用强化学习自动发现模型内部的因果电路,一次训练可迁移应用。
MechRL: Reinforcement Learning Agents Perform Circuit Discovery for Mechanistic Interpretability
- 将电路发现建模为图上逐步删边的决策过程,用因果干预奖励引导策略
- 单一策略训练后可对12种行为均恢复已知电路,且对未见行为直接迁移成功
- 首次证明电路发现可学习与迁移,大幅减少重复搜索成本,适合模型解释研究者
机制可解释性旨在通过寻找模型中负责特定行为的稀疏子图(即电路)来解释其运行机制。现有自动化方法虽系统化了搜索过程,但每项行为都需独立重做,先前努力无法复用。本文提出将电路发现本身视为可学习的序列决策问题,在GPT-2 small的计算图上,由策略逐步移除边,直至获得保持行为的紧凑子图,以因果干预定义的忠实度奖励作为指导。一个在12种行为上训练的策略,能为每种行为恢复出忠实电路;冻结后可直接迁移到训练中未见过的行为,无需额外搜索即可复现其已知电路。短时间预热进一步优化了迁移效果,所得电路远小于从零开始搜索的结果。尽管该策略在电路规模或成本上不及针对单个行为的优化搜索,但它证明了电路发现是一种可学习、可迁移的程序,而非对每个行为重复执行的搜索过程。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。