Efficiently Mitigating Classification Bias via Transfer Learning

Xisen Jin, Francesco Barbieri, Aida Mostafazadeh Davani, Brendan Kennedy, Leonardo Neves, Xiang Ren

Abstract

Fine-tuned language models have been shown to exhibit biases against protected groups in a host of modeling tasks such as text classification and coreference resolution. Previous works focus on detecting these biases, reducing bias in data representations, and using auxiliary training objectives to mitigate bias during fine-tuning. Although these techniques achieve bias reduction for the task and domain at hand, the effects of bias mitigation may not directly transfer to new tasks, requiring additional data collection and customized annotation of sensitive attributes, and re-evaluation of appropriate fairness metrics. We explore the feasibility and benefits of upstream bias mitigation (UBM) for reducing bias on downstream tasks, by first applying bias mitigation to an upstream model through fine-tuning and subsequently using it for downstream fine-tuning. We find, in extensive experiments across hate speech detection, toxicity detection, occupation prediction, and coreference resolution tasks over various bias factors, that the effects of UBM are indeed transferable to new downstream tasks or domains via fine-tuning, creating less biased downstream models than directly fine-tuning on the downstream task or transferring from a vanilla upstream model. Though challenges remain, we show that UBM promises more efficient and accessible bias mitigation in LM fine-tuning.

Introduction

Pre-trained language models (LMs) like BERT and RoBERTa are powerful tools for natural language processing, but they often inherit societal biases from their massive training corpora. When fine-tuned for downstream tasks—such as hate speech detection or resume screening—these models can learn to associate protected groups with negative labels. Traditionally, bias mitigation is applied during the final fine-tuning stage. However, this approach is difficult to scale because it requires collecting and annotating sensitive attributes (e.g., race, gender, dialect) for every new task or dataset encountered.

This research introduces Upstream Bias Mitigation (UBM), a framework designed to make fairness more accessible. The central question is: can we debias a model once on an "upstream" task and have those fairness benefits persist when the model is transferred to new, unseen "downstream" tasks?

The UBM Framework

The UBM framework operates in two distinct stages:

  1. Upstream Stage: A pre-trained model is fine-tuned on a source dataset ($\mathcal{D}_s$) using specific bias mitigation algorithms. The objective is to learn a task-specific representation that is also "fairer" with respect to sensitive attributes.
  2. Downstream Stage: The debiased encoder from the upstream model is transferred to a new downstream task ($\mathcal{D}_t$). Crucially, this stage uses standard fine-tuning without requiring any additional bias mitigation steps or sensitive attribute labels.
The UBM framework involves an upstream debiasing stage followed by a downstream fine-tuning stage, where the downstream task does not require access to upstream data or sensitive labels.

The researchers explored two primary mitigation techniques: Explanation Regularization ($UBM_{reg}$), which penalizes the model for over-relying on spurious keywords like group identifiers, and Adversarial De-biasing ($UBM_{adv}$), which uses a minimax game to prevent the model's internal representations from leaking sensitive attribute information.

Key Insights: Why Fairness Transfers

The study reveals that fairness is indeed transferable across domains. Debiasing doesn't just act as a local patch; it fundamentally changes how the model perceives language features. For instance, debiasing a model on one hate speech dataset helped it remain fair when moved to a completely different toxicity detection task.

A key technical finding is the gradient effect: UBM reduces the gradient of importance for biased features. By the time the model reaches the downstream stage, it is "less tempted" to re-learn harmful associations. Interestingly, the authors found that allowing the encoder to update during downstream fine-tuning (rather than freezing it) yielded the best balance of performance and fairness.

Experimental Results

The authors conducted extensive experiments across tasks including hate speech detection (GHC, Stormfront), toxicity detection (DWMW, FDCL), occupation prediction (BiasBios), and coreference resolution (OntoNotes 5.0).

Experimental results demonstrate that UBM variants consistently reduce bias metrics (like FPRD and Winobias F1-Diff) across various downstream tasks compared to vanilla transfer learning.

Key results include:

  • Significant Bias Reduction: In the Gab Hate Corpus (GHC), $UBM_{reg}$ reduced the False Positive Rate Difference (FPRD) on identity phrases from 21.50 (Vanilla) to 10.02—a nearly 50% improvement in fairness without downstream mitigation.
  • Cross-Domain Success: When transferring from FDCL to DWMW, UBM improved accuracy on African American Vernacular English (AAVE) text (the BROD metric) from 78.98% to 81.24%, indicating the model learned to stop unfairly flagging this dialect as toxic.
  • Performance Maintenance: UBM generally maintained or slightly improved primary task performance (F1 scores), proving that fairness does not have to come at the cost of utility.

Conclusion

While UBM is a major step forward, challenges remain. It rarely outperforms "direct" downstream mitigation when sensitive labels are available, and addressing multiple types of bias simultaneously can be difficult to stabilize. However, UBM offers a promising path toward "off-the-shelf" fair models, making responsible AI more efficient and accessible for developers who lack the resources for custom debiasing on every new application.

Summary updated

BibTeX
@inproceedings{jin2021efficiently,
  author = {Xisen Jin and Francesco Barbieri and Aida Mostafazadeh Davani and Brendan Kennedy and Leonardo Neves and Xiang Ren},
  title = {{Efficiently Mitigating Classification Bias via Transfer Learning}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.naacl-main.296},
}
Figure