Focus and Dilution: The Multi-stage Learning Process of Attention

Zheng-An Chen, Pengxiao Lin, Zhi-Qin John Xu (Shanghai Jiao Tong University), Tao Luo

International Conference on Machine Learning 2026 · Oral

Overview

This talk investigates the internal mechanisms of how transformer-based models and neural networks learn reasoning tasks, focusing on the interplay between initialization hyperparameters, weight condensation, and multi-stage learning dynamics. Presented by Zhi-Qin John Xu on behalf of researchers from Shanghai Jiao Tong University, the paper addresses a fundamental question in machine learning: how neural networks transition from raw memorization of data points to extracting complex rules, symmetries, and compositional structures.

Watch on SlidesLive

Visual summary for Focus and Dilution: The Multi-stage Learning Process of Attention by Zheng-An Chen, Pengxiao Lin, Zhi-Qin John Xu, Tao Luo
Visual summary for Focus and Dilution: The Multi-stage Learning Process of Attention by Zheng-An Chen, Pengxiao Lin, Zhi-Qin John Xu, Tao Luo

Key moments

  1. 0:00 Introduction and opening questions on memorization versus reasoning
  2. 0:58 Audience vote and introduction of the gamma initialization hyperparameter
  3. 2:00 Explaining neural network condensation and resolving overparameterization
  4. 2:58 Transformer visualization and multi-stage learning process of attention
  5. 4:00 Experimental results on WikiText and discussion of phenomenon-driven learning
  6. 5:00 Conclusion and summary of key findings
  7. 5:07 Audience Q&A on reconciling small initialization with deep network training

Focus and Dilution: The Multi-stage Learning Process of Attention

Speakers: Zheng-An Chen; Pengxiao Lin; Zhi-Qin John Xu (Shanghai Jiao Tong University); Tao Luo

Conference: ICML

YouTube: https://slideslive.com/39083736

Overview

This talk investigates the internal mechanisms of how transformer-based models and neural networks learn reasoning tasks, focusing on the interplay between initialization hyperparameters, weight condensation, and multi-stage learning dynamics. Presented by Zhi-Qin John Xu on behalf of researchers from Shanghai Jiao Tong University, the paper addresses a fundamental question in machine learning: how neural networks transition from raw memorization of data points to extracting complex rules, symmetries, and compositional structures.

The core contribution of the research centers around a tuning parameter denoted as $\gamma$ (gamma), which dictates the standard deviation of the Gaussian distribution used for parameter initialization. By systematically modulating $\gamma$, the authors demonstrate that training dynamics can be steered through distinct complexity levels, effectively controlling the reasoning depth of a model. Furthermore, the talk provides a concrete mathematical and visual breakdown of how attention mechanisms in transformers evolve through sequential stages of focus and dilution when processing Markovian token distributions.

Understanding these microscopic training dynamics matters deeply for practitioners and model builders. Modern large language models (LLMs) and diffusion models often exhibit failure modes on compositional tasks not due to a lack of capacity, but because standard training regimes bypass the intermediate stages of rule extraction. By bridging the gap between initialization scaling and emergent reasoning capabilities, this work offers actionable insights into why certain initialization schemes succeed where others stall, providing a theoretical foundation for optimizing model architectures beyond heuristic trial and error.

Background

▶ Watch: Introduction and opening questions on memorization versus reasoning (0:00)

In the machine learning and systems optimization space, a long-standing mystery—originally highlighted by Leo Breiman—is why heavily parameterized neural networks do not invariably overfit training data. Despite having millions or billions of parameters that possess sufficient capacity to memorize arbitrary label noise, overparameterized models frequently achieve robust generalization. Prior theoretical and empirical work has attempted to explain this through implicit regularization, gradient descent dynamics, and the Neural Tangent Kernel (NTK) regime. However, these frameworks often struggle to fully elucidate how hierarchical reasoning, symmetry detection, and compositional rule-learning emerge sequentially during nonlinear training.

Concurrently, practitioners have observed that neural networks exhibit spectral biases or frequency principles, learning coarse-grained structures and low-frequency components before fitting high-frequency details. Yet, connecting this macroscopic training behavior to the microscopic evolution of weight matrices—specifically within modern architectures like the Transformer—remains an active area of research. In standard training setups, initialization hyperparameters are typically treated as fixed constants optimized merely to prevent vanishing or exploding gradients. This talk builds upon the premise that initialization does far more than stabilize backpropagation: it acts as a structural gatekeeper that determines the complexity trajectory of the network, dictating whether gradient descent will trap the model in rote memorization or guide it toward compositional generalization.

Key Findings

▶ Watch: Explaining neural network condensation and resolving overparameterization (2:00)

The central finding of this research is that neural network learning is governed by a multi-stage process driven by an initialization hyperparameter $\gamma$, which dictates a phenomenon the authors term condensation. Specifically, the main discoveries include:

  • The Initialization Parameter $\gamma$: Initializing parameter weights via a Gaussian distribution with a standard deviation defined as $1 / D^{\gamma}$ (where $D$ is the input layer neuron count) acts as a primary knob for controlling the reasoning depth and complexity trajectory of the network.
  • Hierarchical Complexity Levels: Depending on the magnitude of $\gamma$, a network systematically progresses through distinct capabilities: small $\gamma$ leads to strict memorization with heavy condensation; intermediate values enable function-relationship discovery and symmetry detection; and larger values permit complex compositional rule learning.
  • Weight Condensation as a Regularizer: During training, neurons within the same layer tend to cluster and behave similarly—a process called condensation. This clustering dynamically reduces the effective size of the network, explaining why heavily parameterized models avoid overfitting.
  • Multi-Stage Attention Dynamics: In a one-layer transformer trained on Markovian data, learning does not occur uniformly. Instead, it proceeds through cyclic phases of focus (where attention converges onto high-frequency or frequent tokens) and dilution (where attention temporarily diffuses before a new embedding direction emerges to capture subsequent patterns).
  • Conditional Diffusion Correction: On conditional diffusion tasks where models fail to synthesize correct shapes, sizes, and colors from sparse training pairs, increasing $\gamma$ successfully drives the model to resolve compositional failure modes.

Technical Deep Dive

▶ Watch: Transformer visualization and multi-stage learning process of attention (2:58)

To understand the mechanical underpinnings of these findings, the researchers analyzed both fully connected networks and a simplified one-layer Transformer model. The data distribution assumed a Markov property, meaning the next token depends solely on the previous one, with a subset of tokens exhibiting exceptionally high probability compared to others. The model is trained using cross-entropy loss evaluated on the last token.

The training trajectory of this transformer unfolds across distinct mathematical and structural phases:

  1. Initial Condensation Stage: Due to small initialization and the properties of the softmax function, the leading term of the gradient flow for query weights ($W_Q$) and key weights ($W_K$) remains near zero initially. Conversely, embedding weights and output matrices condense rapidly across very few directions. At this stage, all tokens pay uniform attention to every other token.
  2. High-Frequency Bias and Focus: As training progresses, the model encounters a second critical point dictated by the data distribution $\pi$. Sequences ending in the most frequent token experience the fastest loss decay. This induces a high-frequency bias where $W_Q$ and $W_K$ begin to condense, forcing all tokens to shift their attention toward the most frequent token (such as a whitespace character in text experiments on WikiText).
  3. Attention Dilution and Embedding Divergence: Once the dominant token is mastered, the attention mechanism dilutes, causing low-frequency tokens to spread their attention across other tokens. Simultaneously, the embedding vectors of these low-frequency tokens depart from the dominant token, migrating in a negative direction within the latent space.
  4. Emergence of New Embedding Directions: As embedding matrices converge along newly emerging directions, a cyclic process repeats. The model shifts its focus to the second most frequent token, subsequently diluting, and then generating new embedding directions for subsequent frequency tiers.

The mathematical mechanism driving this is rooted in the initialization scaling. Defining the weight standard deviation as $1 / D^{\gamma}$ alters the magnitude ratio between the input vectors and the network blocks. If $\gamma$ is kept too small, the network block magnitude drops to a very low order, potentially starving gradient backpropagation. Conversely, standard modern initializations (often corresponding to a $\gamma$ value around $0.5$ in frameworks like PyTorch or TensorFlow) balance backpropagation viability with the structural benefits of condensation.

Experimental Setup & Results

▶ Watch: Conclusion and summary of key findings (5:00)

The empirical evaluation spans synthetic reasoning tasks, conditional diffusion models, and natural language text corpora:

  • 1D Function Fitting: Evaluated on two-layer networks fitting synthetic data points to observe the evolution of input weights and biases, visually demonstrating neuron clustering into functional groups.
  • Conditional Diffusion Models: Tested on generation tasks where input controls specify feature shape, size, and color. Trained on only four data pairs with four held out for testing. Baseline configurations failed to generalize (e.g., generating correct small blue circles for unseen combinations), whereas tuning $\gamma$ to higher values resolved this failure mode and reached the correct target generation.
  • WikiText Experiments: Conducted using a simplified transformer architecture to track attention weights over time. Visualization of the attention matrices confirmed the theoretical predictions: attention begins uniformly, converges sharply onto frequent tokens (like whitespace), dilutes, and subsequently refocuses on secondary frequent tokens as training proceeds.
  • Scaling Law and Benchmarks: The paper reports that models trained with small initialization maintain a consistently lower loss trajectory compared to those using common default initialization, and benchmark evaluations confirm improved reasoning performance.

Practical Implications

▶ Watch: Audience Q&A on reconciling small initialization with deep network training (5:07)

For machine learning practitioners, infrastructure teams, and model builders, these findings challenge the dogma that default initialization settings (such as Xavier/Glorot or Kaiming initialization implemented out-of-the-box in standard deep learning frameworks) are globally optimal for reasoning tasks.

  • Tuning Initialization for Reasoning: When training models on tasks heavily reliant on compositional logic, mathematical reasoning, or structured code generation, adjusting the initialization hyperparameter $\gamma$ (targeting a sweet spot where $\gamma$ balances gradient propagation health with moderate condensation) can unlock superior generalization without increasing model parameter counts.
  • Diagnosing Compositional Failures: If a model fails to generalize on compositional diffusion or multi-step reasoning tasks despite adequate parameter capacity and data, engineers should consider whether the network is trapped in a rote-memorization regime induced by standard initialization scales.
  • Tradeoffs: There is a delicate engineering tradeoff. Pushing $\gamma$ too low restricts the network block magnitude relative to input magnitudes, harming backpropagation and stalling training stability. Practitioners must locate the specific threshold suited to their architecture depth and dataset distribution.

Key Takeaways

  • Initialization as a Complexity Knob: The standard deviation initialization parameter $\gamma$ ($1 / D^{\gamma}$) dictates whether a neural network memorizes data or learns generalized rules.
  • Condensation Explains Overparameterization: Neuron clustering during training reduces the effective size of heavily parameterized networks, preventing overfitting.
  • Multi-Stage Transformer Dynamics: Transformers learn Markovian data through alternating phases of attention focus on frequent tokens and subsequent dilution before new embedding directions emerge.
  • Compositional Generalization: Tuning initialization parameters successfully resolves failure modes in tasks requiring compositional reasoning, such as conditional diffusion generation.
  • Phenomenon-Driven Understanding: Studying microscopic training dynamics—such as column correlations in weight matrices—provides actionable insights that complement macroscopic scaling laws.

About the Speaker(s)

  • Zhi-Qin John Xu (Shanghai Jiao Tong University): Researcher at Shanghai Jiao Tong University presenting an ICML paper on attention and multi-stage learning processes.

Co-authors: Zheng-An Chen, Pengxiao Lin, Tao Luo.

Reviews

→ Top-rated talks at International Conference on Machine Learning 2026

All talks from International Conference on Machine Learning 2026