Gated DeltaNet-2 (GDN-2), a linear attention model designed for long contexts, sometimes fails during training on sequences as long as 64K tokens: the loss becomes NaN, and training stops. This paper uses theory and training logs to trace the cause to an asymmetry in the erase operation—the direction used to read the state differs from the direction used to modify it. It proposes Stable GDN-2, which makes erasure symmetric and adds a residual writing path controlled by decay. In experiments with 1.6B models, the authors report a 6.80-point gain over GDN-2 in average 128K RULER scores for the recurrent configuration, and a 0.62-percentage-point gain in average accuracy across 9 downstream tasks for the hybrid configuration.
Standard softmax attention in transformers has compute and memory costs that grow quadratically with context length. Linear attention avoids this bottleneck by compressing past information into a fixed-size matrix. Each incoming token updates that memory by adding the outer product of its key and value; the current query then reads out the information it needs. Because the state stays the same size regardless of context length, memory usage remains constant even during autoregressive generation of long sequences. That is what makes linear attention appealing for long contexts.
The difficult part is how to update that fixed-size memory. Simply adding to it leaves old associations accumulating without being erased. The delta rule addresses this by updating the memory only by the residual: the difference between the new value and the existing value predicted by the memory. Adding gates to control how much to forget and how much to write led to Gated DeltaNet (GDN) and Kimi Delta Attention (KDA). These models tied erasing and writing together under a single scalar gate.
GDN-2 takes this a step further. It gives erasing and writing separate gates for each channel. This allows more flexible state updates—erasing more in some coordinates while preserving others—and improves in-context retrieval. But that extra expressiveness introduces the trap identified in this paper. The erase gate couples asymmetrically with the key, allowing an operation that looks harmless to quietly inflate the state.
The key distinction is this: in GDN and KDA, both the direction used to read old content and the direction used to modify it were the same key, k. In GDN-2, reading uses a gated key, while modification follows the original key, k. If these two vectors are not parallel, the erase matrix is no longer symmetric. An asymmetric matrix, particularly a non-normal one, can stretch vectors in certain directions even when all its eigenvalues have magnitude at most 1. This introduces shear: one component stays unchanged while an additional component appears in another direction. If these small amplifications align across tokens, they accumulate. The state can then keep growing until it overflows numerically, even with no new writes at all. That is the context behind the authors’ reference to Franklin’s warning that “a small leak will sink a great ship.”
The problem boils down to one sentence: when the reading and modification directions diverge, an erase operation can enlarge the state instead of erasing it. Stable GDN-2 offers an equally intuitive fix: align those directions again.
Specifically, it splits the erase gate into two square-root factors and applies one identically to each of the two key factors. Reading, modification, and writing then all use the same gated key, making the erase matrix symmetric. Because the matrix is symmetric and its diagonal entries are at most 1, its spectral norm—the maximum amplification factor—does not exceed 1. In other words, without new writes, the state cannot grow. The transition is non-expansive. This closes the opening through which shear amplified the state.
The clever part is that the design does not stop at removing the asymmetry. Symmetric erasure comes at a cost. As a gate value approaches 0, both erasure and the base write vanish in that channel. Suppressing erasure also suppresses writing: the two are tied to the same control. That gives back some of the channel-level flexibility GDN-2 worked to gain.
The authors therefore add a residual writing path along the original key direction. This auxiliary path allows additional writes in channels where a small erase gate has weakened the base write. But it would defeat the purpose if this path inflated the state again, so decay controls the residual’s magnitude. The more state energy decay retains in a channel—that is, the weaker the decay—the smaller the residual write. Stronger decay, which discards more of the state, permits a larger residual write. The implementation scales the residual by the square root of the fraction of energy not retained. It balances how much new information goes in against how much has been cleared out.
The design preserves two important properties. First, the update remains an input-dependent affine operation, so it can reuse the chunkwise parallel training framework used by delta-rule models. The state transition still has a Diagonal-Plus-Low-Rank (DPLR) structure. Interactions between tokens within a chunk can therefore be computed in parallel through a triangular solve, with only the state at chunk boundaries passed sequentially. The residual path is a term that can be precomputed from the inputs alone, so it fits into the same triangular solve. Stability does not come at the expense of training efficiency. Second, the gate parameterization remains the same as in GDN-2: separate sigmoid projections for erasing and writing, and exponential decay constrained through softplus. What changes is the geometry of where and how the gates are applied, not the model’s size.
The models were pretrained on ProLong with a 64K context. The authors combined the 64K and 512K ProLong data, retokenized it with the TinyLlama tokenizer, and repacked it into uniform sequences of 64K tokens. The resulting training stream contains approximately 82.78B tokens, with next-token prediction applied to every non-padding token. The recurrent state resets at each training sample boundary but continues across documents within a sequence. This setup tests how much amplification accumulates when the state propagates uninterrupted through a long context.
The comparison includes four baselines under the same training protocol. GDN-2 serves as the direct reference for measuring the effect of stabilization, while KDA provides a reference within the delta-rule family. The excerpt cuts off partway through the baseline list, so the other two names cannot be confirmed. According to the abstract and main text, the models have approximately 1.6B parameters. Both Pure Linear/Recurrent and hybrid architectures were tested.
The important distinction in the evaluation is what each benchmark measures. Long-context retrieval is measured with 128K RULER. A crucial detail: training uses 64K contexts, while evaluation uses 128K. Retrieval is therefore tested beyond the training length, in an extrapolation setting. General downstream performance is measured as average accuracy across 9 tasks, while language modeling quality is assessed separately. These three dimensions measure different things. The two headline numbers discussed below—RULER +6.80 and downstream +0.62—are also separate results from different configurations and should not be conflated.
The way the paper quantifies instability is itself a contribution. The authors record a “numerical failure” when training loss becomes NaN and the run can no longer continue. In Table 1, GDN-2 failed in 3 of 8 pretraining runs and 4 of 8 post-training runs; all 5 post-training runs started after successful pretraining completed. More importantly, loss alone did not tell the whole story. Even some runs that finished with finite loss values showed abnormally large individual components in the recurrent state. The exact orders of magnitude are blanked out in the excerpt, so they are not reproduced here. This exposes a blind spot in monitoring based solely on loss.
A replay analysis of one failure is particularly convincing. In one pretraining run, the loss became NaN at step 2,058. Overflow was observed at token 52,736 in the problematic sequence, after which non-finite values spread to the logits and loss. Replaying the same input through GDN and KDA did not produce that growth. The decisive test retained updates for only the first 64 tokens, then set subsequent write terms to 0 while keeping the keys, gates, and decay fixed and allowing the state to propagate. GDN and KDA decayed once writing stopped. Only GDN-2 kept growing. This reproduced the theoretically predicted “growth without writing” on an actual token sequence. The authors also measured state capacity through effective rank, which rapidly converged to 1 for GDN-2. That indicates energy concentrating in a single direction, leaving the state unable to make proper use of its representational dimensions.
The paper reports two headline results. Compared with GDN-2, Stable GDN-2 improves average 128K RULER scores by 6.80 points in the recurrent configuration and average accuracy across 9 downstream tasks by 0.62 percentage points in the hybrid configuration. The authors also report that language modeling quality remains competitive. On the theoretical side, they establish an O(T) upper bound on the recurrent state norm. With bounded values and a zero-initialized state, symmetric erasure removes exponential amplification from products of state transitions, while decay control guarantees an upper bound linear in T. Proposition 4.1 establishes non-expansive transitions in the absence of writing; Proposition 4.2 establishes the O(T) norm bound.
How should we read those two numbers? RULER +6.80 indicates better retrieval of information from long contexts. Because it was measured at 128K, twice the training length of 64K, it suggests that stabilization does more than prevent numerical failure: it also improves retrieval beyond the training length. The downstream gain of +0.62 is relatively small and comes from a different configuration—the hybrid model. The authors’ claim is closer to “stabilization without a quality penalty, improving retrieval and downstream performance while preserving language modeling quality” than to “large gains across every metric.” Keeping that distinction clear is essential to a fair reading of the paper.
My own assessment is that the study’s real value lies more in the diagnosis than in the numbers. When training blows up, the usual response is to lower the learning rate or apply remedies such as gradient clipping and loss scaling. This paper identifies the failure mechanism geometrically, through shear and non-normal operators, and proposes a structural fix that removes the cause. Its observation that the state can deteriorate even while the loss looks healthy also carries a practical warning: anyone working with long-context recurrent models should monitor more than loss.
Start with what the authors explicitly acknowledge. The theory establishes that runaway trajectories exist, but whether amplification occurs during actual training—and how severe it becomes—depends on how the token sequence and learned parameters interact with the state. The claim is conditional: the model can fail, and some runs did fail, rather than failure being inevitable. The appendix also notes that removing decay control preserves non-expansive transitions but no longer guarantees an O(T) bound with a constant independent of gate values. Part of the stability guarantee therefore depends on this additional decay-control mechanism.
I see several remaining questions. First is scale. The experiments are limited to models of roughly 1.6B parameters and 64K training contexts. These results alone cannot establish whether the same fix will be equally effective in larger models or with longer training contexts. Second is a more precise breakdown of how much expressiveness is recovered after symmetric erasure is introduced. How much of the flexibility lost through symmetrization does residual writing restore? That detail is buried beneath the aggregate downstream gain of +0.62. Third is the relationship between evaluation dimensions. Retrieval on RULER improves substantially, downstream performance improves modestly, and language modeling is described as “remaining competitive.” The available excerpt does not let us probe further into whether stabilization primarily benefits particular capabilities or delivers broader improvements. (The names of two of the four baselines and the detailed tables are missing from the truncated excerpt, so no further numerical comparisons are drawn here.)
Work on this problem broadly follows two lines. One builds more expressive recurrent memory through delta rules and gating: DeltaNet, GDN, KDA, and GDN-2. This line has advanced by refining how precisely the model can forget and write, with GDN-2’s channel-wise gates taking that refinement furthest. This paper’s insight is that the added control was not free. Once erasing and writing are separated and split by channel, the reading and modification directions diverge, breaking the non-expansiveness of symmetric erasure that had underpinned stability. Stable GDN-2 attempts to restore that foundation while retaining the expressiveness of channel-wise gating.
The other line studies memory capacity and stabilization in recurrent models, using measures such as effective rank to assess how fully the state uses its representational dimensions. This paper borrows effective-rank measurement to diagnose energy concentration in GDN-2. What distinguishes Stable GDN-2 is that it achieves stabilization by correcting the geometry of the state transition, rather than through training tricks such as clipping or scaling, while preserving the efficiency of chunkwise parallel training. Its upper bound also has the same form as that of the additive state accumulation in Linear Transformer, the starting point of linear attention. This places the fix within the existing theoretical framework.
Imagine an AI project manager carrying the context of a long project from start to finish. Hundreds of meeting notes, threads, and decision logs add up to tens of thousands of tokens within a single session. ONTLE aims to manage state efficiently by compressing that context into fixed-size memory and retrieving it when needed, avoiding the cost of rereading everything on every request. The constant-memory, linear-time properties of linear attention are precisely what make it attractive here.
But the failure mode this paper warns about is especially damaging in that setting. As a session grows longer, the internal state can quietly expand even during stretches with no writing, eventually causing numerical failure. Even without an outright failure, state energy can concentrate in a single direction: the model appears to retain a great deal of context, yet in practice holds one thing clearly while everything else becomes blurred. For a PM agent, that would look like becoming fixated on a particular issue as the conversation grows, gradually losing track of other constraints established early on. More troubling still, this may not immediately show up in the loss or the apparent quality of responses. Without separately tracking effective rank, its convergence to 1 can go unnoticed.
For products such as ONTLE that need to retain context over long periods, the practical lesson has two parts. When selecting a model, there is reason to ask whether its state is guaranteed to remain non-expansive over long propagation. When designing monitoring, there is a concrete case for tracking internal state norms and effective dimensionality across long sessions, alongside loss and visible response quality. The longer a product needs to retain context, the more a small leak sinking a great ship becomes an operational risk rather than a metaphor.
Its advantage is that it compresses the past into fixed-size memory, allowing long contexts to be processed with constant memory usage. The crucial question is how that memory is updated. Separating erasing and writing by channel, as GDN-2 does, increases expressiveness, but the reading and modification directions can diverge, making the erase operation asymmetric and non-normal. Such an operation can stretch the state in certain directions even when all eigenvalues are at most 1 in magnitude. As that amplification accumulates across tokens, the state can run away even without new writes.
It splits the erase gate into two square-root factors and applies them identically to the two key factors. Reading, modification, and writing then use the same direction, making the erase matrix symmetric and keeping its maximum amplification factor—its spectral norm—at or below 1. This guarantees that the state cannot grow without new writes. However, small gate values also suppress writing, so the design adds a residual writing path whose magnitude is controlled by decay.
No. One of the paper’s important observations is that individual components of the recurrent state can grow abnormally large even in runs that finish training with finite loss. Effective-rank measurements can also reveal state energy concentrating in a single direction, preventing the model from making proper use of its representational dimensions. Monitoring loss alone misses this internal deterioration, so state norms and effective dimensionality need to be tracked separately.
Not in this paper’s design. The update retains its Diagonal-Plus-Low-Rank (DPLR) form and input-dependent affine structure, allowing it to reuse the chunkwise parallel training framework used by delta-rule models. The residual writing path can be precomputed from the inputs alone and incorporated into the same triangular solve. With fixed chunk and head dimensions, complexity remains linear in sequence length.
The experiments use models with approximately 1.6B parameters, pretrained on ProLong data with a 64K context. Compared with GDN-2, the authors report a 6.80-point increase in average 128K RULER scores for the recurrent configuration and a 0.62-percentage-point increase in average accuracy across 9 downstream tasks for the hybrid configuration, while language modeling quality remains competitive. These are separate results from different configurations.