Don’t Forget About Pronouns: Removing Gender Bias in Language Models Without Losing Factual Gender Information

Tomasz Limisiewicz, David Mareček

TL;DR

This paper introduces a novel method to disentangle and remove stereotypical gender bias from language model representations, specifically focusing on profession names. Crucially, their approach preserves factual gender information conveyed by pronouns, ensuring models remain useful for tasks requiring gender agreement while mitigating harmful stereotypes.

What Problem Does This Paper Address?

Large language models (LLMs) are increasingly used in critical applications, but they often inherit and propagate gender biases present in their training data. This bias manifests as a tendency to associate certain professions with specific genders (e.g., "nurse" with "she," "doctor" with "he"), even when the profession itself is gender-neutral. This can lead to unfair outcomes, such as in job matching systems. While previous work has attempted to de-bias LLMs, many methods indiscriminately remove all gender-related signals, including factual gender information (like pronoun gender), which is essential for tasks requiring gender agreement. This paper aims to strike a balance: reduce stereotypical bias in gender-neutral terms while retaining factual gender information.

Methods

The core of the paper's contribution lies in a method to disentangle two types of gender information encoded in LLM embeddings:

  1. Factual Gender: Grammatical or semantic gender (e.g., "he," "she," "boy," "girl").
  2. Gender Bias: Stereotypical associations between a word and a gender (e.g., "nurse" with female, "engineer" with male).

They achieve this using orthogonal probes, a technique that learns a linear transformation to identify specific information encoded in embedding vectors. By training probes to approximate factual gender (from pronouns) and gender bias (from profession names) separately, they can identify distinct "subspaces" within the embeddings.

Once these subspaces are identified, they apply a filtering algorithm. This algorithm selectively masks dimensions in the embedding space. The primary filter (F_b) removes dimensions identified as encoding bias. A more sophisticated filter (F_b,+f) is also proposed, which prioritizes keeping dimensions important for factual gender over those important for bias. This ensures that factual gender information is preserved.

Datasets

  • WinoBias dataset (and its derivative WinoMT): Used for evaluating the gender bias of gender-neutral professional words. The authors specifically use WinoMT for probing due to its more challenging coreference resolution tasks.
  • English Web Treebank UD: Used to evaluate the impact of filtering on general masked language modeling (MLM) accuracy.
  • GAP Coreference Dataset: Used to evaluate the model's ability to infer personal pronouns based on context after de-biasing.

Key Insights and Ideas

  • Factual vs. Stereotypical Gender: The paper clearly distinguishes between factual gender (essential for grammatical correctness) and stereotypical bias (harmful and to be mitigated). This distinction is crucial for developing nuanced de-biasing strategies.
  • Orthogonal Probes for Disentanglement: The use of orthogonal probes proves effective in separating the embedding subspaces responsible for factual gender and gender bias, a key step towards targeted filtering.
  • Preserving Factual Gender is Key: The most significant insight is that simply removing all gender signals is detrimental. Preserving factual gender information is vital for maintaining model utility in tasks like coreference resolution.
  • Bias is Sparse: The probing results indicate that gender bias is often encoded in a relatively sparse set of dimensions within the embeddings, making targeted filtering feasible.
  • Stereotypes Affect Pronoun Prediction: The models exhibit a strong tendency to predict male pronouns for professions, even when the context doesn't explicitly suggest it, highlighting the pervasive nature of stereotypes.

Key Results

  • Bias Reduction: The proposed filtering method successfully reduces gender bias, as measured by metrics like Mean Squared Error (MSEGN) of relative gender preference, across BERT and ELECTRA models. For instance, MSEGN decreases significantly after filtering.
  • Factual Gender Preservation: The method preserves factual gender information. When the "factual gender preserving filter" (F_b,+f) is used, the models maintain good performance on tasks requiring gender agreement, such as pronoun prediction in the GAP dataset.
  • MLM Accuracy Impact: Filtering out bias dimensions leads to a moderate decrease in general masked language modeling accuracy (e.g., up to 0.07 for ELECTRA). However, this drop is often mitigated or even reversed when factual gender dimensions are preserved.
  • Model Differences: The degree of bias and the effectiveness of de-biasing vary across models. BERT large, for example, shows lower initial bias and good performance after de-biasing.

Limitations and Future Work

  • Linear Probing: The orthogonal probes are linear. The paper acknowledges that gender information might be encoded non-linearly in Transformer models, and this signal could be recovered in subsequent layers. Future work could explore non-linear probing.
  • Incomplete Filtering: While the method reduces bias, it doesn't guarantee complete removal. There's no guarantee that all bias dimensions are filtered.
  • Downstream Task Applicability: The de-biased representations still retain factual gender information, which might be problematic for downstream tasks that rely on gender-biased data distributions (e.g., predicting professions from biographies where gender ratios are imbalanced).
  • Generalization: The current method focuses on profession names. Future work could extend this to other categories of biased terms and explore its application in tasks like machine translation, especially for languages with grammatical gender.

Summary updated

BibTeX
@inproceedings{limisiewicz2022dont,
  author = {Tomasz Limisiewicz and David Mareček},
  title = {{Don’t Forget About Pronouns: Removing Gender Bias in Language Models Without Losing Factual Gender Information}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
}
Figure