Formal Mechanistic Interpretability: Automated Circuit Discovery with Provable Guarantees
Organizations: School of Computer Science and Engineering, The Hebrew University of Jerusalem
Abstract
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
| Dataset | Sampling-based Circuit Discovery | Provably Input-Robust Circuit Discovery | ||||
| Time (s) | Size ( ) | Robustness (%) | Time (s) | Size ( ) | Robustness (%) | |
| CIFAR-10 | 0.23 | 16.47 | 46.5 | 2970.85 | 19.18 | 100.0 |
| MNIST | 0.31 | 12.56 | 19.2 | 611.93 | 15.84 | 100.0 |
| GTSRB | 0.11 | 28.91 | 27.6 | 991.08 | 29.59 | 100.0 |
| TaxiNet | 0.01 | 5.77 | 9.5 | 180.00 | 6.82 | 100.0 |
| Dataset | Zero Patching | Mean Patching | Provably Patching-Robust Patching | ||||||
| Time (s) | Size ( ) | Rob. (%) | Time (s) | Size ( ) | Rob. (%) | Time (s) | Size ( ) | Rob. (%) | |
| CIFAR-10 | 0.1 0.3 | 65.1 | 46.4 | 0.0 | 64.1 | 33.3 | 5408.5 | 65.6 | 100.0 |
| MNIST | 0.1 | 20.0 | 58.0 | 0.0 | 19.2 | 55.7 | 714.9 | 17.0 | 100.0 |
| GTSRB | 0.3 | 32.6 | 38.0 | 0.0 | 33.4 | 40.5 | 2907.2 | 34.3 | 100.0 |
| TaxiNet | 0.0 | 5.8 | 57.1 | 0.0 | 5.4 | 63.3 | 175.7 | 5.4 | 100.0 |
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Model | Examined Granularity | # Components |
| MNIST | FC | Neurons | 31 |
| GTSRB | CNN | Filters | 48 |
| CIFAR-10 | ResNet | Filters | 72 |
| TaxiNet | CNN | Filters | 8 |
| Layer / Block | Output Dim. | Details |
| Input | CIFAR-10 image | |
| Conv1 | , stride 2 | |
| Residual Block 1 | ||
| Conv1 | , stride 2 | |
| ReLU | non-linearity | |
| Conv2 | , stride 1 | |
| Layer | Output Dim. | Details |
| Input | GTSRB image | |
| Conv1 | , padding 1, ReLU | |
| AvgPool1 | ||
| Conv2 | , padding 1, ReLU | |
| AvgPool2 | ||
| Flatten | – |
| Layer | Dimensions | Activation |
| Input | – | |
| Fully Connected (fc1) | ReLU | |
| Fully Connected (fc2) | ReLU | |
| Fully Connected (fc3) | – |
| Layer | Output Dim. | Details |
| Input | TaxiNet image | |
| Conv1 | , padding 1, ReLU | |
| Conv2 | , padding 1, ReLU | |
| Flatten | – | |
| FC1 | ReLU | |
| FC2 | ReLU |
| Dataset | Sampling-based Circuit Discovery | Provably Input-Robust Circuit Discovery | |||||
| Time (s) | Size ( ) | Robustness (%) | Time (s) | Size ( ) | Robustness (%) | ||
| MNIST ( ) | |||||||
| 0.015 | 12.57 | 46.0 | 677.36 | 14.51 | 100.0 | ||
| 0.016 | 12.56 | 25.3 | 663.60 | 15.76 | 100.0 | ||
| 0.309 | 12.56 | 19.2 | 611.93 | 15.84 | 100.0 | ||
| 0.027 | 12.57 | 0.0 | 1700.05 | 28.75 | 100.0 | ||
| Dataset | Sampling-based Circuit Discovery | Provably Input-Robust Circuit Discovery | |||||
| Time (s) | Size ( ) | Robustness (%) | Time (s) | Size ( ) | Robustness (%) | ||
| MNIST ( ) | |||||||
| 0.083 0.329 | 19.72 1.50 | 15.6 3.8 | 460.14 36.59 | 22.02 2.52 | 100.0 0.0 | ||
| 0.309 0.889 | 12.56 2.29 | 19.2 4.0 | 611.93 97.14 | 15.84 2.33 | 100.0 0.0 | ||
| 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 ( ) | |||||||
| Dataset | Metric | Sampling-based Circuit Discovery | Provably Input-Robust Circuit Discovery | ||||
| Time (s) | Size ( ) | Robustness (%) | Time (s) | Size ( ) | Robustness (%) | ||
| MNIST | Logit-diff | 0.31 | 12.56 | 19.2 | 611.93 | 15.84 | 100.0 |
| Winner–Runner | 0.13 0.60 | 5.18 1.05 | 73.0 | 638.57 20.94 | 12.04 5.79 | 100.0 | |
| Abs-Max | 0.014 0.012 | 25.55 2.90 | 6.0 | 362.61 55.73 | 28.11 2.37 | 100.0 | |
| Dataset | % of full net | % 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% |
| Dataset | Zero Patching | Mean Patching | Provably Patching-Robust Patching | |||||||
| Time (s) | Size ( ) | Rob. (%) | Time (s) | Size ( ) | Rob. (%) | Time (s) | Size ( ) | Rob. (%) | ||
| MNIST ( ) | ||||||||||
| 0.054 0.182 | 19.87 1.55 | 87.0 | 0.013 0.001 | 19.19 1.87 | 93.0 | 671.08 | 11.32 2.56 | 100.0 | ||
| 0.013 | 19.92 | 65.9 | 0.013 | 19.13 1.88 | 64.8 | 583.59 | 16.75 2.26 | 100.0 | ||
| 0.010 | 0.060 | 19.96 | 58.0 | 0.016 | 19.16 | 55.7 | 714.87 | 17.03 | 100.0 | |
| 0.015 | 19.76 | 1.2 | 0.015 | 19.09 | 1.2 | 598.41 | 23.20 | 100.0 | ||
| Dataset | Zero Patching | Mean Patching | Provably Robust Patching | |||||||
| Time (s) | Size ( ) | Rob. (%) | Time (s) | Size ( ) | Rob. (%) | Time (s) | Size ( ) | Rob. (%) | ||
| MNIST ( ) | ||||||||||
| 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 | |
| 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 ( ) | ||||||||||