Attention Pruning: Automated Fairness Repair of Language Models via Surrogate Simulated Annealing
Vishnu Asutosh Dasu, Md Rafi Ur Rashid, Vipul Gupta, Saeid Tizpaz-Niari, Gang Tan
Abstract
This paper explores pruning attention heads as a post-processing bias mitigation method for large language models (LLMs). LLMs have been expanding into sensitive social contexts and socio-economic decision-making where fairness concerns become especially crucial. Since LLMs develop their decision-making patterns by training on massive datasets of human-generated content, they naturally encode and perpetuate societal biases. While modifying training datasets and algorithms is prohibitive, post-processing techniquessuch as pruning attention heads in pre-trained LLMs-can provide feasible and effective approaches to improve fairness. However, identifying the optimal subset of parameters to prune presents a combinatorial challenge within the immense parameter space of LLMs, requiring efficient solutions that balance competing objectives across the frontiers of model fairness and utility.
We explore a search-based program repair approach via simulated annealing to address the computational challenges. Given the prohibitive evaluation costs in billion-parameter LLMs, we develop surrogate deep neural networks that efficiently model the relationship between attention head states (active/inactive) and their corresponding fairness/utility metrics. This allows us to perform optimization over the surrogate models and efficiently identify optimal subsets of attention heads for pruning rather than directly searching through the LLM parameter space. This paper introduces Attention Pruning, a fairness-aware surrogate simulated annealing approach to prune attention heads in LLMs that disproportionately contribute to bias while minimally impacting overall model utility. Our experimental evaluation shows that Attention Pruning achieves a reduction of up to 40% in gender bias and outperforms state-of-the-art bias mitigation strategies.
Warning: This paper contains content that some readers may find offensive and harmful.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Fairness Invariants: A Relational Approach to Explaining and Mitigating Fairness Bugs cites Fairway: a way to build fair ML software
- Fairness Invariants: A Relational Approach to Explaining and Mitigating Fairness Bugs cites White-box fairness testing through adversarial sampling
- The WMDP Benchmark: Measuring and Reducing Malicious Use with Unlearning cites RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models
Cited by top-tier papers1
Builds on28
- RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language ModelsSamuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi et al.EMNLP Findings 2020 · 692 citations
- The WMDP Benchmark: Measuring and Reducing Malicious Use with UnlearningNathaniel Li, Alexander Pan, Anjali Gopal, Summer Yue et al.ICML 2024 · 390 citations
- Adversarial Filters of Dataset BiasesRonan Le Bras, Swabha Swayamdipta, Chandra Bhagavatula, Rowan Zellers et al.ICML 2020 · 242 citations
- Fairway: a way to build fair ML softwareJoymallya Chakraborty, Suvodeep Majumder, Zhe Yu, Tim MenziesFSE 2020 · 131 citations
- White-box fairness testing through adversarial samplingPeixin Zhang, Jingyi Wang, Jun Sun, Guoliang Dong et al.ICSE 2020 · 127 citations
Related papers
- Modular and On-demand Bias Mitigation with Attribute-Removal SubnetworksLukas Hauzenberger, Shahed Masoudian, Deepak Kumar, Markus Schedl et al.ACL Findings 2023 · 10 citations
- Toward Inclusive Language Models: Sparsity-Driven Calibration for Systematic and Interpretable Mitigation of Social Biases in LLMsPrommy Sultana Hossain, Chahat Raj, Ziwei Zhu, Jessica Lin et al.EMNLP Findings 2025
- Fairness Evaluation and Inference Level Mitigation in LLMsAfrozah Nadeem, Mark Dras, Usman NaseemACL Findings 2026 · 1 citation
- Deciphering Stereotypes in Pre-Trained Language ModelsWeicheng Ma, Henry Scheible, Brian Wang, Goutham Veeramachaneni et al.EMNLP 2023 · 7 citations
- Fine-tuning LLMs with Cross-Attention-based Weight Decay for Bias MitigationFarsheed Haque, Zhe Fu, Depeng Xu, Shuhan Yuan et al.EMNLP Findings 2025
