Toward Localizing and Repairing Bias in Transformer Attention Heads

Sigma Jahan
7/14/2026
cs.SEcs.LG

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Transformer language models are increasingly used as software components, yet biased outputs remain difficult to localize and repair inside the model. Existing fairness testing and repair methods largely operate at the input-output or retraining level, while recent work suggests that bias-related behavior can concentrate in a small set of attention heads. This paper studies whether attention heads can be localized and repaired through a targeted inference-time intervention. We introduce ROBIN, a white-box head-level fairness debugging method that ranks attention heads using sensitivity to fairness probes and removes a small bias subspace from selected head outputs. In a four-model pilot study, ROBIN reduces the measured WinoBias gap across all models while preserving language-modeling quality better than whole-head zeroing. These preliminary results suggest that head-level bias repair should consider not only which heads are selected, but also how selected heads are modified.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{jahan2026toward,
  title  = {Toward Localizing and Repairing Bias in Transformer Attention Heads},
  author = {Sigma Jahan},
  year   = {2026},
  eprint = {2607.12863},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.12863v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.12863.svg)](https://codeofpaper.com/paper/2607.12863)

Discussion