Mechanistic Interpretability: Understanding What Happens Inside Neural Networks
Reported By
Nakhul Krishna

Abstract
Large language models can produce remarkably capable behaviour, yet their internal computations are distributed across billions of parameters and many layers. Mechanistic interpretability (MI) is a research programme that attempts to reverse-engineer these computations: rather than judging a model only by its inputs and outputs, researchers investigate the internal mechanisms that produce its behaviour. The goal is to identify meaningful components, understand how they interact, and build explanations that are precise enough to make testable predictions.
This article introduces the central ideas behind mechanistic interpretability, including circuits, features, superposition, sparse autoencoders, activation patching and causal intervention. It also examines the limits of current methods and why a convincing explanation is not necessarily a complete one.
1. The interpretability problem
A neural network is a mathematical function implemented by layers of parameterised operations. In a transformer, tokens are converted into vectors, processed by attention and multilayer perceptron (MLP) blocks, and transformed into output probabilities. The model's parameters are learned through optimisation; they are not normally labelled with human-readable concepts.
This creates a gap between capability and understanding. A model may correctly answer a question, write code or follow a complex instruction without revealing which internal computation produced the result. Observing the input and output alone is insufficient to establish the internal reasoning process.
Interpretability research broadly seeks to make model behaviour more understandable. Mechanistic interpretability takes a particularly ambitious approach: construct a mechanistic account of how specific behaviours are implemented inside the network.
A useful explanation should do more than associate a neuron with a word or display an attention heatmap. It should identify an internal computation, explain how information is represented and transformed, and survive interventions that test whether the proposed mechanism is actually involved.
2. From weights to circuits
A neural network contains parameters, activations and computational operations. These are related but distinct:
- Weights are learned parameters that determine how signals are transformed.
- Activations are intermediate values produced when a particular input passes through the network.
- Features are directions or patterns in activation space that may correspond to information represented by the model.
- Circuits are groups of components and connections that work together to implement a computation.
A circuit-level explanation might describe how a model identifies a relationship between two tokens, carries information through residual-stream representations, and uses that information to influence a later prediction.
The transformer residual stream is often treated as a shared communication channel. Attention heads and MLPs read information from it, perform transformations, and write updates back into it. This perspective allows researchers to ask which components read or write particular features and how those operations combine.
However, a circuit is not necessarily a neat, isolated subnetwork. Components can participate in multiple behaviours, and the same behaviour may be implemented through overlapping pathways.
3. Why individual neurons are not enough
An early approach to interpretability was to inspect individual neurons and search for examples that strongly activated them. Sometimes a neuron appears to respond to a recognisable pattern, such as a particular token category or syntactic feature.
But the relationship between neurons and concepts is not reliably one-to-one. A single neuron may respond to several unrelated patterns, while a meaningful concept may be distributed across many neurons.
One important explanation is superposition. Neural networks may represent more features than they have available dimensions by allowing features to overlap in activation space. This can make individual neurons difficult to interpret: a neuron may contribute to several features, and a feature may be encoded across multiple neurons.
Superposition is a useful explanatory framework, not a claim that every model or layer behaves identically. Its practical significance is that interpreting a network by assigning a single human concept to each neuron can miss the distributed structure of its representations.
4. Features and sparse autoencoders
To study representations beyond individual neurons, researchers investigate features: patterns or directions in activation space that capture meaningful information.
A sparse autoencoder (SAE) is one technique used to investigate these features. In simplified form, an SAE learns an encoder and decoder:
z = ReLU(Wenc · x + benc)
x̂ = Wdec · z + bdec
Here, x is an activation vector from the language model, z is a learned feature representation, and x̂ is the reconstructed activation. A sparsity objective encourages only a relatively small number of learned features to activate for a given input.
A typical training objective combines reconstruction quality with a sparsity penalty:
L = Lreconstruction(x, x̂) + λ · Lsparsity(z)
The coefficient λ controls the trade-off between accurately reconstructing the original activation and encouraging sparse feature activity.
SAEs can provide a more useful vocabulary for analysing internal representations. Researchers can inspect examples that activate a feature, test how its activation changes across contexts, and intervene on it to study its effect.
But an SAE feature is not automatically a clean, unique or causally meaningful concept. Features may be split across multiple units, combined, context-dependent or difficult to label. Reconstruction quality and sparsity alone do not prove that the learned features match the model's true internal organisation.
5. Causal testing: activation patching and ablation
A major challenge in interpretability is distinguishing correlation from causation. If a component activates when a model performs a task, that does not prove the component is necessary for the task.
Mechanistic interpretability therefore uses interventions.
Activation patching
Activation patching compares two model runs: a clean run in which the model behaves as expected and a corrupted run in which a carefully chosen part of the input is changed. Researchers replace an activation in the corrupted run with the corresponding activation from the clean run, then measure whether the original behaviour is restored.
For example, suppose a model completes a sentence by predicting a word that depends on a relationship established earlier in the prompt. Researchers might corrupt the relevant earlier token, observe a change in the prediction, and then patch selected internal activations from the clean run. If patching a particular component restores the prediction, that component may carry information important to the behaviour.
The result is evidence about causal contribution, but it must be interpreted carefully. Patching can introduce distribution shifts, and the result may depend on the exact corruption, location and metric chosen.
Ablation
Ablation removes or modifies a component's contribution, for example by setting an activation to zero or replacing it with a baseline. If the target behaviour weakens, the component may be important.
Ablation is not definitive by itself. Neural networks often contain redundant pathways, so removing one component may have little effect even when it normally participates in the computation. Conversely, an intervention can disrupt unrelated computations and create effects that would not occur naturally.
Strong causal claims therefore benefit from multiple interventions, controls and alternative explanations.
6. Building a mechanistic explanation
A practical investigation often follows an iterative process:
- Define a behaviour. Choose a narrow, measurable behaviour rather than trying to explain an entire model.
- Construct controlled inputs. Create examples that trigger the behaviour and matched examples that do not.
- Collect internal activations. Record activations at selected layers, attention heads, MLPs or learned feature representations.
- Form a hypothesis. Propose which components represent relevant information and how that information is transformed.
- Test causally. Use ablation, activation patching or feature interventions to test the proposed mechanism.
- Check generalisation. Repeat the analysis with different examples, wording and contexts.
- Document uncertainty. Record what the evidence establishes, what remains speculative and which alternative explanations are still plausible.
The final result should be a falsifiable account. It should predict what will happen under new inputs or controlled interventions, not merely describe patterns observed after the fact.
7. What mechanistic interpretability can contribute
If its methods become more reliable and scalable, mechanistic interpretability could contribute to several areas:
- Debugging: identifying internal pathways associated with unwanted or unexpected behaviour.
- Safety research: investigating whether models represent concepts or strategies associated with deceptive, harmful or policy-violating behaviour.
- Robustness: studying how internal representations change under distribution shifts and adversarial inputs.
- Scientific understanding: developing theories of how neural networks represent concepts and implement computations.
- Model evaluation: complementing behavioural tests with evidence about internal mechanisms.
These are potential contributions, not guarantees. Finding a feature associated with a behaviour does not by itself establish that the model is safe, honest or reliable. Interpretability results need to be validated against real-world behaviour and other forms of evaluation.
8. Limitations and open research problems
Mechanistic interpretability remains an active research field. Several difficult problems prevent current methods from providing a complete account of large models.
Scale
Modern language models contain enormous numbers of parameters and perform computations across many layers. Analysing a small circuit in a controlled setting is much easier than explaining a complex behaviour that depends on many interacting components.
Polysemanticity and superposition
Representations can be distributed and overlapping. Even when a feature is identified, its boundaries and meaning may be context-dependent. There may be no simple decomposition into independent human-readable concepts.
Incomplete causal evidence
An intervention can show that a component matters under a particular experimental setup. It does not necessarily show that the component is the only route, that it is used in every context, or that the proposed explanation is complete.
Feature identification
Methods such as sparse autoencoders produce candidate features, but there is no universally accepted guarantee that these features correspond to the model's fundamental computational units. Different training choices can produce different decompositions.
Human interpretation
Researchers still have to assign descriptions to discovered features and circuits. A plausible label can be misleading if it is based on a narrow set of examples. Automated explanations also need independent testing.
Behavioural complexity
A model's output may depend on many interacting mechanisms. Explaining a simple token prediction is not the same as explaining long-horizon planning, tool use or a multi-step response.
The central open question is whether researchers can develop methods that are both scalable and causally faithful: methods that explain enough of a large model's internal computation to make dependable predictions about its behaviour.
9. The road ahead
Progress is likely to require a combination of techniques rather than a single universal method. Feature discovery, circuit analysis, causal interventions, behavioural evaluation and automated tooling can complement one another.
A particularly important direction is evaluating explanations by their predictive power. If a proposed circuit is correct, researchers should be able to predict how the model responds when specific components are modified, when inputs are changed, or when the same computation appears in a new context.
Another direction is improving the reliability of feature dictionaries and understanding how representations change across layers, model sizes and training stages. Better benchmarks are also needed so that methods can be compared on more than attractive visualisations or isolated demonstrations.
Mechanistic interpretability should ultimately be judged by whether it produces explanations that are reproducible, causally supported and useful beyond the examples that inspired them.
Conclusion
Mechanistic interpretability aims to turn neural networks from opaque collections of parameters into systems whose internal computations can be investigated. Its central shift is from asking only what a model does to asking how specific behaviours are implemented.
Concepts such as circuits, superposition and learned features provide ways to reason about internal representations. Sparse autoencoders can help expose candidate features, while activation patching and ablation provide tools for testing causal hypotheses. Yet none of these methods alone delivers a complete explanation.
The field's long-term value will depend on its ability to scale rigorous, falsifiable analysis to increasingly capable models. If that challenge can be met, mechanistic interpretability may become an important part of how researchers understand, debug and evaluate advanced AI systems.
Further reading
- Chris Olah et al., "A Mathematical Framework for Transformer Circuits" (2021). A foundational account of analysing transformer computations through circuits.
- Nelson Elhage et al., "Toy Models of Superposition" (2022). Explores why neural networks may represent more features than available dimensions.
- Anthropic, "Towards Monosemanticity: Decomposing Language Models With Dictionary Learning" (2023). Investigates sparse dictionary learning for discovering features in language models.
- Anthropic, "Scaling Monosemanticity: Extracting Interpretable Features from Claude 3 Sonnet" (2024). Reports large-scale feature extraction experiments.
- Neel Nanda, "A Primer on the Use of Activation Patching in Mechanistic Interpretability" (2023). Introduces a widely used causal intervention technique.
Note: Mechanistic interpretability is an evolving research area. The methods described here are active research tools, not settled standards or complete solutions to understanding large language models.