NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

On Measuring and Mitigating Biased Inferences of Word Embeddings

Sunipa Dev, Tao Li, Jeff M. Phillips, Vivek Srikumar

Abstract

Word embeddings carry stereotypical connotations from the text they are trained on, which can lead to invalid inferences in downstream models that rely on them. We use this observation to design a mechanism for measuring stereotypes using the task of natural language inference (NLI). We demonstrate a reduction in invalid inferences via bias mitigation strategies on static word embeddings (GloVe). Further, we show that for gender bias, these techniques extend to contextualized embeddings when applied selectively only to the static components of contextualized embeddings (ELMo, BERT).

Introduction

Most existing research on word embedding bias relies on intrinsic measures—calculating the geometric distance between vectors (e.g., the distance between "doctor" and "man" vs. "woman"). However, this approach has two major flaws. First, it lacks a direct link to model usage; embeddings are features for complex downstream models, and vector distances do not always predict how a model will behave in practice. Second, modern contextualized models like BERT and ELMo produce different vectors for the same word depending on the sentence, making standard distance-based tests for "word types" difficult to apply.

This research addresses these gaps by using Natural Language Inference (NLI) as a probe. NLI requires a model to decide if a "premise" sentence entails, contradicts, or is neutral toward a "hypothesis" sentence. By observing when models make invalid logical leaps—such as assuming an "accountant" is a "man"—we can quantify the stereotypes embedded within the representations.

Probing Bias via Natural Language Inference

The researchers developed a systematic probing mechanism using template-generated sentence pairs designed to be logically neutral. For example:

  • Premise: "The accountant ate a bagel."
  • Hypothesis: "The man ate a bagel."

A bias-free model should label this relationship as Neutral. If the model predicts Entailment, it reveals an underlying gender bias associated with the occupation "accountant."

Table 1: Examples of template fillers that triggered high-confidence biased predictions (entailment or contradiction) in GloVe-based models.

To quantify these effects, the authors defined three metrics:

  1. Net Neutral (NN): The average probability assigned to the neutral label.
  2. Fraction Neutral (FN): The frequency with which "neutral" is the top-ranked choice.
  3. Threshold (T:$\tau$): The fraction of examples where the neutral probability exceeds a specific threshold (e.g., 0.5 or 0.7).

Key Results

The study found substantial bias across all tested embeddings. In an ideal, bias-free scenario, all neutrality scores (NN, FN, T) would be 1.0.

Gender-Occupation Bias

For gender-occupation tasks, GloVe, ELMo, and BERT all showed significant bias, with Net Neutrality (NN) scores ranging from 0.38 to 0.42. This suggests that the models frequently rely on gender stereotypes rather than logical neutrality.

Table 2: Baseline gender-occupation neutrality scores showing significant bias across static (GloVe) and contextualized (ELMo, BERT) models.

Nationality and Religion

Bias was also prevalent in nationality (using demonyms) and religion (using adherents). While slightly less extreme than gender bias—GloVe's NN score for nationality was 0.713—the models still frequently associated specific nationalities or religions with positive or negative traits (polarity).

Mitigation Strategies

The authors employed a projection-based debiasing method, which involves identifying a "bias direction" in the vector space and mathematically removing that component.

A key discovery was the "First Layer" sweet spot for contextualized models. While debiasing every layer of BERT or ELMo often degrades model utility, debiasing only the static first layer (the non-contextual input, such as subwords or characters) significantly reduced gender bias in the final NLI output. For GloVe, this mitigation increased the T:0.7 score from 0.114 to 0.297—a 160% improvement—without sacrificing accuracy on standard benchmarks like the SNLI test set.

Conclusion

This work demonstrates that bias in word embeddings is not just a geometric quirk but a functional failure in reasoning. While linear projection methods offer a path toward mitigation, especially in the static components of contextualized models, the remaining residual bias suggests that stereotypes are deeply embedded. Future work is needed to address the more complex, non-linear biases found in nationality and religious representations.

Summary updated

BibTeX
@inproceedings{dev2020measuring,
  author = {Sunipa Dev and Tao Li and Jeff M. Phillips and Vivek Srikumar},
  title = {{On Measuring and Mitigating Biased Inferences of Word Embeddings}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i05.6267},
}
Figure