Abstract
Deep learning models for medical image segmentation require large amounts of annotated data, which is often difficult to acquire. While diffusion models can generate synthetic data, they typically face a trade-off between the high fidelity of image-guided models and the high diversity of mask-only models. We introduce Siamese-Diffusion, a framework that bridges this gap using a dual-branch training strategy and a novel Noise Consistency Loss. By aligning mask-based generation with image-guided anchors during training, the model learns to produce high-textured, morphologically realistic images from simple masks alone. Our method demonstrates significant improvements in both image realism (FID) and downstream segmentation performance across multiple medical imaging datasets.
Introduction
The scarcity of high-quality annotated medical datasets is a major bottleneck in developing robust segmentation models for clinical applications, such as identifying polyps or skin lesions. Synthetic data generation via Diffusion Models has emerged as a promising solution. However, current approaches generally fall into two categories:
- Mask-only models, which offer high diversity but often lack the fine morphological details and realistic textures necessary for effective training.
- Image-mask models, which produce high-fidelity images but suffer from low diversity as they remain too closely tied to the reference images.
Siamese-Diffusion aims to achieve the "best of both worlds"—the fidelity of image-guided models combined with the creative diversity of mask-only generation.
Methodology: The Siamese-Diffusion Framework
The core of our approach is a dual-branch architecture that shares underlying diffusion model parameters during training.
Dual-Branch Training
- Mask-Diffusion: Learns to synthesize images based solely on a shape mask.
- Image-Diffusion: Learns to generate images using both a mask and an original image as a prior, providing a high-fidelity "anchor."
Noise Consistency Loss ($L_c$)
The "secret sauce" of Siamese-Diffusion is the Noise Consistency Loss. During training, the noise predicted by the high-fidelity Image-Diffusion branch acts as a target. The model forces the Mask-Diffusion branch to align its noise predictions with this anchor. This process "steers" the mask-only model's parameter space to understand complex textures and intricate morphological details that are usually lost in mask-only training.
Architectural Enhancements
To further improve detail, we implemented a Dense Hint Input (DHI) module. Unlike standard sparse modules, DHI uses denser residual blocks and patch merging to capture high-frequency details like color and texture. Additionally, an Online-Augmentation strategy uses intermediate model predictions to expand the training set dynamically.
Crucially, the Image-Diffusion branch is discarded during the sampling phase. Inference relies solely on the refined Mask-Diffusion branch, allowing for the generation of infinite, realistic variations from arbitrary masks.
Experimental Results
We evaluated Siamese-Diffusion across five datasets, including polyps (Kvasir, CVC-ClinicDB), skin lesions (ISIC2016/2018), and specialized modalities like "Stain" and "Faeces."
Visual Fidelity and Realism
Siamese-Diffusion achieved a state-of-the-art FID (Fréchet Inception Distance) of 62.7, a significant improvement over ControlNet (~70.6). Qualitative assessments by professional clinicians (Mean Opinion Score) also ranked our synthetic images as the most visually convincing.
Downstream Segmentation Performance
The ultimate test of synthetic data is its impact on model training. Integrating Siamese-Diffusion data led to substantial gains:
- Polyps: Boosted SANet performance by 3.6% mDice and 4.4% mIoU.
- Skin Lesions: Improved UNet performance on ISIC2018 by 1.52% mDice.
- Low-Data Regimes: On the "Stain" dataset, our method outperformed ControlNet by over 11% mDice, demonstrating exceptional robustness when real data is extremely limited.
Discussion and Conclusion
Siamese-Diffusion shifts the focus of diffusion guidance from the sample space during inference to the parameter space during training. By baking the "knowledge" of realistic textures into the model weights, we eliminate the need for reference images at test time while maintaining high diversity.
One observed limitation is the "long-tail problem": while synthetic data initially boosts performance, gains tend to peak at a 3x augmentation factor. Beyond this, subtle distribution shifts between synthetic and real data may introduce bias. Future work will focus on narrowing this distribution gap to enable even larger-scale synthetic augmentation in diverse clinical settings.
Summary updated