Attention Speaks Volumes: Localizing and Mitigating Bias in Language Models
Not on the map. Why?
Abstract (arXiv)
We explore the internal mechanisms of how bias emerges in large language models (LLMs) when provided with ambiguous comparative prompts: inputs that compare or enforce choosing between two or more entities without providing clear context for preference. Most approaches for bias mitigation focus on either post-hoc analysis or data augmentation. However, these are transient solutions, without addressing the root cause: the model itself. Numerous prior works show the influence of the attention module towards steering generations. We believe that analyzing attention is also crucial for understanding bias, as it provides insight into how the LLM distributes its focus across different entities and how this contributes to biased decisions. To this end, we first introduce a metric to quantify the LLM's preference for one entity over another. We then propose textttATLAS (Attention-based Targeted Layer Analysis and Scaling), a technique to localize bias to specific layers of the LLM by analyzing attention scores and then reduce bias by scaling attention in these biased layers. To evaluate our method, we conduct experiments across 3 datasets (BBQ, Crows-Pairs, and WinoGender) using textttGPT-2 XL (1.5B), textttGPT-J (6B), textttLLaMA-2 (7B) and textttLLaMA-3 (8B). Our experiments demonstrate that bias is concentrated in the later layers, typically around the last third. We also show how textttATLAS effectively mitigates bias through targeted interventions without compromising downstream performance and an average increase of only 0.82% in perplexity when the intervention is applied. We see an average improvement of 0.28 points in the bias score across all the datasets.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 33 of its 38 references that are in the map. First posted on arXiv 29 Oct 2024.
Builds on
33 of 38 references.
References · 33
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,420
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
- 2016Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddingscited by 1,312
- 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,207
- 2023Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Promptingcited by 1,122
- 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,085
- 2024Refusal in Language Models Is Mediated by a Single Directioncited by 1,032
- 2016Semantics derived automatically from language corpora contain human-like biasescited by 901
- 2023Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingcited by 817
21 more
- 2020CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language Modelscited by 710
- 2021BBQ: A Hand-Built Bias Benchmark for Question Answeringcited by 701
- 2023Bias and Fairness in Large Language Models: A Surveycited by 639
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 528
- 2020Null It Out: Guarding Protected Attributes by Iterative Nullspace Projectioncited by 455
- 2018Gender Bias in Coreference Resolutioncited by 442
- 2021Causal Abstractions of Neural Networkscited by 422
- 2023Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language Modelscited by 243
- 2024Two Tales of Persona in LLMs: A Survey of Role-Playing and Personalizationcited by 208
- 2024Improving Instruction-Following in Language Models through Activation Steeringcited by 160
- 2019Black is to Criminal as Caucasian is to Police: Detecting and Removing Multiclass Bias in Word Embeddingscited by 147
- 2023The Truth is in There: Improving Reasoning in Language Models with Layer-Selective Rank Reductioncited by 123
- 2019The emergence of number and syntax units in LSTM language modelscited by 94
- 2023Tell Your Model Where to Attend: Post-hoc Attention Steering for LLMscited by 91
- 2024Towards Principled Evaluations of Sparse Autoencoders for Interpretability and Controlcited by 86
- 2023Attention Satisfies: A Constraint-Satisfaction Lens on Factual Errors of Language Modelscited by 67
- 2020How do Decisions Emerge across Layers in Neural Models? Interpretation with Differentiable Maskingcited by 63
- 2018Sentence-Level Fluency Evaluation: References Help, But Can Be Spared!cited by 43
- 2023Quantifying Context Mixing in Transformerscited by 43
- 2022Geographic and Geopolitical Biases of Language Modelscited by 29
- 2024Do Large Language Models Discriminate in Hiring Decisions on the Basis of Race, Ethnicity, and Gender?cited by 25
Built on by
Citing papers per year: 2025: 2; 2026: 4.
6 papers.
- 2026DatBench: Discriminative, Faithful, and Efficient VLM Evaluationscited by 10
- 2026Failure Modes in Multi-Hop QA: The Weakest Link Effect and the Recognition Bottleneckcited by 3
- 2025Breaking Down Bias: On The Limits of Generalizable Pruning Strategiescited by 2
- 202620/20 Vision Language Models: A Prescription for Better VLMs through Data Curation Alonecited by 2
- 2025BiasGym: A Simple and Generalizable Framework for Analyzing and Removing Biases through Injectioncited by 1
- 2026Mechanics of Bias and Reasoning: Interpreting the Impact of Chain-of-Thought Prompting on Gender Bias in LLMscited by 0
- 2026Mechanics of Bias and Reasoning: Interpreting the Impact of Chain-of-Thought Prompting on Gender Bias in LLMs19 May 2026
- 202620/20 Vision Language Models: A Prescription for Better VLMs through Data Curation Alone12 May 2026
- 2026Failure Modes in Multi-Hop QA: The Weakest Link Effect and the Recognition Bottleneck18 Jan 2026
- 2026DatBench: Discriminative, Faithful, and Efficient VLM Evaluations5 Jan 2026
- 2025BiasGym: A Simple and Generalizable Framework for Analyzing and Removing Biases through Injection12 Aug 2025
- 2025Breaking Down Bias: On The Limits of Generalizable Pruning Strategies11 Feb 2025