Evaluating Gender Bias of Pre-trained Language Models in Natural Language Inference by Considering All Labels

Panatchakorn Anantaprayoon, Masahiro Kaneko, Naoaki Okazaki

TL;DR

Researchers have developed NLI-CoAL (Natural Language Inference - Considering All Labels), a new metric to more accurately measure gender bias in Pre-trained Language Models (PLMs). Unlike previous methods that only looked at one label, NLI-CoAL considers all three NLI labels—entailment, contradiction, and neutral—across English, Japanese, and Chinese, successfully distinguishing between biased reasoning and simple prediction errors.

What Problem Does This Paper Address?

Natural Language Inference (NLI) is a classic NLP task where a model determines if a "premise" sentence entails, contradicts, or is neutral toward a "hypothesis" sentence. For example:

  • Premise: The driver owns a truck.
  • Hypothesis: The man owns a truck.

An unbiased model should label this as neutral (a driver could be any gender). However, biased models often predict entailment due to the stereotype that drivers are male.

Existing evaluation methods, like the "Fraction Neutral" (FN) score, only measure how often a model fails to predict "neutral." The problem? Not all errors are biased. If a model predicts "contradiction" for the example above, it’s wrong, but it isn't necessarily showing gender bias. By ignoring the specific type of error, current metrics provide a muddy picture of a model's true social biases.

Methods

The authors propose NLI-CoAL, which categorizes evaluation data into three distinct groups based on gender stereotypes (using occupation words like "nurse" or "doctor"):

  1. Pro-Stereotypical (PS): The hypothesis matches the stereotype (e.g., Nurse $\rightarrow$ Woman). Biased models are expected to predict entailment.
  2. Anti-Stereotypical (AS): The hypothesis opposes the stereotype (e.g., Nurse $\rightarrow$ Man). Biased models are expected to predict contradiction.
  3. Non-Stereotypical (NS): Uses neutral occupations (e.g., Accountant). Biased models might predict either entailment or contradiction instead of neutral.
Figure 1: Comparison of bias evaluation methods. While the existing method by (Dev et al., 2020) con- siders all incorrect outputs as bias, our proposed method (NLI-CoAL) considers only biased and in- correct outputs

The NLI-CoAL score ($s$) averages the proportions of these specific biased outputs. To prove this metric works, the authors performed a meta-evaluation: they intentionally created models with varying "bias rates" by fine-tuning them on datasets with controlled amounts of biased examples. They then checked if their metric could correctly rank these models by their known bias levels.

Datasets

The study introduces new NLI bias evaluation datasets for three languages:

  • English: Based on MSCOCO captions.
  • Japanese: Based on YJ Captions.
  • Chinese: Based on Flickr8K-CN.

These datasets are unique because they use human-written sentences as premises rather than simple artificial templates, making the evaluation more representative of natural language. They utilized a list of 271 occupation words categorized by their stereotypical gender associations.

Overview of the dataset creation process

Key Insights and Ideas

  • Biased vs. Broken: The most critical insight is that a model can be "bad" at NLI without being "biased." NLI-CoAL is the first NLI metric to successfully separate these two phenomena.
  • Cross-Lingual Compatibility: The authors are the first to construct NLI bias datasets for Japanese and Chinese. They found that while the types of occupations might vary, the underlying logic of measuring bias through NLI holds across different linguistic structures.
  • The Chinese "Inconclusive" Case: Interestingly, Chinese PLMs showed a high rate of "contradiction" labels across all categories (PS, AS, and NS). This suggests the models haven't learned gender-related inferences well enough to even exhibit strong stereotypes—they are simply struggling with the task itself.

Key Results

The meta-evaluation showed that NLI-CoAL is significantly more accurate than the baseline FN score.

  • Correlation: NLI-CoAL achieved a Pearson correlation of 0.99 across all three languages when comparing bias scores to actual bias rates in controlled models.
  • Baseline Failure: The baseline FN score often showed negative or zero correlation (e.g., -0.263 for English BERT), meaning it failed to distinguish between a model that was highly biased and one that was just making random errors.
Correlation between bias rate and bias score across languages

In real-world testing, English and Japanese models showed clear evidence of gender bias, while Chinese models were found to have "fairly high" bias but were primarily characterized by general inference errors.

Limitations and Future Work

  • Binary Gender: The study is currently limited to a male/female binary. The authors acknowledge that extending this to non-binary gender identities is a necessary next step.
  • Occupation Lists: The stereotypes are based on a finite list of occupations from 2016. These may not reflect the evolving social nuances of different cultures or modern job markets.
  • Data Diversity: While using human-written premises is an upgrade over templates, the premise-hypothesis pairs still only differ by a single word. Future work could involve more complex, diverse sentence structures to test model reasoning more rigorously.

Summary updated

BibTeX
@inproceedings{anantaprayoon2024evaluating,
  author = {Panatchakorn Anantaprayoon and Masahiro Kaneko and Naoaki Okazaki},
  title = {{Evaluating Gender Bias of Pre-trained Language Models in Natural Language Inference by Considering All Labels}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=czqfbdUsvg},
}
Figure