Abstract
Pre-trained Language Models (PLMs) like BERT and RoBERTa frequently internalize societal biases from large-scale training data, leading to unfair predictions in downstream tasks. We introduce fairBERTs, a framework that utilizes Generative Adversarial Networks (GANs) to apply semantic-aware perturbations to a model's latent space. By erasing sensitive information while preserving task-relevant features, fairBERTs mitigates social bias without the typical performance degradation associated with fairness-utility trade-offs. Our evaluation on Jigsaw Toxicity and Yelp Sentiment benchmarks demonstrates that fairBERTs significantly improves fairness metrics, such as Demographic Parity Difference (DPD), while maintaining or even enhancing task accuracy.
Introduction
Pre-trained Language Models are the backbone of modern NLP, but they often rely on "protected attributes" (e.g., religion, gender, or race) as shortcuts for prediction. For example, a standard toxicity classifier might incorrectly flag sentences containing identifiers like "Muslim" as toxic due to biased patterns in its training data. Existing solutions, such as word-blinding or dataset re-balancing, are difficult to scale and often degrade model performance. fairBERTs addresses this by treating debiasing as an adversarial game aimed at scrubbing sensitive information from the model's internal representations.
Methodology
The fairBERTs framework treats debiasing as an adversarial optimization problem involving four primary components:
- The Backbone (BPLM): A standard fine-tuned model (e.g., BERT-base).
- The Generator ($G$): Analyzes semantic-rich sequence outputs to generate a specific perturbation mask ($\delta$).
- The Discriminator ($D$): Attempts to predict sensitive attributes (e.g., gender) from the perturbed internal representation.
- The Classifier ($F_\theta$): Ensures the model retains its ability to perform the primary task (e.g., sentiment analysis).
The Generator is trained to create perturbations that cause the Discriminator to fail (erasing sensitive info) while ensuring the Classifier succeeds. To enhance robustness, the authors employ counterfactual adversarial training, intentionally flipping sensitive labels during training to help the model more effectively neutralize biased features.
Experiments and Datasets
The researchers evaluated fairBERTs on two real-world benchmarks:
- Jigsaw Toxicity: A dataset for detecting toxic public comments, using "gender" as the protected sensitive attribute.
- Yelp Sentiment: A dataset of business reviews where gender annotations were used for fairness testing.
Key Results
fairBERTs demonstrates that intelligent latent-space perturbations can decouple fairness from utility, often improving both simultaneously.
- Fairness Gains: On the Jigsaw Toxicity task, fairBERTs reduced the Demographic Parity Difference (DPD) from 0.0670 (vanilla) to 0.0090, a nearly sevenfold improvement.
- Utility Preservation: Unlike other debiasing methods that see accuracy drops of 2-4%, fairBERTs maintained high accuracy (90.67% on Jigsaw) and slightly increased accuracy on the Yelp dataset (from 0.9920 to 0.9953).
- Reduced Reliance on Sensitive Words: Using LIME (an interpretation tool), the authors found that the influence of sensitive gendered words on model decisions decreased by over 30%.
Conclusion and Future Work
fairBERTs successfully erases sensitive information from PLMs through semantic-aware perturbations. While the current study focuses on gender, future work will address intersectional biases (e.g., combinations of race and age) and adapt the framework for large-scale auto-regressive models like GPT-4. The authors suggest generalizing this framework to high-stakes domains such as medical diagnosis and legal technology.
Summary updated