HyperAIHyperAI

Command Palette

Search for a command to run...

LLM
Modelltraining

Stable Gated DeltaNet-2: Rekurrente Zustandsinstabilität verstehen und beheben

Zusammenfassung

Lineare Aufmerksamkeit bietet eine effiziente Lösung für die Modellierung langer Sequenzen durch lineare Komplexität und rekurrente Zustände fester Größe. Gated DeltaNet-2 (GDN-2) führt eine unabhängige kanalweise Steuerung von Löschung und Schreiben ein, wodurch die Ausdruckskraft der Zustandsaktualisierung und das kontextbezogene Abrufen verbessert werden; dennoch treten beim Training mit langen Kontexten Trainingsfehler auf. Wir führen diese Fehler auf die Asymmetrie zwischen Leseund Modifikationsrichtung beim Löschen zurück, die nicht-normale Löschoperatoren erzeugt, deren Richtungsverstärkungen sich über Tokens hinweg akkumulieren und selbst ohne neue Schreibvorgänge ein exponentielles Zustandswachstum auslösen. Zur Lösung schlagen wir Stable GDN-2 vor, das symmetrisches Löschen einsetzt, um eine nicht-expansive Zustandsfortpflanzung sicherzustellen, sowie abklingreguliertes residuales Schreiben, um die Schreibflexibilität zu erhalten. Theoretisch weisen wir eine obere Schranke von O(√T) für das rekurrente Zustandswachstum nach, während die chunkweise parallele Berechnung erhalten bleibt. Experimente mit Modellen von 1,6 Milliarden Parametern zeigen, dass Stable GDN-2 ein stabiles Training bei gleichzeitig verbessertem Abrufen langer Kontexte erreicht. Im Vergleich zu GDN-2 steigert es den durchschnittlichen RULER-Wert bei 128K im rekurrenten Setting um 6,80 Punkte und die durchschnittliche Genauigkeit über neun nachgelagerte Aufgaben im hybriden Setting um 0,62 Punkte.

One-sentence Summary

Researchers from MemTensor, USTC, HKUST(GZ), et al. propose Stable Gated DeltaNet-2, which uses symmetric erasure and decay-regulated residual writing to mitigate recurrent state instability; they establish an O(T)O(\sqrt{T})O(T​) bound on recurrent state growth while retaining chunkwise parallel computation, and, on 1.6B-parameter models, the method improves the 128K average RULER score by 6.80 points in the recurrent setting and average downstream accuracy by 0.62 points in the hybrid setting.

Key Contributions

  • The paper identifies asymmetric erasure in Gated DeltaNet-2 as the cause of training failures during long-context training, showing that non-normal erase operators produce compounding directional gains and exponential recurrent state growth even without new writes.
  • It proposes Stable GDN-2, which uses symmetric erasure for non-expansive state propagation and decay-regulated residual writing to preserve flexible memory updates, while retaining chunkwise parallel computation and establishing an O(√T) upper bound on recurrent state growth.
  • In 1.6B parameter pretraining, Stable GDN-2 stabilizes training and improves long-context retrieval and downstream task accuracy, achieving a 6.80-point higher average 128K RULER score in the recurrent setting and 0.62-point higher average accuracy across nine downstream tasks in the hybrid setting compared with GDN-2.

Introduction

The authors focus on efficient long-sequence modeling with linear attention, where a fixed-size recurrent state enables linear-time processing and constant-memory decoding. Gated DeltaNet-2 (GDN-2) improves state expressiveness and in-context retrieval through independent channel-wise erase and write gates, but it suffers from training failures at long context. The authors trace these failures to an asymmetry between the directions used to read and modify keys during erasure, which creates non-normal erase operators whose directional gains can accumulate across tokens and cause exponential state growth even without further writes. To address this, they propose Stable GDN-2, which uses symmetric erasure to ensure non-expansive state propagation and adds decay-regulated residual writing to preserve update flexibility. They establish an O(T)O(\sqrt{T})O(T​) bound on recurrent state growth while retaining chunkwise parallel computation.

Dataset

  • Dataset sources: The authors use the ProLong dataset, specifically merging its 64K and 512K variants.
  • Composition and scale: The combined ProLong corpus is retokenized with the TinyLlama tokenizer and repacked into uniform sequences of 64K tokens, producing a training stream of approximately 82.78B tokens.
  • Training usage: The data is used for 64K-context pretraining with next-token prediction over all non-padding tokens.
  • Sequence handling: Recurrent states are reset at each training-sample boundary and propagate continuously across documents within each packed sequence.

Method

The authors build upon Gated DeltaNet-2 (GDN-2), which replaces shared scalar update gates with independent channel-wise gates for erasing and writing. In GDN-2, the erase operation reads the decayed recurrent state using a gated key and applies the modification along the original key. This asymmetric coupling yields a generally non-normal erase operator. As illustrated in the geometric comparison, this misalignment between read and modification directions can introduce shear, allowing directional gains to accumulate across tokens and triggering exponential state growth even without new writes.

To resolve this instability while retaining fine-grained control, the authors propose Stable GDN-2. The core innovation involves two key mechanisms: symmetric erasure and residual writing.

First, to ensure non-expansive state propagation, the authors align the reading and modification directions. They split the channel-wise erase gate into two square-root factors and apply one to each key factor. This creates a symmetric erase operator that preserves the diagonal attenuation of the original model while eliminating the expanding directions caused by asymmetry.

Second, because symmetric gating tightly couples erasing stored content with injecting new information, it restricts the ability to write when erasure is suppressed. To supplement these suppressed writes, the authors introduce a residual write path. This residual is directed along the difference between the original key and the symmetrically gated key, and its amplitude is regulated by the decay factor. Stronger decay permits a larger additional write, ensuring flexibility.

The overall block design integrates this Stable Gated Delta Rule-2 module alongside standard components like SwiGLU MLPs and RMSNorm. The recurrent state update explicitly separates the diagonal decay, symmetric erasure, main write, and residual write contributions.

The symmetric erasure operator guarantees that the spectral norm of the transition matrix remains at most one in the absence of new writes, preventing recurrent state amplification. Furthermore, the decay regulation tightens the bound on recurrent state energy growth. The authors theoretically establish that the recurrent state norm is bounded by O(T)O(\sqrt{T})O(T​) under bounded values, effectively controlling the accumulation of new content over long sequences.

Despite the architectural modifications, Stable GDN-2 maintains the Diagonal-Plus-Low-Rank structure required for efficient training. The residual write contributes an input-dependent term that can be precomputed independently of the incoming state. This allows the causal interactions within a chunk to be formulated as a single unit lower triangular system. The authors organize the complete update into the standard chunkwise parallel framework, where auxiliary matrices are prepared independently for each chunk. This design retains linear complexity in sequence length for fixed chunk sizes, seamlessly integrating with existing delta-rule training infrastructure.

Experiment

The experiments first characterize GDN-2 instability during long-context pretraining and post-training, showing that asymmetric erasure can produce recurrent state amplification, reduced effective representational capacity, and occasional numerical failures, which motivates explicit stabilization. Subsequent evaluations compare Stable GDN-2 with GDN-2, KDA, D-Clip, and β-Guard across recurrent and hybrid architectures trained on ProLong, using downstream reasoning tasks, WikiText perplexity, and RULER retrieval at context lengths from 32K to 128K. Stable GDN-2 generally preserves or improves downstream accuracy and language modeling quality while maintaining competitive long-context retrieval, especially under the recurrent setting, without sacrificing historical information use. Ablation studies further validate the complementary roles of residual writing and decay regulation, as removing either component degrades accuracy and retrieval performance, with decay regulation proving particularly important for long-context memory.

Numerical training failures occurred across both GDN-2 recurrent and hybrid architectures during pretraining and post-training. Hybrid runs accounted for most observed failures, while all reported pretraining-to-post-training runs completed successfully. Failures were not limited to one architecture, appearing in both recurrent and hybrid configurations. Hybrid model runs showed more total failures than recurrent model runs across pretraining and post-training. All reported runs that continued to post-training after successful pretraining completed without numerical failure.

Under the Recurrent setting, the proposed method matches the original GDN-2 on average zero-shot common-sense reasoning accuracy while outperforming D-Clip, β-Guard, and KDA. It also achieves lower WikiText perplexity than GDN-2, D-Clip, and β-Guard across all evaluated context windows, though KDA reaches lower perplexity. In the Hybrid setting, the proposed method attains the highest average downstream accuracy among the compared methods. In the Recurrent setting, the method matches GDN-2 on average downstream accuracy and outperforms D-Clip, β-Guard, and KDA. The method reduces WikiText perplexity relative to GDN-2, D-Clip, and β-Guard at every evaluated context length from 8K to 64K, while KDA records the lowest perplexity.

In recurrent long-context retrieval, Stable GDN-2 attains the strongest average RULER results at 32K, 64K, and 128K context lengths, outperforming GDN-2, D-Clip, β-Guard, and KDA. Its edge is most pronounced at 128K, while on the NIAH subset it leads at 32K and 64K before β-Guard and KDA pull slightly ahead at 128K. Overall, retrieval scores tend to degrade as context length increases. Stable GDN-2 achieves the highest average RULER score at every evaluated context length under the recurrent setting. The improvement over GDN-2 and D-Clip is especially large at 128K context length. On NIAH, Stable GDN-2 performs best at 32K and 64K, whereas β-Guard and KDA score slightly higher at 128K. Long-context retrieval metrics generally decline with longer context lengths, with D-Clip showing a sharp drop in variable tracking at 128K.

The experiments assess training stability, language modeling and downstream accuracy, and long-context retrieval. Numerical failures occurred in both recurrent and hybrid GDN-2 variants, with hybrid runs accounting for most failures, while all runs that continued from successful pretraining to post-training remained stable. The proposed recurrent method matched or outperformed GDN-2 and most baselines on zero-shot common-sense reasoning and downstream accuracy, and it reduced WikiText perplexity across context lengths, though KDA achieved lower perplexity. In long-context retrieval, Stable GDN-2 recorded the strongest average RULER results at 32K, 64K, and 128K, with the largest advantage at 128K, although some baselines performed slightly better on NIAH at 128K and overall retrieval scores declined with longer contexts.


KI mit KI entwickeln

Von der Idee bis zum Launch – beschleunigen Sie Ihre KI-Entwicklung mit kostenlosem KI-Co-Coding, sofort einsatzbereiter Umgebung und bestem GPU-Preis.

KI-gestütztes kollaboratives Programmieren
Sofort einsatzbereite GPUs
Die besten Preise

HyperAI Newsletters

Abonnieren Sie unsere neuesten Updates
Wir werden die neuesten Updates der Woche in Ihren Posteingang liefern um neun Uhr jeden Montagmorgen
Unterstützt von MailChimp