Abstract
Machine learning models often inherit societal biases from training data, leading to performance disparities and information leakage regarding protected attributes. This paper proposes a novel debiasing framework using contrastive learning to produce fair representations. By integrating a Fair Contrastive Loss ($\mathcal{L}_{fcl}$) that discourages clustering based on sensitive attributes, the method achieves a superior balance between accuracy and fairness. Evaluated across four benchmarks, the approach demonstrates state-of-the-art results with significantly lower computational costs than adversarial alternatives.
The Challenge of Spurious Correlations
Machine learning models frequently exploit "spurious correlations"—statistical links between target labels (e.g., "doctor") and protected attributes (e.g., "male"). This dependency results in two primary failures:
- Performance Disparity: Models exhibit varying accuracy across different demographic groups.
- Information Leakage: Internal representations often retain sensitive information, allowing attackers to infer protected attributes even when they are not explicit inputs.
Traditional solutions, such as adversarial training, involve a secondary model attempting to "unlearn" bias. However, these methods are notoriously difficult to optimize and computationally intensive. This research seeks a simpler, architecture-agnostic approach to "bleach" sensitive information while preserving high task performance.
Proposed Method: Fair Contrastive Learning
The authors introduce a multi-component loss function designed to shape the representation space. The total objective is defined as: $$\mathcal{L}_* = \alpha\mathcal{L}_{ce} + \beta\{\mathcal{L}_{scl} - \mathcal{L}_{fcl}\}$$
- Cross-Entropy Loss ($\mathcal{L}_{ce}$): Ensures high performance on the primary classification task.
- Supervised Contrastive Loss ($\mathcal{L}_{scl}$): Pulls instances with the same class label together, creating robust task-specific clusters.
- Fair Contrastive Loss ($\mathcal{L}_{fcl}$): The core innovation. This term discourages the model from grouping instances based on protected attributes. By subtracting this from the objective, the model is forced to find representations that are "oblivious" to sensitive features like gender or race.
This "plug-and-play" method requires no additional sub-networks, making it highly efficient and easy to integrate into existing pipelines.
Experimental Evaluation
The method was evaluated across four diverse benchmarks:
- Moji: Twitter sentiment analysis with race (AAE vs. SAE) as the protected attribute.
- Hate Speech: Abusive tweet detection with author age as the protected attribute.
- Bios: Profession prediction from biographies with gender as the protected attribute.
- imSitu: Image activity recognition with gender as the protected attribute.
Key Results and Insights
The proposed method ($Con_*$) consistently outperformed baselines in achieving an optimal accuracy-fairness tradeoff.
- State-of-the-Art Tradeoffs: On the Moji dataset, the model achieved a new state-of-the-art accuracy (75.99%) while significantly reducing information leakage. Race leakage dropped from ~85% in standard models to ~55%, approaching the random chance threshold of 50%.
- Efficiency: By avoiding the complexities of adversarial training, the contrastive approach was up to 30x faster to train than competitive baselines.
- Debiasing as Regularization: Interestingly, the debiasing technique often improved main task accuracy. The authors hypothesize that the contrastive loss acts as a form of regularization, forcing the model to ignore noisy, biased correlations in favor of more "pure" task features.
Limitations and Future Work
While highly effective, the method faces challenges in multi-class settings (e.g., the 28 professions in the Bios dataset), where finding the "sweet spot" between tight class clusters and perfectly mixed demographics is more difficult. Additionally, the current evaluation assumes a linear attacker for leakage metrics; future work may explore robustness against non-linear attackers and the impact of fine-tuning initial embedding layers (like BERT or ResNet) directly with the fair contrastive objective.
Summary updated