Feed-Forward Steering in Transformer Residual Dynamics

Timur Mudarisov, Mikhail Burtsev, Radu StatearXiv 2026 · arXiv

TL;DR

This paper reframes Transformer residual stream dynamics by modeling the Feed-Forward Network (FFN) as a local "steering field" that counteracts the token-clustering effects of attention. By decomposing the FFN's impact into tangential (directional) and radial (magnitude) components, the authors demonstrate that the FFN primarily drives directional updates to preserve representation diversity. Furthermore, they leverage this framework to introduce a practical metric for safely parallelizing sequential attention-FFN blocks.

What Problem Does This Paper Address?

Most mathematical theories treating Transformers as continuous dynamical systems focus almost exclusively on attention. In these "attention-only" frameworks, tokens are modeled as particles moving on a sphere, and attention acts as a force that pulls them together. While elegant, this view predicts that tokens will inevitably suffer from "rank collapse" or over-clustering.

In reality, Transformers rely heavily on Feed-Forward Networks (FFNs), which contain a massive portion of a model's parameters and function as key-value memories. How do FFNs interact with attention mathematically within the residual stream? This paper bridges the gap by incorporating FFNs into the continuous dynamical framework, revealing how they actively shape and preserve the geometry of the residual stream.

Methods

The authors model token representations as moving on a unit sphere $\mathbb{S}^{d-1}$, a natural consequence of normalization layers like LayerNorm or RMSNorm. They formulate the block update as an ordinary differential equation (ODE) projected onto the sphere's tangent space.

The core methodological innovation is the geometric decomposition of the FFN field $\Phi(u)$:

  • Radial Component: Directed parallel to the token vector, changing only its magnitude (which regulates angular speed).
  • Tangential Component: Directed orthogonal to the token vector, actively changing its geometric direction.
Tangential vs Radial decomposition

Additionally, the authors introduce the sequential-to-parallel defect ($C_\ell$). This metric uses directional derivatives (akin to a Lie bracket or commutator) to quantify the mathematical error introduced when a standard sequential block ($x \to x + A(x) + \Phi(x + A(x))$) is replaced by a parallelized block ($x \to x + A(x) + \Phi(x)$), where attention and FFN branches run concurrently.

Datasets

The authors evaluated their framework using standard pretrained language models across various architectures (GPT-2, GPT-2-large, Pythia-410M, Pythia-1.4B, Mistral-7B, and Llama-3-8B). All data-dependent diagnostics and evaluations were performed using the OpenWebText corpus. No new datasets or benchmarks were introduced.

Key Insights and Ideas

  • Attention Aggregates, FFN Steers: Attention acts as a non-local force pulling tokens toward shared directions, which reduces representation diversity. Conversely, the FFN acts as a local steering field, injecting rotational and saddle-like transport modes that prevent excessive token concentration.
Aggregation-steering view of residual flow
  • Direction is Driven by Tangential Forces: The FFN's utility is almost entirely contained within its tangential component. The radial component merely rescales the token norm, acting as a speed regulator rather than a driver of semantic direction.
  • Predicting Block Parallelization: The sequential-to-parallel defect score ($C_\ell$) serves as a highly reliable proxy for architecture modification. Layers with low defect scores can be safely parallelized to save inference time without degrading model performance.

Key Results

  • Attention-Only Angular Deficit: The authors found that the attention branch alone is highly misaligned with the actual block update. This angular deficit ranges from 0.41 in GPT-2 up to 0.63 in Llama-3-8B, proving that the FFN contributes directly to the directional trajectory of tokens.
  • Tangential vs. Radial Ablation: In forward-pass intervention experiments, retaining only the tangential FFN component kept language-modeling loss remarkably close to the baseline (a minor increase of 0.07 to 1.72). In contrast, retaining only the radial component caused a catastrophic performance collapse (loss spikes of 7.19 to 12.96), performing just as poorly as removing the FFN entirely.
  • Defect-Guided Parallelization: Using $C_\ell$ to selectively parallelize layers yielded impressive practical results. For GPT-2-large, parallelizing 18 low-defect layers achieved an estimated $1.24\times$ submodule speedup with a negligible $+0.02$ loss increase. Conversely, parallelizing high-defect layers caused rapid performance degradation ($+0.29$ loss after parallelizing just 4 layers).

Limitations and Future Work

  • Mean-Field vs. Causal Dynamics: The rigorous mean-field limits proven in the paper assume bidirectional attention. Causal decoder-only models require more intricate prefix-indexed Volterra dynamics, which the authors noted as an important area for deeper theoretical extension.
  • Local vs. Global Geometry: The phase-portrait and critical-point analyses are local diagnostics within reduced subspaces (via PCA), rather than a complete global description of the high-dimensional residual space.
  • Idealized Speedups: The parallelization benefits are calculated as idealized submodule-time reductions rather than wall-clock benchmarks on optimized production kernels (e.g., custom Triton kernels).

Summary updated

Abstract

Attention-only dynamical theories model Transformer residual directions as particles aggregating on a sphere. We extend this framework by incorporating the feed-forward network (FFN) term as a local steering field acting on each token state. The resulting theory predicts that the tangential component of the FFN field is necessary for motion in residual-direction space, that critical residual directions correspond to nonlinear projective equilibria, and that a commutator defect determines when a finite attention--FFN block can be accurately approximated by a parallel, additive flow. Across GPT-2, Pythia, Mistral, and Llama models, the extended theory improves one-step angular prediction relative to an attention-only baseline, with the contribution of the FFN increasing from GPT-2 to Llama-3-8B. Intervention experiments show that retaining only the tangential FFN component preserves most model quality, whereas retaining only the radial component causes performance to collapse. The tangential component also preserves output diversity under aggregation pressure. As a practical application, layers with small commutator defects can be approximately parallelized with only a modest increase in loss, whereas layers with large defects degrade rapidly. These findings support the interpretation of FFN layers as directional steering fields that shape Transformer residual geometry and govern the feasibility of block-level interventions.
BibTeX
@misc{mudarisov2026feed,
  author = {Timur Mudarisov and Mikhail Burtsev and Radu State},
  title = {{Feed-Forward Steering in Transformer Residual Dynamics}},
  year = {2026},
  eprint = {2608.02071},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.02071},
}
Figure