Unmasking Contextual Stereotypes: Measuring and Mitigating BERT’s Gender Bias

Marion Bartl, Malvina Nissim, Albert Gatt


Abstract
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.
Anthology ID:
2020.gebnlp-1.1
Volume:
Proceedings of the Second Workshop on Gender Bias in Natural Language Processing
Month:
December
Year:
2020
Address:
Barcelona, Spain (Online)
Editors:
Marta R. Costa-jussà, Christian Hardmeier, Will Radford, Kellie Webster
Venue:
GeBNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1–16
Language:
URL:
https://aclanthology.org/2020.gebnlp-1.1
DOI:
Bibkey:
Cite (ACL):
Marion Bartl, Malvina Nissim, and Albert Gatt. 2020. Unmasking Contextual Stereotypes: Measuring and Mitigating BERT’s Gender Bias. In Proceedings of the Second Workshop on Gender Bias in Natural Language Processing, pages 1–16, Barcelona, Spain (Online). Association for Computational Linguistics.
Cite (Informal):
Unmasking Contextual Stereotypes: Measuring and Mitigating BERT’s Gender Bias (Bartl et al., GeBNLP 2020)
Copy Citation:
PDF:
https://aclanthology.org/2020.gebnlp-1.1.pdf
Code
 marionbartl/gender-bias-BERT
Data
GAP Coreference Dataset