Diff-CXR: Report-to-CXR generation through a disease-knowledge enhanced diffusion model

Peng Huang, Bowen Guo, Shuyu Liang, Junhu Fu, Yuanyuan Wang, Yi GuoarXiv 2024 · DOI

Generating realistic images from text prompts has seen significant progress with models like Stable Diffusion. However, applying these techniques to the medical domain, specifically for generating Chest X-rays (CXRs) from clinical reports, presents unique challenges. In the paper "Diff-CXR: Report-to-CXR generation through a disease-knowledge enhanced diffusion model," researchers from Fudan University propose a specialized framework designed to handle the complexities of medical data and produce pathologically accurate images.

Challenges in Medical Text-to-Image Generation

The transition from general-purpose text-to-image (TTI) generation to medical applications is hindered by three primary characteristics of medical data:

  1. Noisy Data: Medical datasets often contain "noisy" samples, such as blurred images, misaligned report-image pairs, or images with significant artifacts (e.g., medical tubing and wires). These outliers can lead to overfitting and degrade the quality of generated images.
  2. Verbose Reports: Clinical reports are typically long and contain substantial "fluff"—text that describes procedures or comparisons to previous studies rather than visual findings. This verbosity increases computational costs and can distract models from relevant pathological information.
  3. Pathological Precision: Capturing the subtle visual manifestations of specific diseases (e.g., consolidation, pleural effusion) is critical. Standard TTI models often lack the "medical common sense" required to accurately represent these features.
Figure 1: Characteristics of medical data highlighting noisy images, verbose clinical reports, and the importance of disease-specific information.

The Diff-CXR Framework

To address these hurdles, the authors introduce Diff-CXR, a diffusion-based framework built on a U-ViT backbone. The framework incorporates three novel strategies to enhance data quality, text representation, and pathological accuracy.

Figure 2: Overview of the Diff-CXR framework, including the Latent Noise Filtering Strategy, Adaptive Vision-Aware Textual Learning, and Disease-Knowledge Injection Mechanism.

1. Latent Noise Filtering Strategy (LNFS)

LNFS employs a coarse-to-fine approach to clean training data. It first uses K-means clustering in the latent space to identify coarse outliers. Subsequently, an autoencoder identifies images that deviate from the "normal" data manifold based on reconstruction error. Finally, a discriminator provides fine-grained supervision to ensure only high-quality, representative samples are used for training.

2. Adaptive Vision-Aware Textual Learning (AVA-TLS)

To manage lengthy reports, Diff-CXR utilizes a domain-specific Vision-Language Model (BiomedCLIP) paired with an "information squeeze" module. This module uses contrastive learning to compress a report (often 256 tokens) into a compact set of 77 "visually essential" tokens. This ensures the model focuses on text that directly corresponds to visual features in the CXR.

3. Disease-Knowledge Injection Mechanism (DKIM)

DKIM acts as a "control adapter" to refine pathological details. It uses a labeler (CheXbert) to extract standardized disease labels from the report, which are then mapped to template-based prompts (e.g., "There is consolidation"). This explicit disease knowledge is injected into the diffusion process, guiding the model to generate medically accurate findings.

Experimental Results

The model was evaluated on the MIMIC-CXR and IU-Xray datasets. Diff-CXR demonstrated superior performance across several key dimensions:

  • Image Fidelity: On MIMIC-CXR, it achieved a Fréchet Inception Distance (FID) of 19.50, a significant improvement over the previous state-of-the-art (LLM-CXR at 29.27).
  • Medical Accuracy: The generated images were validated using disease classifiers, achieving a Mean AUC (mAUC) of 0.678, indicating high alignment between the generated visual pathologies and the input reports.
  • Computational Efficiency: Diff-CXR is remarkably efficient, operating at 29.64 GFLOPs—approximately 1/9th the complexity of LLM-CXR. Inference is also significantly faster, taking only 1.3 seconds.

Key Insights

A notable finding of this research is the "less is more" approach to text. Compressing reports actually improved text-image alignment by removing non-visual information. Furthermore, the authors demonstrated the utility of synthetic data: a classifier trained on just 1% real data supplemented with Diff-CXR synthetic data performed nearly as well as one trained on 100% real data. This highlights the potential of Diff-CXR to mitigate data scarcity issues in medical AI.

Conclusion

Diff-CXR represents a significant step forward in medically-grounded image generation. By explicitly addressing data noise, report verbosity, and disease knowledge, it produces high-fidelity CXRs that are both visually realistic and clinically relevant. Future work will focus on expanding the framework to other modalities like CT or MRI and incorporating additional conditioning inputs like anatomical segmentation masks.

Summary updated

BibTeX
@misc{huang2024diff,
  author = {Peng Huang and Bowen Guo and Shuyu Liang and Junhu Fu and Yuanyuan Wang and Yi Guo},
  title = {{Diff-CXR: Report-to-CXR generation through a disease-knowledge enhanced diffusion model}},
  year = {2024},
  eprint = {2410.20165},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.20165},
}
Figure