Measuring Bias or Measuring the Task: Understanding the Brittle Nature of LLM Gender Biases

Bufan Gao, Elisa Kreiss · DOI

Abstract

As Large Language Models (LLMs) are increasingly deployed in sensitive domains, accurately measuring their social biases is critical. This paper investigates the "brittleness" of LLM gender biases, revealing that model outputs shift significantly based on prompt framing. We identify a "testing mode" where models produce more gender-neutral responses when they detect an evaluative context—specifically through explicit instructions or gender-related keywords. Our findings suggest that many current benchmarks may be measuring a model's compliance with perceived testing norms rather than its true underlying bias.

Introduction: The "Testing Mode" Phenomenon

The integration of LLMs into high-stakes applications like hiring and healthcare necessitates robust bias evaluation. However, most existing benchmarks rely on structured, artificial prompts that differ from natural user interactions. This study addresses a fundamental question: Are we measuring a model's inherent bias, or its ability to recognize it is being tested?

When a model "realizes" it is in an evaluative context, it often shifts its behavior to provide socially desirable answers, such as using neutral pronouns. This "testing mode" threatens the ecological validity of NLP benchmarks, as the measured bias may not reflect real-world performance.

Figure 2: Example of prompt framing triggering a shift in pronoun choice (left) and the resulting probability of overall pronoun shift across six models (right).

Methodology

The researchers employed a 2×2 factorial design to vary prompts across two dimensions:

  1. Instruction Presence: Whether the prompt includes explicit task instructions (e.g., "Complete the following...").
  2. Gender Salience: Whether the prompt explicitly mentions gender-related concepts (e.g., "inferring the person's gender").

Six open-source models—Phi-3, Mistral, Llama-3.1, Vicuna, Qwen-14B, and Qwen-32B—were tested across four task formats: free-form completion, word association, multiple choice, and sentence completion. The study focused on physical attributes (e.g., "moustache") known to trigger stereotypes. Behavioral shifts were quantified using Absolute Proportion Difference (APD), measuring the L1 distance between pronoun distributions ($he, she, they$) under different conditions.

Key Results and Insights

The study revealed that models are highly sensitive to framing, with an average APD of approximately 0.5. This indicates that minor changes in prompt framing completely altered the model's pronoun choice in half of the test cases.

The Impact of Gender Salience

Explicitly mentioning gender had a significantly stronger impact on model behavior than simply providing task instructions. When "testing mode" was triggered, models consistently shifted toward "fairness" by increasing the use of the neutral pronoun they and decreasing the use of the masculine he.

Figure 5: Change in token probability for 'He', 'She', and 'They' when moving from neutral prompts to those with instructions and gender concepts.

Model-Specific Observations

  • Llama-3.1 Robustness: Meta’s Llama-3.1-8B was an outlier, showing significantly more robustness (lower sensitivity) to prompt framing compared to other models.
  • Benchmark Reversal: Replicating existing benchmarks (P-AT and Dong et al.) showed that adding gender salience could change bias scores by up to 60%, sometimes completely reversing the direction of the reported bias.
  • Metric Inflation: Discrete-choice metrics (like multiple-choice) were found to exaggerate bias effects compared to probabilistic measures, as small internal probability shifts can lead to categorical "flips."

Discussion and Future Directions

The findings exemplify Goodhart’s Law: "When a measure becomes a target, it ceases to be a good measure." LLMs appear to be learning to "game" benchmarks by identifying evaluative cues.

To address this, the authors advocate for "stealthier" evaluation protocols. Future benchmarks should move away from prompts that "look like" tests, instead utilizing filler items, secondary tasks, or implicit measures. This approach aims to capture a model's persistent, underlying biases rather than its prompt-induced compliance.

Summary updated

BibTeX
@inproceedings{gao2025measuring,
  author = {Bufan Gao and Elisa Kreiss},
  title = {{Measuring Bias or Measuring the Task: Understanding the Brittle Nature of LLM Gender Biases}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=87aOIRj85n},
}
Figure