Source-linked AI summary
Evaluating the Underlying Gender Bias in Contextualized Word Embeddings
Christine Basta, Marta R. Costa-jussà, Noe Casas
TL;DR
Gender bias in NLP motivates testing whether contextualized word embeddings differ from standard and debiased embeddings. The paper adapts established bias measures to contextualized representations and finds lower bias on several measures, while implicit gender remains predictable above 80%.
Problem
The paper addresses limited analysis of gender bias in contextualized word embeddings and compares them with standard and debiased embeddings.
Method
The study adapts and contrasts prior gender-bias measures using established gender-related word lists and contextualized representations.
Results
Contextualized embeddings show reduced gender space, lower direct bias, and weaker male/female clustering than standard embeddings, while implicit gender prediction exceeds 80% accuracy.
Takeaways & Limitations
Contextualized embeddings appear less biased than standard embeddings across several evaluated aspects, including comparisons with debiased standard embeddings for clustering.
Takeaways & Limitations
The study cannot draw clear conclusions about whether contextualized embeddings overall augment or reduce gender bias and plans broader domain and language analyses.
Abstract
from arXiv · showhide
Gender bias is highly impacting natural language processing applications. Word embeddings have clearly been proven both to keep and amplify gender biases that are present in current data sources. Recently, contextualized word embeddings have enhanced previous word embedding techniques by computing word vector representations dependent on the sentence they appear in. In this paper, we study the impact of this conceptual change in the word embedding computation in relation with gender bias. Our analysis includes different measures previously applied in the literature to standard word embeddings. Our findings suggest that contextualized word embeddings are less biased than standard ones even when the latter are debiased.
1 Introduction
NLP systems can reproduce social and gender biases, making bias in word embeddings an important concern. The paper examines whether contextualized representations change this problem.
- NLP systems have shown poorer performance for ethnic minorities and biased behavior in translation and sentiment analysis.
- Word embeddings encode words as vectors whose geometric relations can reflect analogies and social stereotypes.
- Contextualized word embeddings provide different vector representations for the same word in different contexts.
- The paper extends gender-bias analysis from standard embeddings to contextualized embeddings using methods from prior work.
2 Background
Standard word embeddings learn vector representations from corpus statistics, which can encode and amplify social bias. Contextualized models instead vary word representations with sentence context, while debiasing methods remove or constrain explicit gender information.
- Word embeddings associate vocabulary words with numeric vectors learned from large corpora for downstream NLP tasks.
- Corpus co-occurrence statistics give embeddings geometric properties that model semantic relations and analogies.
- Social biases in human-generated corpora are learned into embeddings through co-occurrence statistics and can be amplified.
- Debiasing approaches constrain gender information to a designated vector portion or remove it after training.
- Task-agnostic debiasing transformations can leave gender information in the representations.
- Unlike word2vec, ELMo produces representations that depend on the sentence containing each word.
- ELMo combines character-level word processing with a two-layer bidirectional LSTM trained on language modeling.
3 Research questions
The study asks whether contextualized embeddings contain gender bias relative to standard and debiased embeddings. It also compares evaluation techniques for detecting that bias.
- The paper investigates whether contextualized embeddings exhibit gender bias and how it compares with standard and debiased embeddings.
- It asks whether different evaluation techniques identify bias similarly and which measure is best for contextualized embeddings.
- The analysis adapts and contrasts evaluation measures proposed by Bolukbasi et al. and Gonen and Goldberg.
4 Experimental Framework
The experiments use prior gender-biased word lists and ELMo contextualized representations. ELMo is selected because it supplies word-level representations suitable for direct analysis.
- The study uses the English side of the WMT18 English-German news corpus, containing 464,947 lines and 1,004,6125 tokens.
- The experiments use definitional, professional, biased, and extended biased lists derived from prior work.
- The classification list contains 5000 male- and female-biased tokens, with 2500 tokens for each gender.
- Some listed words may be absent from the corpus, preventing extraction of contextualized embeddings for them.
- ELMo is chosen because its word-level representations permit direct study of word-level semantic traits rather than subword composition.
5 Evaluation measures and results
The paper adapts several standard word-embedding gender-bias measures to contextualized representations and compares their results with prior standard-embedding findings. Across evaluations, contextualized embeddings show weaker gender structure and clustering than biased or debiased standard embeddings, although gender information remains detectable.
- Evaluation framework: The analysis adapts prior gender-bias measures to contextualized word embeddings and compares them with standard biased and debiased embeddings.It evaluates gender-space structure, direct bias, clustering, classification, and nearest-neighbor behavior.
- Gender-space detection: A single dominant direction still explains much of the variance in definitional vector differences, but the variance gap is smaller for contextualized embeddings than for standard embeddings.Random-word representations show a smoother, gradual decrease across eigenvalues.
- Direct bias: Direct bias is 0.03 for contextualized ELMo representations versus 0.08 for standard word2vec embeddings.The authors associate the reduction with profession representations varying across sentences.
- Male/female clustering: K-means clustering of biased male and female words reaches 70.1% average accuracy across ten contextualized-embedding experiments, below 99.9% biased and 92.5% debiased standard embeddings.The contextualized experiments ranged from 69.1% to 71.3% accuracy.
- Overall comparison: The evaluation therefore finds less gender bias in contextualized embeddings than in standard embeddings, including debiased standard representations.Gender information is reduced but remains detectable through multiple evaluation approaches.
- Classification: A classifier trained on 1,000 biased words generalizes to 4,000 others with 85.56% average accuracy across ten experiments.The minimum and maximum accuracies were 83.33% and 88.43%.
6 Conclusions and further work
Contextualized word embeddings show reduced gender bias on several geometric measures, but preserve or amplify bias on prediction and clustering measures. The study therefore recommends emphasizing the latter measures in future debiasing evaluations while acknowledging that broader conclusions remain limited.
- The study cannot draw clear conclusions about whether contextualized word embeddings augment or reduce gender bias overall, despite a tendency toward reduction.The authors plan to extend the analysis to multiple domains and languages.
- Contextualized word embeddings reduce gender space, direct bias, and male/female clustering relative to standard embeddings, including debiased ones.The gender space and direct bias are lower than in standard embeddings, while male/female clustering is less strong than in both debiased and non-debiased standard embeddings.
- Contextualized word vectors still encode implicit gender with accuracies higher than 80%, only slightly below debiased and non-debiased standard embeddings.
- Stereotyped words group with implicit-gender words of the same gender more than they do in debiased and non-debiased standard embeddings.
- All evaluated measures exhibit some gender bias, but the latter two measures show higher bias than the first three.The authors suggest emphasizing these latter measures when evaluating future debiasing methods for contextualized word embeddings.
- The analysis aims to support standard bias evaluation, effective debiasing methods, and equitable algorithms that ignore biased data.