Elucidating the Design Space of Decay in Linear Attention

Zhen Qin, Xuyang Shen, Yiran Zhong

Abstract

This paper presents a comprehensive investigation into the decay mechanisms inherent in linear complexity sequence models. We systematically delineate the design space of decay mechanisms across four pivotal dimensions: parameterization strategy, which refers to the computational methodology for decay; parameter sharing, which involves the utilization of supplementary parameters for decay computation; decay granularity, comparing scalar versus vector-based decay; and compatibility with relative positional encoding methods, such as Rotary Position Embedding (RoPE). Through an extensive series of experiments conducted on diverse language modeling tasks, we uncovered several critical insights. Firstly, the design of the parameterization strategy for decay requires meticulous consideration. Our findings indicate that effective configurations are typically confined to a specific range of parameters. Secondly, parameter sharing cannot be used arbitrarily, as it may cause decay values to be too large or too small, thereby significantly impacting performance. Thirdly, under identical parameterization strategies, scalar decay generally underperforms compared to its vector-based counterpart. However, in certain scenarios with alternative parameterization strategies, scalar decay may unexpectedly surpass vector decay in efficacy. Lastly, our analysis reveals that RoPE, a commonly employed relative positional encoding method, typically fails to provide tangible benefits to the majority of linear attention mechanisms.

Introduction

Standard Transformer architectures face significant scalability challenges due to the quadratic complexity of their attention mechanisms relative to sequence length. In response, linear complexity models—including State Space Models (SSMs) and Linear Attention—have emerged as efficient alternatives. A fundamental component of these models is the decay mechanism, which governs the retention and forgetting of historical information at each time step. Despite its critical role, decay design has historically been ad-hoc, with various models employing disparate strategies ranging from fixed constants to complex data-dependent vectors. This research provides the first systematic mapping of the decay design space to identify the most effective architectural choices.

The Decay Design Space

We categorize the decay design space into four primary dimensions:

  1. Parameterization Strategy: The mathematical formulation used to compute decay values (e.g., Mamba’s discretization vs. GLA’s sigmoid-based approach).
  2. Parameter Sharing: The decision to use dedicated parameters for decay or to share them with other components, such as key vectors.
  3. Decay Granularity: The choice between Scalar Decay (one value per head) and Vector Decay (unique values for every hidden dimension).
  4. Positional Encoding Integration: Evaluating the necessity of relative positional methods like Rotary Position Embedding (RoPE) in the presence of inherent decay.

To facilitate a controlled comparison, we introduced a standardized "Decay Linear Transformer" and proposed Simple Decay, a streamlined formula: $\lambda_t^j = \text{sigmoid}(f_t^j + \Delta_t^j)$, where $\Delta$ is initialized to target specific median decay values.

Experimental Methodology

Models were trained on the fineweb-edu-10B dataset across three scales (160M, 410M, and 1.45B parameters). Evaluation metrics included perplexity on WikiText and LAMBADA, alongside a suite of ten zero-shot benchmarks (e.g., HellaSwag, PIQA, ARC) to assess general reasoning and knowledge.

Analysis of Decay Dynamics

Our investigation revealed several key insights into how decay affects model performance:

  • The "Goldilocks" Zone: High-performing models, such as Mamba2, tend to maintain median decay values around 0.8. Values approaching 1.0 often lead to "attention dilution," where the model cannot effectively distinguish relevant context from noise, while values near 0.0 cause the model to lose context too rapidly.
Figure 4: Median decay values across layers for various linear attention methods, illustrating the convergence of successful models toward a central 'Goldilocks' zone.
  • Redundancy of RoPE: Contrary to its status in standard Transformers, RoPE provides negligible benefits to most linear attention models. The decay mechanism inherently creates a "locality prior," performing a similar function by naturally emphasizing recent tokens.
  • Granularity and Sharing: Vector decay generally outperforms scalar decay when using the same parameterization strategy. Furthermore, sharing parameters between keys and decay is risky, as it often drives decay values to extremes (0 or 1), severely degrading performance.

Performance Results

  • Efficacy of Simple Decay: Despite its simplicity, the proposed Simple Decay method outperformed the more complex Mamba2 decay at the 1.45B scale, achieving an average accuracy of 51.1% compared to Mamba2’s 50.9%.
  • Mamba2 Component Ablation: Ablation studies indicated that Mamba2’s performance is not solely dependent on its complex "A" parameter. Removing it often resulted in comparable or superior performance, suggesting potential for further architectural simplification.
Figure 5: Ablation study of Mamba2 components, showing how the removal of specific parameters like 'A' or 'Delta' shifts the median decay values across layers.

Conclusion and Future Work

This study clarifies the essential role of decay in linear attention models. While Simple Decay proves highly effective at the 1.45B scale, future work should explore these dynamics at "frontier-scale" (7B+ parameters) and across diverse modalities such as audio and video. Additionally, optimizing hardware-level kernels for Simple Decay will be crucial for matching the throughput of existing highly-optimized implementations like Mamba.

Summary updated

BibTeX
@inproceedings{qin2025elucidating,
  author = {Zhen Qin and Xuyang Shen and Yiran Zhong},
  title = {{Elucidating the Design Space of Decay in Linear Attention}},
  booktitle = {COLM},
  year = {2025},
  url = {https://openreview.net/forum?id=whXh2YxMbt},
}
Figure