Source-linked AI summary

Healthy Counterfactual Generation via Diffusion Inpainting for Mammography Classification

Inês Cruchinho Garcia, Mariana Mourão, Francisco Maria Calisto, Carlos Santiago, Jacinto Nascimento

arXiv:2610.12147v1cs.CV

TL;DR

False negatives and the possibility of CAD relying on spurious rather than lesion-specific cues motivate this work. It uses healthy-image diffusion and RePaint inpainting to create lesion-free counterfactuals for training, with sensitivity gains across diverse classifiers, particularly at 80% specificity.

  • Problem

    Breast-cancer CAD faces false negatives and concerns that predictions may rely on spurious correlations rather than clinically meaningful lesion cues.

    Source: §1 · pp. 1–2
  • Method

    The framework trains a DDPM on healthy mammograms and applies RePaint to inpaint annotated lesion regions, producing counterfactuals for classifier training.

    Source: §5 · p. 8
  • Results

    Sensitivity improved across diverse architectures, particularly at 80% specificity; gains in F1-score, balanced accuracy, and ROC-AUC were more modest, while specificity slightly decreased for some models.

    Source: §5 · p. 9
  • Takeaways & Limitations

    Healthy counterfactual augmentation is presented as a strategy for reducing missed detections in mammography classification.

    Source: §1 · p. 2

    Source mammograms had quality limitations, including low contrast, unrealistic soft-tissue appearance, implausible axillary superposition, and incomplete breast coverage, which may contribute to perceived lack of realism.

    Source: Expert Reader Study · p. 6

Abstract

from arXiv · show

False negatives remain a critical limitation of computer-aided diagnosis (CAD) systems for breast cancer screening due to delayed detection and treatment. To address this issue, we propose a counterfactual data augmentation strategy that generates healthy mammograms by "erasing" lesions from anomalous images, thereby enriching the training distribution. We train a Denoising Diffusion Probabilistic Model on BI-RADS 1 (healthy) mammograms and use a RePaint-based sampling strategy to inpaint realistic normal tissue within annotated lesion bounding boxes. The resulting healthy counterfactuals replace annotated lesion regions with realistic healthy tissue while preserving patient-specific anatomical structure, as supported by similarity metrics between real and generated images. Image realism was further assessed by radiologists and found to be consistent with the original dataset quality. We evaluate counterfactual augmentation across four representative classifier architectures: a convolutional neural network (ConvNeXt), a vision transformer (ViT), a vision-language model pre-trained on mammogram-report pairs (Mammo-CLIP) and a multi-scale attention-based multiple-instance learning framework (FPN-MIL). Experiments conducted on the VinDr-Mammo dataset show improvements in sensitivity across all architectures, particularly at 80\% fixed specificity, contributing towards more reliable CAD systems for breast cancer. Code is available at: https://github.com/ines03garcia/diffusion-based-counterfactual-generation.

1 Introduction

Missed breast-cancer detections and predictions based on spurious rather than clinically meaningful evidence motivate more reliable CAD. The paper proposes localized healthy counterfactual inpainting and evaluates its use for classifier augmentation, reporting sensitivity gains particularly at 80% specificity.

1 Introduction

  • False negatives are associated with delayed diagnosis and worse outcomes, while CAD predictions may rely on spurious correlations rather than lesion-specific cues.For clinical deployment, the introduction says systems should improve sensitivity and base predictions on regions of interest.Source: §1 · pp. 1–2
  • The study addresses the underexplored use of healthy counterfactuals for augmentation by replacing annotated lesion regions while preserving surrounding anatomy.The method generates plausible normal counterparts of abnormal images rather than synthesizing lesions.Source: §1 · p. 2
  • The approach is evaluated across four classifier architectures with distinct inductive biases: ConvNeXt, ViT, Mammo-CLIP, and FPN-MIL.The selected models span convolutional, transformer, mammography-specific image-encoder, and multiple-instance-learning approaches.Source: §1 · p. 2
  • Sensitivity gains over standard augmentation baselines are consistent, particularly at 80% specificity on VinDr-Mammo.The passage presents this operating point as clinically relevant and frames the strategy as supporting fewer missed detections.Source: §1 · p. 2

2 Method

The method learns healthy breast-tissue appearance with a DDPM, uses RePaint to inpaint annotated lesion regions, and adds the resulting counterfactuals to classifier training.

2 Method

  • The three-stage pipeline trains on healthy mammograms, inpaints lesion regions using bounding-box-derived masks, and incorporates generated counterfactuals into classifier training.The pipeline overview identifies the DDPM as the healthy-tissue model and RePaint as the mask-guided inpainting step.Source: §2 · p. 2, Figure 1 · p. 3

2.1 Denoising Diffusion Probabilistic Model (DDPM)

  • A DDPM with a U-Net learns normal breast anatomy by predicting injected Gaussian noise during training and iteratively denoising random noise at inference.Training uses BI-RADS 1 mammograms exclusively, with an MSE noise-prediction objective.Source: §2.1 · p. 3

2.2 RePaint Inpainting

  • RePaint re-noises known pixels at each step and updates masked regions through the learned reverse transition, combining preserved tissue with newly generated content.The element-wise update uses the mask to combine the preserved region and the newly generated image content.Source: §2.2 · p. 3

3 Experiments

Experiments use VinDr-Mammo and generate lesion-free counterfactuals with a healthy-image DDPM and RePaint. The counterfactuals are added to training data across four classifier architectures.

3.1 Dataset

  • VinDr-Mammo contributes 5,000 exams and 20,000 mammograms, split into 16,000 training and 4,000 test images.Each exam contains four standard CC and MLO views; images were resized to 512 × 512 for generation and later restored to 1520 × 912.Source: §3.1 · pp. 3–4

3.2 Counterfactual Generation

  • The DDPM was trained on BI-RADS 1 images, and RePaint used bounding-box-derived binary masks to replace annotated lesion regions while preserving surrounding tissue.One counterfactual was generated per anomalous annotated mammogram; sampling used 500 respaced timesteps.Source: DDPM Training · p. 4, Sampling using RePaint · p. 4

3.3 Counterfactual Augmentation

  • The evaluation spans ConvNeXt, ViT, Mammo-CLIP, and FPN-MIL, selected to represent different classifier inductive biases.ConvNeXt and ViT used ImageNet-pretrained weights; Mammo-CLIP and FPN-MIL used VinDr-Mammo-pretrained EfficientNet backbones.Source: §3.3 · p. 4
  • Adding one healthy counterfactual per annotated image supplied 1,410 negative samples, increasing the negative class by 13%.Positive-class weights were recalculated after augmentation to reflect the changed class distribution.Source: §3.3 · p. 5

4 Results

Healthy counterfactuals showed broadly comparable but not identical realism to real mammograms, and augmenting training consistently improved classifier sensitivity, especially at 80% specificity. The section also reports model-dependent changes in other metrics and quality variation with density and lesion size.

4.1 Healthy Counterfactual Generation Quality Assessment

  • Distributional FID and FRD results suggested edits remained close to real healthy mammograms, and patch scores were reported as better than a study using different datasets and patch types.The comparison with Osuala et al. was described as indicating competitive realism, despite protocol differences.Source: Distributional Metrics · p. 5, Table 1 · p. 6
  • The blind reader study compared 70 counterfactuals with 30 real healthy mammograms, while six radiologists assessed a balanced subset of 100 synthetic images.Three examples received unanimous 5/5 realism ratings from all reviewing radiologists.Source: Expert Reader Study · p. 6, Figure 3 · p. 7
  • Real and counterfactual mammograms received broadly aligned ratings, although counterfactuals shifted slightly lower for full-image realism and bounding-box healthiness.Both bounding-box rating distributions remained concentrated in the 3–4 range.Source: Expert Reader Study · p. 6, Figure 2 · p. 7

4 Results

  • The reader noted source-dataset defects, and the authors did not perform matched-pair prediction-consistency analysis because its interpretation was limited in this setting.Reported source issues included low contrast, unrealistic soft-tissue appearance, implausible axillary superposition, and incomplete breast coverage.Source: §4 · p. 5, Expert Reader Study · p. 6

4.1 Healthy Counterfactual Generation Quality Assessment

  • Density D cases received the strongest overall realism ratings, while larger masked lesions tended to receive lower ratings.Density C cases had the largest proportion of upper-end ratings compared with densities A and B.Source: Expert Reader Study · pp. 6–7, Figure 4 · p. 8

4.2 Data Augmentation

  • Recall improved across all four classifiers, with gains of 4.6% for ConvNeXt and 1.9% for FPN-MIL; recall at 80% specificity rose by 0.6%–1.3%.Balanced accuracy and F1-score also improved modestly across all models.Source: Classification Performance · p. 7, Table 2 · p. 8
  • ROC-AUC improved modestly for ViT and Mammo-CLIP but remained nearly unchanged for ConvNeXt and FPN-MIL; specificity decreased for three models.Specificity improved slightly for ViT, while sensitivity gains were consistent across models.Source: Classification Performance · pp. 7–8

5 Conclusion

The framework generates patient-specific lesion-free mammograms through diffusion inpainting for augmentation. Across diverse classifiers, augmentation consistently improves sensitivity, particularly at 80% specificity.

  • The framework generated lesion-free counterfactuals by training a DDPM on healthy mammograms and RePaint-inpainting annotated lesions while preserving patient-specific anatomy.Source: §5 · p. 8
  • Distributional metrics and expert reader assessments found generated images consistent with real healthy mammograms.Source: §5 · p. 8
  • Sensitivity improved consistently across diverse classifiers, especially at 80% specificity; F1-score, balanced accuracy, and ROC-AUC gains were more modest, while some models lost specificity.Source: §5 · p. 9
Loading 2610.12147v1…