TL;DR
This paper provides the first systematic "map" of the design space for decay mechanisms in linear complexity sequence models (like Mamba and GLA). The authors discover that optimal performance hinges on keeping median decay values around 0.8 and propose a streamlined "Simple Decay" parameterization that matches or exceeds state-of-the-art performance with less complexity.
What Problem Does This Paper Address?
Standard Transformers suffer from quadratic computational complexity—as sequences get longer, the cost to process them grows exponentially. Linear complexity models (Linear Attention, State Space Models, and Linear RNNs) offer a solution, but they often struggle with "attention dilution," where the model fails to focus on the most relevant parts of a sequence.
To fix this, researchers use decay mechanisms. These mechanisms act like a "forgetting" factor, allowing the model to prioritize recent or important information while letting less relevant historical data fade away. However, every new model (Mamba2, GLA, Hgrn2, etc.) uses a slightly different way to calculate this decay. Until now, there hasn't been a rigorous study to determine which design choices—like whether to use a single number (scalar) or a vector for decay—actually matter for performance.
Methods
The authors unify various models under a single mathematical framework for linear attention. They then systematically explore the design space across four dimensions:
- Parameterization Strategy: How the decay value ($\lambda$) is actually computed (e.g., using sigmoid functions, discretization, or fixed values).
- Parameter Sharing: Whether the model should use the same parameters to calculate both the "Key" ($k$) and the decay ($\lambda$).
- Decay Granularity: Comparing Scalar Decay (one value per head) vs. Vector Decay (different values for each feature dimension).
- Positional Encoding Integration: Testing if relative positional encodings like RoPE (Rotary Position Embedding) provide any benefit when decay is already present.
Based on their findings, they propose Simple Decay: $$\lambda_t = \text{sigmoid}(f_t + \Delta_t)$$ Here, $\Delta_t$ is initialized so that the model starts with a specific median decay value ($p$), which the authors found to be a critical hyperparameter.
Datasets
The models were trained on the fineweb-edu-10b dataset, a high-quality subset of web data designed for educational value. For evaluation, the authors used the lm-eval-harness to perform zero-shot testing across several standard benchmarks, including WikiText, LAMBADA, and various ARC (AI2 Reasoning Challenge) tasks. They also used the tinyshakespeare dataset to visualize how decay values evolve across layers during training.
Key Insights and Ideas
- The "Goldilocks" Zone for Decay: The most successful models (like Mamba2) tend to have median decay values clustered around 0.8. If decay is too close to 1.0, the model suffers from attention dilution (it forgets too slowly); if it's too close to 0, it loses long-term memory.
- Vector Decay is Generally Superior: Within the same parameterization strategy, vector-based decay consistently outperforms scalar decay. It provides a more nuanced, feature-specific control over what the model remembers.
- RoPE is Often Redundant: In linear attention, decay inherently provides a "locality prior"—it naturally makes the model focus on nearby tokens. Because of this, adding complex positional encodings like RoPE typically fails to provide tangible benefits.
- Sharing is Risky: Sharing parameters between keys and decay can be efficient, but it often pushes decay values to extremes (near 0 or 1), which hurts performance for models like GLA and LightNet.
Key Results
- Mamba2 Leads the Pack: Among existing strategies, Mamba2's parameterization performed best across all model sizes (160M to 1.45B parameters).
- Simple Decay Success: The proposed Simple Decay with an initialization of $p=0.99$ achieved a perplexity of 23.5 and an average accuracy of 51.1% at the 1.45B scale, slightly outperforming the standard Mamba2 (24.0 perplexity, 50.9% accuracy).
- Granularity Matters: For the 1.45B Mamba2 model, moving from vector decay to scalar decay dropped the average accuracy from 50.9% to 50.3%.
Limitations and Future Work
The authors acknowledge that their experiments were conducted with a relatively limited number of training tokens (20,000 steps). While this is sufficient for a comparative study, the long-term behavior of these decay mechanisms on trillion-token datasets remains to be seen.
Additionally, the study focused primarily on diagonal state transition matrices. While they touched on DPLR (Diagonal Plus Low Rank) scenarios, further research is needed to see if these insights hold for even more complex, non-diagonal recurrence structures. Finally, the compatibility of RoPE with vector decay requires more specialized architectural designs that were not fully explored here.
Summary updated