Skip to content
Transformer Circuits·Indexed by this site · Originally published· Alignment →SelectedAttention31

Anthropic open-sources attention head visualization tool HeadVis

HeadVis

AI summary

Anthropic's interpretability team releases the interactive tool HeadVis for studying attention heads in large language models, and open-sources the frontend code and backend interface specification. The tool helps generate and test hypotheses about attention head functions through attention pattern visualization, distribution metrics, low-rank component projection, and SAE feature attribution via the QK and OV circuits. The authors present four case studies with Claude Haiku 3.5: an induction head behaves as fuzzy induction in the feature basis; a previously studied line width head exhibits three behaviors—years, multi-token words, and newlines—across the full distribution, with PCA showing clear clustering of Q, K, O activations; an answer selection head reuses the same selection mechanism across a broader distribution, and virtual weight analysis suggests it may be monosemantic; and a same-set suppression head suppresses attention between countries and their own cities, holding in 98% of 185 self-generated sentences.

Why it was selected

Anthropic open-sourced the attention head visualization tool HeadVis, and provided four examples ranging from easy to hard, showing how attention head behavior on the full data distribution deviates from a single task description.

Read originaltransformer-circuits.pub