Transformer inference across depth remains insufficiently characterized in terms of the distinct components of residual updates. We formulate inference as a discrete-time state-update process on the full token sequence and decompose each residual update into additive self-attention and MLP contributions. This decomposition enables component-wise interventions and systematic measurement of their effects. We introduce operational, output-based notions of an invariance region and basin-like selection, and examine how prediction diagnostics change when attention-output contributions are suppressed from a selected layer onward. Experiments on Pythia-410M reveal two complementary findings. First, suppressing context-side attention from later onset layers generally produces smaller changes in position-wise prediction diagnostics, although the response trajectories remain token dependent and non-uniform. Second, component-wise comparisons between attention and MLP suppression reveal distinct effects on the output. Together, these findings support a functional distinction in which self-attention primarily contributes to sequence-level reorganization and context integration, whereas the MLP primarily supports position-wise representational refinement and output stabilization. The proposed framework provides a measurable, intervention-based dynamical description of Transformer inference while accounting for token-dependent and non-uniform stabilization across depth.
首页
>
AI前沿
>
Depth-Wise Inference Dynamics in Transformers: An Intervention-Based Decomposition of Self-Attention and MLP Contributions