FineDeb: A Debiasing Framework for Language Models

Akash Saravanan, Dhruv Mullick, Habibur Rahman, Nidhi HegdearXiv 2023 · DOI

Introduction

As large language models (LMs) like BERT become foundational to modern technology—powering everything from healthcare assistants to legal tools—they often carry a hidden passenger: societal bias. Most existing debiasing research has focused on static word embeddings or binary classifications (e.g., male vs. female). However, modern models are contextual; the meaning of a word shifts based on its surroundings. Furthermore, real-world bias is multi-faceted, affecting various groups across race, religion, and gender.

FineDeb is a novel framework designed to address these complexities. It moves beyond binary categories to handle multi-class demographics while preserving the model's linguistic performance through a specialized two-phase process.

The FineDeb Framework

FineDeb operates through two distinct phases to ensure that demographic identity does not skew a model's internal representations:

  1. The Debiasing Phase: This phase modifies the model's representations so that demographic labels become interchangeable in neutral contexts. Using "near-identical" sentence pairs that differ only by a target word (e.g., "The [Jewish/Christian] man went to the store"), the framework minimizes the distance between these target word embeddings within their specific sentence contexts. This teaches the model that demographic swaps should not shift the overall intent or sentiment of the text.
  2. The LM Fine-tuning Phase: A common pitfall of debiasing is "embedding smear," where the model loses its linguistic edge. To counteract this, FineDeb fine-tunes the model on a standard language modeling task (masked word prediction) using the CNN-DailyMail dataset. By freezing the debiased embeddings and only updating the weights of the language modeling head, the framework restores fluency without undoing the debiasing work.

Experimental Results

FineDeb was evaluated against major benchmarks, including StereoSet, Crow-S Pairs, and the Sentence Encoder Association Test (SEAT). The results demonstrate a significant improvement over baseline models and existing debiasing techniques.

Comparison of bias effect sizes across Gender, Race, and Religion. FineDeb shows a significant reduction in Gender bias compared to the BERT baseline.

Near-Perfect Neutrality

On the StereoSet benchmark, FineDeb achieved "near-perfect" Stereotype Scores (SS) for Race (50.82) and Religion (50.39), where a score of 50.0 represents a perfectly unbiased model. In comparison, the baseline BERT model typically scores between 57 and 60.

StereoSet results for FineDeb and baseline models. FineDeb achieves near-ideal Stereotype Scores (SS) of ~50 for Race and Religion while maintaining competitive ICAT scores.

Performance Trade-offs

Using the ICAT metric—which balances bias reduction with language proficiency—FineDeb outperformed state-of-the-art methods like CDA and Dropout in the Gender and Religion categories. In the SEAT evaluation, FineDeb significantly reduced the bias "effect size" for Gender, dropping it from 0.620 in the base model to 0.362.

Limitations and Future Directions

Despite its success, the authors note several challenges. While the second phase helps stabilize the model, there remains a slight drop in the Language Modeling Score (LMS), indicating a "tug-of-war" between fairness and technical expertise. Additionally, the method relies on pre-defined word lists; if a specific demographic group or term is omitted, the model will not learn to debias it.

Distinguishing between "factual" associations and "stereotypical" bias also remains a hurdle. Future work may explore a single-phase approach where debiasing and language modeling occur simultaneously to further optimize the balance between social fairness and technical accuracy.

Summary updated

BibTeX
@misc{saravanan2023finedeb,
  author = {Akash Saravanan and Dhruv Mullick and Habibur Rahman and Nidhi Hegde},
  title = {{FineDeb: A Debiasing Framework for Language Models}},
  year = {2023},
  eprint = {2302.02453},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.02453},
}
Figure