Layout-Guided Controllable Pathology Image Generation with In-Context Diffusion Transformers
Organizations: Xi’an Jiaotong University
Abstract
Controllable pathology image synthesis requires reliable regulation of spatial layout, tissue morphology, and semantic detail. However, existing text-guided diffusion models offer only coarse global control and lack the ability to enforce fine-grained structural constraints. Progress is further limited by the absence of large datasets that pair patch-level spatial layouts with detailed diagnostic descriptions, since generating such annotations for gigapixel whole-slide images is prohibitively time-consuming for human experts. To overcome these challenges, we first develop a scalable multi-agent LVLM annotation framework that integrates image description, diagnostic step extraction, and automatic quality judgment into a coordinated pipeline, and we evaluate the reliability of the system through a human verification process. This framework enables efficient construction of fine-grained and clinically aligned supervision at scale. Building on the curated data, we propose In-Context Diffusion Transformer (IC-DiT), a layout-aware generative model that incorporates spatial layouts, textual descriptions, and visual embeddings into a unified diffusion transformer. Through hierarchical multimodal attention, IC-DiT maintains global semantic coherence while accurately preserving structural and morphological details. Extensive experiments on five histopathology datasets show that IC-DiT achieves higher fidelity, stronger spatial controllability, and better diagnostic consistency than existing methods. In addition, the generated images serve as effective data augmentation resources for downstream tasks such as cancer classification and survival analysis.
Figures & tables
| Methods | BLCA | BRCA | GBMLGG | LUAD | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Vanilla FID | CLIP FID | Similarity | Vanilla FID | CLIP FID | Similarity | Vanilla FID | CLIP FID | Emb Similarity | Vanilla FID | CLIP FID | Similarity | |
| 20x Magnification | ||||||||||||
| MFDiffusion | 115.73 | 101.88 | 0.24 | 104.72 | 94.31 | 0.29 | 127.90 | 115.43 | 0.18 | 145.72 | 131.93 | 0.15 |
| Medfusion | 57.62 | 50.09 | 0.33 | 68.52 | 59.02 | 0.31 | 70.59 | 66.33 | 0.27 | 73.48 | 67.65 | 0.24 |
| Pathldm | 18.62 | 15.47 | 0.46 | 21.38 | 17.59 | 0.43 | 22.54 | 19.41 | 0.41 | 24.10 | 22.03 | 0.38 |
| SSL-guided LDM | 10.47 | 7.43 | 0.56 | 12.57 | 8.41 | 0.49 | 14.59 | 13.36 | 0.46 | 15.03 | 14.17 | 0.44 |
| Methods | BLCA | BRCA | GBMLGG | LUAD |
|---|---|---|---|---|
| 20x Magnification | ||||
| ControlNet | 20.67 | 19.76 | 20.03 | 20.34 |
| PathDiff | 22.48 | 21.35 | 21.92 | 22.15 |
| IC-DiT | 24.83 | 24.64 | 23.72 | 25.67 |
| 5x Magnification | ||||
| ControlNet | 17.23 | 18.91 | 17.34 | 18.45 |
| Methods | BLCA | BRCA | GBMLGG | LUAD |
|---|---|---|---|---|
| 20x Magnification | ||||
| Diffmix | 0.7123 | 0.7312 | 0.7089 | 0.7245 |
| SDM | 0.6532 | 0.6891 | 0.6245 | 0.6978 |
| ControlNet | 0.7425 | 0.7034 | 0.7289 | 0.7167 |
| PathDiff | 0.7856 | 0.7912 | 0.7734 | 0.8015 |
| IC-DiT | 0.8319 | 0.8412 | 0.8352 | 0.8363 |
| Components | BLCA | BRCA | GBMLGG | LUAD | ||
|---|---|---|---|---|---|---|
| Global Caption | Layout | Embeddings Similarity | Vanilla FID | Vanilla FID | Vanilla FID | Vanilla FID |
| 74.59 | 79.02 | 76.60 | 80.45 | |||
| 70.05 | 72.31 | 72.29 | 76.53 | |||
| 12.15 | 15.77 | 18.68 | 20.03 | |||
| 66.14 | 67.51 | 68.20 | 73.37 | |||
| 10.09 | 12.41 | 14.57 | 17.30 | |||
| Methods | Train Data | Datasets | ||||
|---|---|---|---|---|---|---|
| BLCA | BRCA | GBMLGG | LUAD | UCEC | ||
| Porpoise | Real | 0.6461 0.0338 | 0.6207 0.0544 | 0.8479 0.0128 | 0.6403 0.0412 | 0.6918 0.0488 |
| w/PathDiff | Synth | 0.5735 0.0273 | 0.5581 0.0373 | 0.7383 0.0470 | 0.5637 0.0509 | 0.6049 0.0286 |
| w/PathDiff | Real+Synth | 0.6523 0.0179 | 0.6291 0.0307 | 0.8585 0.0288 | 0.6524 0.0283 | 0.6997 0.0416 |
| w/IC-DiT | Synth | 0.5970 0.0319 | 0.5891 0.0274 | 0.7613 0.0482 | 0.5933 0.0144 | 0.6318 0.0337 |
| w/IC-DiT | Real+Synth | 0.6694 0.0456 | 0.6440 0.0734 | 0.8702 0.0173 | 0.6636 0.0556 | 0.7151 0.0659 |
| Methods | Train Data | Datasets | |||||
|---|---|---|---|---|---|---|---|
| BLCA | BRCA | GBMLGG | LUAD | UCEC | Avg. | ||
| ViLa-MIL | Real | 84.59 | 81.06 | 90.35 | 82.06 | 91.52 | 85.92 |
| w/PathDiff | Synth | 78.41 | 74.53 | 85.99 | 76.28 | 87.65 | 80.57 |
| w/PathDiff | Real+Synth | 85.26 | 82.34 | 90.69 | 83.44 | 91.80 | 86.71 |
| w/IC-DiT | Synth | 80.48 | 77.13 | 87.49 | 79.05 | 89.08 | 82.66 |
| w/IC-DiT | Real+Synth | 88.10 | 84.73 | 91.58 | 84.13 | 92.30 | 88.17 |
Image Generation
Image generation studies models that create or edit images from text, examples, layouts, and other structured controls.
See all 463 papers