Automatically Identifying Local and Global Circuits with Linear Computation Graphs
Xuyang Ge, Fukang Zhu, Wentao Shu, Junxuan Wang, Zhengfu He, Xipeng Qiu
TL;DR
This work addresses mechanistic interpretability of Transformer models by introducing a pipeline that uses Sparse Autoencoders (SAEs) and Transcoders to render OV and MLP circuits as a strictly linear computation graph, enabling exact causal attribution without resorting to linear approximations. It then pairs this representation with Hierarchical Attribution to automatically isolate task-relevant subgraphs, allowing scalable and faithful circuit discovery. Applying the method to GPT-2 Small, the authors uncover fine-grained circuits for bracket, induction, and indirect object identification tasks, linking SAE features to known head-level mechanisms while also revealing new, intermediate insights. The approach offers a principled, scalable way to dissect internal model behavior with precise attribution, though it remains focused on input-specific analysis and invites future work to extend generality and applicability.
Abstract
Circuit analysis of any certain model behavior is a central task in mechanistic interpretability. We introduce our circuit discovery pipeline with Sparse Autoencoders (SAEs) and a variant called Transcoders. With these two modules inserted into the model, the model's computation graph with respect to OV and MLP circuits becomes strictly linear. Our methods do not require linear approximation to compute the causal effect of each node. This fine-grained graph identifies both end-to-end and local circuits accounting for either logits or intermediate features. We can scalably apply this pipeline with a technique called Hierarchical Attribution. We analyze three kinds of circuits in GPT-2 Small: bracket, induction, and Indirect Object Identification circuits. Our results reveal new findings underlying existing discoveries.
