Bias and Representational Harm in LLMs
Bias in an LLM comes in two kinds. Representational harm is how a group gets portrayed. Allocational harm is who gets worse outcomes. Gallegos et al. (2024) sorted the metrics into embedding, probability, and generated-text, and recent work shows single-axis tests miss what happens at intersections like gender and race. Interpretability gives you levers (neurons, SAE features, attention heads), but a lever on an axis nobody measured does little.
Learning Objectives
- Define representational vs allocational harm and give one example of each in an LLM deployment.
- Name the three evaluation-metric categories from Gallegos et al. 2024 and describe one metric from each.
- Describe intersectionality and why WinoIdentity's uncertainty-based fairness measurement addresses gaps in single-axis bias evaluation.
- Describe two mechanistic-interpretability approaches to bias (gender neurons, SAE features, attention-head manipulation).
The Problem
The previous lessons cover deliberate harm (jailbreaks, scheming) and safety governance. Bias is harm that shows up without anyone intending it. It comes from training data distributions, prompt framing, and accumulated design choices. Measuring and reducing it is a different methodological problem from adversarial robustness.
The Concept
Representational vs allocational
- Representational harm. Stereotypes, erasure, demeaning portrayals. An LLM that depicts nurses as exclusively female is producing representational harm.
- Allocational harm. Unequal material outcomes. An LLM that scores Black applicants' resumes systematically lower is producing allocational harm.
These are not the same. A model can be "representationally unbiased" (produces diverse portrayals) while being "allocationally biased" (makes unequal recommendations). Evaluations need to measure both.
Three evaluation-metric categories (Gallegos et al. 2024)
- Embedding-based. WEAT-style tests on pre-RLHF embeddings. Measures statistical associations between identity terms and attribute terms. Limited: measures the representation, not the behaviour.
- Probability-based. Log-likelihood of stereotype-confirming vs stereotype-violating completions. Decoder-side measurement. Captures some behavioural bias.
- Generated-text-based. Downstream-task measurement on generated text. Resume-scoring, recommendation writing, dialogue. Most ecologically valid; hardest to reproduce.
Intersectionality
Bias evaluation on "gender" misses the bias that only fires on (gender, race) pairs. An et al. 2025 find GPT-4o penalizes Black women in resume scoring more than Black men and more than white women separately. Single-axis evaluation cannot capture this.
WinoIdentity (COLM 2025) introduces uncertainty-based intersectional fairness. It measures whether the model's uncertainty over outcomes differs across intersectional identity tuples, not just the point prediction. That catches the case where the model is equally wrong across groups but more uncertain for some, which changes downstream allocation behaviour.
Mechanistic approaches
2024-2025 interpretability work opens bias to mechanistic intervention:
- Gender neurons (Yu & Ananiadou 2025). Specific MLP neurons correlate with gender-specific behaviours. Ablating these neurons reduces gender-gap metrics with limited capability cost.
- Clinical racial bias via SAEs (Ahsan & Wallace 2025). Sparse autoencoder features decompose the internal representation into interpretable dimensions; race-correlated features can be identified and suppressed.
- UniBias (Zhou et al. 2024). Attention-head manipulation for zero-shot debiasing. Specific heads amplify identity-class sensitivity; zeroing or re-weighting these heads reduces bias with no fine-tuning.
The meta-critique
The 10-year literature review (arXiv:2508.11067, 2025) finds the field disproportionately focuses on binary-gender bias. Other axes (disability, religion, migration status, multi-lingual identity) receive far less attention. The meta-critique argues that narrow focus can harm marginalized groups by neglect: a model well-debiased on binary gender may be badly biased on dimensions nobody checked.
Where this fits in Phase 18
Lessons 20-21 cover bias and fairness formally. Lesson 22 covers privacy. Lesson 23 covers watermarking. These are the user-harm layer complementing the earlier deception/safety layer.
Use It
code/main.py builds a toy embedding-based bias probe. It uses a hand-written 4-d embedding table and computes a WEAT-style score: how much more the male identity words associate with tech words than the female identity words do. Run it to see the metric report a positive effect, then see a simple debiasing step (projecting out the gender direction) reduce it without removing it.
Ship It
This lesson produces outputs/skill-bias-eval.md. Given a model card or fairness claim, it audits the evaluation across the three metric categories (embedding, probability, generated-text), the intersectionality coverage, and the mechanism of any debiasing intervention.
I'd run main.py first and read the output before the survey papers. The embedding is a hand-written 4-d table with axes for masculine, feminine, tech, and care, so the effect size it prints says something about my toy vectors and nothing about any real model. What it shows is the mechanics: weat_score is a difference of mean cosine similarities, and you can see exactly which numbers move it.
The debiasing step is worth reading closely. debias projects the gender direction out of the six attribute words (engineer, nurse, and so on) and leaves the identity words alone. The score drops but stays positive, because the tech and care axes still separate the two attribute sets. That residual is the reason I'd treat an embedding score as one signal. Passing it says little about what the model does when it writes a resume summary, which is where the probability-based and generated-text metrics come in.
The toy also has a single gender axis and no race axis, so it cannot show the intersectional effect An et al. report. Exercise 2 means adding axes and word groups yourself, and I think that is the fastest way to feel why single-axis evaluation misses things. Real WEAT runs on pretrained embeddings with far more dimensions, so keep the toy in proportion.
Exercises
-
Run
code/main.py. Report WEAT-style bias scores before and after the debiasing step. Explain why the metric does not drop to zero. -
Extend the probe with an intersectional test: (gender, race) x (career, family). Report cross-axis bias scores.
-
Read An et al. 2025 (PNAS Nexus). Identify the two intersectional effects they report that single-axis gender evaluation would miss.
-
Yu & Ananiadou 2025 identify gender neurons. Sketch a falsification experiment that would distinguish "these neurons cause gender bias" from "these neurons correlate with gender bias."
-
The meta-critique argues the field focuses too narrowly on binary gender. Pick one under-studied axis and describe a representational-harm measurement protocol for it.
Key Terms
| Term | What people say | What it actually means |
|---|---|---|
| Representational harm | "stereotypes / erasure" | Biased portrayal of a group |
| Allocational harm | "unequal decisions" | Biased material outcome for a group |
| WEAT | "the embedding test" | Word Embedding Association Test; co-occurrence-based bias probe |
| Intersectionality | "combined identity effects" | Bias that emerges at the intersection of multiple identity axes |
| Gender neurons | "MLP bias neurons" | Specific neurons whose activations correlate with gender-specific behaviour |
| SAE feature | "interpretable dimension" | Sparse-autoencoder-identified feature; useful for mechanistic bias analysis |
| UniBias | "attention-head debiasing" | Zero-shot debiasing by reweighting attention heads |
Further Reading
- Gallegos et al.: Bias and Fairness in LLMs: A Survey (arXiv:2309.00770, Computational Linguistics 2024): canonical survey
- An et al.: Intersectional resume-evaluation bias (PNAS Nexus, March 2025): five-model intersectional study
- WinoIdentity: uncertainty-based intersectional fairness (arXiv:2508.07111, COLM 2025): new benchmark
- UniBias: attention-head manipulation (Zhou et al. 2024, ACL): zero-shot debiasing
Code
- main.py (python, 102 lines)