Papers
Topics
Authors
Recent
Search
2000 character limit reached

Circuit Tracing: Causal Pathways in Complex Systems

Updated 10 July 2026
  • Circuit tracing is a collection of techniques that explicitly recover causal subgraphs and pathways across domains like neural networks, biology, quantum circuits, and electronics.
  • It employs diverse methods including interventional, observational, and sparse regression approaches to attribute internal feature contributions and trace error propagation.
  • These techniques enable practical insights for mechanistic interpretability, hardware optimization, quantum error correction, and provenance verification.

Circuit tracing is a family of techniques for making pathways explicit. In mechanistic interpretability, it denotes the recovery of a sparse, directed computational subgraph or attribution graph that explains how internal features and interactions contribute to a model prediction. In biological foundation models, it denotes directed feature-to-feature interventions across network depth. In quantum compilation and watermarking, it denotes gate lineage, error propagation, or provenance recovery. In electronics and fabrication, it can denote the generation, isolation, or verification of physical wire traces (Shen et al., 25 May 2026, Kendiukhov, 2 Mar 2026, Wan, 18 Sep 2025, He et al., 2020, Yang et al., 2024).

1. Terminological scope and domain-specific meanings

The term is not univocal. Across the literature, “circuit tracing” refers to several related but non-identical operations: recovering causal subgraphs inside neural networks, tracing state dynamics, tracing routed conductors, tracing error accumulation in quantum circuits, and tracing provenance through an intermediate representation. The common thread is explicit pathway recovery, but the traced object, intervention model, and evaluation criterion are domain-specific.

Domain Unit traced Typical objective
Transformer mechanistic interpretability sparse, directed computational subgraph explain which internal features causally contribute to a prediction
Single-cell and protein foundation models sparse latent features across layers recover biologically meaningful computation
Vision-language and diffusion models multimodal feature-to-feature edges expose cross-modal semantic propagation
PCB, paper, and FHE synthesis traces, cuts, or routed paths generate or optimize circuit structure
Quantum compilation and watermarking gate lineage or ownership signal verification, provenance, or tracing of generated circuits

In transformer work, a circuit is typically a directed subgraph of the computation graph sufficient to produce a behavior on a given task. In sparse-feature formulations, nodes may be attention heads, MLP features, SAE or transcoder latents, token positions, or logits; edges encode causal influence or effective linear contribution. In hardware and quantum work, by contrast, nodes are often gates, nets, cuts, or compiler IR objects, and tracing emphasizes auditability, optimization, or ownership rather than internal representation learning (Franco et al., 2024, Dai et al., 24 Sep 2025, Wan, 18 Sep 2025).

2. Core mechanistic formalism in transformers

In LLMs, circuit tracing is commonly formulated as attribution over sparse features. The formalization adopted by "Detecting Unfaithful Chain-of-Thought via Circuit-Guided Internal-External Discrepancy" treats a prompt-specific circuit as an attribution graph whose input nodes are tokens, output nodes are next-token logits, and interior nodes are sparse, overcomplete features discovered by a transcoder replacement model. Active feature nodes are

Vf={v=(,t,k)f,t,k>0},\mathcal{V}_{f} = \{v=(\ell,t,k)\mid f_{\ell,t,k} > 0\},

and directed edge weights are

Ast=aswst,A_{s\to t} = a_s\, w_{s\to t},

where asa_s is the source feature’s activation and wstw_{s\to t} its effective linear contribution to the target under the local replacement model (Shen et al., 25 May 2026).

This general scheme has several concrete realizations. "Sparse Attention Decomposition Applied to Circuit Tracing" decomposes OV=WOWVOV = W_O W_V, WQW_Q, and WKW_K with SVD, interprets right singular vectors of OVOV as input features extracted at the source token and left singular vectors as output features written into the residual stream, and defines inter-head communication by alignment between writer and reader directions. In that formulation, circuit tracing is feature-level rather than head-level: the traced edge is not merely head aba \to b, but the residual direction written by one component and read by another (Franco et al., 2024).

A distinct but related formulation appears in graph reasoning. "Uncovering Graph Reasoning in Decoder-only Transformers with Circuit Tracing" applies the circuit-tracer framework to decoder-only transformers trained on synthetic graph tasks and identifies two core mechanisms: token merging and structural memorization. Token merging is the progressive combination of multiple tokens representing relevant substructures into more compact representations, while structural memorization is the recovery of 1-hop neighbors from internal representations when prompted with a single node ID. The paper defines

SE=NselectNpred,\mathrm{S_E} = \frac{N_{\text{select}}}{N_{\text{pred}}},

to measure how well selected tokens align with required evidence, and reports Ast=aswst,A_{s\to t} = a_s\, w_{s\to t},0 in attributed path reasoning (Dai et al., 24 Sep 2025).

The common formal commitments are sparse intermediate variables, directed edges, and prompt- or task-specific causal interpretation. The main differences concern what is taken as the primitive node, how edge weights are computed, and whether the method is intervention-based, reconstruction-based, or observational.

3. Biological and protein model circuit tracing

Single-cell foundation models have made circuit tracing explicitly interventional. "Causal Circuit Tracing Reveals Distinct Computational Architectures in Single-Cell Foundation Models: Inhibitory Dominance, Biological Coherence, and Cross-Model Convergence" introduces causal circuit tracing (CCT) as a feature-level intervention method that maps directed, causal interactions among Sparse Autoencoder features across model depth. The procedure ablates a source feature at layer Ast=aswst,A_{s\to t} = a_s\, w_{s\to t},1, propagates the altered hidden state forward, and measures downstream responses: Ast=aswst,A_{s\to t} = a_s\, w_{s\to t},2 Effect size is computed on paired per-cell differences with Cohen’s Ast=aswst,A_{s\to t} = a_s\, w_{s\to t},3, and directional reliability is measured by consistency. Edges are retained if Ast=aswst,A_{s\to t} = a_s\, w_{s\to t},4 and Consistency Ast=aswst,A_{s\to t} = a_s\, w_{s\to t},5. Applied to Geneformer V2-316M and scGPT whole-human across four conditions, the method produced 96,892 significant edges and 80,191 forward passes; both models show approximately 53 percent biological coherence and 65 to 89 percent inhibitory dominance, and cross-model consensus yields 1,142 conserved domain pairs (Kendiukhov, 2 Mar 2026).

The paper’s interpretive claims are sharply bounded. Gene-level CRISPRi validation gives directional accuracy 56.4 percent and negligible magnitude correlation, supporting the conclusion that the models primarily encode co-expression rather than gene-level causal regulation. The traced circuits nonetheless recover interpretable process-level cascades, including DNA damage response, checkpoint, cell-cycle arrest, proteostasis, chromatin organization, and stress-response pathways (Kendiukhov, 2 Mar 2026).

Protein models require a different replacement architecture because layer-local decompositions are insufficient for sequence modeling and fitness prediction. "Protein Circuit Tracing via Cross-layer Transcoders" introduces ProtoMech, in which each MLP output is reconstructed from sparse latent variables from all preceding layers: Ast=aswst,A_{s\to t} = a_s\, w_{s\to t},6 Applied to ESM2, ProtoMech recovers 82-89% of the original performance on protein family classification and function prediction tasks; compressed circuits use <1% of the latent space while retaining up to 79% of model accuracy, and steering along these circuits enables high-fitness protein design, surpassing baseline methods in more than 70% of cases (Tsui et al., 12 Feb 2026).

" Circuit Tracing in Autoregressive Protein LLMs" extends the same cross-layer logic to ProGen3, a sparse Mixture-of-Experts model trained for both causal generation and span infilling. Its zero-shot circuit discovery algorithm ranks latents by attribution to the KL divergence between original and reconstructed logits and then greedily selects them until a fidelity threshold is met. In causal generation circuits, the selected subset typically uses <2% of the latent space; in zero-shot fitness estimation, circuits use <1% while still recovering functional scoring behavior and biologically meaningful motifs (Tsui et al., 14 Jun 2026).

4. Multimodal and generative circuit tracing

Multimodal tracing extends sparse-feature methods across modalities, timesteps, and visual token layouts. "Circuit Tracing in Vision-LLMs: Understanding the Internal Mechanisms of Multimodal Thinking" builds an end-to-end framework around per-layer transcoders, local-linear attribution graphs, and attention rollout for visual tokens. Nodes are token embeddings, active transcoder features at Ast=aswst,A_{s\to t} = a_s\, w_{s\to t},7, and output logits. Edge weights are computed by a local Jacobian factorization, and graph growth is controlled by cumulative influence thresholds of 0.80 and 0.98. The resulting circuits expose visually grounded arithmetic, associative visual latents such as Mars Ast=aswst,A_{s\to t} = a_s\, w_{s\to t},8 space shuttle, and a six-finger hallucination in which generic “hand” features dominate weaker counting features (Yang et al., 23 Feb 2026).

For spatiotemporal reasoning, "CircuitProbe: Dissecting Spatiotemporal Visual Semantics with Circuit Tracing" decomposes LVLM processing into three circuits: visual auditing circuit, semantic tracing circuit, and attention flow circuit. The framework analyzes LLaVA-family models and reports that visual semantics are highly localized to specific object tokens—removing these tokens can degrade model performance by up to 92.6%. It further reports that interpretable concepts of objects and actions emerge and become progressively refined in the middle-to-late layers, and that these layers exhibit specialized functional localization for spatiotemporal semantics (Zhang et al., 25 Jul 2025).

Diffusion transformers add an explicit temporal axis. "DifFRACT: Diffusion Feature Reconstruction and Attribution for Circuit Tracing" trains timestep-conditioned transcoders for FLUX.1[schnell] and constructs a Local Replacement Model that linearizes the remaining computation. Feature-to-feature attribution is exact on the cached input, and circuits are extracted by iterative expansion and pruning. Across 80 graphs, text-stream contribution decreases from 89.9% at step 0 to 5.4% at step 3, image-stream contribution increases from 10.1% to 94.6%, and cross-modal edge fraction drops from 14.9% to 2.0%, confirming a two-phase process of early semantic reasoning with strong cross-modal interaction and late perceptual refinement within the image stream (Mazur et al., 14 Jun 2026).

These multimodal systems preserve the same structural motifs as text-only tracing—sparse latent variables, directed edges, intervention-based validation—but the traced pathways now cross image and text streams, frame order, denoising steps, and visual token grids.

5. State-level, sentence-level, and scalable surrogates

Several papers broaden circuit tracing beyond local feature graphs. "Detecting Unfaithful Chain-of-Thought via Circuit-Guided Internal-External Discrepancy" treats circuit tracing as a compact sentence-level attribution pipeline for instance-level CoT unfaithfulness detection. The method selects informative reasoning tokens using entropy and counterfactual necessity, traces compact sentence-level circuits, encodes them with a GNN, constructs external sentence graphs from hidden states, and scores discrepancy with Fused Gromov–Wasserstein distance. On FaithCoT-Bench, it achieves state-of-the-art Accuracy and F1 on all datasets while cutting peak memory by 48.3–55.2%, traced tokens by 62.4–68.6%, and runtime by 67.6% on TruthfulQA and 46.7% on AQuA (Shen et al., 25 May 2026).

"Markovian Circuit Tracing for Transformer State Dynamic" shifts attention from local pathways to coarse predictive state abstractions. Its benchmark uses synthetic HMM families where latent states, transition matrices, Bayesian beliefs, and counterfactual targets are known exactly. Residual activations are clustered into recovered states, and causal relevance is tested by state forcing: patching a recovered-state centroid reduces KL to the exact HMM counterfactual target from 0.1957 in the unpatched model to 0.0532 on average, beating wrong-state, mean-activation, random-activation, and shuffled-label controls (X, 20 May 2026). Here, circuit tracing becomes state-dynamics interpretability rather than feature-to-feature attribution.

Scalability has motivated observational surrogates. "Scalable Circuit Learning for Interpreting LLMs" introduces CircuitLasso, which learns sparse dependency skeletons over neurons or SAE features by solving block-upper-triangular Lasso problems instead of performing intervention-heavy edge testing. On InterpBench, CircuitLasso-linear attains mean SHD 3.16, statistically indistinguishable from EAP-ig at 2.98, with mean runtime 16.3 s per case, 3.0× faster than EAP-ig and 2.1× faster than EAP (Yin et al., 15 Jun 2026). The learned object is explicitly a sparse regression surrogate rather than a strict causal SEM, but it preserves the practical ambition of tracing “who influences whom” at scale.

Taken together, these variants show that circuit tracing can be local or global, interventional or observational, token-level or state-level, and still remain recognizably about explicit pathway recovery.

6. Routing, fabrication, quantum error tracing, and provenance

In electronic design automation, the term often denotes routed conductors rather than internal causal subgraphs. "Circuit Routing Using Monte Carlo Tree Search and Deep Neural Networks" models routing as sequential decision-making on a grid and uses MCTS with DNN-guided rollout to generate traces of wires. On 30 randomly generated single-layer circuits, DNN-DFS rollout with Avg-UCT or Max-UCT reached 100% success at 1000–5000 iterations, while sequential A* and Lee’s algorithm left 20% of boards unrouted (He et al., 2020).

"Fabricating Paper Circuits with Subtractive Processing" deliberately reinterprets circuit tracing as subtractive isolation: the conductor becomes one or more large, contiguous zones for each net, and the “routing” is realized by subtractive isolation cuts—moats that separate nets. PaperCAD converts traditional circuit descriptions into large-zone paper circuit layouts and outputs cutter-ready vector paths or printed isolation guides (Yang et al., 2024).

Boolean FHE synthesis uses yet another specialized sense. "Cut Tracing with E-Graphs for Boolean FHE Circuit Synthesis" augments multiplicative-depth and multiplicative-complexity reduction flows by recording local cut alternatives in an e-graph and extracting a circuit that minimizes

Ast=aswst,A_{s\to t} = a_s\, w_{s\to t},9

Its preliminary results demonstrate that cut tracing yields up to a 40% improvement in homomorphic evaluation runtime when applied to these two flows (Castelnau et al., 15 Jun 2025).

Quantum work splits between error tracing and provenance tracing. "Error tracing in linear and concatenated quantum circuits" traces accumulated error probability due to noisy gates and decoherence and inserts a QECC block only when error exceeds a threshold. Tracing errors in higher levels of concatenation shows that, in most cases, after 1 or 2 levels of concatenation, the number of QECC blocks required become static (Majumdar et al., 2016). "Quantum Circuit Engineering for Correcting Coherent Noise" traces unitary ZZ crosstalk by exploiting the arrangement of CNOT gates and forced commutation and reports up to 25% reduction in the infidelity of asa_s0 code asa_s1 state on IBMQ processors (Ahsan, 2021).

Compiler provenance work makes tracing literal. "Qompiler: A Traceable Quantum Circuit Synthesizer for Arbitrary Hamiltonians" uses a B-Tree-based intermediate representation that encodes information for gate lineage, enabling detailed tracing information of quantum circuit gates and facilitating circuit verification (Wan, 18 Sep 2025). "Q-Tag: Watermarking Quantum Circuit Generative Models" treats tracing as ownership attribution: watermark bits are embedded into the Gaussian latent prior of a QCGM by symmetric sampling, and detection uses inversion, reverse sampling, ECC decoding, and a threshold calibrated to false positive rate asa_s2 (Yang et al., 26 Feb 2026).

RTL-generation systems adopt a source-level debugging meaning. "VerilogCoder: Autonomous Verilog Coding Agents with Graph-based Planning and Abstract Syntax Tree (AST)-based Waveform Tracing Tool" combines simulator output, AST-derived dependency analysis, and waveform alignment; the full system reaches 94.2% syntactically and functionally correct Verilog code on VerilogEval-Human v2 (Ho et al., 2024).

7. Limitations, evaluation, and interpretive cautions

A recurring misconception is that circuit tracing names a single method with uniform causal guarantees. The literature does not support that view. Some methods are explicit interventions on hidden states, some are local-linear decompositions, some are sparse regression surrogates, some are routing algorithms, and some are provenance schemes. Their guarantees are therefore heterogeneous.

Within mechanistic interpretability, most methods depend on replacement models, sparse dictionaries, or local linearization. CIE-Scorer assumes white-box access and a transcoder replacement model and approximates reasoning at the sentence level, which may miss fine-grained token interactions (Shen et al., 25 May 2026). DifFRACT freezes the QK pathway, explains OV routing and downstream MLP transformations, and restricts analysis to double-stream blocks, so it does not explain why attention attends where it does (Mazur et al., 14 Jun 2026). CircuitLasso explicitly states that its edge weights are not exact causal effects of the LLM’s nonlinear computation; observational coefficients can reflect dataset co-occurrences rather than ground-truth causal relations (Yin et al., 15 Jun 2026).

Biological tracing adds domain-specific caveats. In CCT, source features were a curated subset, combinatorial interactions were not examined, thresholds are conventional, and biological coherence depends on existing ontologies. Most importantly, gene-level CRISPRi validation is only marginally above chance, and the authors conclude that process-level circuits and temporal ordering generalize better than gene-level causal claims (Kendiukhov, 2 Mar 2026).

This suggests that “circuit tracing” is best understood as an umbrella term for explicit pathway recovery under domain-specific approximations. Its strongest use is not as a universal proof of mechanism, but as a disciplined way to expose candidate pathways, quantify intervention effects, compare architectures, and make hidden structure available for verification, debugging, or control.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (19)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Circuit Tracing.