[Paper Review] Unmasking Contextual Stereotypes: Measuring and Mitigating BERT's Gender Bias
The paper develops a bilingual (English, German) framework to measure gender bias in BERT using a bias evaluation corpus (BEC-Pro) and a masked-language-model approach, and evaluates a mitigation via Counterfactual Data Substitution followed by fine-tuning on GAP data. It also shows cross-linguistic limitations, especially for German.
Contextualized word embeddings have been replacing standard embeddings as the representational knowledge source of choice in NLP systems. Since a variety of biases have previously been found in standard word embeddings, it is crucial to assess biases encoded in their replacements as well. Focusing on BERT (Devlin et al., 2018), we measure gender bias by studying associations between gender-denoting target words and names of professions in English and German, comparing the findings with real-world workforce statistics. We mitigate bias by fine-tuning BERT on the GAP corpus (Webster et al., 2018), after applying Counterfactual Data Substitution (CDS) (Maudslay et al., 2019). We show that our method of measuring bias is appropriate for languages such as English, but not for languages with a rich morphology and gender-marking, such as German. Our results highlight the importance of investigating bias and mitigation techniques cross-linguistically, especially in view of the current emphasis on large-scale, multilingual language models.
Motivation & Objective
- Assess how gender bias is encoded in BERT for English and German using profession-related contexts.
- Develop a template-based bias measurement corpus (BEC-Pro) and validate a MLM-based association metric.
- Evaluate bias mitigation by applying Counterfactual Data Substitution (CDS) and fine-tuning on a balanced corpus (GAP).
- Investigate cross-linguistic transfer of bias measurement and mitigation methods, highlighting German-specific morphology effects.
Proposed method
- Create BEC-Pro in English and German using profession-centric templates anchored to real-world workforce statistics.
- Measure association bias by computing log-ratio targets conditioned on attributes using BERT’s masked language model (P(T|A) vs P(T)).
- Apply CDS to the GAP corpus and fine-tune English BERT (three epochs, AdamW) to reduce bias, then re-evaluate.
- Translate and adapt measurement templates to German to test cross-linguistic transfer and analyze the impact of grammatical gender on bias measurements.
Experimental results
Research questions
- RQ1Can gender bias in BERT be measured reliably for English and German using MLM-based association scores?
- RQ2Does Counterfactual Data Substitution with subsequent fine-tuning mitigate bias in English BERT, and to what extent?
- RQ3Does a measurement approach developed for English transfer to German, a morphologically rich language with gender marking?
- RQ4How do measured biases relate to real-world workforce statistics across profession groups?
Key findings
- For English, CDS + fine-tuning reduces associations for female targets with female-typical professions but can increase associations in anti-typical settings.
- Bias in English BERT aligns with real-world workforce statistics prior to fine-tuning, and bias-mitigation effects are more pronounced for female terms than for male terms.
- German results show that the English-based measurement method poorly transfers due to German grammatical gender marking, with consistently higher associations for female targets.
- In German, associations differ across masculine/feminine profession terms due to gender-marking, indicating language-specific biases that the English method does not capture.
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.