---
title: "Evaluating the Underlying Gender Bias in Contextualized Word Embeddings — Basta 2019"
description: "This workshop paper asks whether contextualized word embeddings carry gender bias, and how much… 70.1% accuracy. 5 references, cited by 80 papers here."
authors: ["Christine Basta", "Marta R. Costa-jussà", "Noe Casas"]
year: 2019
venue: "Proceedings of the First Workshop on Gender Bias in Natural Language Processing"
source: "https://aclanthology.org/W19-3805/"
doi: "10.18653/v1/w19-3805"
licence: "CC BY 4.0 (ACL Anthology)"
licence_url: "https://creativecommons.org/licenses/by/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/basta-2019-evaluating-underlying-gender-bias-contextualized/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/basta-2019-evaluating-underlying-gender-bias-contextualized/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2019](https://md.research.elamur.ai/free/en/papers/2019/page/3/) / Evaluating the Underlying Gender Bias in Contextualized Word Embeddings

# Evaluating the Underlying Gender Bias in Contextualized Word Embeddings

**Authors:** Christine Basta, [Marta R. Costa-jussà](https://md.research.elamur.ai/free/en/authors/marta-r-costa-jussa/) and [Noe Casas](https://md.research.elamur.ai/free/en/authors/noe-casas/) · **Year:** 2019 · **Venue:** Proceedings of the First Workshop on Gender Bias in Natural Language Processing · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

**Links:** [Publisher's page](https://aclanthology.org/W19-3805/) · [PDF](https://aclanthology.org/W19-3805.pdf) · [DOI 10.18653/v1/w19-3805](https://doi.org/10.18653/v1/w19-3805) · [OpenAlex](https://openalex.org/W2972668795)

**Citations:** 184 citations (OpenAlex, 2026-10-14) · [80](https://md.research.elamur.ai/free/en/papers/basta-2019-evaluating-underlying-gender-bias-contextualized/cited-by/) in our library, of the 140,884 papers whose bibliographies we read

## Summary
This workshop paper asks whether contextualized word embeddings carry gender bias, and how much compared with standard and debiased static embeddings. The authors use ELMo, chosen over BERT because ELMo gives word-level vectors rather than subwords. They extract representations from the English side of the WMT18 English-German news corpus. They adapt existing bias tests to the setting where a word has a different vector in each sentence: the gender-subspace and direct-bias measures of Bolukbasi et al. (2016), and the clustering, classification and nearest-neighbour probes of Gonen and Goldberg (2019). They use word lists from those works: definitional pairs, professions, and biased and extended biased lists.

ELMo vectors show a weaker gender subspace, lower direct bias and weaker male/female clustering than static embeddings, even debiased ones. However, a classifier still recovers gender fairly well, and professions' neighbourhoods remain strongly stereotyped. The work shows that bias in contextual models is reduced on some axes but persists, and that no single metric captures it.

## Key points
- **Data and lists**
  - Corpus: English side of the WMT18 news commentary data (464,947 lines).
  - Lists: 'Definitional List' (pairs like she–he), 'Professional List', 'Biased List' (500 female- and 500 male-biased tokens), and 'Extended Biased List' (5000 tokens).
- **Clustering**: k-means with 2 clusters on Biased List tokens.
  - ELMo averaged 70.1% accuracy over 10 runs (range 69.1–71.3%).
  - Reported static-embedding results were 99.9% (original) and 92.5% (debiased).
- **Classification**: an RBF-kernel SVM was trained on 1000 Extended Biased List words and tested on the remaining 4000.
  - ELMo averaged 85.56% (range 83.33–88.43%).
  - Static embeddings reached 98.25% (biased) and 88.88% (debiased).
- **K-nearest neighbours on professions**: the share of female/male-stereotyped neighbours was correlated with each profession's original bias.
  - ELMo's average Pearson correlation was 0.89 (range 0.801–0.961, p \< 1e-40).
  - This is higher than for static embeddings: 0.774 (biased) and 0.606 (debiased).
  - On this axis, contextual vectors look *more* stereotyped.
- **Overall conclusion**: the paper does not claim that contextualization clearly removes bias. Instead, it lists the aspects that improve: gender space, direct bias and clustering.

## Interesting ideas
- **Counterfactual swapping for the gender direction**: instead of comparing two words in different contexts, take one sentence, replace the gendered word with its opposite-gender partner, and subtract the two contextual vectors. This keeps the context fixed and isolates the attribute. The same trick could probe other attributes in any contextual model.
- **Filtering confounding contexts**: when measuring direct bias, sentences containing both a profession and an explicit gender word were dropped. This keeps the gender word's influence from leaking into the target vector, a useful precaution for any context-dependent probe.
- **Repeated sampling of one context per word**: static-embedding tests expect one vector per word. Running the test 10 times, each with a randomly chosen sentence per word, adapts them to contextual models and gives a range rather than a single number.
- **Matching model granularity to the analysis**: picking a word-level model (ELMo) avoids having to merge subword vectors, which could distort word-level measurements. This is worth considering for morphologically rich languages, where subword splitting is heavy.
- **Using several complementary metrics**: the measures disagreed. Clustering suggested little bias, while nearest-neighbour correlation suggested strong bias. Any bias audit should therefore report a battery of tests rather than relying on one score.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

Fields: [Natural language processing](https://md.research.elamur.ai/free/en/shelves/nlp/)

Topics: [📏 Evaluation & benchmarks](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/) · [🛡️ Bias, fairness & safety](https://md.research.elamur.ai/free/en/topics/bias-fairness-safety/)

## Institutions

- [Universitat Politècnica de Catalunya](https://md.research.elamur.ai/free/en/universities/universitat-politecnica-de-catalunya/) — University, Barcelona, Spain · 22 works · 15,068 citations

## Cite

Cite as: Christine Basta, Marta R. Costa-jussà and Noe Casas. 2019. Evaluating the Underlying Gender Bias in Contextualized Word Embeddings. Proceedings of the First Workshop on Gender Bias in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{basta2019evaluating,
  title = {{Evaluating the Underlying Gender Bias in Contextualized Word Embeddings}},
  author = {Christine Basta, Marta R. Costa-jussà and Noe Casas},
  booktitle = {Proceedings of the First Workshop on Gender Bias in Natural Language Processing},
  year = {2019},
  doi = {10.18653/v1/w19-3805},
  url = {https://doi.org/10.18653/v1/w19-3805}
}
```

- [← previous A Dual Reinforcement Learning Framework for Unsupervised Text Style Transfer](https://md.research.elamur.ai/free/en/papers/luo-2019-dual-reinforcement-learning-framework-unsupervised/)
- [next → Selective Attention for Context-aware Neural Machine Translation](https://md.research.elamur.ai/free/en/papers/maruf-2019-selective-attention-context-aware-neural/)
- [↑ back to papers of 2019](https://md.research.elamur.ai/free/en/papers/2019/page/3/)

## References

5 references, 2 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. Tolga Bolukbasi, Kai-Wei Chang, James Y Zou, Venkatesh Saligrama, and Adam T Kalai. 2016. Man is to computer programmer as woman is to homemaker? debiasing word embeddings. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems… [our card](https://md.research.elamur.ai/free/en/papers/bolukbasi-2016-man-computer-programmer-woman-homemaker/)
2. However, contextualized word embeddings preserve and even amplify gender bias when taking into account other aspects: 1. The implicit gender of words can be predicted with accuracies higher than 80% based on contextualized word vectors which is only a slightly lower accuracy than when using vectors… [find](https://scholar.google.com/scholar?q=However%2C+contextualized+word+embeddings+preserve+and+even+amplify+gender+bias+when+taking+into+account+other+aspects%3A+1%2E+The+implicit+gender+of+words+can+be+predicted+with+accuracies+higher+than+80%25+b)
3. Joy Buolamwini and Timnit Gebru. 2018. Gender shades: Intersectional accuracy disparities in commercial gender classification. In Conference on Fairness, Accountability and Transparency, FAT 2018, 23-24 February 2018, New York, NY, USA, pages 77–91. 2. The stereotyped words group with implicit-gende… [find](https://scholar.google.com/scholar?q=Joy+Buolamwini+and+Timnit+Gebru%2E+2018%2E+Gender+shades%3A+Intersectional+accuracy+disparities+in+commercial+gender+classification%2E+In+Conference+on+Fairness%2C+Accountability+and+Transparency%2C+FAT+2018%2C+23%2D)
4. Aylin Caliskan, Joanna J. Bryson, and Arvind Narayanan. 2017. Semantics derived automatically from language corpora necessarily contain human biases. Science, 356:183–186. [find](https://scholar.google.com/scholar?q=Aylin+Caliskan%2C+Joanna+J%2E+Bryson%2C+and+Arvind+Narayanan%2E+2017%2E+Semantics+derived+automatically+from+language+corpora+necessarily+contain+human+biases%2E+Science%2C+356%3A183%E2%80%93186%2E)
5. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805. [our card](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/)
