Stable Gated DeltaNet-2: Understanding and Mitigating Recurrent State Instability

Summary (Overview)

  • Identifies a fundamental instability in Gated DeltaNet-2 (GDN-2): The asymmetric coupling between channel-wise erase gates and keys creates non-normal erase operators that can amplify recurrent state energy, leading to training failures during long-context training.

  • Provides theoretical characterization: Proves that GDN-2's erase operator can have spectral norm > 1 despite all eigenvalues having magnitude ≤ 1, and demonstrates that directional gains can accumulate across tokens, causing unbounded state growth even without further writes (Corollary 3.2).

  • Proposes Stable GDN-2: A stabilization mechanism using symmetric erasure (splitting the erase gate into two square-root factors applied to each key factor) plus a decay-regulated residual writing path, guaranteeing non-expansive state propagation while retaining channel-wise gating flexibility.

  • Establishes theoretical guarantees: Proves an O(T)O(\sqrt{T}) upper bound on recurrent state growth (Proposition 4.2) while maintaining chunkwise parallel computation compatibility.

  • Demonstrates empirical improvements: On 1.6B parameter models, Stable GDN-2 improves the 128K average RULER score by 6.80 points in the recurrent setting and average accuracy across nine downstream tasks by 0.62 points in the hybrid setting compared to GDN-2.

Introduction and Theoretical Foundation

Background

Linear attention offers efficient long-sequence modeling through linear complexity and fixed-size recurrent states. The field has evolved from basic linear attention (Katharopoulos et al., 2020) through delta-rule updates (Schlag et al., 2021; Yang et al., 2024b) to gated variants like Gated DeltaNet (GDN) and Kimi Delta Attention (KDA). GDN-2 (Hatamizadeh et al., 2026) represents the latest advance, introducing independent channel-wise erase and write gates for more expressive state updates.

The Core Problem

The fundamental issue lies in GDN-2's erase operation asymmetry:

St=[I−kt(bt⊙kt)⊤]DtSt−1+kt(wt⊙vt)⊤(4)\mathbf{S}_t = \left[ \mathbf{I} - \boldsymbol{k}_t (\boldsymbol{b}_t \odot \boldsymbol{k}_t)^{\top} \right] \mathbf{D}_t \mathbf{S}_{t-1} + \boldsymbol{k}_t (\boldsymbol{w}_t \odot \boldsymbol{v}_t)^{\top} \tag{4}

Here, the erase gate bt\boldsymbol{b}_t weights the key coordinates used to read content for erasure, but the modification is applied along the original key kt\boldsymbol{k}_t. Since bt⊙kt\boldsymbol{b}_t \odot \boldsymbol{k}_t and kt\boldsymbol{k}_t need not be parallel, the erase matrix I−kt(bt⊙kt)⊤\mathbf{I} - \boldsymbol{k}_t(\boldsymbol{b}_t \odot \boldsymbol{k}_t)^{\top} need not be symmetric.

Theoretical Foundation

The key insight is that non-symmetric matrices can be non-normal, meaning they can amplify certain directions even when all eigenvalues have magnitude ≤ 1. This is formalized through the decomposition of the erase operator:

a=μe∥+γe⊥,μ=k⊤a,γ=∥a−μk∥2(5)\mathbf{a} = \mu \mathbf{e}_{\parallel} + \gamma \mathbf{e}_{\perp}, \quad \mu = \mathbf{k}^{\top}\mathbf{a}, \quad \gamma = \|\mathbf{a} - \mu\mathbf{k}\|_2 \tag{5}

which yields the two-dimensional representation:

T=(1−μ−γ01)(6)\mathbf{T} = \begin{pmatrix} 1 - \mu & -\gamma \\ 0 & 1 \end{pmatrix} \tag{6}

The shear parameter γ\gamma measures the asymmetry; when γ>0\gamma > 0, the operator can amplify state energy.

Methodology

Theoretical Analysis

Theorem 3.1 (Single-step amplification in GDN-2) establishes that for A=I−k(b⊙k)⊤\mathbf{A} = \mathbf{I} - \mathbf{k}(\mathbf{b} \odot \mathbf{k})^{\top}:

∥A∥2=σmax⁡(A)=μ2+γ2+(2−μ)2+γ22(7)\|\mathbf{A}\|_2 = \sigma_{\max}(\mathbf{A}) = \frac{\sqrt{\mu^2 + \gamma^2} + \sqrt{(2-\mu)^2 + \gamma^2}}{2} \tag{7}

The spectral norm equals 1 if and only if γ=0\gamma = 0 (i.e., a\mathbf{a} and k\mathbf{k} are collinear); otherwise, ∥A∥2>1\|\mathbf{A}\|_2 > 1.

Corollary 3.2 (Unbounded growth without further writes) proves that there exist admissible sequences of GDN-2 updates such that:

lim⁡t→∞∥St∥F=∞(10)\lim_{t \to \infty} \|\mathbf{S}_t\|_F = \infty \tag{10}

after a finite nonzero write at the first token, even with no writes at subsequent tokens.

Stable GDN-2 Architecture

The proposed solution has two key components:

1. Symmetric Erasure: Split the erase gate into two square-root factors:

Atsym=I−(bt⊙kt)(bt⊙kt)⊤=I−ut(ut)⊤(11)\mathbf{A}_t^{\text{sym}} = \mathbf{I} - (\sqrt{\mathbf{b}_t} \odot \mathbf{k}_t)(\sqrt{\mathbf{b}_t} \odot \mathbf{k}_t)^{\top} = \mathbf{I} - \mathbf{u}_t(\mathbf{u}_t)^{\top} \tag{11}

2. Decay-Regulated Residual Writing: Add a residual path with amplitude regulated by decay:

rt=1−dt2⊙(kt−ut)(13)\mathbf{r}_t = \sqrt{1 - \mathbf{d}_t^2} \odot (\mathbf{k}_t - \mathbf{u}_t) \tag{13}

The complete update becomes:

St=AtsymDtSt−1+(ut+rt)zt⊤(14)\mathbf{S}_t = \mathbf{A}_t^{\text{sym}} \mathbf{D}_t \mathbf{S}_{t-1} + (\mathbf{u}_t + \mathbf{r}_t) \mathbf{z}_t^{\top} \tag{14}

Stability Guarantees

Proposition 4.1 (Non-expansive transitions without writes):

∥Mt∥2≤∥dt∥∞≤1(15)\|\mathbf{M}_t\|_2 \leq \|\mathbf{d}_t\|_{\infty} \leq 1 \tag{15}

Proposition 4.2 (Recurrent state norm bound) with ∥vt∥2≤V\|\mathbf{v}_t\|_2 \leq V:

∥ST∥F≤3T2V(17)\|\mathbf{S}_T\|_F \leq \sqrt{\frac{3T}{2}} V \tag{17}

Chunkwise Parallel Computation

Stable GDN-2 retains the chunkwise parallel structure through a Diagonal-Plus-Low-Rank (DPLR) transition. The computation involves:

  • Precomputing chunk-local auxiliaries via triangular solves
  • Propagating boundary states recurrently across chunks
  • Computing output blocks in parallel

Empirical Validation / Results

Training Stability

Table 1 shows training failures across regimes:

ArchitecturePretrainingPost-trainingPretraining → Post-training
GDN-2 Recurrent1/41/40/3
GDN-2 Hybrid2/43/40/2

Stable GDN-2 achieves stable training across all configurations.

Downstream Performance (Table 2)

Recurrent Setting:

  • Stable GDN-2 achieves 50.39% average accuracy, matching GDN-2 while outperforming D-Clip (49.10%), β-Guard (48.89%), and KDA (49.02%)
  • Lower WikiText perplexity than GDN-2 across all context windows (7.801 vs 7.849 at 8K)

Hybrid Setting:

  • Stable GDN-2 achieves the highest average accuracy of 50.53%, improving over GDN-2 by 0.62 percentage points

Long-Context Retrieval (Table 3)

Recurrent Setting at 128K:

  • Stable GDN-2: 11.62 average RULER score
  • GDN-2: 4.82, D-Clip: 7.02, β-Guard: 10.82, KDA: 9.96

Notable advantage on Variable Tracking (Hybrid setting):

  • Stable GDN-2: 31.88 at 32K, 17.80 at 64K
  • All baselines: < 5.28 at 32K

Ablation Studies

Removing either component degrades performance:

  • Removing residual writing (RW): accuracy drops from 50.39% to 49.43%, RULER score from 25.43 to 22.22
  • Removing decay regulation (DR): RULER score drops to 13.53, accuracy to 49.18%

Theoretical and Practical Implications

Theoretical Implications

  1. Non-normality as a stability criterion: The work demonstrates that spectral analysis alone is insufficient for assessing recurrent state stability in linear attention models; non-normal operators require explicit control of directional gains.

  2. Generalization to other architectures: The findings suggest that any delta-rule variant introducing asymmetry between read and write directions may face similar instability issues.

  3. O(√T) growth bound: The theoretical guarantee provides a principled framework for understanding how decay regulation and symmetric erasure jointly control state growth.

Practical Implications

  1. Training reliability: Stable GDN-2 eliminates numerical failures during long-context training, reducing the risk of wasted computational resources.

  2. Improved retrieval: The stabilization enables better long-context retrieval, particularly in purely recurrent architectures where GDN-2 suffers most.

  3. Architecture design guidance: The work provides concrete design principles—symmetric erasure and decay-regulated residual writing—that can guide future linear attention architecture development.

Conclusion

This work identifies asymmetric erasure as a fundamental source of recurrent state instability in GDN-2, providing both theoretical characterization and empirical evidence of the failure mechanism. The proposed Stable GDN-2 solution combines:

  • Symmetric erasure to guarantee non-expansive state propagation
  • Decay-regulated residual writing to preserve writing flexibility

The approach maintains chunkwise parallel computation and achieves stable training alongside improved long-context retrieval and downstream performance. Key results include a 6.80-point improvement in 128K RULER scores (recurrent setting) and a 0.62-point improvement in downstream accuracy (hybrid setting) over GDN-2.

Future directions may include:

  • Extending the stability analysis to other linear attention variants
  • Exploring adaptive decay regulation mechanisms
  • Investigating the relationship between state capacity and retrieval performance in stabilized architectures

Related papers