In a transformer, information does not pass strictly layer-by-layer with each layer replacing the previous representation; instead, every layer reads from a shared residual stream — a running vector, carried forward through the network via residual (skip) connections — and adds its own computed output back into it, rather than overwriting what was already there:
where is the layer’s own sublayer computation (an attention block or an MLP). Because of this additive structure, the residual stream at any given layer is a sum of contributions from every earlier layer, and any later layer can in principle read a feature that an earlier layer wrote.
This additive structure is what makes the residual stream a natural place to intervene for activation steering (adding a direction into the stream at one or more layers) and to study for mechanistic interpretability: a feature’s trajectory through the residual stream across layers — where it first appears, how its direction shifts, how strongly later layers read it — can itself carry information, for instance about whether a model’s ongoing computation is a correct or an erroneous one.
Related papers
- Damirchi, Meza De la Jara, Ranasinghe, Liu, and Shi, “Reasoning Errors Have a Region and a Direction in the Residual-Stream Trajectory of LLMs”, arXiv:2608.05660 (2026) — detects reasoning errors from where and in what direction a model’s residual-stream state moves across layers.