Leveraging CLIP for Inferring Sensitive Information and Improving Model Fairness

Miao Zhang, Rumi Chunara · OpenReview

Abstract

Performance disparities of image recognition across different demographic populations are known to exist in deep learning-based models, but previous work has largely addressed such fairness problems assuming knowledge of sensitive attribute labels. To overcome this reliance, previous strategies have involved separate learning structures to expose and adjust for disparities. In this work, we explore a new paradigm that does not require sensitive attribute labels, and evades the need for extra training by leveraging general-purpose vision-language model (VLM), as a rich knowledge source for common sensitive attributes. We analyze the correspondence between VLM predicted and human defined sensitive attribute distribution. We find that VLMs can recognize samples with clear attribute information encoded in image representations, thus capture under-performed samples conflicting with attribute-related bias. We train downstream target classifiers by re-sampling and augmenting under-performed attribute groups. Extensive experiments on multiple benchmark facial attribute classification datasets show fairness gains of the model over existing unsupervised baselines that tackle with arbitrary bias. The work indicates that vision-language models can extract discriminative sensitive information prompted by language, and be used to promote model fairness.

Introduction

Deep learning models often exhibit performance disparities across demographic groups, typically due to imbalanced representations or spurious correlations in training data (e.g., associating "doctor" with "male"). Addressing these biases usually requires explicit labels for sensitive attributes like race, age, or gender—labels that are often scarce, expensive, or legally restricted.

Existing unsupervised fairness methods often rely on heuristics, such as upweighting high-loss samples. However, these proxy-based approaches lack a direct mathematical connection to specific fairness definitions, making it difficult to guarantee that a model will achieve specific goals like Equal Opportunity across groups. This paper introduces a framework to directly optimize parity metrics by leveraging Vision-Language Models (VLMs) like CLIP to generate "soft" attribute signals, bypassing the need for ground-truth sensitive labels.

Methodology

The proposed approach shifts from proxy-based optimization to direct, metric-specific optimization through two primary steps:

  1. Sensitive Attribute Estimation via VLMs: Instead of discrete labels, a pre-trained VLM (e.g., CLIP) computes a "soft relevancy score" ($c$) for each image. This is achieved by prompting the VLM with contrasting text pairs, such as "A photo of a young person" versus "A photo of an old person."
  2. Mathematically Grounded Loss Functions: Specific penalty terms are derived based on the Pearson Correlation Coefficient (PCC) between the model’s predicted probabilities and the VLM's soft scores.
  3. Equal Opportunity ($\mathcal{L}_{EOp}$): Penalizes correlation within positive-class samples.
  4. Equalized Odds ($\mathcal{L}_{EOd}$): Extends the penalty across all target classes.
  5. Accuracy Parity ($\mathcal{L}_{AP}$): Combines correlation penalties with terms minimizing accuracy differences between predicted classes.

This configurable objective allows practitioners to target the fairness metric most relevant to their application.

Experimental Evaluation

The framework was evaluated on three benchmark datasets:

  • CelebA: 200k facial images focusing on "Blond hair" and "Attractive" targets with "Male" and "Young" as sensitive attributes.
  • UTKFace: 23k images annotated for Age, Gender, and Race to test multi-category parity.
  • Dogs and Cats: A generalizability test using fur color (bright vs. dark) as a sensitive attribute for species recognition.

Results and Discussion

Superior Fairness Gains

Quantitative results demonstrate that the proposed method significantly outperforms existing state-of-the-art debiasing methods. For instance, on the CelebA "Blond hair" task, the Equal Opportunity gap ($EOp$) was reduced from 0.493 (ERM) to 0.0942, as detailed in the performance comparison below.

Table 1: Comparison of Equal Opportunity (EOp) gaps across different methods and target attributes. Lower is better.

Accuracy Preservation and Improvement

A significant finding is that fairness constraints do not necessarily degrade model performance. In many cases, forcing the model to ignore spurious correlations (like gender) compelled it to learn more robust features, leading to improved average group accuracy.

Figure 1: Average group accuracy across various target attributes for ERM and the proposed fairness-constrained methods.

Key Insights

  • Soft Signals vs. Hard Labels: Continuous scores from VLMs capture nuance and uncertainty better than discrete pseudo-labels, providing a smoother regularization signal.
  • Robustness to Noise: The method remains effective even with imperfect VLM signals; experiments showed significant gains even when 30% Gaussian noise was added to the VLM scores.
  • VLM Agnostic: The framework is flexible, yielding comparable improvements using various VLMs like BLIP or ALIGN.

Conclusion

This work demonstrates that vision-language models can effectively extract discriminative sensitive information to promote model fairness without requiring explicit labels. While the current framework focuses on parity-based metrics and requires manual prompt engineering, it establishes a robust foundation for direct fairness optimization. Future research may extend these correlation-based regularizations to more complex tasks like object detection and explore automated prompt generation to further reduce manual setup.

Summary updated

Abstract

Performance disparities of image recognition across different demographic populations are known to exist in deep learning-based models, but previous work has largely addressed such fairness problems assuming knowledge of sensitive attribute labels. To overcome this reliance, previous strategies have involved separate learning structures to expose and adjust for disparities. In this work, we explore a new paradigm that does not require sensitive attribute labels, and evades the need for extra training by leveraging general-purpose vision-language model (VLM), as a rich knowledge source for common sensitive attributes. We analyze the correspondence between VLM predicted and human defined sensitive attribute distribution. We find that VLMs can recognize samples with clear attribute information encoded in image representations, thus capture under-performed samples conflicting with attribute-related bias. We train downstream target classifiers by re-sampling and augmenting under-performed attribute groups. Extensive experiments on multiple benchmark facial attribute classification datasets show fairness gains of the model over existing unsupervised baselines that tackle with arbitrary bias. The work indicates that vision-language models can extract discriminative sensitive information prompted by language, and be used to promote model fairness.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
CelebACLIP-debiasWorst-group Acc.0.295split: test · backbone=CLIP
Source quote
L161: CLIP-debias │ 0.746 (0.0059) │ 0.295 (0.027) │ 0.267 (0.0094)
CelebANo-interventionWorst-group Acc.0.181split: test
Source quote
L157: No-intervention │ 0.713 (0.0070) │ 0.181 (0.091) │ 0.315 (0.038)
DollarStreetCLIP-debiasUnbiased Acc.0.840split: test · backbone=CLIP
Source quote
L166: CLIP-debias │ 0.840 (0.0032) │ 0.264 (0.068) │ 0.164 (0.0032)
DollarStreetPGDUnbiased Acc.0.846split: test
Source quote
L163: DollarStreet │ PGD │ 0.846 (0.0023) │ 0.281 (0.031) │ 0.164 (0.0027)
DollarStreetCLIP-debiasWorst-group Acc.0.264split: test · backbone=CLIP
Source quote
L166: CLIP-debias │ 0.840 (0.0032) │ 0.264 (0.068) │ 0.164 (0.0032)
DollarStreetPGDWorst-group Acc.0.281split: test
Source quote
L163: DollarStreet │ PGD │ 0.846 (0.0023) │ 0.281 (0.031) │ 0.164 (0.0027)
BibTeX
@misc{zhang2024leveraging,
  author = {Miao Zhang and Rumi Chunara},
  title = {{Leveraging CLIP for Inferring Sensitive Information and Improving Model Fairness}},
  year = {2024},
  eprint = {2403.10624},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.10624},
}
Figure