Table of Contents
Fetching ...

Understanding and Mitigating Gender Bias in LLMs via Interpretable Neuron Editing

Zeping Yu, Sophia Ananiadou

TL;DR

This work tackles gender bias in large language models by first introducing CommonWords, a fresh dataset designed to reveal bias in everyday vocabulary, and then dissecting the neuron-level information flow that underpins biased behavior. It identifies two key neuron circuits—gender neurons activated by stereotypical terms and general neurons influenced by the start token—demonstrating that editing a small set of neurons can disproportionately affect model capabilities due to hierarchical interactions. Building on these insights, the authors propose Interpretable Neuron Editing (INE), a three-step, logit- and causal-based neuron selection approach that reduces bias while preserving core tasks, outperforming fine-tuning and other editing baselines across five decoder-only LLMs. The findings offer a practical framework for bias mitigation grounded in mechanistic interpretability, with implications for safer and more reliable deployment of LLMs in real-world settings.

Abstract

Large language models (LLMs) often exhibit gender bias, posing challenges for their safe deployment. Existing methods to mitigate bias lack a comprehensive understanding of its mechanisms or compromise the model's core capabilities. To address these issues, we propose the CommonWords dataset, to systematically evaluate gender bias in LLMs. Our analysis reveals pervasive bias across models and identifies specific neuron circuits, including gender neurons and general neurons, responsible for this behavior. Notably, editing even a small number of general neurons can disrupt the model's overall capabilities due to hierarchical neuron interactions. Based on these insights, we propose an interpretable neuron editing method that combines logit-based and causal-based strategies to selectively target biased neurons. Experiments on five LLMs demonstrate that our method effectively reduces gender bias while preserving the model's original capabilities, outperforming existing fine-tuning and editing approaches. Our findings contribute a novel dataset, a detailed analysis of bias mechanisms, and a practical solution for mitigating gender bias in LLMs.

Understanding and Mitigating Gender Bias in LLMs via Interpretable Neuron Editing

TL;DR

This work tackles gender bias in large language models by first introducing CommonWords, a fresh dataset designed to reveal bias in everyday vocabulary, and then dissecting the neuron-level information flow that underpins biased behavior. It identifies two key neuron circuits—gender neurons activated by stereotypical terms and general neurons influenced by the start token—demonstrating that editing a small set of neurons can disproportionately affect model capabilities due to hierarchical interactions. Building on these insights, the authors propose Interpretable Neuron Editing (INE), a three-step, logit- and causal-based neuron selection approach that reduces bias while preserving core tasks, outperforming fine-tuning and other editing baselines across five decoder-only LLMs. The findings offer a practical framework for bias mitigation grounded in mechanistic interpretability, with implications for safer and more reliable deployment of LLMs in real-world settings.

Abstract

Large language models (LLMs) often exhibit gender bias, posing challenges for their safe deployment. Existing methods to mitigate bias lack a comprehensive understanding of its mechanisms or compromise the model's core capabilities. To address these issues, we propose the CommonWords dataset, to systematically evaluate gender bias in LLMs. Our analysis reveals pervasive bias across models and identifies specific neuron circuits, including gender neurons and general neurons, responsible for this behavior. Notably, editing even a small number of general neurons can disrupt the model's overall capabilities due to hierarchical neuron interactions. Based on these insights, we propose an interpretable neuron editing method that combines logit-based and causal-based strategies to selectively target biased neurons. Experiments on five LLMs demonstrate that our method effectively reduces gender bias while preserving the model's original capabilities, outperforming existing fine-tuning and editing approaches. Our findings contribute a novel dataset, a detailed analysis of bias mechanisms, and a practical solution for mitigating gender bias in LLMs.
Paper Structure (25 sections, 10 equations, 3 figures, 13 tables)

This paper contains 25 sections, 10 equations, 3 figures, 13 tables.

Figures (3)

  • Figure 1: The neuron-level information flow of sentence "The nurse is a" -> "woman". The <start> token activates "general neurons" and the word "nurse" activates "gender neurons" on their residual streams. These information propagate through attention neurons and are transferred to the final position, ultimately contributing to the prediction of "woman."
  • Figure 2: Important heads for gender bias in Llama-7B.
  • Figure 3: Neuron frequency across 1,000 cases.