Sample-Specific Debiasing for Better Image-Text Models

Peiqi Wang, Yingcheng Liu, Ching-Yun Ko, William M. Wells Iii, Seth J. Berkowitz, Steven Horng, Polina Golland

Abstract

Self-supervised representation learning on image-text data facilitates crucial medical applications, such as image classification, visual grounding, and cross-modal retrieval. One common approach involves contrasting semantically similar (positive) and dissimilar (negative) pairs of data points. Drawing negative samples uniformly from the training data set introduces false negatives, i.e., samples that are treated as dissimilar but belong to the same class. In healthcare data, the underlying class distribution is nonuniform, implying that false negatives occur at a highly variable rate. To improve the quality of learned representations, we develop a novel approach that corrects for false negatives. Our method can be viewed as a variant of debiased contrastive learning that uses estimated sample-specific class probabilities. We provide theoretical analysis of the objective function and demonstrate the proposed approach on both image and paired image-text data sets. Our experiments illustrate empirical advantages of sample-specific debiasing.

Introduction: The False Negative Problem

Contrastive learning, the foundation for models like CLIP, relies on distinguishing "positive" pairs (e.g., an image and its matching caption) from "negative" pairs (e.g., an image and a random caption). In the embedding space, the model learns to pull positive pairs together and push negative pairs apart.

However, a significant issue arises when a randomly selected negative sample actually shares the same semantic meaning as the positive sample—a "False Negative." For instance, if the anchor text is "Heart is enlarged" and the randomly drawn negative image also exhibits cardiomegaly, the model is incorrectly penalized for placing them close together in the embedding space.

Illustration of the false negative problem in medical contrastive learning. A randomly drawn negative sample (red border) may share the same pathology as the anchor text.

In general computer vision, this is often negligible due to the high number of classes. In the medical domain, however, class distributions are highly non-uniform. Common conditions like cardiomegaly may appear in up to 25% of reports, while rare conditions appear in less than 1%. Standard debiasing methods typically assume a uniform class distribution, applying a constant correction factor that fails to account for this high variance.

Methodology: Sample-Specific Debiasing

The authors propose Sample-Specific Debiasing (DCL-$\eta_{LM}$). This method extends Debiased Contrastive Learning (DCL) by replacing the constant hyperparameter $\eta$ (the assumed class probability) with a sample-specific function $\eta(x)$.

The process involves three key steps:

  1. Likelihood Estimation: A pre-trained Language Model (CXR-BERT) calculates the likelihood of a text description, $p_{LM}(x)$.
  2. Probability Mapping: The text likelihood is mapped to an estimated class probability using a log-linear relationship: $\eta(x) = a \cdot p_{LM}(x)^k$.
  3. Adaptive Correction: This probability is integrated into the contrastive loss function. Common findings receive a stronger correction to mitigate the high risk of false negatives, while rare findings receive minimal correction.

Theoretical analysis (Proposition 1) demonstrates that using sample-specific probabilities provides a tighter bound on the loss function's approximation error compared to a fixed constant.

Experimental Setup and Datasets

The method was evaluated across several benchmarks:

  • CIFAR10-r: A controlled version of CIFAR10 with non-uniform class subsampling.
  • MIMIC-CXR: A massive dataset of over 234,000 chest X-rays and radiology reports.
  • MS-CXR: Used for visual grounding and cross-modal retrieval evaluation.

Results and Discussion

The proposed DCL-$\eta_{LM}$ consistently outperformed state-of-the-art baselines like BioViL and LSE+NL.

Performance Metrics

  • Zero-Shot Classification (CheX5): Achieved an average AUC of 0.862, significantly higher than BioViL (0.783). It showed remarkable gains in rare conditions like Pneumothorax (0.760 vs. 0.526).
  • Visual Grounding: Improved the Contrast-to-Noise Ratio (CNR) to 1.486 (from 1.142), indicating superior localization of pathologies.
  • Cross-Modal Retrieval: Reduced the Median Rank (MedR) for correct matches from 151 to 106.

Key Insights

The core innovation lies in using the text itself as a frequency signal. A language model can effectively "inform" the contrastive objective about the likelihood of a collision with a random negative sample. This approach breaks the performance trade-off seen in standard debiasing, where a high constant $\eta$ helps common findings but penalizes rare ones. Furthermore, the method introduces minimal computational overhead compared to clustering-based debiasing.

Conclusion and Future Work

While effective, the method currently relies on associated text to estimate probabilities, making it less applicable to image-only datasets. Future research could explore more complex mappings for $\eta_{LM}$ and extend theoretical bounds to grounding and retrieval tasks. Nonetheless, sample-specific debiasing represents a significant step forward in building robust medical AI models.

Summary updated

BibTeX
@inproceedings{wang2023sample,
  author = {Peiqi Wang and Yingcheng Liu and Ching-Yun Ko and William M. Wells III and Seth J. Berkowitz and Steven Horng and Polina Golland},
  title = {{Sample-Specific Debiasing for Better Image-Text Models}},
  booktitle = {MLHC},
  year = {2023},
  url = {https://openreview.net/forum?id=ckyfnSvuDW},
}
Figure