Abstract
Training deep language models is notoriously unstable, often resulting in catastrophic "loss spikes" that can terminate training runs. This paper identifies Token Embedding Variability (TEV) as a computationally efficient metric to predict training instability. Furthermore, it introduces Multi-head Low-Rank Attention (MLRA), a structural modification that factorizes attention projection matrices to mathematically suppress gradient explosion. Our results demonstrate that MLRA enables the stable training of models up to 192 layers deep and consistently improves zero-shot perplexity across standard benchmarks compared to vanilla GPT-2 and state-of-the-art stabilization techniques.
Introduction
As Large Language Models (LLMs) scale in depth and parameter count, they become increasingly susceptible to training instability. The current standard for monitoring this instability involves tracking gradient variance, a process that is computationally expensive, requiring $O(nd)$ additional operations.
The authors identify a specific architectural vulnerability in Pre-Layer Normalization (pre-LN) transformers. While pre-LN is generally preferred for training stability, it creates a "Shallow Layer Paradox": the layers closest to the input (the embedding and initial transformer layers) are the most vulnerable to gradient explosion. Because gradients accumulate and grow exponentially as they flow back through residual connections, the embedding layer often experiences the most extreme magnitudes. There is a critical need for a low-cost "smoke detector" for instability and a structural solution to prevent it.
Token Embedding Variability (TEV)
To address the need for an efficient monitoring metric, the paper introduces Token Embedding Variability (TEV). Instead of performing complex gradient calculations, TEV measures the standard deviation of the token embeddings.
The authors analyzed established models such as OPT, Pythia, and Llama-2, discovering a consistent trend: as models increase in size and performance, their TEV (both mean and standard deviation) naturally decreases. This suggests that lower embedding variability is a hallmark of well-optimized, stable models. TEV serves as a highly effective, low-cost proxy for gradient noise, allowing researchers to detect impending instability without significant computational overhead.
Multi-head Low-Rank Attention (MLRA)
To mitigate the instability identified by TEV, the authors propose Multi-head Low-Rank Attention (MLRA). This method involves factorizing the Query, Key, and Value projection matrices ($W_q, W_k, W_v$) into two low-rank matrices:
$$W = W^U W^D$$
By passing representations through two linear layers instead of one, the variance of the output is naturally diminished. Unlike traditional low-rank approximations that apply to the entire model and often degrade performance, MLRA applies this factorization specifically within the multi-head architecture. This allows the model to maintain high expressivity while benefiting from the variance-reducing properties of the low-rank structure, effectively acting as a built-in numerical stabilizer.
Experimental Results
Stability at Scale
The most significant finding occurred during training at the 192-layer scale. While the vanilla GPT-2 baseline failed to train and diverged five times, the MLRA-equipped model trained successfully without intervention. MLRA exhibited significantly lower gradient variance than both vanilla GPT-2 and $\sigma$Reparam, a current state-of-the-art stabilization method.
Performance Benchmarks
The authors evaluated the models using zero-shot perplexity on several standard benchmarks, including Lambada, Wikitext-2, Wikitext-103, and the 1 Billion Word Benchmark (1BW).
On the Lambada dataset (at 48 layers), MLRA achieved a perplexity of 70.61, significantly outperforming:
- Vanilla GPT-2: 79.60
- $\sigma$Reparam: 76.02
This trend of superior performance and smoother training curves was consistent across all tested datasets, with the performance gap between MLRA and baselines widening as model depth increased.
Conclusion and Future Work
MLRA provides a structural solution to the numerical problem of gradient explosion in deep transformers. By reducing embedding variability, it ensures smoother training and better convergence for deep architectures.
While these results are promising at the 1.5 billion parameter scale, future work is required to validate these findings at the "frontier" scale of 7B to 70B parameters. Additionally, the authors suggest that TEV could be utilized as a real-time signal for dynamic optimization strategies, such as automated learning rate adjustment, to further harden the pre-training process against instability.
Summary updated