# A Comprehensive Mechanistic Interpretability Explainer & Glossary

*This is a linkpost for a [very long doc](https://neelnanda.io/glossary) defining, explaining, and giving intuitions and conceptual frameworks for all the concepts I think you should know about when engaging with mechanistic interpretability. If you find the UI annoying, there's [an HTML version here](https://neelnanda.io/mechanistic-interpretability/glossary)*

### Why does this doc exist?

-   The goal of this doc is to be a comprehensive glossary and explainer for [Mechanistic Interpretability](https://distill.pub/2020/circuits/zoom-in/) (focusing on transformer language models), the field of studying how to reverse engineer neural networks.
-   There's a lot of complex terms and jargon in the field! And these are often scattered across various papers, which tend to be pretty well-written but not designed to be an introduction to the field as a whole. The goal of this doc is to resolve some [research debt](https://distill.pub/2017/research-debt/) and strives to be a canonical source for explaining concepts in the field
-   I try to go beyond just being a reference that gives definitions, and to actually dig into how to *think* about a concept. Why does it matter? Why should you care about it? What are the subtle implications and traps to bear in mind? What is the underlying intuition, and how it fits into the rest of the field?
-   I also go outside pure mechanistic interpretability, and try to define what I see as the key terms in deep learning and in transformers, and how I think about them. If you want to reverse engineer a system, it's *extremely* useful to have a deep model of what's going on inside of it. What are the key components and moving parts, how do they fit together, and how could the model use them to express different algorithms?
### How to read this doc?

-   The first intended way is to use this a **reference**. When reading papers, or otherwise exploring and learning about the field, coming here and looking up any terms and trying to understand them.
-   The second intended way is to treat this as a **map to the field**. My hope is that if you're new to the field, you can just read through this doc from the top, get introduced to the key ideas, and be able to dig into further sources when confused. And by the end of this, have a pretty good understanding of the key ideas, concepts and results!
-   It's obviously not practical to fully explain *all* concepts from scratch! Where possible, I link to sources that give a deeper explanation of an idea, or to learn more.
    -   More generally, if something’s not in this glossary, you can often find something good by googling it or searching on [alignmentforum.org](http://alignmentforum.org). If you can’t, [let me know](mailto:neelnanda27@gmail.com)!
-   I frequently go on long tangents giving my favourite intuitions and context behind a concept - it is not at all necessary to understand these (though hopefully useful!), and I recommend moving on if you get confused and skimming these if you feel bored.
### Table of Contents
-   [Introduction](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=iJffSbaz_Vj8ujdvRb9IlQ_8)
    -   [Why does this doc exist?](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=EEGvuK3NricH4Z8cDqt4vHPi)
    -   [How to read this doc](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=6xKhX3sR-7dyjzhRggHOJzMB)
-   [Mechanistic Interpretability](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=eL6tFQqNwd4LbYlO1DVIen8K)
    -   [General](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=BQds7CQ8ytq2rolt7p0XQPbt)
    -   [Representations of Features & Superposition](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=KiDMIteKCEXt_EkR2sZCOfbG)
    -   [Superposition](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=3br1psLRIjQCOv2T4RN3V6F2)
    - [A Toy Model of Superposition](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=EuO4CLwSIzX7AEZA1ZOsnwwF)
    -   [The Broader Interpretability Field](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=bsKRuga24AHSMztSeter7oGX)
    -   [Linear Algebra](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=HM3KfFp0X4P2HPSE6Luq80Pi)
    -   [Circuits As Computational Subgraphs](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=Pky4iQrwVO1hN3HUO5aeJC22)
-   [Machine Learning](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=FU_mI4vJX1gBv3X70upDyjnn)
    -   [Basic Concepts](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=LgWRcThnOwW8Uc2qeK_6E5mm)
    -   [Training Concepts](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=gw6rZcDY2uyqgmTcWv7nHVSC)
    -   [Training Dynamics](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=gw6rZcDY2uyqgmTcWv7nHVSC)
    -   [Misc](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=gJWBGbXh3bXBH_hMFYmoc2o2)
-   [Transformers](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=pndoEIqJ6GPvC1yENQkEfZYR)
    -   [Transformer Basics](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=6SOSlUPQukfjSYIjo-rXNaLe)
    -   [Transformer Components](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=83xppOkmpR8Enfc5O8m1uw7b)
    -   [Attention Heads](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=94hCeljxx7mX_WoIBNjpszE1)
    -   [Misc Transformer Words](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=PS0Czs5DoAG74iySI9p-gqeW)
    -   [Training](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=ROPHo0DxpSgg5Cub-gjxztPR)
-   [Transformer Circuits](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=L1NKUgo0EBsRc-fBZTtjaHtx)
    -   [Language Modelling](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=mHPjBbUJWc0UiIzCxjLibN82)
    -   [A Mathematical Framework for Transformer Circuits](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=aGu9fP1EG3hiVdq169cMOJId)
    -   [Induction Circuits](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=_Jzi6YHRHKP1JziwdE02qdYZ)
    -   [SoLU](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=NnlcCwpsX2yJpu4js1EnluiF)
    -   [The Indirect Object Identification Circuit](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=iWsV3s5Kdd2ca3zNgXr5UPHa)
-   [Techniques](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=8m6oU03bXO60iaRnGzFHBHN9)
    -   [Mechanistic Interpretability Techniques](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=M3vTmlndMJTgnL1-t1IAsTaR)
    -   [Non-MI Techniques](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=mwSnqyC-_MzCZGcGGPSUxs7s)
    -   [Tooling](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=tKdEkEU5X0U-1zVKv0PO0L3q)
-   [Notable Models](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=1Z1d-y3LE8Y6TVqglA0UrGZS)
    -   [Open Source GPT-Style Models](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=jHj79Pj58cgJKdq4t-ygK-4h)
    -   [My Interpretability-Friendly Models](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=NCJ6zH_Okw_mUYAwGnMKsj2m)
    -   [Other Open Source Models](https://dynalist.io/d/n2ZWtnoYHrU1s4vnFSAQ519J#z=urEWXO4Oj-V36CCCARRRZwkT)