# The Devil is in the Neurons: Interpreting and Mitigating Social Biases in Pre-trained Language Models

Source: [The Devil is in the Neurons: Interpreting and Mitigating Social Biases in Pre-trained Language Models](<https://www.sota2.com/research/paper/68fa73ad1e209131cea5de3d>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-28T13:57:07.323Z

Authors: Yan Liu, Yu Liu, Xiaokang Chen, Pin-Yu Chen, Daoguang Zan, Min-Yen Kan, Tsung-Yi Ho

Published: 2024-06-14T15:41:06.000Z

## Abstract

Pre-trained Language models (PLMs) have been acknowledged to contain harmful information, such as social biases, which may cause negative social impacts or even bring catastrophic results in application. Previous works on this problem mainly focused on using black-box methods such as probing to detect and quantify social biases in PLMs by observing model outputs. As a result, previous debiasing methods mainly finetune or even pre-train language models on newly constructed anti-stereotypical datasets, which are high-cost. In this work, we try to unveil the mystery of social bias inside language models by introducing the concept of {\\sc Social Bias Neurons}. Specifically, we propose {\\sc Integrated Gap Gradients (IG$^2$)} to accurately pinpoint units (i.e., neurons) in a language model that can be attributed to undesirable behavior, such as social bias. By formalizing undesirable behavior as a distributional property of language, we employ sentiment-bearing prompts to elicit classes of sensitive words (demographics) correlated with such sentiments. Our IG$^2$ thus attributes the uneven distribution for different demographics to specific Social Bias Neurons, which track the trail of unwanted behavior inside PLM units to achieve interoperability. Moreover, derived from our interpretable technique, {\\sc Bias Neuron Suppression (BNS)} is further proposed to mitigate social biases. By studying BERT, RoBERTa, and their attributable differences from debiased FairBERTa, IG$^2$ allows us to locate and suppress identified neurons, and further mitigate undesired behaviors. As measured by prior metrics from StereoSet, our model achieves a higher degree of fairness while maintaining language modeling ability with low cost.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Bias Evaluation on BBQ (Averaged across Gender, Nationality, Religion)](<https://www.sota2.com/research/sota/bias-evaluation-on-bbq-averaged-across-gender-nationality-religion.md>): Bias Evaluation; BBQ averaged across gender, nationality, and religion domains; Accuracy (Ambiguous): 59.

- [Stereotypical Bias Evaluation on StereoSet](<https://www.sota2.com/research/sota/stereotypical-bias-evaluation-on-stereoset.md>): Bias Measurement; StereoSet; Overall SS: not recorded.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2406.10130>)

[PDF](<https://arxiv.org/pdf/2406.10130.pdf>)
