Automated circuit discovery is a central tool in mechanistic interpretability for identifying the internal components of neural networks responsible for specific behaviors. While prior methods have made significant progress, they typically depend on heuristics or approximations and do not offer provable guarantees over continuous input domains for the resulting circuits. In this work, we leverage recent advances in neural network verification to propose a suite of automated algorithms that yield circuits with provable guarantees. We focus on three types of guarantees: (1) input domain robustness, ensuring the circuit agrees with the model across a continuous input region; (2) robust patching, certifying circuit alignment under continuous patching perturbations; and (3) minimality, formalizing and capturing a wide array of various notions of succinctness. Interestingly, we uncover a diverse set of novel theoretical connections among these three families of guarantees, with critical implications for the convergence of our algorithms. Finally, we conduct experiments with state-of-the-art verifiers on various vision models, showing that our algorithms yield circuits with substantially stronger robustness guarantees than standard circuit discovery methods, establishing a principled foundation for provable circuit discovery.
Figures & tables
Figure 1: Illustration of the Siamese encoding for certifying the guarantee in Def. 1 .
Figure 2: Illustration of the Siamese encoding for certifying the guarantee in Def. 2 . Gray neurons denote non-circuit units whose activations are patched with those of the full model.
Figure 3: A toy Boolean circuit.
Dataset
Sampling-based Circuit Discovery
Provably Input-Robust Circuit Discovery
Time (s)
Size ( ∣C∣ )
Robustness (%)
Time (s)
Size ( ∣C∣ )
Robustness (%)
CIFAR-10
0.23 ±0.52
16.47 ±9.08
46.5 ±5.0
2970.85 ±874.23
19.18 ±10.16
100.0 ±0.0
MNIST
0.31 ±0.89
12.56 ±2.30
19.2 ±4.0
611.93 ±97.14
15.84 ±2.33
100.0 ±0.0
GTSRB
0.11 ±0.33
28.91 ±4.69
27.6 ±4.0
991.08 ±162.91
29.59 ±4.45
100.0 ±0.0
TaxiNet
0.01 ±0.00
5.77 ±0.80
9.5 ±3.0
180.00 ±40.39
6.82 ±0.46
100.0 ±0.0
Table 1: Circuit results from Algorithm 1 , where Φ is defined either by bounding logit differences under input sampling or by verifying the bound using the siamese encoding.
Figure 4: Examples of ResNet circuits at the filter level on CIFAR-10. Filters are numbered within each layer, with non-circuit filters in gray and residual connections shown as dashed lines. We compare circuits from the sampling-based discovery and the provably robust variant, highlighting components unique to the provable circuit in green.
Dataset
Zero Patching
Mean Patching
Provably Patching-Robust Patching
Time (s)
Size ( ∣C∣ )
Rob. (%)
Time (s)
Size ( ∣C∣ )
Rob. (%)
Time (s)
Size ( ∣C∣ )
Rob. (%)
CIFAR-10
0.1 ± 0.3
65.1 ±3.0
46.4 ±6.0
0.0 ±0.0
64.1 ±3.6
33.3 ±5.7
5408.5 ±1091.0
65.6 ±1.6
100.0
MNIST
0.1 ±0.3
20.0 ±1.5
58.0 ±5.3
0.0 ±0.0
19.2 ±1.8
55.7 ±5.3
714.9 ±207.1
17.0 ±2.3
100.0
GTSRB
0.3 ±0.9
32.6 ±4.2
38.0 ±4.4
0.0 ±0.0
33.4 ±4.2
40.5 ±4.5
2907.2 ±721.7
34.3 ±4.1
100.0
TaxiNet
0.0 ±0.1
5.8 ±0.8
57.1 ±5.0
0.0 ±0.1
5.4 ±0.7
63.3 ±4.9
175.7 ±52.7
5.4 ±0.6
100.0
Table 2: Circuit results from Algorithm 1 , where Φ is defined either by bounding logit differences under zero patching, mean patching, or by verifying the bound using the siamese encoding.
Figure 5: (a) Circuit size vs. MHS of blocking sets size, with the dashed equality line y=x as the lower bound. (b) Convergence of circuit size over the first 10 minutes; shaded region shows deviation.
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 6: Boolean toy network with XOR aggregation: y=v1⊕v2⊕v3⊕v4⊕v5 . With v1=x2 , v2=v3=x1 , v4=v5=x1⊕x2 , and v6=x2⊕x2=0 the full model computes fG(x1,x2)=x2 .
Dataset
Model
Examined Granularity
# Components
MNIST
FC
Neurons
31
GTSRB
CNN
Filters
48
CIFAR-10
ResNet
Filters
72
TaxiNet
CNN
Filters
8
Appendix
Table 3: Granularity and number of components considered for circuit discovery across the benchmark models.
Layer / Block
Output Dim.
Details
Input
32×32×3
CIFAR-10 image
Conv1
16×16×8
3×3 , stride 2
Residual Block 1
Conv1
8×8×16
3×3 , stride 2
ReLU
8×8×16
non-linearity
Conv2
8×8×16
3×3 , stride 1
Appendix
Table 4: Full architecture of the ResNet2b model used in Bak et al. (2021) for the CIFAR-10 benchmark
Layer
Output Dim.
Details
Input
32×32×3
GTSRB image
Conv1
32×32×16
3×3 , padding 1, ReLU
AvgPool1
16×16×16
2×2
Conv2
16×16×32
3×3 , padding 1, ReLU
AvgPool2
8×8×32
2×2
Flatten
1×2048
–
Appendix
Table 5: Architecture of the GTSRB-CNN model used in ( Bassan et al., 2025a ) .
Layer
Dimensions
Activation
Input
28×28=784
–
Fully Connected (fc1)
784→13
ReLU
Fully Connected (fc2)
13→11
ReLU
Fully Connected (fc3)
11→10
–
Appendix
Table 6: Architecture of the fully connected MNIST network. The model has 31 hidden neurons in total, which we treat as the granularity for circuit discovery.
Layer
Output Dim.
Details
Input
27×54×1
TaxiNet image
Conv1
27×54×4
3×3 , padding 1, ReLU
Conv2
27×54×4
3×3 , padding 1, ReLU
Flatten
1×5832
–
FC1
5832→20
ReLU
FC2
20→10
ReLU
Appendix
Table 7: Architecture of the CNN regression model used for TaxiNet, following the VeriX framework ( Wu et al., 2023a ) .
Dataset
ϵp
Sampling-based Circuit Discovery
Provably Input-Robust Circuit Discovery
Time (s)
Size ( ∣C∣ )
Robustness (%)
Time (s)
Size ( ∣C∣ )
Robustness (%)
MNIST ( δ=2.0 )
0.005
0.015 ±0.003
12.57 ±2.29
46.0 ±5.0
677.36 ±183.65
14.51 ±2.41
100.0 ±0.0
0.009
0.016 ±0.013
12.56 ±2.30
25.3 ±4.4
663.60 ±181.13
15.76 ±2.25
100.0 ±0.0
0.010
0.309 ±0.889
12.56 ±2.30
19.2 ±4.0
611.93 ±97.14
15.84 ±2.33
100.0 ±0.0
0.050
0.027 ±0.065
12.57 ±2.29
0.0 ±0.0
1700.05 ±562.36
28.75 ±6.67
100.0 ±0.0
Appendix
Table 8: Effect of varying the input neighborhood size ϵp under a fixed tolerance δ . Reported values are means with standard deviations. For robustness (a binary variable), we report the standard error (SE). Bold values indicate robustness percentages. Rows highlighted in gray correspond to the results selected in the main paper.
Dataset
δ
Sampling-based Circuit Discovery
Provably Input-Robust Circuit Discovery
Time (s)
Size ( ∣C∣ )
Robustness (%)
Time (s)
Size ( ∣C∣ )
Robustness (%)
MNIST ( ϵp=0.01 )
0.50
0.083 ± 0.329
19.72 ± 1.50
15.6 ± 3.8
460.14 ± 36.59
22.02 ± 2.52
100.0 ± 0.0
2.00
0.309 ± 0.889
12.56 ± 2.29
19.2 ± 4.0
611.93 ± 97.14
15.84 ± 2.33
100.0 ± 0.0
3.00
0.013 ± 0.001
9.44 ± 1.92
34.0 ± 4.7
577.41 ± 35.84
12.27 ± 2.52
100.0 ± 0.0
TaxiNet ( ϵp=0.005 )
Appendix
Table 9: Variation on tolerance level δ , with input neighborhood size ϵ fixed to the dataset-specific values used in the main experiments. Reported values are means with standard deviations. For robustness (a binary variable), we report the standard error (SE). Rows highlighted in gray correspond to the results selected in the main paper.
Dataset
Metric
Sampling-based Circuit Discovery
Provably Input-Robust Circuit Discovery
Time (s)
Size ( ∣C∣ )
Robustness (%)
Time (s)
Size ( ∣C∣ )
Robustness (%)
MNIST
Logit-diff
0.31 ±0.89
12.56 ±2.30
19.2 ±4.0
611.93 ±97.14
15.84 ±2.33
100.0 ±0.0
Winner–Runner
0.13 ± 0.60
5.18 ± 1.05
73.0 ±4.4
638.57 ± 20.94
12.04 ± 5.79
100.0 ±0.0
Abs-Max
0.014 ± 0.012
25.55 ± 2.90
6.0 ±2.4
362.61 ± 55.73
28.11 ± 2.37
100.0 ±0.0
Appendix
Table 10: Comparison of circuit discovery methods under alternative output metrics. Reported values are means with standard deviations. For robustness (a binary variable), we report the standard error (SE). All methods use the same configurations as in the main experiments.
Figure 7: Comparison of similarity and coverage metrics between provably-robust and sampling-based circuits. We report symmetric measures (IoU, Dice), a symmetric difference ratio, and asymmetric coverage ratios ( provable over sampling , sampling over provable ) to illustrate both overlap and directional differences.
Dataset
ϵp
∣Cp∖Cs∣
% of full net
∣Cs∖Cp∣
% of full net
MNIST
0.005
2.64
7.76%
0.70
2.06%
0.007
3.32
9.76%
0.74
2.18%
0.010
4.10
12.06%
0.81
2.38%
0.020
6.24
18.35%
0.58
1.71%
0.030
7.73
22.74%
0.39
1.15%
0.040
10.94
32.18%
0.24
0.71%
Appendix
Table 11: Set differences between the provably-robust circuit Cp and the sampling-based circuit Cs . For each ϵp , we report (i) the number of units appearing only in the provably-robust circuit ∣Cp∖Cs∣ , (ii) the number appearing only in the sampling-based circuit ∣Cs∖Cp∣ , and (iii) the corresponding percentages relative to the full network size for that dataset.
Figure 8: Provable-robust circuit size over time on MNIST for different neighborhood radii ϵp . Shaded regions denote the standard deviation.
Figure 9: Grad-CAM heatmaps comparison for a GTSRB input and its adversarial counterpart, shown at the last convolutional layer across three models (the full model, the provably robust circuit, and the sampling-based circuit).
Figure 10: Clean input x , its perturbed version z∈Bϵpp(x) with ϵp=0.015 , and the corresponding difference heatmap.
Figure 11: (a) Activation maps of the shared first-layer filters present in both the provably robust and sampling-based circuits. (b) Activation map of the additional first-layer filter included only in the provably robust circuit. Blue indicates negative activations; red indicates positive activations. White denotes neutral or near-zero values.
Dataset
ϵp
Zero Patching
Mean Patching
Provably Patching-Robust Patching
Time (s)
Size ( ∣C∣ )
Rob. (%)
Time (s)
Size ( ∣C∣ )
Rob. (%)
Time (s)
Size ( ∣C∣ )
Rob. (%)
MNIST ( δ=0.5 )
0.005
0.054 ± 0.182
19.87 ± 1.55
87.0 ±3.4
0.013 ± 0.001
19.19 ± 1.87
93.0 ±2.6
671.08 ±36.86
11.32 ± 2.56
100.0 ±0.0
0.009
0.013 ±0.000
19.92 ±1.51
65.9 ±5.0
0.013 ±0.001
19.13 ± 1.88
64.8 ±5.0
583.59 ±44.99
16.75 ± 2.26
100.0 ±0.0
0.010
0.060 ±0.322
19.96 ±1.50
58.0 ±5.3
0.016 ±0.003
19.16 ±1.84
55.7 ±5.3
714.87 ±207.08
17.03 ±2.30
100.0 ±0.0
0.050
0.015 ±0.005
19.76 ±1.50
1.2 ±1.2
0.015 ±0.003
19.09 ±1.81
1.2 ±1.2
598.41 ±156.96
23.20 ±1.17
100.0 ±0.0
Appendix
Table 12: Variations on patching neighborhood size ϵp with fixed tolerance δ . Reported values are means with standard deviations (formatted as {mean ± std}). For robustness (a binary outcome), we report the mean robustness with its standard error (SE), and display robustness values in bold . Rows highlighted in gray correspond to the results selected in the main paper.
Dataset
δ
Zero Patching
Mean Patching
Provably Robust Patching
Time (s)
Size ( ∣C∣ )
Rob. (%)
Time (s)
Size ( ∣C∣ )
Rob. (%)
Time (s)
Size ( ∣C∣ )
Rob. (%)
MNIST ( ϵp=0.01 )
0.25
0.142 ± 0.476
21.36 ± 1.87
48.6 ± 5.9
0.013 ± 0.000
21.22 ± 1.74
52.8 ± 5.9
523.67 ± 41.31
19.42 ± 2.01
100.0 ± 0.0
0.50
0.060 ± 0.322
19.96 ± 1.50
58.0 ± 5.3
0.016 ± 0.003
19.16 ± 1.84
55.7 ± 5.3
714.87 ± 207.08
17.03 ± 2.30
100.0 ± 0.0
1.00
0.013 ± 0.000
16.88 ± 1.85
61.2 ± 4.9
0.013 ± 0.001
16.11 ± 1.93
66.3 ± 4.8
690.42 ± 44.38
11.37 ± 2.64
100.0 ± 0.0
TaxiNet ( ϵp=0.01 )
Appendix
Table 13: Variation of tolerance level δ with fixed patching neighborhood size ϵp=0.01 . Reported values are means with standard deviations (formatted as mean ± std). For robustness (a binary outcome), we report the mean robustness with its standard error (SE), and display robustness means in bold . Rows highlighted in gray correspond to the results selected in the main paper.
Understanding how neural networks arrive at their predictions is essential for debugging, auditing, and deployment. Mechanistic interpretability pursues this goal by identifying circuits--minimal subnetworks responsible for specific behaviors. However, existing circuit discovery methods are brittle: circuits depend strongly on the chosen concept dataset and often fail to transfer out-of-distribution, raising doubts whether they capture the concept or merely dataset-specific artifacts. We introduce Certified Circuits, which provide provable stability guarantees for circuit discovery. Our framework wraps any black-box discovery algorithm with randomized data subsampling to certify that inclusion decisions over circuit components--neurons or edges of the model graph, depending on the base algorithm--are invariant to bounded edit-distance perturbations of the concept dataset. Unstable components are abstained from, yielding circuits that are more compact and more accurate. We validate across three architectures (ResNet, ViT, GPT-2) on vision (ImageNet and four OOD datasets) and language (IOI, IOI-Hard, Greater-Than) tasks. Certified circuits achieve up to 56% higher accuracy and up to 80% fewer components, and remain reliable where baselines degrade. Certified Circuits puts circuit discovery on formal ground by producing mechanistic explanations that are provably stable and better aligned with the target concept. Code: https://github.com/AlaaAnani/certified-circuits.
Alaa Anani, Tobias Lorenz, Bernt Schiele +2
Max Planck Institute for Informatics, Saarland Informatics Campus, Saarbrücken, Germany · CISPA Helmholtz Center for Information Security, Saarbrücken, Germany
Transparency of neural networks' internal reasoning is at the heart of interpretability research, adding to trust, safety, and understanding of these models. The field of mechanistic interpretability has recently focused on studying task-specific computational graphs, defined by connections (edges) between model components. Such edge-based circuits have been defined in the context of large language models, yet vision-based approaches so far only consider neuron-based circuits. These tell which information is encoded, but not how it is routed through the complex wiring of a neural network. In this work, we investigate whether useful mechanistic circuits can be identified through computational graphs in vision transformers. We propose an effective method for Automatic Visual Circuit Discovery (Vi-CD) that recovers class-specific circuits for classification, identifies circuits underlying typographic attacks in CLIP, and discovers circuits that lend themselves for steering to correct harmful model behavior. Overall, we find that insightful and actionable edge-based circuits can be recovered from vision transformers, adding transparency to the internal computations of these models.
Nina Żukowska, Wolfgang Stammer, Bernt Schiele +1
Max Planck Institute for Informatics, Saarland Informatics Campus, Saarbrücken, Germany
Mechanistic interpretability (MI) is an emerging framework for interpreting neural networks. Given a task and model, MI aims to discover a succinct algorithmic process, an interpretation, that explains the model's decision process on that task. However, MI is difficult to scale and generalize. This stems in part from two key challenges: there is no precise notion of a valid interpretation; and, generating interpretations is often an ad hoc process. In this paper, we address these challenges by defining and studying the problem of interpretive equivalence: determining whether two different models share a common interpretation, without requiring an explicit description of what that interpretation is. At the core of our approach, we propose and formalize the principle that two interpretations of a model are equivalent if all of their possible implementations are also equivalent. We develop an algorithm to estimate interpretive equivalence and case study its use on Transformer-based models. To analyze our algorithm, we introduce necessary and sufficient conditions for interpretive equivalence based on models' representation similarity. We provide guarantees that simultaneously relate a model's algorithmic interpretations, circuits, and representations. Our framework lays a foundation for the development of more rigorous evaluation methods of MI and automated, generalizable interpretation discovery methods.
Alan Sun, Mariya Toneva
Carnegie Mellon University · Max Planck Institute for Software Systems