Skip to the content.

Circuit catalog — composed circuits, surveyed & collected across models

Operators are single head-classes (../operators/); circuits are their compositions (a writer-op feeding a reader-op’s K/Q/V port, chained). A working catalog (amateur, exploratory, provisional — not a definitive reference) of 7 circuits collected with the tools here, two sources:

Circuit inventory (index)

Circuit vs operator — a naming note. A few names (duplicate, induction) appear in both this circuit catalog and the operator catalog. A circuit is a composition (circuit:induction = prev-token → induction); the same-named operator is the head class it is named after and built around (op:induction). The coincidence is deliberate: a circuit is keyed by its reader operator. Pages cross-link to their namesake.

Cross-model circuit-edge liveness (remove the writer from the reader’s key → attention collapse %)

circuit defining edge gpt2 gpt2-medium gpt2-large gemma-2-2b Llama-3.2-1B Qwen2.5-1.5B
induction prevtok_head -> induction (K) +17% 4.11 +23% 2.15 +8% 3.14 +18% 0.0 +70% 1.20 +89% 1.4
positional_broadcast sink-writer -> prevtok key (K) +22% 1.3 +32% 1.5 +0% 3.0 +0% 5.4 (skip) +0% 0.0
duplicate (reader-side; writer often layer-0) (skip) +0% 0.13 +4% 1.1 +3% 0.2 +9% 0.17 +13% 0.6

Reading it: the induction edge (prev-token → induction) is live in every model (and stronger in RoPE — content matching lives in the key everywhere); positional-broadcast (sink/hub → prev-token key) is GPT-2-small/medium-only (the absolute-position plumbing — RoPE reads position from the rotation, so the prev-token key has no upstream writer to remove). Same absolute-position-family split as the operator catalog’s sink.

Discovered edges (de novo, cross-model)

Beyond the named circuits, discovered circuit edges runs the key-patch over the top content readers in every model and keeps the edges that collapse the reader beyond a reader-matched null. It recovers the prev-token→induction K-chain de novo in the GPT-2 family (6/2/2 live edges) and finds localized edges in Llama (3) and Qwen (1), but none in Gemma (0 — its content-reader keys aren’t sharply localized to one writer; RoPE distributes the circuit). 14 live edges total.

Executable decompilation — is the circuit sufficient?

Edge liveness shows the circuit’s edges are necessary. Reconstruction tests sufficiency: keep only the induction circuit’s heads (induction + prev-token), mean-ablate every other attention head (MLPs intact), and measure how much induction the circuit alone recovers — far above a random same-size head-set. A small head-set that reconstructs most of the behaviour is an executable decompilation.

Each cross-model circuit page now also carries a cross-model causal dossier (necessity + sufficiency + redundancy, operator-parity), generated on the unified ResidualVM debugger (circuit_dossier_xmodel.py). The sharpest read: the induction circuit’s necessity and sufficiency both decay monotonically across the GPT-2 ladder (small → XL) — the named circuit is most localized in the smallest model and dissolves into the network with scale, the same distributedness theme measured as a clean ablation battery.

MLP nodes in the circuit DAG — the COMPUTE class, cross-model

The cross-model edges above are attention-only (head→head). But circuits also route through MLPs: mlp_circuit_xmodel.py (on the ResidualVM) makes them first-class circuit nodes — per-layer COMPUTE importance for induction (ablate each MLP → Δinduction-NLL) + the head↔MLP composition edges that wire them in.

model induction head all-MLP-ablated Δind-NLL dominant induction-MLP(s) detokenizer = MLP0?
gpt2 5.1 +8.7 L0 (+8.2), L1 (+6.3)
gpt2-medium 11.1 +8.9 L0 (+15.4)
gpt2-large 16.0 +13.0 L0 (+10.3)
gemma-2-2b 6.3 +17.5 L0 (+3.7), L17 (+1.6), L5 (+1.4)
Llama-3.2-1B 10.23 +15.1 L1 (+12.8), L0 (+12.5), L15 (+1.9) ✗ (L1)
Qwen2.5-1.5B 14.3 +15.9 L2 (+14.0), L1 (+13.4), L0 (+7.3) ✗ (L2)

Taxonomy & gaps

How this was made

circuit_atlas.py (cross-model edges + harvest) → circuit_catalog_doc.py (these docs). Discovery/validation: composition_dag.py, validate_new_edges.py, vcomposition.py, ioi_causal.py, self_repair.py, rung3_induction_chain.py. See ../DECOMPILATION.md.