Latent Diffusion for Semi-Supervised Domain Adaptation in Pathology

Model weights accompanying Semi-Supervised Domain Adaptation with Latent Diffusion for Pathology Image Classification.

Model Description

This work uses a latent diffusion model to generate synthetic pathology images for semi-supervised domain adaptation. The model is trained using unlabeled images from both source and target domains and conditions generation on foundation model features, cohort identity, and tissue preparation method.

The approach aims to preserve source-domain tissue morphology while incorporating target-domain appearance. Generated images are combined with labeled source-domain images to train a downstream classifier.

The latent diffusion implementation is adapted from PathLDM.

Released Checkpoints

File Description Matching configuration
last.ckpt The LDM weights used in the manuscript 2_ldm/configs/latent-diffusion/feature_cond/uni_and_others_from_scratch_concat.yaml

Training and Evaluation

The GitHub repository provides instructions for autoencoder and diffusion-model training, FID-statistics calculation, and downstream classification experiments.

Reported performance on the held-out target-cohort test set:

Metric Baseline With proposed augmentation
Weighted F1 0.611 0.706
Macro F1 0.641 0.716

Getting Started

Use the accompanying code repository to set up the environment:

git clone https://github.com/hsu-lab/ldm-pathology-ssda.git
cd ldm-pathology-ssda/2_ldm
conda env create -f environment_olivia.yaml
conda activate ldm

Download the checkpoint files from this model repository.

From 2_ldm, use a config matching the trained checkpoint and set data.params.validation to the dataset providing sampling features and conditions:

CUDA_VISIBLE_DEVICES=0 python sample_images_lmdb.py \
  --config_path /path/to/sampling_config.yaml \
  --ckpt_path /path/to/model.ckpt \
  --output_dir /path/to/generated_samples \
  --batch_size 16 \
  --scale 1.5

Citation

@article{zhang2026semisupervised,
  title={Semi-Supervised Domain Adaptation with Latent Diffusion for Pathology Image Classification},
  author={Zhang, Tengyue and Ding, Ruiwen and Zhuang, Luoting and Wu, Yuxiao and Rodriguez, Erika F. and Hsu, William},
  journal={arXiv preprint arXiv:2601.17228},
  year={2026},
  url={https://arxiv.org/abs/2601.17228}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for hsu-lab/ldm-pathology-ssda