A circuit is a minimal, connected subgraph of a neural network's computational graph—comprising specific attention heads, MLP neurons, and their weight connections—that is causally responsible for performing a discrete, interpretable task. Unlike viewing a single neuron in isolation, a circuit captures the collaborative, multi-component algorithm that transforms an input into a specific feature or output, such as detecting indirect objects or completing a pattern. This concept treats a model not as a black box but as a compiled program that can be reverse-engineered into its constituent functions.
Glossary
Circuits

What is Circuits?
In mechanistic interpretability, circuits are the fundamental functional units of a neural network, representing sparse, interpretable subgraphs of connected attention heads and MLP neurons that collectively implement a specific, human-understandable algorithm.
Circuits are discovered through a combination of causal interventions like activation patching and path patching, which isolate the direct effect of a computational path, and validated using causal scrubbing, which tests whether the hypothesized subgraph alone can reproduce the model's full behavior. The study of circuits, pioneered in transformer language models, has revealed specialized components like induction heads that perform in-context copying, demonstrating that complex model behaviors emerge from the precise interaction of simpler, interpretable algorithmic units.
Key Characteristics of a Circuit
A circuit is a sparse, interpretable subgraph of a neural network consisting of connected attention heads and MLP neurons that implement a specific, human-understandable algorithm. The following properties define how circuits are identified, validated, and analyzed.
Minimality
A valid circuit must be sparse—it includes only the smallest set of model components (attention heads and MLP neurons) necessary to recover the original model's performance on a specific task. Extraneous components are excluded.
- Causal Scrubbing is the primary validation method: all activations outside the hypothesized circuit are replaced with corrupted values.
- If the model's performance is preserved, the circuit is considered complete.
- If performance degrades, the circuit is missing critical components.
- Contrast with the full model, which contains many redundant or task-irrelevant pathways.
Compositional Structure
Circuits are not flat collections of components; they exhibit hierarchical composition. Earlier layers extract low-level features that are combined by later layers into higher-level abstractions.
- Attention heads route information between token positions, forming skip-trigram patterns.
- MLP layers act as associative memory, amplifying or suppressing features.
- The residual stream serves as the communication channel where each component reads from and writes to a shared state.
- Example: In an Indirect Object Identification circuit, earlier heads duplicate the subject token, and later heads attend to the duplicated position to predict the indirect object.
Causal Falsifiability
Every hypothesized circuit must be causally testable. Correlation between a component's activation and a behavior is insufficient; the component must be shown to be necessary and sufficient.
- Knockout analysis: Ablating a circuit component (zero ablation or mean ablation) must degrade task performance.
- Knock-in analysis: Preserving only the circuit components while corrupting all others must restore performance.
- Path Patching isolates the direct effect of a specific computational path between two components, ruling out indirect influences.
- This distinguishes genuine mechanistic understanding from mere activation correlation.
Universality Across Models
Circuits exhibiting universality reappear with similar structure across different random initializations, architectures, and training runs when models are trained on similar data distributions.
- Induction heads have been found consistently across transformer models of varying scales and architectures.
- Universality suggests circuits are convergent solutions to computational subproblems imposed by the data.
- Not all circuits are universal; some are idiosyncratic to a specific training run.
- Detecting universal circuits provides evidence that the discovered algorithm is a natural solution rather than an artifact of analysis.
Feature Decomposition
Individual neurons in a circuit are often polysemantic—they respond to multiple unrelated concepts. Decomposing these into monosemantic features is critical for interpretability.
- Sparse Autoencoders are trained on activations to produce a sparse overcomplete basis where each latent dimension corresponds to a single concept.
- Dictionary Learning extracts a set of basis vectors that sparsely reconstruct activations.
- In a circuit context, this decomposition reveals that what appears as one neuron may actually be implementing several distinct sub-computations.
- This is essential for understanding circuits exhibiting superposition, where more features than dimensions are compressed into a layer.
End-to-End Verifiability
A fully understood circuit must be verifiable through end-to-end replication: the hypothesized algorithm, when implemented in code, should reproduce the model's behavior on all inputs.
- Direct Logit Attribution decomposes the final output into additive contributions from each component, confirming the circuit accounts for the total effect.
- The circuit's algorithm should generalize beyond the examples used to discover it.
- Edge cases and failure modes of the circuit should be predictable from the hypothesized mechanism.
- This standard distinguishes partial explanations from complete reverse engineering of the learned algorithm.
Frequently Asked Questions
Explore the core concepts behind reverse-engineering the sparse, human-understandable subgraphs that implement specific algorithms within neural networks.
A circuit is a sparse, interpretable subgraph of a neural network consisting of connected attention heads and MLP neurons that implement a specific, human-understandable algorithm. Unlike viewing the model as a monolithic black box, circuits decompose the computation into modular components that interact via the residual stream. For example, in a transformer language model, an induction head circuit copies previous-token patterns by attending to a token that followed a similar current token, enabling in-context sequence completion. Circuits are discovered through causal interventions like activation patching, which isolate the minimal set of components necessary and sufficient for a behavior. The goal is to reverse-engineer the learned algorithm into a clean, verifiable description.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core concepts for reverse-engineering the sparse, interpretable subgraphs that implement specific algorithms within neural networks.
Superposition
A hypothesized phenomenon where a neural network represents more independent features than it has dimensions in a given layer, compressing sparse features into a lower-dimensional space. This compression explains why individual neurons often appear polysemantic—they participate in representing multiple features simultaneously through interference patterns in activation space.
Causal Scrubbing
A systematic evaluation methodology that tests a hypothesized circuit by replacing all activations outside the circuit with corrupted values and verifying the model's performance is preserved. If the scrubbed model maintains accuracy, the circuit is causally complete. If performance degrades, the hypothesis is missing critical components.
Activation Patching
A causal intervention technique that replaces a model's internal activation at a specific layer and position with a value from a corrupted or alternative forward pass to isolate its function. Key variants include:
- Resample ablation: replacing with activations from a different input
- Mean ablation: replacing with the dataset average
- Zero ablation: setting activations to zero
Induction Heads
A specific attention head circuit that performs in-context copying by attending to a previous token that followed a similar current token, enabling sequence completion. Discovered as a fundamental building block of in-context learning, induction heads form the basis of more complex circuits like previous token heads and copy suppression mechanisms.
Sparse Autoencoder
An unsupervised architecture trained to decompose a model's dense, polysemantic activations into a sparse set of interpretable, monosemantic features. By enforcing sparsity through an L1 penalty on the hidden representation, SAEs recover the overcomplete basis vectors that correspond to individual human-understandable concepts compressed in superposition.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us