English

Decomposing Attention To Find Context-Sensitive Neurons

Computation and Language 2025-10-07 v1 Artificial Intelligence Machine Learning

Abstract

We study transformer language models, analyzing attention heads whose attention patterns are spread out, and whose attention scores depend weakly on content. We argue that the softmax denominators of these heads are stable when the underlying token distribution is fixed. By sampling softmax denominators from a "calibration text", we can combine together the outputs of multiple such stable heads in the first layer of GPT2-Small, approximating their combined output by a linear summary of the surrounding text. This approximation enables a procedure where from the weights alone - and a single calibration text - we can uncover hundreds of first layer neurons that respond to high-level contextual properties of the surrounding text, including neurons that didn't activate on the calibration text.

Keywords

Cite

@article{arxiv.2510.03315,
  title  = {Decomposing Attention To Find Context-Sensitive Neurons},
  author = {Alex Gibson},
  journal= {arXiv preprint arXiv:2510.03315},
  year   = {2025}
}

Comments

10 pages, 7 figures. Submitted to the Mechanistic Interpretability Workshop at NeurIPS 2025

R2 v1 2026-07-01T06:15:54.481Z