MechRL: Reinforcement Learning Agents Perform Circuit Discovery for Mechanistic Interpretability
About
Mechanistic interpretability seeks to explain a model's behaviour by finding its circuit: the sparse subgraph of the model's computation that is causally responsible for it. Automated methods have made this search systematic, but each one starts afresh for every behaviour, and the effort spent finding one circuit does nothing for the next. Circuit discovery has thus been automated, but not amortised. We ask whether circuit discovery can itself be learned. We frame it as a sequential decision problem over the computation graph of GPT-2 small, in which a policy removes edges until it reaches a compact subgraph that preserves the behaviour, guided by a faithfulness reward defined through causal intervention. A single policy trained across twelve behaviours recovers a faithful circuit for each, and once frozen it transfers to behaviours it never saw during training, recovering their known circuits without further search. A short warm-start improves these transferred circuits, returning far smaller ones than training from scratch. While the learned policy does not match a per-behaviour search on circuit size or cost, it shows that circuit discovery is a learnable, transferable procedure rather than a search repeated for every behaviour.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Docstring-completion | Docstring-completion evaluation episodes (held-out) | Policy Score2.195 | 1 | |
| Indirect Object Identification | IOI evaluation episodes (held-out) | Policy Score2.976 | 1 | |
| Induction | Induction evaluation episodes (held-out) | Policy Score3.408 | 1 |