CCIS-DIFF: A Generative Model with Stable Diffusion Prior for Controlled Colonoscopy Image Synthesis

Yifan Xie, Jingge Wang, Tao Feng, Fei Ma, Yang Li

TL;DR

CCIS-DIFF is a new generative framework that leverages the power of Stable Diffusion to create high-quality, clinically accurate colonoscopy images. By combining a novel "blur mask weighting" strategy with a text-aware attention mechanism, the model allows researchers to generate synthetic polyps that are both seamlessly integrated into the colonic background and strictly adherent to specific clinical descriptions (like color, texture, and swelling).

What Problem Does This Paper Address?

Developing AI for automatic polyp detection is a high-stakes task—missing a polyp during a colonoscopy can lead to undetected colorectal cancer. However, training these models requires massive amounts of high-quality, annotated data. In the medical field, such data is notoriously scarce due to privacy concerns and the high cost of expert annotation.

While researchers have tried using Generative Adversarial Networks (GANs) and Diffusion models to "synthesize" extra training data, existing methods fall short in two ways:

  1. Lack of Control: They often can't precisely place a polyp or dictate its clinical appearance (e.g., "make this polyp look reddish and swollen").
  2. Poor Integration: Synthetic polyps often look like "stickers" pasted onto a background, with harsh edges that don't match the surrounding tissue, leading to "noisy" data that confuses downstream AI models.

Methods

CCIS-DIFF builds upon the ControlNet architecture, using a pre-trained Stable Diffusion v1.5 model as its foundation. The authors introduce two primary innovations to solve the control and realism issues:

  • Blur Mask Weighting Strategy (BMWS): Instead of using a "hard" binary mask for the polyp shape, the model applies a Gaussian blur to the mask edges. It then uses two separate mask encoders and a multi-layer perceptron (MLP) to learn how to blend the polyp features into the background mucosa seamlessly.
  • Text-Aware Attention Mechanism (TAAM): The authors noticed that in standard models, the visual mask often "overpowers" the text prompt, causing the model to ignore descriptions of color or texture. TAAM calculates a similarity matrix between the text tokens and the image pixels, effectively "reminding" the model to pay attention to the clinical description for every part of the generated polyp.

Datasets

The researchers recognized that you can't train a text-controlled model without a text-heavy dataset. Since most colonoscopy datasets only provide images and masks, they built a new multi-modal colonoscopy dataset:

  • Source Data: They pulled image-mask pairs from established benchmarks: EndoScene, CVC-ClinicDB, and Kvasir.
  • LLM Augmentation: They used a LLaMA (Large Language Model) agent to act as a virtual doctor. By feeding the LLM the image-mask pairs, they generated detailed clinical captions describing the polyp's color, shape, texture, and degree of swelling.
  • The Result: A dataset of triplets (Image, Mask, Text) that allows for fine-grained generative training.

Key Insights and Ideas

  • The "Visual Dominance" Bias: A key insight was identifying why previous models failed at text-consistency. In medical imaging, the structural constraint (the mask) is so strong that the diffusion process often "forgets" the nuances of the text prompt. The TAAM module is a surgical fix for this specific imbalance.
  • Seamlessness is Data Quality: In medical AI, "realism" isn't just about looking pretty; it's about the transition zones. If a synthetic polyp doesn't have a realistic boundary with the mucosa, a segmentation model trained on that data will fail when it encounters the subtle transitions of real human tissue.
  • LLMs as Bridge-Builders: The paper demonstrates a clever use of LLMs to "upgrade" legacy datasets. By turning simple masks into rich clinical descriptions, they unlocked the ability to use modern Text-to-Image (T2I) priors for specialized medical tasks.

Key Results

The authors compared CCIS-DIFF against standard ControlNet and Uni-ControlNet using several metrics:

  • Image Quality: CCIS-DIFF achieved an FID (Fréchet Inception Distance) of 71.73, significantly lower (better) than ControlNet’s 87.32, indicating much higher visual realism.
  • Text Alignment: It scored higher on CLIP-score (31.96), proving the generated images actually matched the clinical descriptions.
  • Downstream Utility: This is the "gold standard" test. When they added CCIS-DIFF's synthetic images to the training set of a segmentation model (PraNet), the model's performance on the Kvasir dataset jumped from 89.2 to 92.8 mDice. This proves the synthetic data is "high-fidelity" enough to actually teach a model how to find real polyps.
  • Expert Approval: In a user study with 15 clinical experts, CCIS-DIFF was rated significantly higher for image fidelity and clinical accuracy than competing methods.

Limitations and Future Work

While the paper presents a significant leap forward, a few areas remain for exploration:

  • Base Model Bias: The system relies on Stable Diffusion v1.5, which was trained on general internet images. While fine-tuning helps, the model might still carry "priors" from the natural world that don't perfectly align with internal human anatomy.
  • Computational Cost: Diffusion models are notoriously resource-intensive. The paper notes they used an NVIDIA A100 (40G) for training; adapting this for real-time use or lower-end hardware remains a challenge.
  • Diversity of Pathology: While the model handles "polyps" well, future work could expand the framework to include other colonic conditions like inflammatory bowel disease (IBD) or vascular lesions.

Summary updated

BibTeX
@inproceedings{xie2025ccis,
  author = {Yifan Xie and Jingge Wang and Tao Feng and Fei Ma and Yang Li},
  title = {{CCIS-DIFF: A Generative Model with Stable Diffusion Prior for Controlled Colonoscopy Image Synthesis}},
  booktitle = {ISBI},
  year = {2025},
  url = {https://openreview.net/forum?id=Q9nWCDxZMV},
}

Loading related content...

Figure