Bi-directional Bias Attribution: Debiasing Large Language Models without Modifying Prompts
Yujie Lin, Kunquan Li, Yixuan Liao, Xiaoxin Chen, Jinsong Su
TL;DR
This work tackles demographic bias in large language models by avoiding fine-tuning and prompt redesign. It defines two problems, Demographic-Invariant Generation (DIG) and Stereotype-Free Inference (SFI), and leverages two gradient-based attribution strategies, Forward-IG and Backward-IG, to pinpoint bias-inducing neurons. Stereotype cues are automatically identified via entropy-based selection from adjectives and nouns, and biased neurons are mitigated by constraining their activations at the projection layer, with a theoretical bound linking bias reduction to output changes. Empirically, the method improves fairness across StereoSet, BBQ, and WinoBias while preserving language modeling performance, outperforming baselines and demonstrating a scalable, interpretable debiasing pathway for LLMs.
Abstract
Large language models (LLMs) have demonstrated impressive capabilities across a wide range of natural language processing tasks. However, their outputs often exhibit social biases, raising fairness concerns. Existing debiasing methods, such as fine-tuning on additional datasets or prompt engineering, face scalability issues or compromise user experience in multi-turn interactions. To address these challenges, we propose a framework for detecting stereotype-inducing words and attributing neuron-level bias in LLMs, without the need for fine-tuning or prompt modification. Our framework first identifies stereotype-inducing adjectives and nouns via comparative analysis across demographic groups. We then attribute biased behavior to specific neurons using two attribution strategies based on integrated gradients. Finally, we mitigate bias by directly intervening on their activations at the projection layer. Experiments on three widely used LLMs demonstrate that our method effectively reduces bias while preserving overall model performance. Code is available at the github link: https://github.com/XMUDeepLIT/Bi-directional-Bias-Attribution.
