[Paper Review] Debiasing Pre-trained Contextualised Embeddings
This paper proposes a fine-tuning-based debiasing method for pre-trained contextualized word embeddings that operates at the token- or sentence-level without retraining models. It effectively reduces gender bias across multiple SoTA models (BERT, RoBERTa, ALBERT, DistilBERT, ELECTRA) while preserving semantic quality, with token-level debiasing across all layers yielding the best performance.
In comparison to the numerous debiasing methods proposed for the static non-contextualised word embeddings, the discriminative biases in contextualised embeddings have received relatively little attention. We propose a fine-tuning method that can be applied at token- or sentence-levels to debias pre-trained contextualised embeddings. Our proposed method can be applied to any pre-trained contextualised embedding model, without requiring to retrain those models. Using gender bias as an illustrative example, we then conduct a systematic study using several state-of-the-art (SoTA) contextualised representations on multiple benchmark datasets to evaluate the level of biases encoded in different contextualised embeddings before and after debiasing using the proposed method. We find that applying token-level debiasing for all tokens and across all layers of a contextualised embedding model produces the best performance. Interestingly, we observe that there is a trade-off between creating an accurate vs. unbiased contextualised embedding model, and different contextualised embedding models respond differently to this trade-off.
Motivation & Objective
- Address the lack of effective debiasing methods for contextualized word embeddings compared to static embeddings.
- Overcome challenges in debiasing due to model complexity, context-dependent bias, and high computational cost of retraining.
- Develop a lightweight, fine-tuning-based method applicable to any pre-trained contextualized model without architectural changes.
- Preserve semantic information while removing stereotypical gender biases encoded in contextualized embeddings.
- Systematically evaluate debiasing effectiveness across multiple models and datasets using standardized benchmarks.
Proposed method
- Propose a fine-tuning method that operates at token-level or sentence-level to debias contextualized embeddings.
- Apply the method independently to each layer of the transformer-based model to ensure comprehensive bias removal.
- Use gender-specific word vectors (feminine and masculine) as bias directions to guide the debiasing process.
- Compute average hidden states across all sentences containing a target word to estimate its gender bias representation.
- Adjust embeddings via projection to minimize cosine similarity with gender direction vectors while maintaining semantic proximity.
- Apply debiasing uniformly across all tokens and layers to avoid residual bias in deeper or shallower representations.
Experimental results
Research questions
- RQ1Can a fine-tuning-based method effectively debias pre-trained contextualized embeddings without retraining?
- RQ2How does debiasing at the token-level versus sentence-level affect bias reduction and semantic preservation?
- RQ3Does debiasing across all layers of a contextualized model yield better results than selective layer debiasing?
- RQ4How do different contextualized models (e.g., BERT, RoBERTa, ALBERT) respond to the same debiasing procedure in terms of bias reduction and performance trade-offs?
- RQ5To what extent does debiasing preserve semantic information while reducing stereotypical gender associations?
Key findings
- Token-level debiasing applied across all layers of a contextualized model yields the best overall performance in reducing gender bias.
- Debiasing only the first and last layers is insufficient, as biases persist in intermediate layers, especially in models like DistilBERT.
- The proposed method successfully reduces gender bias on SEAT and MNLI benchmarks across all evaluated models, including BERT, RoBERTa, ALBERT, DistilBERT, and ELECTRA.
- There is a trade-off between model accuracy and fairness: models like RoBERTa and ALBERT show different debiasing behaviors—RoBERTa under-deb降s, ALBERT over-deb降s—indicating model-specific responses to the debiasing process.
- Visualization shows that debiased embeddings for stereotypical words move toward zero gender score, indicating reduced gender association, though the distribution shift varies by model.
- The method preserves semantic quality, as evidenced by consistent downstream performance on benchmark tasks after debiasing.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.