Contrastive Learning with Counterfactual Explanations for Radiology Report Generation

Mingjie Li, Haokun Lin, Liang Qiu, Xiaodan Liang, Ling Chen +2 more
2/14/2026

No official code found. Best implementation: mlii0117/CoFE (18 stars, MIT, last commit 2025-04-03).

Abstract

Due to the common content of anatomy, radiology images with their corresponding reports exhibit high similarity. Such inherent data bias can predispose automatic report generation models to learn entangled and spurious representations resulting in misdiagnostic reports. To tackle these, we propose a novel \textbf{Co}unter\textbf{F}actual \textbf{E}xplanations-based framework (CoFE) for radiology report generation. Counterfactual explanations serve as a potent tool for understanding how decisions made by algorithms can be changed by asking ``what if'' scenarios. By leveraging this concept, CoFE can learn non-spurious visual representations by contrasting the representations between factual and counterfactual images. Specifically, we derive counterfactual images by swapping a patch between positive and negative samples until a predicted diagnosis shift occurs. Here, positive and negative samples are the most semantically similar but have different diagnosis labels. Additionally, CoFE employs a learnable prompt to efficiently fine-tune the pre-trained large language model, encapsulating both factual and counterfactual content to provide a more generalizable prompt representation. Extensive experiments on two benchmarks demonstrate that leveraging the counterfactual explanations enables CoFE to generate semantically coherent and factually complete reports and outperform in terms of language generation and clinical efficacy metrics.

View on arXivView PDF

Code Implementations(1)

mlii0117/CoFECommunity65%
MIT

Official Code for Contrastive Learning with Counterfactual Explanations for Radiology Report Generation (ECCV 2024)

180Shell, PythonJul 10, 20241 years agoMIT

Similar Papers

Cite this paper

@article{li2026contrastive,
  title  = {Contrastive Learning with Counterfactual Explanations for Radiology Report Generation},
  author = {Mingjie Li and Haokun Lin and Liang Qiu and Xiaodan Liang and Ling Chen and Abdulmotaleb Elsaddik and Xiaojun Chang},
  year   = {2026},
  eprint = {2407.14474},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2407.14474},
  journal = {ECCV 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.14474.svg)](https://codeofpaper.com/paper/2407.14474)

Discussion