FairNet: Dynamic Fairness Correction without Performance Loss via Contrastive Conditional LoRA

Songqi Zhou, Zeyuan Liu, Benben Jiang · DOI

Abstract

Machine learning models often inherit social biases from training data, leading to significant performance disparities across demographic groups. Traditional debiasing techniques frequently encounter a "performance-fairness trade-off," where enhancing fairness for minority groups inadvertently reduces overall model accuracy. This paper presents FairNet, a novel framework designed to break this zero-sum game through dynamic, instance-level corrections. FairNet integrates internal bias detectors with conditional Low-Rank Adaptation (LoRA) modules. By selectively triggering corrections only for instances identified as high-risk and employing a contrastive loss to align minority and majority representations, FairNet improves fairness metrics—such as Worst-Group Accuracy (WGA) and Equalized Odds (EOD)—while maintaining or even enhancing overall performance. Our experiments across vision and language tasks demonstrate FairNet's superiority over existing state-of-the-art methods.

Introduction

The deployment of AI in sensitive domains is often hindered by inherent biases that result in lower accuracy for protected groups. Current mitigation strategies generally fall into three categories: pre-processing, in-processing, and post-processing. However, these approaches face critical limitations. Most notably, they often apply a "one-size-fits-all" correction that can lead to "over-correction" for unbiased instances, thereby degrading overall performance. Furthermore, many methods rely heavily on the availability of sensitive attribute labels, which are frequently missing or restricted.

FairNet addresses these challenges by moving from static interventions to a dynamic, instance-level architecture. Instead of modifying the entire model globally, FairNet asks whether a specific input requires correction, ensuring that the majority of the model's well-performing logic remains untouched for unbiased samples.

Methodology: The FairNet Framework

The core of FairNet lies in its ability to perform selective, targeted interventions. The framework consists of two primary components integrated into a pre-trained backbone:

  1. Internal Bias Detectors: These are lightweight modules positioned after intermediate layers. They monitor internal representations to estimate the probability that a sample belongs to a minority or biased group.
  2. Conditional LoRA (Low-Rank Adaptation): When a detector flags a sample as "high-risk," it triggers a LoRA module. These modules consist of small, trainable rank-decomposition matrices that apply a targeted correction to the model's weights specifically for that forward pass.
The FairNet framework features a four-step training process: base model preparation, bias detector training, contrastive pair preparation, and conditional LoRA training.

To optimize these modules, FairNet employs a Contrastive Loss function. This loss is designed to pull the internal representations of minority group samples closer to those of majority group samples within the same class. By forcing the model to align these representations, FairNet enables the minority group to "borrow" high-quality features learned for the majority group, effectively fixing the underlying feature representation rather than just shifting the final output.

The training process follows a four-step pipeline as illustrated in Figure 1: base model preparation, bias detector training, embedding extraction for contrastive pairs, and final conditional LoRA training.

Experimental Evaluation

The authors evaluated FairNet on three diverse benchmarks to test its versatility across different modalities and bias types:

  • CelebA (Vision): A facial attribute dataset where the task is to predict "Male" while accounting for "Blond Hair" as a spurious correlation.
  • MultiNLI (Language): A natural language inference task where linguistic biases often arise from the presence of negation words.
  • HateXplain (Language): A dataset used to evaluate the model's ability to handle intersectional biases, such as those involving both race and gender.

FairNet was tested under three label-availability scenarios: FairNet-Full (using all sensitive labels), FairNet-Partial (using a small fraction of labels), and FairNet-Unlabeled (using unsupervised outlier detection).

Results and Analysis

FairNet consistently outperformed state-of-the-art baselines, including GroupDRO and DFR, across all tested datasets.

Performance comparison across different datasets and methods shows FairNet consistently achieving high accuracy and fairness metrics.

As detailed in the results table, FairNet demonstrates a remarkable ability to improve fairness without sacrificing accuracy:

  • On CelebA: FairNet-Full achieved a Worst-Group Accuracy (WGA) of 88.2%, significantly higher than the ERM baseline of 77.9%. Crucially, overall accuracy increased slightly from 95.8% to 95.9%.
  • On MultiNLI: The framework boosted WGA by over 11 percentage points (from 67.3% to 78.5%) while maintaining the overall accuracy at 82.6%.
  • Label Flexibility: Even in the unsupervised setting (FairNet-Unlabel), the model achieved a WGA of 82.3% on CelebA, outperforming many supervised baselines.

The theoretical analysis provided in the paper supports these empirical findings, proving that FairNet is guaranteed to improve fairness without hurting overall accuracy provided the bias detector meets a specific performance threshold.

Conclusion

FairNet represents a significant advancement in ethical AI by demonstrating that the performance-fairness trade-off is not an inevitability. Through the use of dynamic, instance-level corrections and representation alignment via contrastive LoRA, FairNet provides a flexible and effective solution for building fairer models. Future work will focus on improving detector quality in scenarios with limited internal group discriminability and extending the framework to handle increasingly complex intersectional biases.

Summary updated

BibTeX
@inproceedings{zhou2025fairnet,
  author = {Songqi Zhou and Zeyuan Liu and Benben Jiang},
  title = {{FairNet: Dynamic Fairness Correction without Performance Loss via Contrastive Conditional LoRA}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=t0PtZOlo3y},
}
Figure