CWCD: Category-Wise Contrastive Decoding for Structured Medical Report Generation

Shantam Srivastava, Mahesh Bhosale, David Doermann, Mingchen Gao

TL;DR

This paper introduces Category-Wise Contrastive Decoding (CWCD), a novel method to improve automated radiology report generation (RRG) from chest X-rays. CWCD addresses the tendency of current models to "hallucinate" or generate spurious findings by focusing on specific anatomical categories and using a contrastive decoding approach that masks relevant image regions. The method significantly outperforms existing models in both generating natural-sounding and clinically accurate reports.

What Problem Does This Paper Address?

Interpreting chest X-rays is complex due to overlapping anatomical structures and subtle disease presentations, making it a time-consuming task even for experienced radiologists. While large multimodal models (MLLMs) have shown promise in automating radiology report generation (RRG), they often struggle with a key limitation: as they generate longer reports, their attention shifts away from the visual information in the X-ray and towards learned language priors. This can lead to "spurious co-occurrences," where the model generates findings that often appear together in training data but aren't actually present in the specific X-ray. This is akin to a model confidently stating a patient has both cardiomegaly and pulmonary edema simply because they frequently co-occur, even if the X-ray only shows one or neither. This issue can lead to inaccurate and misleading reports, a critical problem in medical diagnostics.

Methods

CWCD tackles this problem with two main innovations:

  1. Category-Specific Parameterization: Instead of generating a report in one go, CWCD breaks down the report generation into eight distinct anatomical categories (e.g., Lungs and Airways, Pleura, Cardiovascular). For each category, it uses specialized, lightweight adapters (LoRA) trained on that specific category's data. This allows the model to focus its attention on the relevant visual information for each part of the report, preventing the dilution of attention over the entire image.
  2. Masked Contrastive Decoding (MCD): This is the core of the approach. During inference, for each category, CWCD masks out the pixels in the X-ray corresponding to that category's anatomical region. It then performs two forward passes: one with the original X-ray (base probability) and one with the masked X-ray (masked probability). By contrasting these two distributions, CWCD penalizes tokens that are likely to be generated based on language priors alone (when the relevant visual information is masked) and rewards tokens that are strongly supported by the visible visual evidence. This encourages the model to ground its generation in the actual image content, reducing hallucinations.

The paper also introduces Plausibility-Based Vocabulary Subselection to refine MCD. This step filters out low-probability tokens before the contrastive decoding, ensuring that common-sense or grammatically correct tokens aren't unduly penalized, thus maintaining fluency.

Datasets

  • MIMIC-CXR: A large, publicly available dataset of de-identified chest X-rays and their corresponding free-text radiology reports. This dataset was used for training and evaluation.
  • SRRG-Findings: A dataset derived from MIMIC-CXR and CheXpert-Plus, where reports are structured into eight anatomical categories. This was used for training the category-specific adapters.
  • LATTE-CXR: A dataset containing bounding-box annotations for abnormalities in chest X-rays, derived from eye-tracking data and expert annotations. This was used to generate the category-specific masks for the contrastive decoding process.
  • IU-Xray: A publicly available chest X-ray dataset from Indiana University, used for out-of-distribution (OOD) evaluation to test the model's generalization capabilities.

Key Insights and Ideas

  • Attention Decay is a Core Problem: The paper provides compelling evidence (Figure 2 and Appendix A) that standard MLLMs suffer from a significant decay in attention to image tokens as report generation progresses. This is a fundamental limitation that CWCD directly addresses.
  • Category-Specific Focus is Key: Breaking down the report generation by anatomical category, rather than treating the entire report as a single sequence, significantly improves performance. This allows the model to leverage visual information more effectively for each specific finding.
  • Masking for Grounding: The core idea of masking relevant image regions to force the model to rely on visual evidence for specific findings is a powerful technique for reducing hallucinations and improving clinical accuracy.
  • Contrastive Decoding for Medical Reports: While contrastive decoding has been used for natural language generation, its application to medical reports, specifically by masking image regions, is a novel contribution.

Key Results

CWCD consistently outperformed baseline models across various metrics:

  • NLG Metrics: CWCD achieved the highest scores in BLEU-1-4, BERTScore, and ROUGE-L, indicating more fluent, coherent, and semantically aligned reports. For example, it achieved a BLEU-4 score of 6.60, significantly higher than the best baseline (LLaVA-Rad) at 4.74.
  • Clinical Efficacy Metrics: CWCD also showed superior performance in clinical validity, with the highest F1RadGraph scores and improved precision and recall. It achieved an F1RadGraph score of 24.60 and an overall F1 score of 62.51, outperforming baselines like LLaVA-Rad (F1: 62.12).
  • Out-of-Distribution Performance: CWCD demonstrated strong generalization on the IU-Xray dataset, achieving the best performance on 11 out of 14 metrics, highlighting its robustness.

Limitations and Future Work

  • Computational Cost: The inference process for CWCD is computationally more expensive than standard decoding because it requires multiple forward passes (one for each category, and two per token within each category). This makes the inference process time-intensive.
  • Reliance on Automated Classification: The pipeline relies on an automated anatomical classification step to identify regions for masking. Errors in this classification could propagate and affect report generation quality.
  • Potential for Introduced Biases: Since the structured reports are derived from existing language models, there's a risk that subtle inconsistencies or biases from those models might be introduced into the training data.

Future work could explore more efficient masking strategies, investigate methods to mitigate potential biases from automated classification, and further refine the contrastive decoding process for even greater accuracy and efficiency.

Summary updated

BibTeX
@inproceedings{srivastava2026cwcd,
  author = {Shantam Srivastava and Mahesh Bhosale and David Doermann and Mingchen Gao},
  title = {{CWCD: Category-Wise Contrastive Decoding for Structured Medical Report Generation}},
  booktitle = {MIDL},
  year = {2026},
  url = {https://openreview.net/forum?id=XcsjdD3inB},
}
Figure