mej7.comHow AI Works

Mechanistic interpretability curriculum

Author: Mehdi Sadriu, independent educator. Last reviewed: 25 November 2026. How we check claims: methodology.

This curriculum is twelve cited lessons on how researchers reverse-engineer transformer internals: residual streams, QK/OV circuits, induction heads, superposition, sparse autoencoders, patching, lenses, probes, circuits, features versus neurons, grokking, and the limits of those methods. Demos are teaching models, not production weights.

In one paragraph. A free, bilingual sequence of mechanistic interpretability lessons on mej7.com, each with a definition, math, a no-JS demo, a quiz, misconceptions, and primary-source citations.

  1. 1. What is the residual stream in a transformer?

    The residual stream is the running vector at each token that every layer reads from and writes to. Teaching model, not production weights.

  2. 2. What are attention heads and QK/OV circuits?

    A head is a where-to-look map (QK) plus a what-to-write map (OV). Formula from Vaswani et al. 2017; circuit split from Elhage et al. 2021.

  3. 3. What are induction heads?

    Induction heads complete a repetition: A B … A → B. Olsson et al. 2022 link them to in-context learning in the models they studied.

  4. 4. What are superposition and polysemanticity?

    Models can pack more features than dimensions by overlapping them. Neurons then respond to mixtures (Elhage et al., 2022).

  5. 5. What are sparse autoencoders (SAEs)?

    An SAE reconstructs activations as a sparse sum of dictionary features. Primary sources: Sharkey et al. 2022, Cunningham et al. 2023, Bricken et al. 2023.

  6. 6. What is activation patching?

    Copy an activation between a clean run and a corrupted run to test causal use (Meng et al. 2022; Heimersheim & Nanda 2024).

  7. 7. What are the logit lens and the tuned lens?

    The logit lens decodes intermediate residuals with the unembedding (nostalgebraist 2020). The tuned lens learns a per-layer map first (Belrose et al. 2023).

  8. 8. What is probing in interpretability?

    A probe is a small classifier on frozen activations. It tests whether information is present (Alain & Bengio 2016), not whether it is used.

  9. 9. What is a circuit in mechanistic interpretability?

    A circuit is a subgraph that implements one identifiable computation, tested by patching and knockout (Olah et al. 2020; Wang et al. 2022).

  10. 10. What is the difference between features and neurons?

    A neuron is a built-in unit. A feature is a direction you claim corresponds to a concept. Superposition is why they often fail to match (Olah et al. 2020; Elhage et al. 2022).

  11. 11. What is grokking?

    Grokking is delayed generalization after memorization (Power et al. 2022). Nanda et al. 2023 reverse-engineered one modular-addition case.

  12. 12. What are the limits of current mechanistic interpretability?

    Explanations can be unfaithful, incomplete, scale-sensitive, and easy to over-read. Surveys: Bereska & Gavves 2024; Rai et al. 2024.