Table of Contents
Fetching ...

Certified Circuits: Stability Guarantees for Mechanistic Circuits

Alaa Anani, Tobias Lorenz, Bernt Schiele, Mario Fritz, Jonas Fischer

TL;DR

Certified Circuits is introduced, which provides provable stability guarantees for circuit discovery and puts circuit discovery on formal ground by producing mechanistic explanations that are provably stable and better aligned with the target concept.

Abstract

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 concept or 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 circuit component inclusion decisions are invariant to bounded edit-distance perturbations of the concept dataset. Unstable neurons are abstained from, yielding circuits that are more compact and more accurate. On ImageNet and OOD datasets, certified circuits achieve up to 91% higher accuracy while using 45% fewer neurons, 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 will be released soon!

Certified Circuits: Stability Guarantees for Mechanistic Circuits

TL;DR

Certified Circuits is introduced, which provides provable stability guarantees for circuit discovery and puts circuit discovery on formal ground by producing mechanistic explanations that are provably stable and better aligned with the target concept.

Abstract

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 concept or 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 circuit component inclusion decisions are invariant to bounded edit-distance perturbations of the concept dataset. Unstable neurons are abstained from, yielding circuits that are more compact and more accurate. On ImageNet and OOD datasets, certified circuits achieve up to 91% higher accuracy while using 45% fewer neurons, 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 will be released soon!
Paper Structure (24 sections, 18 equations, 5 figures, 2 tables)

This paper contains 24 sections, 18 equations, 5 figures, 2 tables.

Figures (5)

  • Figure 1: Certified circuits are smaller, more accurate, and generalize to OOD. Given a concept dataset, we isolate a circuit—a subnetwork encoding that concept—that is provably stable under dataset edits. (a) Certified circuits keep stable semantic neurons (e.g., teeth) and abstain from unstable spurious ones (e.g., bird cues), improving circuit-only accuracy to $94\%$ ($62\%$ over baseline). (b) Across distribution shifts, ImageNet-discovered certified circuits ($\blacklozenge$) are significantly smaller and more accurate than baseline circuits ($\bullet$).
  • Figure 2: Certified circuit discovery via concept deletion smoothing. (§\ref{['sec:setup-inputs']}) Given a concept dataset $\mathcal{D}$, model graph $G$, and circuit discovery algorithm $A$: (§\ref{['sec:deletion-smoothing']}) We sample dataset variants via per-example random deletion with probability $p_{\mathrm{del}}$, (§\ref{['sec:smoothed-discovery']}) run $A$ on each to obtain candidate circuits, (§\ref{['sec:estimating-circuit']}) aggregate per-vertex inclusion frequencies, (§\ref{['sec:estimating-circuit']}) certify vertices as in, out, or abstain ($\oslash$) based on votes consistency. (§\ref{['sec:cert-properties']}) The certified circuit is provably invariant to dataset edits within radius $r$.
  • Figure 3: Circuit accuracy (cACC) vs. size $K$. Solid lines show certified circuits, dashed show baselines, with colors distinguishing models. Rows vary scoring methods, columns vary datasets. Circuits are discovered on ImageNet and evaluated on OOD data.
  • Figure 4: Structural stability under distribution shift. Per-class IoU between circuits discovered on ImageNet and re-discovered on each OOD dataset, evaluated at the $K$ that maximizes the certified--baseline $\Delta$cACC = $100 \cdot \frac{\mathrm{cACC}_{\mathrm{cert}}-\mathrm{cACC}_{\mathrm{base}}}{\mathrm{cACC}_{\mathrm{base}}}$ gap. Boxes show the distribution over classes. Relevance top-$K$ scoring is used.
  • Figure 5: Certified edit-distance radius $r$ as a function of the deletion probability $p_{\mathrm{del}}$ for different confidence thresholds $\tau$. Larger $p_{\mathrm{del}}$ and larger $\tau$ yield larger certified radii.

Theorems & Definitions (1)

  • proof