mlsanityData to 14 Oct 2026

Attention Speaks Volumes: Localizing and Mitigating Bias in Language Models

arXiv 2410.22517 ↗First posted 29 Oct 2024cs.CL cs.AI cs.LGcited by 6

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  4. 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,420
  5. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
  6. 2016Man is to Computer Programmer as Woman is to Homemaker? Debiasing Word Embeddingscited by 1,312
  7. 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,207
  8. 2023Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Promptingcited by 1,122
  9. 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,085
  10. 2024Refusal in Language Models Is Mediated by a Single Directioncited by 1,032
  11. 2016Semantics derived automatically from language corpora contain human-like biasescited by 901
  12. 2023Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingcited by 817
21 more
  1. 2020CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language Modelscited by 710
  2. 2021BBQ: A Hand-Built Bias Benchmark for Question Answeringcited by 701
  3. 2023Bias and Fairness in Large Language Models: A Surveycited by 639
  4. 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 528
  5. 2020Null It Out: Guarding Protected Attributes by Iterative Nullspace Projectioncited by 455
  6. 2018Gender Bias in Coreference Resolutioncited by 442
  7. 2021Causal Abstractions of Neural Networkscited by 422
  8. 2023Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language Modelscited by 243
  9. 2024Two Tales of Persona in LLMs: A Survey of Role-Playing and Personalizationcited by 208
  10. 2024Improving Instruction-Following in Language Models through Activation Steeringcited by 160
  11. 2019Black is to Criminal as Caucasian is to Police: Detecting and Removing Multiclass Bias in Word Embeddingscited by 147
  12. 2023The Truth is in There: Improving Reasoning in Language Models with Layer-Selective Rank Reductioncited by 123
  13. 2019The emergence of number and syntax units in LSTM language modelscited by 94
  14. 2023Tell Your Model Where to Attend: Post-hoc Attention Steering for LLMscited by 91
  15. 2024Towards Principled Evaluations of Sparse Autoencoders for Interpretability and Controlcited by 86
  16. 2023Attention Satisfies: A Constraint-Satisfaction Lens on Factual Errors of Language Modelscited by 67
  17. 2020How do Decisions Emerge across Layers in Neural Models? Interpretation with Differentiable Maskingcited by 63
  18. 2018Sentence-Level Fluency Evaluation: References Help, But Can Be Spared!cited by 43
  19. 2023Quantifying Context Mixing in Transformerscited by 43
  20. 2022Geographic and Geopolitical Biases of Language Modelscited by 29
  21. 2024Do Large Language Models Discriminate in Hiring Decisions on the Basis of Race, Ethnicity, and Gender?cited by 25

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 4.

6 papers.