In a classic high school biology textbook, an assembly line in a factory is depicted as a strict linear sequence: Worker A welds two steel beams together, passes the chassis to Worker B who installs the engine, who hands it to Worker C who bolts on the doors. If Worker B drops the chassis or makes an error, the entire car is ruined. For years, computer scientists assumed deep neural networks operated the exact same way, each layer completely transforming the output of the layer before it.
In 2015, Kaiming He and his team at Microsoft Research introduced a profound mathematical breakthrough called Residual Connections (ResNets). When adapted to language models by Vaswani et al. in the transformer architecture, it created something far more elegant than a traditional assembly line: The Residual Stream. The residual stream is the central highway, a massive, high-dimensional memory conveyor belt that runs through the entire depth of the network.
The Mathematical Magic
In standard neural networks, layer outputs are multiplied by weight matrices and crushed through non-linear activation functions (x_(l+1) = σ(W · x_l)). But in a transformer, layers do not replace the stream; they merely add vectors to it:
The Additive Residual State
x_0) travels undisturbed down the stream. Every attention head and multi-layer perceptron (MLP) acts as a reader and writer: it reads the current state of the stream, computes an update vector (Δx), and adds it back onto the stream.
Why the Residual Stream Changes Everything
Because updates are purely additive, the residual stream has three astonishing architectural properties that make mechanistic interpretability possible:
The Universal Bus
Layer 24 doesn’t just see Layer 23’s output; it has direct access to features written by Layer 1, Layer 5, and the raw input tokens simultaneously.
Gradient Superhighway
During backpropagation, error gradients travel back through addition operations without vanishing or exploding, enabling 100+ layer models.
Logit Lens Auditing
Researchers can apply the final vocabulary unembedding matrix at intermediate layers (the Logit Lens) to see what the model is thinking mid-computation!
The Logit Lens
One of the most thrilling discoveries in mechanistic interpretability is the Logit Lens. Because the residual stream preserves linear directions throughout all 32 layers of a model, researchers can take the stream vector at Layer 8 or Layer 16, multiply it by the output vocabulary matrix, and see which token the model would predict if it stopped thinking right then.
When you do this, you witness progressive refinement in action: at Layer 4, the stream only knows the broad category (e.g., “a European capital”); by Layer 12, it has narrowed the concept to “France”; and by Layer 24, it has resolved the exact word: “Paris”.
Now that we understand the residual highway, who is driving on it? In Part 3, we discover the most famous circuit motif in all of modern AI: Induction Heads.
Ready for Neural Reverse Engineering? Explore the Flagship Treatise
This series translates the core principles of transformer circuit tracing, superposition, and monosemantic feature extraction into accessible visual models. For mathematical invariants, formal proofs, and PyTorch circuit pruning algorithms, consult our foundational monograph: Mechanistic Interpretability Transformer: 5 Empirical Rules.
Mechanistic Interpretability in AI
An empirical exploration through neural residual streams, induction circuits, polysemanticity, and causal weight editing.