UniBias: Unveiling and Mitigating LLM Bias through Internal Attention and FFN Manipulation
Hanzhang Zhou, Zijian Feng, Zixiao Zhu, Junlang Qian, Kezhi Mao

TL;DR
This paper investigates the internal mechanisms causing bias in large language models and introduces UniBias, a method that identifies and removes biased components to improve model robustness and performance.
Contribution
The study uncovers how FFNs and attention heads contribute to bias in LLMs and proposes UniBias, an inference-only technique to mitigate bias by targeting these internal components.
Findings
UniBias effectively reduces bias in LLMs across multiple datasets.
Mitigation improves in-context learning performance and reduces prompt sensitivity.
Internal attention and FFN analysis reveal key sources of bias.
Abstract
Large language models (LLMs) have demonstrated impressive capabilities in various tasks using the in-context learning (ICL) paradigm. However, their effectiveness is often compromised by inherent bias, leading to prompt brittleness, i.e., sensitivity to design settings such as example selection, order, and prompt formatting. Previous studies have addressed LLM bias through external adjustment of model outputs, but the internal mechanisms that lead to such bias remain unexplored. Our work delves into these mechanisms, particularly investigating how feedforward neural networks (FFNs) and attention heads result in the bias of LLMs. By Interpreting the contribution of individual FFN vectors and attention heads, we identify the biased LLM components that skew LLMs' prediction toward specific labels. To mitigate these biases, we introduce UniBias, an inference-only method that effectively…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsSoftware Engineering Research
