Legacy Concept Lab
Transformer Circuits, Induction Heads & Mechanistic Interpretability
These frameworks study GPT-style models, including Llama-3 and Claude-3, by identifying concrete circuits
#13CircuitsRepresentations
key equation
Phase 5: Representation & interpretabilityConcept 13 of 100
Why It Matters for Modern Models
- These frameworks study GPT-style models, including Llama-3 and Claude-3, by identifying concrete circuits
- Inform safety research (locating deception-related circuits) and architecture design
What Tutorials Skip
What is still poorly explained in textbooks and papers:
- Interactive visualizations of how QK and OV matrices implement algorithms like induction
- Broader taxonomies of circuit motifs beyond a few toy examples
Interactive Visualization
Core Math (Optional Deep Dive)
If you want intuition first, start with the key equation and the visualization. Come back here for the full walkthrough.
Key Equation
Decompose transformer computations into linear components on the residual stream:
Induction heads: specific attention heads implement an algorithm:
by attending from the final [A] token to previous [A] tokens and copying the subsequent token's representation.
The sudden appearance of these heads is tied to a phase transition in in-context learning.