cs.LGSep 28, 2026

The Role of Feed-Forward Layers in Transformer Dynamics

Authors: Thomas Jacob Maranzatto, Semih Akkoc, Sennur Ulukus

Organizations: Department of Electrical and Computer Engineering University of Maryland College Park, MD 20742, USA

Abstract

We study the dynamical behavior of tokens in transformers from a control-theoretic perspective. Our model includes the feed-forward layer present after the self-attention mechanism, with the self-attention mechanism interpreted as an interacting particle system and the feed-forward layer as an independent control. Our main theoretical result establishes that the feed-forward network can steer the tokens arbitrarily close to consensus regardless of the key, query, and value matrices. Our result are easily extended to convergence to many clusters and to multi-head attention. We conduct numerical experiments to verify our results, and compare thresholding behavior from our theory to real-world LLMs.

Figures & tables

Explore similar work

CardsList
  1. Feed-Forward Steering in Transformer Residual Dynamics

    Aug 3, 2026Timur Mudarisov, Mikhail Burtsev, Radu StateTransformer InterpretabilityTransformer FFNs

  2. Asymptotic Analysis of Discrete-Time Self-Attention Dynamics in Transformers

    Oct 9, 2026Claudio AltafiniSelf-AttentionAttention Mechanisms

  3. Training-Induced Escape from Token Clustering in a Mean-Field Formulation of Transformers

    May 8, 2026Noboru Isobe, Daisuke Inoue, Masaaki ImaizumiTransformerTransformer Training Dynamics