HeadVis
Two titles, both real. The heading above is how the lab announced this work. The document actually behind it is titled “HeadVis: An Interactive Tool For Investigating Attention Heads” — everything below is read from that document.
Anthropic built and open-sourced HeadVis, a tool for visualizing attention heads across a full data distribution, revealing that heads' behavior often differs sharply from narrow-task expectations.
It gives interpretability researchers a concrete, open-source workflow and vocabulary for telling whether an attention head does one thing or several, which is still a live methodological gap.
R. Luger · Harish Kamath · Doug Finkbeiner · Purvi Goel · Adam Jermyn · Sam Zimmerman · Joshua Batson · Tom Conerly — meet the researchers →
Two readings, equal authority
How to choose: The paper’s words is verbatim — use it when you need to quote, or to judge how they write. Plain language is a paraphrase written for comprehension — use it when you want the idea fast. Neither is a summary of the other; they are two doors into the same room.
This source carries no verbatim abstract.
Anthropic built HeadVis, an interactive tool for browsing how individual attention heads in a language model behave across a huge range of text, rather than on just one hand-picked example. Using it on Claude Haiku 3.5, they found that a head that looked polysemantic (three unrelated jobs crammed into one head) really was, while a head that looked like it just tracked multiple-choice answers turned out to implement a much broader 'about to repeat marked content' behavior. They open-sourced the tool's frontend so other researchers can run the same kind of investigation on their own models.
What this paper defines
Every definition below is the paper’s own sentence, with its locator. The plain gloss is a reading aid and is marked as one.
Induction score
“The induction score is the average attention pattern of a head on (query, key) token pairs that correspond to the literal copying case of induction.”Fuzzy Induction
In plain terms: A number that measures how much a head does plain copy-the-earlier-token induction.
QK attribution
“QK attribution writes the attention score as a sum of (query feature, key feature) interactions.”Fuzzy Induction
In plain terms: A breakdown of why a head attends where it does, expressed as pairs of interacting features rather than raw numbers.
OV attribution
“OV attribution writes the head's output as a sum of (value feature, output feature) interactions: value features at the attended token, output features at the query token.”Fuzzy Induction
In plain terms: A breakdown of what a head actually copies or writes once it has decided where to attend, expressed as interacting features.
Polysemantic head
“The clean separation across Q, K, and O — together with the token-level patterns — makes us fairly confident this head is polysemantic: a single head implementing several unrelated behaviors.”A Polysemantic Attention Head
In plain terms: One attention head that is really doing several unrelated jobs at once.
K-composition
“This is K-composition : one head writes to a position, a later head reads from it.”Same-Set Suppression
In plain terms: One head leaves information at a token position that a later head then reads and uses.
Same-set suppression geometry
“A country's query vector has strongly negative cosine similarity (mean −0.47) with the key vectors of its own cities and near-zero (mean +0.01) with cities elsewhere.”Same-Set Suppression
In plain terms: The mechanism by which a head avoids attending from an item to other members of its own group, built directly into the geometry of its query and key vectors.
Attentional feature
“The goal is spiritually the same: learn monosemantic, sparse "attentional features" that faithfully reconstruct an attention layer.”Discussion
In plain terms: A hoped-for basic, single-purpose unit of attention computation, analogous to a sparse feature in an MLP layer.
What they actually did
Each step is a synthesis. Open any step to see the paper’s own sentence it was derived from, with its locator — so nothing here floats free of the source.
- Built HeadVis to combine attention-pattern visualizations, quantitative per-head metrics, low-rank projections, and feature-level attributions into one tool for investigating attention heads.
Trace this step to the paper
“We built HeadVis to easily generate and test hypotheses about what an attention head does, using visualizations of attention patterns and head outputs, quantitative distribution metrics, low-rank component projections, and SAE feature attributions through QK and OV circuits.”Introduction
- Used a configurable scatter plot of per-head metrics as the entry point for finding heads worth investigating, on the idea that heads at metric extremes tend to be the interpretable ones.
Trace this step to the paper
“The first component of the HeadVis UI is a scatter plot of heads, with both axes and point color configurable to any per-head quantity, like its layer, head index, or one of several computed metrics.”Fuzzy Induction
- Identified a fuzzy induction head using the induction score metric, then ran QK and OV attributions on a top-activating example to decompose its behavior into feature-level interactions.
Trace this step to the paper
“To understand what makes this induction fuzzy, we run QK and OV attributions from the second token of gleam back to the newline after dream .”Fuzzy Induction
- For a previously studied line-width head, collected Q, K, and O activations at its highest-attention (query, key) token pairs and ran PCA on each as a hypothesis-generation check for distinct sub-behaviors.
Trace this step to the paper
“We take the (query, key) token pairs with highest attention output norm, and collect the head's Q, K, and O activations at those pairs ... and run PCA on each set. If the top components separate into clusters, that's a hint the head has distinct behaviors worth investigating separately.”A Polysemantic Attention Head
- Pinned down the exact boundary of one of the line-width head's behaviors by sweeping the year value in a fixed prompt rather than relying on attention patterns or attributions alone.
Trace this step to the paper
“sweeping the year in a fixed prompt shows the head attends strongly only for 1000–1986, a constraint neither the attention patterns nor the attributions surfaced.”A Polysemantic Attention Head
- For the answer-selection head, ran QK and OV attributions across examples spanning the full data distribution, not just multiple-choice questions, to see whether a shared feature template underlies apparently different behaviors.
Trace this step to the paper
“Running QK and OV attributions on examples from the full distribution, a pattern emerges. The OV circuit always does the same thing: it copies content stored at the attended token, much like induction.”Answer Selection
- Projected a known feature through the head's key and query weights to find which other features land nearby, as a virtual-weights test of whether disjoint-looking behaviors share an underlying mechanism.
Trace this step to the paper
“We project the "correct answer" feature through the head's key weights, and ask which other features land nearby in that projected space.”Answer Selection
- Ran a systematic controlled test for the same-set suppression head by generating a batch of templated sentences, each with one item that does not belong to the group, and measuring how often the head attends to the outlier.
Trace this step to the paper
“To test this systematically we generated 185 sentences of the form "{five cities} are all cities in {country}", where four cities belong to that country and one is foreign.”Same-Set Suppression
- Computed mean-subtracted cosine similarities between country query vectors and city key vectors to locate the suppression mechanism directly in the QK circuit's geometry.
Trace this step to the paper
“For each country, we compute the head's query vector on "The country {X}", subtract the mean across countries, and do the same for city key vectors on "The city {X} is well known".”Same-Set Suppression
- Traced a K-composition chain by ranking all heads by their attention pattern on a specific (query, key) pair, to find which earlier head wrote the feature that the target head's key side reads.
Trace this step to the paper
“we looked for a head that attended between a and chikumbuso , and checked its OV circuit. That head writes exactly the Zambian features our head's key side reads!”Same-Set Suppression
- Open-sourced the HeadVis frontend together with a specification of its interface to the two backend components, so others can connect it to their own models.
Trace this step to the paper
“We open-source the frontend along with a specification of the interface with the two backends.”Open Source HeadVis
Exactly what was run, and how
| Model | Developer | Temp | Effort / reasoning | Deployment | Other settings |
|---|---|---|---|---|---|
| Claude Haiku 3.5 | Anthropic | not reported | not reported | unstated | A hosted demo covers only a subset of Haiku 3.5's heads, using cached QK/OV attributions for a few paper examples rather than a live backend. |
| Gemma 3 1B | not reported | not reported | unstated | — |
Source for Claude Haiku 3.5 settings
“We present a few case studies using HeadVis to interpret attention heads from Claude Haiku 3.5.”Introduction
Source for Gemma 3 1B settings
“HeadVis on all heads in Gemma 3 1B is here .”Open Source HeadVis
What they reported — and what they left out
The paper names Claude Haiku 3.5 and Gemma 3 1B as the models its demos and case studies cover, and notes the Haiku demo is restricted to a subset of heads with cached attributions, but it never reports temperature, sampling settings, context length, or deployment method for either model.
The numbers they report
The line-width head's 'years' behavior has a sharp cutoff that isn't visible from attention patterns or attributions alone.
attends strongly only for years 1000–1986
See it in the paper
“sweeping the year in a fixed prompt shows the head attends strongly only for 1000–1986, a constraint neither the attention patterns nor the attributions surfaced.”A Polysemantic Attention Head
A country token reliably attends more to a foreign city than to its own cities in controlled test sentences.
98% of 185 templated sentences
See it in the paper
“The country token attends more to the foreign city than to any of its own 98% of the time.”Same-Set Suppression
A country's query vector is strongly anti-aligned with its own cities' key vectors, and roughly neutral toward other cities.
mean cosine similarity −0.47 (own cities) vs. +0.01 (other cities)
See it in the paper
“A country's query vector has strongly negative cosine similarity (mean −0.47) with the key vectors of its own cities and near-zero (mean +0.01) with cities elsewhere.”Same-Set Suppression
The suppression is a flip introduced by the head's own weights: a country and its own cities actually have positive similarity in the residual stream before the head's projections act on them.
mean cosine similarity +0.17 in the residual stream
See it in the paper
“in the residual stream a country and its own cities have positive cosine similarity (mean +0.17), so the head flips the sign.”Same-Set Suppression
Swapping the out-of-place country for the in-set country in a hand-built example collapses the suppressed attention edge.
attention to 'a' dropped from 0.87 to 0.08 (Zambia); 0.10 (Lusaka)
See it in the paper
“we replaced Ivory Coast with Zambia in the sequence, and attention to a dropped from 0.87 to 0.08; the same happened with Lusaka , the Zambian capital (0.10).”Same-Set Suppression
Swapping in any other African country (rather than the in-set one) leaves the attention edge largely intact.
median 0.27 across the other 51 African countries
See it in the paper
“Swapping in the other 51 African countries, attention mostly stays well above that (median 0.27).”Same-Set Suppression
QK and OV attributions in HeadVis are computed against a large shared feature basis.
10M-feature weakly causal crosscoder (WCC)
See it in the paper
“the features come from the same 10M-feature weakly causal crosscoder (WCC) used in .”Fuzzy Induction
What they assert, beside what they showed
Left is the claim in the paper’s own words. Right is the data offered for it. Where the two do not fully meet, a gold band names the distance.
The line-width head is genuinely polysemantic: one head cleanly implementing three unrelated behaviors.
“The clean separation across Q, K, and O — together with the token-level patterns — makes us fairly confident this head is polysemantic: a single head implementing several unrelated behaviors.”
“For this head, all three PCAs separate the behaviors into distinct clusters in the first few principal components.”
A Polysemantic Attention HeadThe answer-selection head implements a general 'about to repeat marked content' behavior rather than a multiple-choice-specific mechanism.
“We found that "answer selection" was better described as a more general head behavior that helps the model repeat previous context by identifying what entity is about to be mentioned.”
“The features that align most strongly are not specifically about multiple choice, but they are other instances of "this is the relevant content" — these features are near-orthogonal in the residual stream and the head's K projection maps them close together.”
Answer SelectionSame-set suppression — a head suppressing attention between an item and other members of its own group — is a real mechanism, not just an artifact of the hand-built test sentences.
“The geometry and the 98% result on custom sentences are evidence that same-set suppression is real.”
“A country's query vector has strongly negative cosine similarity (mean −0.47) with the key vectors of its own cities and near-zero (mean +0.01) with cities elsewhere.”
Same-Set SuppressionPCA clustering of a head's Q/K/O activations is a useful hint for whether the head has distinct sub-behaviors.
“If the top components separate into clusters, that's a hint the head has distinct behaviors worth investigating separately.”
“In this head, the PCA does not cluster activations, so it's not useful for understanding if this head implements multiple behaviors.”
Answer SelectionA head's behavior on the full data distribution rarely matches what a narrow task or dataset suggests.
“One theme emerges across both prior work and our own: a head's behavior on the full distribution rarely matches what a narrow task suggests, and the difference isn't always easy to characterize.”
“found a head implementing "succession" (predicting the next element in an ordinal sequence) on a custom dataset. When they analyzed that head on a more general dataset, they noticed distinct behaviors including copying, comparison, and acronym production.”
IntroductionHow they frame it, and what they want next
Their framing
The Discussion frames open problems in attention interpretability by direct contrast with the more mature MLP/transcoder case, naming four concrete named obstacles and pointing to each case-study head as a worked example of one obstacle rather than a solved problem. The tone stays optimistic about eventual tractability while being explicit that no decomposition method for attention analogous to MLP transcoders currently exists.
Register: Concrete and confident about the specific numeric results from their own case studies (cosine similarities, attention values, percentages), but consistently tentative when generalizing toward a full theory of attention decomposition, with frequent 'we suspect,' 'we don't know,' and 'our best guess' framing.
Where they hedge
“We don’t know how to do the analogous thing for an attention layer.”Discussion
“Our best guess is that this head is monosemantic, but we aren't fully convinced.”Answer Selection
“We have not determined which our line width head is, but a decomposition method must handle both.”Head Polysemanticity
“We suspect some attentional features are spread across multiple heads, but we have no confirmed example in a real LLM.”Attention Superposition
What they say it means
- A single attention head can be polysemantic without weight superposition, unlike a single MLP neuron, so decomposition methods built for MLPs will not transfer to attention unchanged.
the paper’s words
“We also want to make a theoretical point explicit: an attention head can be polysemantic without superposition.”Head Polysemanticity
- Because some attentional features are likely high-rank, any successful decomposition method will need to interpret multi-dimensional objects rather than single directions the way rank-1 MLP features work.
the paper’s words
“Some attentional features are likely high rank, making them much harder to interpret than rank-1 MLP features.”Discussion
- Existing rank-1 decomposition methods target polysemanticity and superposition but still leave the high-rank interpretability problem on the QK side unsolved.
the paper’s words
“These approaches also inherit the high-rank interpretability challenge, since their QK circuits are still high rank.”Existing Decomposition Approaches
What they call for next
- Researchers who want the full interactive backend should use Claude to implement it against the published frontend/backend interface specification.
the paper’s words
“We suggest pointing Claude at the repository to implement the backend pieces for your setup.”Open Source HeadVis
- Anyone researching attention should spend a few hours exploring heads in HeadVis on an open model to build intuition.
the paper’s words
“we'd encourage anyone researching attention to spend a few hours in HeadVis on an open model.”Attention Biology
- Future work should extend HeadVis-style investigation to heads that attend over long contexts.
the paper’s words
“We'd be excited to see work on HeadVis for long contexts.”Attention Biology
- Future work should try splitting a polysemantic head like the line-width head into separate heads that each isolate one behavior and check that together they reproduce the original.
the paper’s words
“We'd be excited to see a single polysemantic head split into monosemantic units.”Head Polysemanticity
- Existing rank-1 decomposition methods should be tested against a small number of early-layer heads that HeadVis already makes understandable, as an easy way to gauge their performance.
the paper’s words
“We'd be excited to see these decompositions applied to a small number of early-layer heads that are understandable with HeadVis”Existing Decomposition Approaches
Limitations they state
“Custom-sequence input is not included in the open-source release; see Open Source HeadVis .”Same-Set Suppression
“This functionality is not included in the open-source release; see Open Source HeadVis .”Same-Set Suppression
“Some features we found useful internally are not included in this open source release:”Open Source HeadVis
“So far we have only studied individual attention edges (a single key and query token) at a time, so any logic that depends on competition among keys would be invisible to us.”Attention Biology
“We have not determined which our line width head is, but a decomposition method must handle both.”Head Polysemanticity
“Past toy models, including our own , produce forms of attention superposition, but it isn't clear they capture a phenomenon that occurs in real heads.”Attention Superposition
Moves worth stealing
Structures the entire Discussion as an explicit analogy-by-contrast to a better-understood case (MLP superposition and transcoders), naming precisely where the analogy breaks down instead of just gesturing at similarity.
“It's useful to frame the open problems in the study of attention by contrast with MLPs.”
Names its own biggest open obstacles as a short checklist before discussing each one, giving the reader a map of the argument before the detail arrives.
“Four obstacles stand in the way:”
Closes a multi-case-study section by explicitly naming which tool view solved which case, turning four separate anecdotes into one legible method table in prose.
“Each step in this section used a different HeadVis view — top-token rankings to see what dominates, custom sequences to test a guess, QK attributions to read a confusing example, head-ranking on a (query, key) pair to trace composition.”
States its own confidence level in plain, hedged language directly beside the evidence, rather than letting tone alone signal how strong the finding is.
“Our best guess is that this head is monosemantic, but we aren't fully convinced.”
Where else this leads
Same people
- Characterizing interference weights in a tiny language model Anthropic
shares Joshua Batson - Verbalizable Representations Form a Global Workspace in Language Models Anthropic
shares Joshua Batson - Natural Language Autoencoders Produce Unsupervised Explanations of LLM Activations Anthropic
shares Joshua Batson - Teaching Claude Why Anthropic
shares Adam Jermyn
Same territory
- Characterizing interference weights in a tiny language model Anthropic
mechanistic interpretability - Verbalizable Representations Form a Global Workspace in Language Models Anthropic
mechanistic interpretability
Published alongside it
The nearest publications in time, across all three labs.
- Model Spec Midtraining: Improving How Alignment Training Generalizes Anthropic
2026-05-15 - Natural Language Autoencoders Produce Unsupervised Explanations of LLM Activations Anthropic
2026-05-15 - SLEIGHT-Bench: Finding Blind Spots in AI Monitors Anthropic
2026-05-15 - Teaching Claude Why Anthropic
2026-05-15
What this page was built from
Working from a full plain-text extraction of the published Transformer Circuits web page, including Related Work, Discussion, and Open Source sections; interactive figures are represented only by their captions and surrounding prose, and several inline citations were stripped of their author names during text extraction (e.g. 'found a head implementing succession...' with no named subject), so those specific prior-work attributions are not recoverable from this text.