Manuscript Offprint
arXiv:2610.38578Dual DeltaNet: Value-Side Memory Reorganization for Linear Attention
Abstract
Linear attention and state space models (SSMs) offer efficient alternatives to softmax attention by maintaining a fixed-size recurrent state, but this design requires careful management to preserve useful historical associations and limit interference. The delta rule helps reduce interference through correction of the value associated with each key, but it does not explicitly account for how related value features are distributed across the state. We observe that a state can be viewed as a bank of addresses storing -dimensional values. While a key-side read retrieves the value associated with , a value-side read aggregates addresses whose stored value features match the selector . Based on this observation, we propose Dual DeltaNet (DDN), which extends Kimi Delta Attention (KDA) with a two-sided delta rule. The key-side delta rule reads with the current key to correct its associated value, while the complementary value-side delta rule reads with selected features of the current value to reorganize the addresses it occupies. We derive a chunkwise parallel training algorithm and a rank-2 recurrence that increases arithmetic intensity during inference. Compared with KDA, GDN-2, and Mamba-3, DDN achieves the strongest overall performance across language modeling, zero-shot downstream tasks, and retrieval, while incurring modest training and inference overhead relative to KDA. Code: https://github.com/ReichtumQian/DualDeltaNet
1. Introduction
Transformers have become the dominant backbone of modern large language models (Vaswani et al., 2017). How-
ever, full attention incurs quadratic computation in sequence length during training, while autoregressive inference maintains a token-level KV cache that grows linearly with the context length. Modern recurrent sequence models, including state space models (SSMs) and linear attention, offer efficient alternatives by processing sequences through recurrent state updates and compressing the history into a fixed-size state (Gu & Dao, 2023; Dao & Gu, 2024; Qian et al., 2026a; Katharopoulos et al., 2020). This recurrent formulation enables linear-time sequence processing and fixed-size inference memory, and recent work has shown that such models can achieve language-modeling performance competitive with Transformers (Yang et al., 2025; Zhang et al., 2025; Lahoti et al., 2026). This compression, however, introduces a fundamental challenge: the recurrent fixed-size state must continuously accommodate new information while preserving useful historical associations and avoiding interference among them. Prior studies on associative recall, copying, and long-context retrieval suggest that recurrent models can be less effective at retrieving precise information than softmax attention in certain settings. (Arora et al., 2024a; Jelassi et al., 2024; Waleffe et al., 2024). Therefore, effectively utilizing the recurrent fixed-size state while maintaining reliable associative memory remains a central challenge.
Prior work has sought to improve recurrent-state utilization along several complementary directions. The Mamba family improves the underlying state-space dynamics: Mamba introduces input-dependent selective propagation and forgetting, Mamba-2 develops state space duality and a more efficient structured recurrence, and Mamba-3 combines a more expressive discretization with complex-valued states and multi-input multi-output updates (Gu & Dao, 2023; Dao & Gu, 2024; Lahoti et al., 2026). In parallel, the DeltaNet family improves the associative update itself. DeltaNet uses the delta rule to correct the value associated with the current key (Schlag et al., 2021), and a subsequent parallel formulation enables efficient training over sequence length (Yang et al., 2024). Gated DeltaNet (GDN) adds an adaptive forgetting gate, Kimi Delta Attention (KDA) extends decay to individual key channels, and Gated DeltaNet-2 (GDN-2) further decouples erasure from writing (Yang et al., 2025; Zhang et al., 2025; Hatamizadeh et al., 2026). Preconditioned GDN (PGDN) and Kalman Delta Networks (KDNs)
¹College of Control Science and Engineering, Zhejiang University ²Polytechnic Institute, Zhejiang University ³Department of Mathematics, National University of Singapore ⁴School of Science, Huzhou Normal University. Correspondence to: Song Chen song.chen@nus.edu.sg, Shengze Cai shengze_cai@zju.edu.cn, Chao Xu cxu@zju.edu.cn.
Preprint.
further refine residual writes using curvature and uncertainty information, respectively (Tumma et al., 2026; Bui et al., 2026). Another line organizes memory into explicit slots with separately maintained key and value states. Gated Slot Attention (GSA) uses input-dependent routing and adaptive forgetting to update these slots, Raven sparsifies this routing so that each token modifies only a selected subset of slots, and GSA2 implements two-sided correction through separate key-slot and slot-value recurrences, using Gated Oja Rule-2 and Gated Delta Rule-2, respectively (Zhang et al., 2024; Afzal et al., 2026; Li et al., 2026). These approaches improve recurrent memory through richer dynamics, associative correction, or explicit slot routing.
Linear attention constructs an associative state by accumulating an outer-product update from each token, where and . Viewed row-wise, this state forms a bank of addresses, each carrying a -dimensional value representation. In this view, serves two roles: it is the semantic key matched by subsequent queries, and it acts as the write-address vector in the outer-product update , determining how is distributed across the address bank. For vanilla linear attention with , these two roles appear in the state construction and readout:
(write address),
(semantic matching).
Existing delta rules use the key-side read to correct the value associated with the current key, but do not explicitly examine how related value features are distributed across different addresses. Building on DART's observation that value-side reads from recurrent states can decode token-conditioned keys (Qian et al., 2026b), we exploit this complementary operation to guide associative memory updates. While linear attention is designed for key-to-value retrieval and a value-side read does not generally invert this mapping to recover semantic keys, this read can reveal how selected value features are represented across the recurrent state's addresses. Specifically, given a value-side selector , the response aggregates the address directions associated with the selected value features, as illustrated in Figure 1(a). The resulting state-dependent address vector can guide the reorganization of related value content within the associative memory.
Motivated by this observation, we propose Dual DeltaNet (DDN), which extends KDA with complementary key-side and value-side delta rules. While the key-side delta rule corrects the value associated with the current key , the value-side delta rule adjusts the addresses of value features.
Specifically, DDN constructs a selector by applying a sigmoid channel gate to the normalized value direction . The value-side read aggregates stored address directions weighted by their alignment with the selected value features. For each outer-product write , the value-side read gives , weighting its write address by the selected value features. The value-side delta rule moves the aggregated address toward , the corresponding address of the current key-value association, as illustrated in Figure 1(b). This correction reorganizes value-conditioned address occupancy within the state, potentially reducing redundant storage and interference. Our contributions are summarized as follows:
• We introduce Dual DeltaNet (DDN), which applies a key-side delta rule to correct the value associated with the current key and a complementary value-side delta rule to reorganize value content across addresses within the same associative state.
• We develop efficient training and inference algorithms for DDN. For training, we extend KDA's chunkwise parallel formulation using two-sided compact WY factorizations. For inference, we express the recurrence in a rank-2 factorized form that increases theoretical arithmetic intensity during memory-bound decoding. Our experiments show modest training and inference overhead relative to KDA, with efficiency competitive with GDN-2 and Mamba-3 MIMO.
• We compare DDN with KDA, GDN-2, and Mamba-3 on language-model pretraining, zero-shot downstream tasks, real-world retrieval tasks, and synthetic NIAH tasks. DDN achieves the strongest overall performance across the 130M, 340M, and 1B scales, with the most pronounced gains on the needle-in-a-haystack benchmark.
For , expanding the recurrence gives
so linear attention combines the values using the key-query inner products as weights.

Figure 1. Illustration of the value-side read and delta rule. (a) The selector extracts the address response of selected value features, which occupy addresses 1 and 3 in this example. (b) Comparing this response with the target produces a negative correction at addresses 1 and 3 and a positive correction at address 5, reorganizing the selected features toward the target address.
Delta Rule. DeltaNet replaces the additive write with a key-side correction (Schlag et al., 2021),
(3)
The residual measures the difference between the incoming value and the value currently associated with , while controls the strength of this correction.
Several subsequent models extend DeltaNet with more flexible forgetting and update mechanisms. Gated DeltaNet adds adaptive forgetting to the delta rule (Yang et al., 2025). Kimi Delta Attention (KDA) further generalizes forgetting to channel-wise decay (Zhang et al., 2025):
where and allows the value content stored at each address to decay at a different rate. Gated DeltaNet-2 further separates channel-wise decay, erasure, and writing (Hatamizadeh et al., 2026).
3. Methodology
DDN maintains a matrix state . The query and key are L2-normalized in key space before the recurrent update. Let be the KDA update strength and let with . The retained state after decay is .
Key-side delta rule. KDA updates the state through a value residual:
This form adjusts the incoming value by subtracting the value already associated with in . The resulting correction is written at the same key with strength . Equivalently, the update can be expressed as erasure followed by writing:
The left factor removes a fraction of the value associated with before the new value is written. Denote this factor by .
Dual DeltaNet. Let denote the normalized value direction. To select which value features guide the correction, define the channel gate , where the logit vector is predicted from the current input. Define the normalized selector and its target scale as
Let be a scalar gate whose logit is predicted from the current input. The complementary value-side delta rule then applies
The channel gate selects the value features used by to identify matching addresses. The residual guides the correction of the resulting address vector toward , with strength controlled by . Equivalently, the update can be written as:
(9)
where . Since , the effective write strength is
Rank-2 factorized form. Autoregressive decoding with linear attention is often memory-bound because each token reads and writes the recurrent state while performing relatively little computation. Mamba-3's MIMO formulation improves model expressivity by increasing computation while keeping recurrent-state memory traffic largely unchanged (Lahoti et al., 2026). This increases arithmetic intensity (FLOPs per input/output byte) and improves hardware utilization during decoding. Motivated by this principle, DDN expresses its two rank-one corrections as a rank-2 update in Algorithm 1. Both state-dependent reads are computed from the decayed state , and the resulting correction directions are packed on chip into and . Table 1 compares the input/output traffic, FLOPs, and arithmetic intensity of KDA and DDN. Both methods load one state and write it back once per token, while DDN increases the leading-order computation from to with only additional input. Its arithmetic intensity consequently increases from approximately 1.75 to 2.75 FLOPs/byte when state traffic dominates.
Algorithm 1 Rank-2 factorized form
Input: , , , , , , , and
Output: Updated state and output
1: Preparation: Compute , , and .
2: Read both sides: , .
3: Form residual directions.
,
.
4: Pack rank-2 factors.
, .
5: Update state: .
6: Read output: .
Table 1. Arithmetic intensity for (a) KDA and (b) DDN, measured in FLOPs/byte for 2-byte inputs and outputs. The batch and head dimensions cancel out. DDN's higher arithmetic intensity can improve hardware utilization during memory-bound phases such as autoregressive decoding.
| Input | Output | FLOPs | Arithmetic intensity |
|---|---|---|---|
(a) KDA (2-byte data).
| Input | Output | FLOPs | Arithmetic intensity |
|---|---|---|---|
(b) DDN (2-byte data).
Block design. DDN follows KDA's block design, as illustrated in Figure 2. The query, key, and value branches each apply a linear projection, a short causal convolution, and a SiLU activation, with additional normalization for queries and keys. The gates , and are produced by linear projections of the current input followed by sigmoid activations. The decay branch follows KDA's parameterization for , and its nonlinear transformations are omitted from the figure for clarity and detailed in Appendix B.

Figure 2. DDN block design. Query, key, and value branches apply linear projections, short causal convolutions, and SiLU activations, with normalization applied to queries and keys. The control branches produce the channel-wise decay and the sigmoid-gated quantities , and .
4. Chunkwise Computation
Chunk notation. For chunks of length , indexed by , write for position . The incoming and outgoing states are
Chunk matrices carry the same subscript .
Equivalent decay-free recurrence. Define the cumulative diagonal decay as
with . Set , , and . Substituting into Equation (9), left-multiplying by
, and using gives
where the normalized left-side erasure is
The right-side transition from Equation (9) is . The initial normalized state is .
Compact WY representation. Unrolling separates the transformed initial state from the propagated writes:
where , , and
\begin{align*}\boldsymbol{h}_{[n]}^{i}&=(\bar{\boldsymbol{A}}_{[n]}^{C}\cdots\bar{\boldsymbol{A}}_{[n]}^{i+1})\bar{\boldsymbol{k}}_{[n]}^{i},\ $ z_{[n]}^{i})^{\top}&=(\hat{\boldsymbol{v}}_{[n]}^{i})^{\top}(\boldsymbol{B}_{[n]}^{i+1}\cdots\boldsymbol{B}_{[n]}^{C}).\end{align*}(16)
Empty products are identities.
Stack as columns of , and , , , , and as rows of , , , , and , respectively. The compact WY representation of the left and right transition products (Lemma A.1, Appendix A) gives
\begin{align*}\boldsymbol{H}_{[n]}(\boldsymbol{I}+\boldsymbol{T}_{L,[n]})=\bar{\boldsymbol{K}}_{[n]}^{\top},\ $ \boldsymbol{I}+\boldsymbol{T}_{R,[n]})^{\top}\boldsymbol{Z}_{[n]}=\hat{\boldsymbol{V}}_{[n]},\end{align*}(17)
where
(18)
Writing and , the solutions are
State transition. Applying the product identity in Lemma A.1 to both transition products gives
(20)
Define the diagonal write-strength matrix
Substituting into Equation (15) yields
Using from Equation (19), the right-side erasure term factors as . Define the right-transition factor and state-dependent quantities
(23)
Substituting Equation (23) into Equation (22) gives
(24)
Restoring the cumulative decay gives the boundary recurrence
Causal readout. Define the decay-scaled queries by
For the prefix ending at position j, Equation (15) gives
(27)
where the transition products and propagated directions follow Equations (15)–(16) with endpoint replaced by . Denote the row-stacked first and second terms of the last expression by and , respectively. Substituting the left-side WY identities from Equations (20) and (19) and stacking the causal reads gives
Define
Substituting the right-side WY form into the initial-state and new-write terms and retaining causal coefficients yields
(30)
(31)
Adding these contributions and defining
(32)
gives
Here row of is . The operator tril retains the lower-triangular part, including the diagonal, and sets all entries above the diagonal to zero. Algorithm 2 summarizes the computation, and Appendix B gives the implementation details.
5. Experiments
Setup. We compare DDN against KDA, GDN-2, and Mamba-3 to evaluate its effectiveness among recent recurrent models. For Mamba-3, we evaluate both SISO and rank-4 MIMO variants. The 130M, 340M, and 1B models are trained on approximately 5B, 15B, and 50B FineWeb-Edu tokens, respectively. Within each scale, we match total parameter counts by adjusting model and MLP widths to compensate for differences in recurrent parameters. Following the Mamba-3 and GDN-2 setups (Lahoti et al., 2026; Hatamizadeh et al., 2026), we preserve the multi-value attention (MVA) head structure of Mamba-3, resulting in more heads than the linear-attention baselines. This shape adjustment keeps the effective state size per layer identical across all baselines at each model scale. All runs use AdamW, gradient clipping at 1.0, cosine learning-rate decay, and a context length of 2,048. Further architecture, optimization, and evaluation details are provided in Appendix C.
Language modeling and zero-shot downstream tasks. Table 2 reports FineWeb-Edu training perplexity, WikiText-2 and LAMBADA perplexity, and zero-shot accuracy on the
Algorithm 2 DDN chunkwise computation
Input: Incoming state ; per-token , , and for
Output: and
1: Normalize decay. Compute and using Equation (12). Set .
2: Triangular solution. Stack , and as rows of , , , and , and set and . Compute , , , and using Equations (18)–(19). Form , using Equation (26) and compute using Equation (29).
3: State-independent factors.
4: State update.
5: Causal readout.
seven downstream tasks from LAMBADA through OpenBookQA. In language modeling, DDN achieves lower perplexity than KDA on all three measures at every scale and ranks among the leading models in most comparisons. These results suggest that the value-side delta rule improves language modeling. On zero-shot downstream tasks, DDN achieves the highest average downstream accuracy among all evaluated baselines at each scale.
Synthetic NIAH tasks. Table 3 evaluates four needle variants from RULER (Hsieh et al., 2024) at context lengths from 1,024 to 4,096. DDN achieves the highest average score at all three model scales. At 1B, it achieves the highest accuracy across all NIAH-Single settings, with particularly pronounced gains on NIAH-Single-2 at 4,096 tokens and NIAH-Single-3. These results suggest that the state management provided by the value-side delta rule substantially improves associative recall.
Real-world retrieval tasks. Table 4 reports six recall-intensive real-world tasks from Just Read Twice (Arora et al., 2024c), with inputs truncated to a maximum of 2,048 tokens. DDN outperforms KDA in average accuracy at all three scales, achieving the highest average at 130M and 340M. At 1B, it ranks second with 31.20%, slightly below GDN-2 at 31.80%. GDN-2 shows a particularly large ad-
Table 2. Results on language modeling and zero-shot downstream tasks at the 130M, 340M, and 1B scales after approximately 5B, 15B, and 50B FineWeb-Edu training tokens, respectively. All accuracy values are percentages. Bold and underlined values denote the best and second-best distinct scores within each model-size group in each column, respectively.
| Model | FW-Edu train ppl | WT2 ppl | LAMB. ppl | LAMB. acc | PIQA acc | HellaS. acc | WinoGr. acc | ARC-E acc | ARC-C acc | OBQA acc | Avg. acc |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 130M models; 5B tokens | |||||||||||
| Mamba-3 SISO | 15.10 | 44.58 | 68.20 | 26.37 | 63.11 | 31.97 | 50.91 | 50.46 | 20.39 | 18.80 | 37.43 |
| Mamba-3 MIMO | 14.93 | 43.89 | 73.03 | 25.97 | 62.08 | 32.22 | 52.64 | 51.01 | 20.73 | 19.60 | 37.75 |
| GDN-2 | 15.22 | 42.79 | 67.88 | 26.41 | 62.51 | 32.28 | 51.70 | 50.93 | 20.14 | 19.20 | 37.60 |
| KDA | 14.79 | 42.53 | 69.91 | 25.69 | 62.95 | 32.14 | 52.09 | 49.66 | 20.14 | 19.00 | 37.38 |
| DDN (ours) | 14.78 | 42.36 | 60.93 | 27.75 | 62.35 | 32.49 | 52.41 | 51.22 | 20.39 | 19.60 | 38.03 |
| 340M models; 15B tokens | |||||||||||
| Mamba-3 SISO | 10.97 | 28.68 | 29.62 | 34.93 | 66.00 | 40.46 | 49.96 | 59.18 | 25.60 | 22.60 | 42.67 |
| Mamba-3 MIMO | 10.81 | 27.63 | 28.33 | 34.83 | 66.76 | 41.12 | 50.67 | 59.09 | 24.92 | 23.60 | 43.00 |
| GDN-2 | 11.19 | 29.40 | 29.18 | 36.35 | 65.51 | 39.48 | 52.25 | 56.06 | 23.21 | 20.20 | 41.87 |
| KDA | 10.93 | 28.13 | 29.09 | 35.92 | 65.83 | 40.31 | 51.38 | 57.53 | 24.23 | 21.60 | 42.40 |
| DDN (ours) | 10.88 | 27.43 | 28.41 | 35.92 | 66.32 | 40.34 | 51.46 | 58.33 | 27.30 | 24.40 | 43.44 |
| 1B models; 50B tokens | |||||||||||
| Mamba-3 SISO | 8.29 | 19.38 | 14.81 | 43.22 | 71.27 | 53.00 | 54.93 | 67.00 | 32.42 | 29.40 | 50.18 |
| Mamba-3 MIMO | 8.20 | 19.10 | 15.14 | 42.75 | 71.60 | 53.96 | 56.20 | 68.01 | 32.42 | 28.40 | 50.48 |
| GDN-2 | 8.63 | 19.30 | 14.44 | 45.62 | 71.00 | 51.84 | 56.59 | 67.17 | 30.97 | 28.60 | 50.26 |
| KDA | 8.23 | 19.07 | 13.86 | 44.29 | 71.22 | 52.84 | 56.12 | 66.67 | 33.28 | 28.20 | 50.37 |
| DDN (ours) | 8.22 | 19.00 | 13.56 | 44.98 | 71.65 | 52.77 | 54.46 | 67.59 | 32.85 | 29.80 | 50.59 |
Table 3. RULER-style needle retrieval accuracy in percent at the 130M, 340M, and 1B scales after approximately 5B, 15B, and 50B training tokens, with 500 examples per task. Bold and underlined values denote the best and second-best distinct scores within each model-size group in each column.
| Model | NIAH-Single-1 | NIAH-Single-2 | NIAH-Single-3 | NIAH-MultiKey-1 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1024 | 2048 | 4096 | 1024 | 2048 | 4096 | 1024 | 2048 | 4096 | 1024 | 2048 | 4096 | |
| 130M models; 5B tokens | ||||||||||||
| Mamba-3 SISO | 22.2 | 6.4 | 3.4 | 66.2 | 18.6 | 10.0 | 0.0 | 0.0 | 0.0 | 9.0 | 10.4 | 9.2 |
| Mamba-3 MIMO | 41.6 | 14.4 | 5.2 | 41.0 | 9.6 | 3.6 | 0.0 | 0.0 | 0.0 | 9.6 | 10.0 | 4.8 |
| GDN-2 | 68.8 | 29.6 | 14.2 | 82.8 | 34.0 | 28.4 | 1.8 | 0.2 | 0.2 | 23.8 | 22.0 | 16.8 |
| KDA | 99.0 | 96.8 | 52.8 | 93.0 | 33.6 | 21.0 | 0.4 | 0.2 | 0.0 | 25.4 | 21.4 | 13.6 |
| DDN (ours) | 99.2 | 97.4 | 82.8 | 84.6 | 36.0 | 17.2 | 5.4 | 2.4 | 0.2 | 22.6 | 21.0 | 18.0 |
| 340M models; 15B tokens | ||||||||||||
| Mamba-3 SISO | 86.2 | 36.6 | 19.8 | 98.2 | 86.0 | 32.0 | 7.0 | 3.6 | 2.0 | 16.0 | 16.6 | 16.2 |
| Mamba-3 MIMO | 94.0 | 66.2 | 28.0 | 96.4 | 90.0 | 35.6 | 17.0 | 8.4 | 2.2 | 21.6 | 21.4 | 17.6 |
| GDN-2 | 99.8 | 96.6 | 65.2 | 100.0 | 98.4 | 48.8 | 2.0 | 4.0 | 2.2 | 22.6 | 22.4 | 20.8 |
| KDA | 100.0 | 98.8 | 64.2 | 99.2 | 95.6 | 40.6 | 27.8 | 13.6 | 2.0 | 27.4 | 25.4 | 19.8 |
| DDN (ours) | 100.0 | 100.0 | 100.0 | 98.4 | 67.2 | 14.4 | 58.0 | 37.2 | 7.0 | 23.6 | 23.2 | 17.4 |
| 1B models; 50B tokens | ||||||||||||
| Mamba-3 SISO | 98.6 | 75.4 | 16.6 | 97.2 | 50.2 | 24.8 | 68.4 | 28.8 | 11.0 | 48.8 | 35.0 | 12.2 |
| Mamba-3 MIMO | 99.8 | 83.0 | 43.2 | 100.0 | 97.4 | 56.4 | 83.4 | 50.8 | 7.0 | 53.2 | 35.4 | 19.2 |
| GDN-2 | 100.0 | 100.0 | 99.8 | 99.8 | 95.4 | 56.6 | 94.2 | 78.2 | 29.4 | 30.6 | 25.8 | 23.0 |
| KDA | 100.0 | 97.6 | 96.4 | 92.8 | 100.0 | 54.2 | 59.4 | 67.2 | 19.0 | 34.4 | 30.2 | 20.0 |
| DDN (ours) | 100.0 | 100.0 | 100.0 | 100.0 | 100.0 | 80.8 | 97.0 | 83.6 | 36.0 | 37.6 | 32.2 | 27.0 |
Table 4. Real-world retrieval at the 130M, 340M, and 1B scales after approximately 5B, 15B, and 50B training tokens. Bold and underlined values denote the best and second-best distinct scores within each model-size group in each column.
| Model | SWDE | SQuAD | FDA | TQA | NQ | DROP | Avg. |
|---|---|---|---|---|---|---|---|
| 130M models; 5B tokens | |||||||
| Mamba-3 SISO | 5.85 | 18.97 | 0.82 | 35.13 | 4.47 | 11.60 | 12.81 |
| Mamba-3 MIMO | 6.57 | 16.89 | 1.36 | 34.83 | 4.72 | 13.51 | 12.98 |
| GDN-2 | 10.35 | 21.35 | 2.09 | 37.03 | 5.61 | 16.77 | 15.53 |
| KDA | 8.82 | 20.07 | 1.91 | 37.92 | 5.70 | 16.68 | 15.18 |
| DDN (ours) | 10.62 | 21.95 | 2.63 | 39.40 | 5.96 | 16.53 | 16.18 |
| 340M models; 15B tokens | |||||||
| Mamba-3 SISO | 14.40 | 27.71 | 3.27 | 50.24 | 8.46 | 19.26 | 20.56 |
| Mamba-3 MIMO | 15.84 | 29.89 | 2.72 | 51.72 | 9.00 | 19.50 | 21.45 |
| GDN-2 | 17.10 | 30.80 | 3.63 | 50.42 | 9.34 | 17.97 | 21.54 |
| KDA | 16.83 | 30.23 | 3.81 | 49.82 | 9.60 | 17.54 | 21.31 |
| DDN (ours) | 18.45 | 29.89 | 8.71 | 51.13 | 9.57 | 21.56 | 23.22 |
| 1B models; 50B tokens | |||||||
| Mamba-3 SISO | 27.18 | 35.29 | 6.08 | 58.83 | 15.24 | 23.19 | 27.63 |
| Mamba-3 MIMO | 31.86 | 36.03 | 11.16 | 60.19 | 15.33 | 22.14 | 29.45 |
| GDN-2 | 31.95 | 39.21 | 17.42 | 62.97 | 17.01 | 22.23 | 31.80 |
| KDA | 35.46 | 37.80 | 10.62 | 61.08 | 15.30 | 25.11 | 30.90 |
| DDN (ours) | 32.58 | 37.06 | 12.89 | 62.50 | 17.45 | 24.72 | 31.20 |
vantage on FDA at this scale, scoring 17.42% compared with 12.89% for DDN and 10.62% for KDA. These task-dependent gains suggest that GDN-2 and DDN may improve different aspects of recall.
Training and inference efficiency. Figure 3 compares end-to-end BF16 training throughput and peak allocated memory of 1B models on an NVIDIA H200. All baselines retain the default recomputation settings of their original implementations. DDN's throughput is modestly lower than KDA's and GDN-2's, and higher than Mamba-3 MIMO's. Mamba-3 SISO saves recurrent states and other forward intermediates for backward, favoring higher throughput at the cost of greater memory usage. DDN's peak allocated memory is slightly higher than KDA's and comparable to GDN-2's. Both DDN and Mamba-3 MIMO show reduced throughput at 8K × 4. A possible reason is that the current implementations provide limited parallelism at small batch sizes, as discussed in Appendix B. For inference, Table 5 reports prefill and prefill-plus-decode latency for the 1B models on an NVIDIA H200 with batch size 64. The generation length equals the input length. GDN-2, DDN, and Mamba-3 MIMO have higher prefill and prefill-plus-decode latencies than Mamba-3 SISO and KDA. DDN's latencies are close to those of GDN-2 and Mamba-3 MIMO.
Ablation study. To isolate the role of the learned channel gate, we train 130M and 340M DDN variants with for approximately 5B and 15B tokens, respectively. Table 6 summarizes the results. At both scales, the gated and ungated DDN variants improve retrieval and NIAH accuracy

(b) Peak Allocated Memory

Figure 3. Training throughput and peak allocated memory of 1B models on an NVIDIA H200. The horizontal axis denotes sequence length × batch size. All baselines retain their default recomputation settings.
Table 5. Prefill and prefill + decode latency in seconds for 1B models on an NVIDIA H200 with batch size 64. Generation length equals input length. Bold and underlined values denote the lowest and second-lowest distinct latencies in each column within each group, respectively.
| Model | 1024 | 2048 | 4096 | 8192 |
|---|---|---|---|---|
| Prefill | ||||
| Mamba-3 SISO | 0.34 | 0.68 | 1.35 | 2.69 |
| Mamba-3 MIMO | 0.40 | 0.81 | 1.64 | 3.35 |
| GDN-2 | 0.40 | 0.80 | 1.58 | 3.16 |
| KDA | 0.35 | 0.70 | 1.39 | 2.81 |
| DDN (ours) | 0.39 | 0.79 | 1.57 | 3.15 |
| Prefill + Decode | ||||
| Mamba-3 SISO | 3.65 | 7.31 | 14.66 | 27.44 |
| Mamba-3 MIMO | 4.16 | 8.34 | 16.70 | 33.46 |
| GDN-2 | 4.13 | 8.26 | 16.53 | 33.11 |
| KDA | 3.65 | 7.31 | 14.66 | 29.34 |
| DDN (ours) | 4.18 | 8.35 | 16.68 | 33.37 |
over KDA, supporting the effectiveness of the value-side delta rule. The gated variant achieves stronger overall performance, suggesting that selecting relevant value features benefits value-side address reorganization.
Table 6. Ablation results for 130M and 340M models trained on approximately 5B and 15B FineWeb-Edu tokens, respectively. Downstream, Retrieval, and NIAH report average accuracy in percent. Bold and underlined values denote the best and second-best scores at each scale.
| Model | Downstream | Retrieval | NIAH |
|---|---|---|---|
| 130M models; 5B tokens | |||
| KDA | 37.38 | 15.18 | 38.10 |
| DDN () | 37.41 | 15.87 | 39.45 |
| DDN | 38.03 | 16.18 | 40.57 |
| 340M models; 15B tokens | |||
| KDA | 42.40 | 21.30 | 51.20 |
| DDN () | 42.16 | 23.48 | 52.42 |
| DDN | 43.44 | 23.22 | 53.87 |
6. Conclusion
We presented Dual DeltaNet (DDN), which extends KDA with complementary key-side and value-side delta rules. The key-side update corrects the value associated with the current key, while the value-side update utilizes selected value features to reorganize related content across addresses. A chunkwise parallel formulation and a rank-2 recurrent form support efficient training and inference with modest overhead relative to KDA. Experiments across the 130M, 340M, and 1B scales show improvements over KDA in language modeling, zero-shot downstream tasks, and retrieval, with particularly pronounced gains on the RULER needle-in-a-haystack benchmark. These results suggest that key-side associative correction and value-side address reorganization can jointly improve the management of fixed-size recurrent memory.
References
Afzal, A., Bick, A., Xing, E. P., Cevher, V., and Gu, A. Raven: High-recall sequence modeling with sparse memory routing. arXiv preprint arXiv:2607.25357, 2026.
Arora, S., Eyuboglu, S., Timalsina, A., Johnson, I., Poli, M., Zou, J., Rudra, A., and Ré, C. Zoology: Measuring and improving recall in efficient language models. In International Conference on Learning Representations, 2024a.
Arora, S., Eyuboglu, S., Zhang, M., Timalsina, A., Alberti, S., Zinsley, D., Zou, J., Rudra, A., and Ré, C. Simple linear attention language models balance the recall-throughput tradeoff. arXiv preprint arXiv:2402.18668, 2024b.
Arora, S., Timalsina, A., Singhal, A., Spector, B., Eyuboglu, S., Zhao, X., Rao, A., Rudra, A., and Ré, C. Just read
twice: closing the recall gap for recurrent language models. arXiv preprint arXiv:2407.05483, 2024c.
Bisk, Y., Zellers, R., Le Bras, R., Gao, J., and Choi, Y. PIQA: Reasoning about physical commonsense in natural language. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pp. 7432–7439, 2020.
Bui, N., Huang, T., and Ying, R. Kalman delta networks: Uncertainty-aware associative memory. arXiv preprint arXiv:2609.07816, 2026.
Clark, P., Cowhey, I., Etzioni, O., Khot, T., Sabharwal, A., Schoenick, C., and Tafjord, O. Think you have solved question answering? try ARC, the AI2 reasoning challenge. arXiv preprint arXiv:1803.05457, 2018.
Dao, T. and Gu, A. Transformers are SSMs: Generalized models and efficient algorithms through structured state space duality. arXiv preprint arXiv:2405.21060, 2024.
Dua, D., Wang, Y., Dasigi, P., Stanovsky, G., Singh, S., and Gardner, M. DROP: A reading comprehension benchmark requiring discrete reasoning over paragraphs. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 2368–2378, 2019.
Gao, L., Tow, J., Biderman, S., Black, S., DiPofi, A., Foster, C., Golding, L., Hsu, J., McDonell, K., Muennighoff, N., et al. A framework for few-shot language model evaluation. Zenodo, 2021.
Gu, A. and Dao, T. Mamba: Linear-time sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00752, 2023.
Hao, Q., Cai, R., Pang, Y., and Zhang, L. From one tree to a forest: a unified solution for structured web data extraction. In Proceedings of the 34th international ACM SIGIR conference on Research and development in Information Retrieval, pp. 775–784, 2011.
Hatamizadeh, A., Choi, Y., and Kautz, J. Gated deltanet-2: Decoupling erase and write in linear attention. arXiv preprint arXiv:2605.22791, 2026.
Hsieh, C.-P., Sun, S., Kriman, S., Acharya, S., Rekesh, D., Jia, F., Zhang, Y., and Ginsburg, B. RULER: What’s the real context size of your long-context language models? arXiv preprint arXiv:2404.06654, 2024.
Jelassi, S., Brandfonbrener, D., Kakade, S. M., and Malach, E. Repeat after me: Transformers are better than state space models at copying. arXiv preprint arXiv:2402.01032, 2024.
Joshi, M., Choi, E., Weld, D. S., and Zettlemoyer, L. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1601–1611, 2017.
Katharopoulos, A., Vyas, A., Pappas, N., and Fleuret, F. Transformers are RNNs: Fast autoregressive transformers with linear attention. In International conference on machine learning, pp. 5156–5165. PMLR, 2020.
Kwiatkowski, T., Palomaki, J., Redfield, O., Collins, M., Parikh, A., Alberti, C., Epstein, D., Polosukhin, I., Devlin, J., Lee, K., et al. Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452–466, 2019.
Lahoti, A., Li, K. Y., Chen, B., Wang, C., Bick, A., Kolter, J. Z., Dao, T., and Gu, A. Mamba-3: Improved sequence modeling using state space principles. arXiv preprint arXiv:2603.15569, 2026.
Li, R., Ding, S., Zhang, W., Tang, D., Zeng, Z., Zeng, Q., Chen, M., Hu, J., and Liang, Y. Gated slot attention-2: Two-sided associative memory correction in linear attention. arXiv preprint arXiv:2610.02816, 2026.
Merity, S., Xiong, C., Bradbury, J., and Socher, R. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016.
Mihaylov, T., Clark, P., Khot, T., and Sabharwal, A. Can a suit of armor conduct electricity? a new dataset for open book question answering. In Proceedings of the 2018 conference on empirical methods in natural language processing, pp. 2381–2391, 2018.
Paperno, D., Kruszewski, G., Lazaridou, A., Pham, N.-Q., Bernardi, R., Pezzelle, S., Baroni, M., Boleda, G., and Fernández, R. The LAMBADA dataset: Word prediction requiring a broad discourse context. In Proceedings of the 54th annual meeting of the association for computational linguistics (volume 1: Long papers), pp. 1525–1534, 2016.
Qian, Y., Chen, S., Liu, J., Cai, S., and Xu, C. DSSMs: State space models with explicit memory via delay differential equations. arXiv preprint arXiv:2607.10244, 2026a.
Qian, Y., Chen, S., Wang, P., Liu, J., Cai, S., and Xu, C. DART: Decoded attention over recurrent states for efficient long-context sequence modeling. arXiv preprint arXiv:2608.02032, 2026b.
Rajpurkar, P., Zhang, J., Lopyrev, K., and Liang, P. SQuAD: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical
Methods in Natural Language Processing, pp. 2383–2392, 2016.
Sakaguchi, K., Le Bras, R., Bhagavatula, C., and Choi, Y. WinoGrande: An adversarial winograd schema challenge at scale. Communications of the ACM, 64(9):99–106, 2021.
Schlag, I., Irie, K., and Schmidhuber, J. Linear transformers are secretly fast weight programmers. In International Conference on Machine Learning, pp. 9355–9366. PMLR, 2021.
Tumma, N., Loo, N., and Rus, D. Preconditioned DeltaNet: Curvature-aware sequence modeling for linear recurrences. arXiv preprint arXiv:2604.21100, 2026.
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. Advances in neural information processing systems, 30, 2017.
Waleffe, R., Byeon, W., Riach, D., Norick, B., Korthikanti, V., Dao, T., Gu, A., Hatamizadeh, A., Singh, S., Narayanan, D., et al. An empirical study of Mamba-based language models. arXiv preprint arXiv:2406.07887, 2024.
Wang, L., Cheng, Y., Shi, Y., Tang, Z., Mo, Z., Xie, W., Ma, L., Xia, Y., Xue, J., Yang, F., and Yang, Z. TileLang: A composable tiled programming model for AI systems. arXiv preprint arXiv:2504.17577, 2025.
Yang, S. and Zhang, Y. FLA: A triton-based library for hardware-efficient implementations of linear attention mechanism. https://github.com/fla-org/flash-linear-attention, January 2024.
Yang, S., Wang, B., Zhang, Y., Shen, Y., and Kim, Y. Parallelizing linear transformers with the delta rule over sequence length. Advances in neural information processing systems, 37:115491–115522, 2024.
Yang, S., Kautz, J., and Hatamizadeh, A. Gated delta networks: Improving Mamba2 with delta rule. In International Conference on Learning Representations, 2025.
Zellers, R., Holtzman, A., Bisk, Y., Farhadi, A., and Choi, Y. HellaSwag: Can a machine really finish your sentence? In Proceedings of the 57th annual meeting of the association for computational linguistics, pp. 4791–4800, 2019.
Zhang, Y., Yang, S., Zhu, R., Zhang, Y., Cui, L., Wang, Y., Wang, B., Shi, F., Wang, B., Bi, W., Zhou, P., and Fu, G. Gated slot attention for efficient linear-time sequence modeling. In Advances in Neural Information Processing Systems, volume 37, 2024.
Zhang, Y., Lin, Z., Yao, X., Hu, J., Meng, F., Liu, C., Men, X., Yang, S., Li, Z., et al. Kimi linear: An expressive, efficient attention architecture. arXiv preprint arXiv:2510.26692, 2025.
A. Compact WY Representation
Lemma A.1 (Compact WY form of rank-one transitions). Let and for . Set , , and
Thus for , and otherwise. The inverse exists for arbitrary , since is unit lower triangular. Define the propagated columns and , with empty products equal to . Then
The transition product admits the compact representation
Proof. The cancellation can be seen by expanding the successive differences:
Thus, for , with an empty sum when i = m,
where the third line uses , and the last uses the definition of . For , multiplying by yields . These are the column equations of , giving . Taking in Equation (37) gives the product identity.
B. Implementation Details
All implementations are built on the Flash Linear Attention (FLA) library (Yang & Zhang, 2024).
Decay parameterization. The diagonal decay is implemented as with
where
Here is a learned per-head parameter and is a positive input-dependent step size. This parameterization keeps and therefore .
State transition implementation. State transition kernels for KDA and GDN-2 exploit the independence of state columns through value tiling, assigning a separate program to each sequence, attention head, and value tile. This increases parallelism beyond one program per sequence and head. DDN's value-side read couples these columns through a reduction over , so value tiles cannot be processed independently under the same scheme. Distributing them across programs would require cross-program reductions and synchronization. We therefore assign one program to each sequence and attention head, with chunks processed sequentially within each program. We implement this strategy in TileLang (Wang et al., 2025), keeping the full state resident in shared memory. This strategy avoids cross-program reductions, but limits the number of independently scheduled programs to the batch size times the number of heads. At small batch sizes, the resulting parallelism may be insufficient to fully utilize the GPU, contributing to the throughput decrease at in Figure 3. The released Mamba-3 MIMO implementation similarly processes chunks sequentially within one program per sequence and head (Lahoti et al., 2026).
Precision and recomputation. Most matrix operands and the carried recurrent state are stored in BF16, with FP32 accumulation for matrix products. Normalization, cumulative log-decay calculations, and triangular-solve intermediates are computed in FP32. During training, we retain , , and , together with the inverse L2 norms computed during normalization. The triangular inverses and and the causal query-key interaction matrix are also cached. Other state-transition and readout intermediates are recomputed during backward to reduce activation memory.
C. Experimental Details
Architecture and parameter matching. Table 7 summarizes the model configurations. KDA, GDN-2, and DDN use 128-dimensional keys and values. Mamba-3 retains its multi-value structure with expansion factor 2, one shared state group, and state and head dimensions of 64. Consequently, every model at a given scale has the same effective state size . Model and MLP widths are adjusted within each scale to compensate for differences in recurrent parameters. In DDN, the decay and selector-gate logits are generated by separate low-rank projections with bottleneck width , following KDA's decay-gate parameterization. We initialize all entries of to 0.5 and to 0.05, giving at initialization.
Table 7. Architecture configurations. For the linear-attention models, and are the key and value dimensions. For Mamba-3, they denote the state and head dimensions, respectively.
| Model | Depth | Heads | State size | ||||
|---|---|---|---|---|---|---|---|
| 130M scale | |||||||
| Mamba-3 SISO | 12 | 24 | 64 | 64 | 768 | 2,208 | 98,304 |
| Mamba-3 MIMO | 12 | 24 | 64 | 64 | 768 | 2,064 | 98,304 |
| GDN-2 | 12 | 6 | 128 | 128 | 768 | 2,112 | 98,304 |
| KDA | 12 | 6 | 128 | 128 | 816 | 2,336 | 98,304 |
| DDN (ours) | 12 | 6 | 128 | 128 | 800 | 2,320 | 98,304 |
| 340M scale | |||||||
| Mamba-3 SISO | 24 | 32 | 64 | 64 | 1,024 | 2,048 | 131,072 |
| Mamba-3 MIMO | 24 | 32 | 64 | 64 | 1,024 | 1,920 | 131,072 |
| GDN-2 | 24 | 8 | 128 | 128 | 904 | 2,560 | 131,072 |
| KDA | 24 | 8 | 128 | 128 | 992 | 2,816 | 131,072 |
| DDN (ours) | 24 | 8 | 128 | 128 | 976 | 2,800 | 131,072 |
| 1B scale | |||||||
| Mamba-3 SISO | 24 | 56 | 64 | 64 | 1,792 | 3,584 | 229,376 |
| Mamba-3 MIMO | 24 | 56 | 64 | 64 | 1,792 | 3,456 | 229,376 |
| GDN-2 | 24 | 14 | 128 | 128 | 1,616 | 4,352 | 229,376 |
| KDA | 24 | 14 | 128 | 128 | 1,760 | 4,864 | 229,376 |
| DDN (ours) | 24 | 14 | 128 | 128 | 1,744 | 4,848 | 229,376 |
Optimization. All models are trained on FineWeb-Edu with a batch of 256 sequences and a sequence length of 2,048. All models share the same LLaMA tokenizer with a vocabulary of 32,000 tokens for training and evaluation. We utilize AdamW with , , , weight decay 0.01, and gradient clipping at 1.0. The learning rate follows a cosine schedule that decays to 10% of its peak value. Table 8 summarizes the training steps, peak learning rates, and warmup steps for all model scales.
Table 8. Training steps, peak learning rates, and warmup steps of pretraining.
| Scale | 130M | 340M | 1B |
|---|---|---|---|
| Training steps | 9,500 | 30,000 | 95,000 |
| Peak learning rate | |||
| Warmup steps | 512 | 1,024 | 1,024 |
Evaluation protocol. All downstream and retrieval evaluations are zero-shot and are conducted with lm-evaluation-harness (Gao et al., 2021). Responses are generated via greedy decoding, with a maximum of 48 new tokens for real-world retrieval and 128 for NIAH.
Language modeling. FineWeb-Edu training perplexity is the exponential of the mean logged loss over the final 500 steps, sampled every 10 steps. We report word-level perplexity on WikiText-2 (Merity et al., 2016) and both perplexity and final-word prediction accuracy on the OpenAI version of LAMBADA (Paperno et al., 2016).
Zero-shot downstream tasks. The seven tasks cover contextual word prediction, commonsense reasoning, coreference resolution, and science question answering. We report raw accuracy for LAMBADA (Paperno et al., 2016), PIQA (Bisk et al., 2020), WinoGrande (Sakaguchi et al., 2021), ARC-Easy and ARC-Challenge (Clark et al., 2018), and OpenBookQA (Mihaylov et al., 2018), and length-normalized accuracy for HellaSwag (Zellers et al., 2019).
Real-world retrieval tasks. We evaluate six recall-intensive tasks following prior work (Arora et al., 2024b;c): SWDE (Hao et al., 2011), SQuAD Completion (Rajpurkar et al., 2016), FDA (Arora et al., 2024b), TriviaQA Cloze (Joshi et al., 2017), Natural Questions Cloze (Kwiatkowski et al., 2019), and DROP Cloze (Dua et al., 2019). Inputs are limited to 2,048 tokens. We report contains accuracy, counting a response as correct when it contains any accepted answer string.
Synthetic NIAH tasks. The four RULER variants (Hsieh et al., 2024) test word-to-number retrieval in repeated text (Single-1) or essays (Single-2), word-to-UUID retrieval in essays (Single-3), and retrieval among four word-to-number associations in essays (MultiKey-1). Each variant has 500 examples at each context length of 1,024, 2,048, and 4,096 tokens.