Residual-stream features, MLP features and MLP neurons have long been studied with "feature visualization": pages showing where a unit fires across a large dataset. Attention heads are harder to show this way, the authors say, because they are high rank, combine two circuits and act across a whole context. Earlier work had also found that heads studied on one task often do other things on general text. This paper, published on the Transformer Circuits Thread on 4 May 2026, introduces HeadVis, an interactive tool for asking what one attention head does across the data distribution, releases its code, and uses it on heads of Claude 3.5 Haiku (which the paper calls Claude Haiku 3.5). Its stated theme is that "a head's behavior on the full distribution rarely matches what a narrow task suggests, and the difference isn't always easy to characterize" (Introduction). The case studies are qualitative, with a few controlled tests; the paper ends with the authors' view of what blocks a full decomposition of attention layers.
The live page is the version of record, together with the repository at its release commit (304acba075, 4 May 2026, the only commit, Apache-2.0 licence). A capture of the page from 4 May 2026 in the Internet Archive differs from the current page only in punctuation. Most figures are interactive and load data in the browser; the numbers in this note are from the text.
Terms used in this note
- Attention head; QK and OV circuits. A head chooses which earlier positions (keys) each position (query) reads from, through its QK circuit, and what it copies from them, through its OV circuit. See A Mathematical Framework for Transformer Circuits.
- Induction head. A head that, given a pattern [A][B] … [A], attends from the second A to B and predicts B again. A fuzzy induction head matches A only approximately.
- QK and OV attribution. From Tracing Attention Computation Through Feature Interactions: an attention score is written as a sum of terms, one per pair of a query-side and a key-side feature; a head's output is likewise written as a sum over pairs of a feature at the attended position and an output feature. HeadVis computes these for any query-key pair, using a 10-million-feature weakly causal crosscoder (a dictionary of residual-stream features; see Sparse Crosscoders).
- Polysemantic and monosemantic. A unit is polysemantic if it implements several unrelated behaviors, monosemantic if one.
- Attention superposition. The hypothesis that interpretable attention units ("attentional features", in the paper's term) are spread across several heads.
What the tool does
HeadVis has three parts (section "Open Source HeadVis"): a web frontend; an offline script that computes, for each head, metrics and attention patterns over a dataset; and a server for live queries such as QK and OV attributions. Its main views, as the case studies use them:
- A head selector: a scatter plot of all heads, with axes and colour set to any per-head metric (layer, an induction score, others), on the authors' observation that heads at the extremes of a metric are often the interpretable ones (Figure 1).
- Dataset examples: attention patterns on the examples where the head attends most, with hover views of which keys each token attends to (Figure 3).
- PCA views of a head's query, key and output activations on the token pairs where its output is largest, as a first check on whether apparent behaviors are distinct to the head itself. The authors "treat PCA as a hypothesis-generation tool rather than a test" (section "A Polysemantic Attention Head").
- QK and OV attributions for any query-key pair.
- Custom prompts and head ranking on a chosen query-key pair, both available internally but not in the open-source release.
The released code is the frontend plus a specification of the two backends; the pipeline and server are skeletons that a user implements for their own model, and the authors suggest "pointing Claude at the repository" to do so. The repository's README calls it a "Reference implementation" that "is not maintained and not accepting contributions". Hosted demos cover all heads of Gemma 3 1B and a subset of Haiku heads, with cached attributions for the paper's examples. Five weeks later, Neuronpedia's blog announced HeadVis as a core Neuronpedia feature "in collaboration with Anthropic", with over 36,000 head dashboards across 37 models (Lin and Chanin, 9 June 2026).
What the case studies find
All studies are on heads of Claude 3.5 Haiku, over a dataset the paper calls standard but does not describe further. Labels for heads and features are the authors' interpretations.
Fuzzy induction
An induction score (average attention on literal [A][B] … [A] pairs in ordinary text) finds induction heads in all layers; the authors report that early-layer ones copy literally while mid-layer ones do fuzzier induction, which the score does not track (section "Fuzzy Induction", Figure 2). In one poetry head, the token "gleam" attends to the newline after an earlier "dream". QK attribution shows a query-side feature for an "ea" sound at line end interacting with a key-side feature for a newline after an "ee" sound, while the top OV term is the same as in literal induction (copy the newline). The authors conclude that here "The fuzziness lives entirely in QK". They report finding fuzzy induction heads that match across languages, antonyms, list positions and kinship terms, without counts.
A polysemantic head
An early-layer head studied in When Models Manipulate Manifolds as a "line width" head, which helps count characters since the last newline, turned out to do three things (section "A Polysemantic Attention Head"): attend between the two tokens of a year from 1000 to 1999 that the tokenizer splits (from "776" to "1" in 1776), between the pieces of split long words, and between newlines (the behavior studied before). In PCA of the head's query, key and output activations, the three behaviors fall into separate clusters, colored by token rules fixed in advance (Figure 6). The authors say this "makes us fairly confident this head is polysemantic", and that most dataset examples fit one of the three. Per-example attributions did not give a rule for the years behavior: sweeping the year in a fixed prompt showed strong attention only for 1000 to 1986, which "neither the attention patterns nor the attributions surfaced" (Figure 7). The direct test, splitting the head into three heads that together reproduce it, was not done.
Answer selection
The "answer selection" head from Tracing Attention Computation pulls a multiple-choice answer forward. None of its top examples on the full dataset are multiple-choice questions, and its PCA shows one continuous cloud (section "Answer Selection", Figure 9). Across examples, its OV circuit always copies what is at the attended token, and its QK circuit matches key-side features marking content as relevant with query-side features for being about to produce such content: in a multiple-choice question, a sentiment-classification function and a two-speaker dialogue (Figures 10 to 12). The features in each case are disjoint, so the authors projected the "correct answer" feature through the head's key weights and found that the nearest features were other "this is the relevant content" features that are near-orthogonal in the residual stream (Figure 13); the same check on the years behavior of the polysemantic head found only year features. They write: "Our best guess is that this head is monosemantic, but we aren't fully convinced", noting that the evidence covers "a handful of examples" and that they lack a crisp enough description of the behavior to test against every example.
Same-set suppression
A mid-layer head attends mostly among places, people and team names (section "Same-Set Suppression"). On custom sentences it attends from "Madrid" to "Messi" rather than to "Modrić", who played for Real Madrid, and from "Europe" to the one non-European country in a list. In 185 generated sentences of the form "{five cities} are all cities in {country}", with one foreign city, the country token attends more to the foreign city than to any of its own "98% of the time". In the head's QK geometry, after subtracting means, a country's query has mean cosine similarity −0.47 with the keys of its own cities and +0.01 with cities elsewhere, although in the residual stream countries and their own cities have mean similarity +0.17, so the head's projections reverse the sign (Figure 17).
On real data the pattern is not clean: some examples are not about places, and many are unclear. The authors say what they isolated is "part of what this head does with places". One puzzling example, in which "Ivory" (of Ivory Coast) attends to an unrelated "a" in a text about a trip to Zambia, is traced to a Zambian feature at "a", written there by an earlier head attending to the name of a Zambian nonprofit: an instance of K-composition. Replacing Ivory Coast with Zambia dropped the attention from 0.87 to 0.08 (0.10 with Lusaka), while the other 51 African countries gave a median of 0.27 (Figure 19). The authors note that the direction differs from the custom sentences (here the odd country attends; there the country attended to the odd city), which they read as a broader behavior of which the custom prompts isolated one case.
The authors' view of the open problems
The Discussion contrasts attention with MLP layers, where transcoders give sparse, rank-1 features that reconstruct much of the computation and that the authors "believe" can be mechanistically faithful to the original MLP; a footnote calls that faithfulness "an assumption" that is "sometimes not true", linking A Toy Model of Mechanistic (Un)Faithfulness. For attention they name four obstacles:
- Attention biology. It is not known what attentional features to expect, so it is hard to tell whether a decomposition works. The authors propose studying heads over long contexts, mentioning "the role of the system prompt in guiding an Assistant throughout a conversation" as one possible use, and ask how often heads use softmax competition for "attend to A if present, otherwise B" logic, which single-edge analysis cannot see.
- Head polysemanticity. The authors argue that "an attention head can be polysemantic without superposition, which isn’t possible for an MLP neuron": a head's high-rank output can write unrelated behaviors to separable directions. They have not determined which kind the line width head is.
- Attention superposition. "We suspect some attentional features are spread across multiple heads, but we have no confirmed example in a real LLM." They ask for one example, and note that toy models, including their own, produce attention superposition without showing that it occurs in real heads.
- High-rank attentional features. A head's score is a bilinear form of rank equal to the head dimension; the authors suspect real heads cannot be approximated well by sums of rank-1 heads, and say that "perhaps" most attentional features fit in rank 2 to 6, a range prior work has interpreted, or perhaps some need rank close to the head dimension.
They place attention output SAEs, multitoken transcoders (Progress on Attention) and Low-Rank Sparse Attention (He et al., 2025; Shu et al., 2026) in one family that learns rank-1 OV directions, which in principle can isolate both polysemanticity and superposition but splits higher-rank behaviors such as copying across many features. The conclusion says the authors are "optimistic about interpreting attention".
Limitations and open questions
- Qualitative, selected cases. The four heads were chosen for illustration; the polysemantic head was "picked because its behaviors separated cleanly". Apart from the 185-sentence test and the country swap, findings rest on inspected examples, with no counts of heads examined or of how many resisted interpretation.
- One closed model. All case studies use Claude 3.5 Haiku; the open demo on Gemma 3 1B is not analyzed in the paper.
- PCA can mislead. The authors say a head could be structured to make PCA "maximally misleading" and treat it only as a starting point.
- Single edges only. Logic that depends on competition among keys is invisible to the methods used.
- What the release omits. Custom prompts, logit-lens views, similarity metrics between heads and composition heatmaps were used internally but are not released; the repository is unmaintained.
- Superposition, a year on. Progress on Attention (April 2025) reported "significant evidence of attention superposition" from reconstruction trade-offs. This paper's statement that no confirmed example exists in a real model concerns a different kind of evidence, an individually inspected case; the paper does not compare the two.
Research questions
- How common are polysemantic heads? Running the PCA check over all heads of an open model and following up clustered heads by inspection would estimate how many heads show separable behaviors, by layer.
- Can the line width head be split? Training three heads, each on one behavior, and measuring how well their sum reproduces the original head's output would be the direct test the authors propose.
- Is the answer-selection head one behavior? Writing a text description of the proposed behavior and having graders check it against a random sample of the head's top examples would test the "best guess" of monosemanticity.
- What sets the 1986 cut-off? Tracing QK attributions for years immediately above and below 1986 would show which features stop matching.
- Does same-set suppression generalize beyond places? Building controlled sets of related and unrelated items in other domains (sports teams, chemical elements) and measuring the head's attention would test how general the mechanism is.
- Can a real case of attention superposition be found? Searching for a behavior that is unreadable in any one head but clear in a combination of a few, as the authors propose, would settle the question this paper leaves open.
How it connects
- Tracing Attention Computation Through Feature Interactions (July 2025) supplies the QK attributions and crosscoder features HeadVis builds on, and the answer-selection head re-examined here.
- Progress on Attention (April 2025) reported the team's attempts to decompose attention layers; HeadVis cites it among existing decomposition methods.
- When Models Manipulate Manifolds (October 2025) is the source of the line width heads.
- Circuits Updates – May 2023 has the toy model of attention head superposition the authors refer to as their own; Circuits Updates – July 2024 lists attention superposition among the field's remaining hurdles.
- A Mathematical Framework for Transformer Circuits and In-context Learning and Induction Heads define induction heads, K-composition and the prefix score from which the induction score is adapted.
- Towards Monosemanticity introduced the feature visualization interface HeadVis is modeled on and the "Hebrew feature" the authors want an attention analogue of.
- Open-sourcing circuit tracing tools is the earlier open release of the team's attribution-graph tooling.
References
- Luger, R., Kamath, H., Finkbeiner, D., Goel, P., Jermyn, A., Zimmerman, S., Batson, J., and Conerly, T. (2026). HeadVis: An Interactive Tool For Investigating Attention Heads. Transformer Circuits Thread, 4 May 2026. https://transformer-circuits.pub/2026/headvis/index.html. Section and figure numbers refer to the web version read in November 2026. record
- Anthropic. (2026). headvis [software repository], commit 304acba075, 4 May 2026. https://github.com/anthropics/headvis record
- Lin, J., and Chanin, D. (2026, June 9). HeadVis, plus NLA Contributions and more SAEs. The Residual Stream (Neuronpedia blog). https://www.neuronpedia.org/blog/headvis record
- He, Z., Wang, J., Lin, R., Ge, X., Shu, W., Tang, Q., and Zhang, J. (2025). Towards Understanding the Nature of Attention with Low-Rank Sparse Decomposition. arXiv:2504.20938. record
- Shu, W., Ge, X., Zhou, G., Wang, J., Lin, R., Song, Z., Wu, J., He, Z., and Qiu, X. (2026). Bridging the Attention Gap: Complete Replacement Models for Complete Circuit Tracing. https://interp.open-moss.com/posts/complete-replacement (cited by the paper; not read for this note). record