Table of Contents
Fetching ...

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.

Bi-directional Bias Attribution: Debiasing Large Language Models without Modifying Prompts

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.
Paper Structure (41 sections, 1 theorem, 31 equations, 10 figures, 26 tables, 1 algorithm)

This paper contains 41 sections, 1 theorem, 31 equations, 10 figures, 26 tables, 1 algorithm.

Key Result

Theorem 1

Let ${y}$ denote the model output of the projection layer $Proj(\cdot)$ and $B:\mathbb{R}^k \to \mathbb{R}$ be a differentiable bias function, such as the reciprocal of entropy or the Jensen–Shannon divergence introduced above. Suppose the hidden representation ${h}$ is modified along the path: with $\Delta {h}$ defined by attribution-guided projection on a subset of neurons $S$. Then the change

Figures (10)

  • Figure 1: Overview of our method (illustrated with Forward-IG). We first identify the words that trigger biased behavior in the model, then use these words to elicit such behaviors. Based on this, we attribute the biased responses to the most influential neurons and subsequently modify their values. In the bottom-right figure, the gray neurons denote the bias-related neurons after modification. The bar chart presents the debiasing performance of Llama-3.1 on StereoSet. The x-axis corresponds to four types of bias, while the y-axis represents the SS score, where values closer to 50% indicate greater fairness. Our method (gray bars) achieves results demonstrates improved fairness.
  • Figure 2: Ablation results of Llama-3.1 on StereoSet: (a) w/o attribution, and (b) w/o selection.
  • Figure 3: Ablation results of Llama-3.1 on StereoSet: BBA w/o attribution.
  • Figure 4: Ablation results of Llama-3.2 on StereoSet: FBA w/o attribution.
  • Figure 5: Ablation results of Llama-3.2 on StereoSet: BBA w/o attribution.
  • ...and 5 more figures

Theorems & Definitions (3)

  • Definition 1: Demographic-Invariant Generation (DIG)
  • Definition 2: Stereotype-Free Inference (SFI)
  • Theorem 1: Bias Change under Attribution-Guided Modification