Manuscript Offprint
arXiv:2610.41994DAMI: Dual-Axis Memory Initialization for Enhanced Long-Context Retrieval in Gated Linear Attention
Abstract
Linear attention scales linearly with sequence length, but its finite-state memory can limit long-context retrieval. In gated linear recurrences, memory retention depends on state decay, which is shaped jointly by gate parameters A_log and dt_bias and by input activations. In controlled Gated DeltaNet (GDN) experiments, both parameters remain highly correlated with their initial values after training, highlighting the importance of initialization. Therefore, we introduce Dual-Axis Memory Initialization (DAMI), which jointly configures these parameters before training. DAMI assigns geometric timescales across heads for varied retrieval distances and a low-high-low input-sensitivity profile across layers. A small activation sample calibrates the GDN-family implementation to match both behavioral targets without adding trainable parameters. Across GDN, KDA, GDN2, Mamba-2, and RWKV-7, DAMI improves average RULER-style retrieval accuracy by 5.29–16.71 percentage points over the corresponding random-initialization baselines. Performance on language modeling, commonsense reasoning, and 2K real-world retrieval remains broadly comparable to those baselines.
1 Introduction
Long-context retrieval requires retaining distant information despite intervening distractors. Linear attention and gated recurrences replace softmax attention's quadratic computation and growing cache with fixed-size states (Vaswani et al., 2017; Katharopoulos et al., 2020). Retrieval remains challenging even as recurrent architectures advance (Arora et al., 2024a,b; Yang et al., 2025;

Figure 1: Dual-axis memory initialization. (a) Diverse head-wise timescales broaden memory coverage across evidence-query distances; curves illustrate normalized exponential decay. (b) Schematic uniform-high and uniform-low Random regimes illustrate recent-pair bias and mixed memories, contrasted with DAMI's low-high-low sensitivity profile. Text excerpts are from RULER; placements and outcomes are schematic.
Kimi Team, 2025; Hatamizadeh et al., 2026). We investigate decay-gate initialization as a means of improving memory without changing state-update operators.
In controlled Gated DeltaNet (GDN) runs, the learnable memory parameters A_log and dt_bias remain highly correlated with their initial values (Section 3.2), motivating structured initialization. PoST improves long-range memory through geometric decay spectra and position-adaptive scaling (Cao, 2026). Realized decay, however, depends jointly on the decay multiplier A_log, the Softplus
Our code is available at https://speedai.com/research/dami.
operating region shifted by dt_bias, and input activations. Achieving intended memory behavior therefore requires coordinating both parameters.
We propose Dual-Axis Memory Initialization (DAMI): geometric target timescales across heads and a low-high-low input-sensitivity profile across layers. Approximate power-law dependencies in text and their exponential-mixture representation motivate multiscale coverage (Altmann et al., 2012; Lin and Tegmark, 2017; Beylkin and Monzón, 2010), while different representation stages motivate depth-dependent responses. Figure 1 illustrates these complementary requirements. DAMI jointly calibrates both targets from actual activations before training. Its GDN-family implementation adjusts native memory parameters; Mamba-2 and RWKV-7 use architecture-specific extensions (Section 3.5).
Across approximately 100M-parameter GDN, KDA, GDN2, Mamba-2, and RWKV-7 models trained on 5B tokens, DAMI improves average RULER-style NIAH accuracy (Hsieh et al., 2024) by 5.29–16.71 percentage points over Random and outperforms PoST-style spectral initialization. Language modeling, commonsense reasoning, and real-world retrieval remain broadly comparable.
Our main contributions are:
-
We identify persistent correlations between initial and trained GDN memory parameters, motivating structured initialization.
-
We introduce DAMI, jointly configuring head-wise timescales and layer-wise sensitivities, with extensions to Mamba-2 and RWKV-7.
-
Five-architecture experiments demonstrate improved retrieval with broadly comparable general capabilities; GDN ablations establish the benefit of the joint configuration.
et al., 2024). DeciMamba and LongMamba extend receptive fields through post-training filtering (Ben-Kish et al., 2024; Ye et al., 2025). DAMI operates at initialization, leaving the recurrence and inference procedure unchanged.
Decay Spectra and Power-Law Dependencies. Multiscale memory has also been explored in dynamic graphs, where hierarchical memories combine continuous-time updates with multiple discrete-time granularities to capture temporal dynamics (Zhang et al., 2022). HiPPO, S4, and S4D connect long-range memory to structured dynamics and spectra (Gu et al., 2020, 2022a,b). Approximate power-law dependencies in text (Altmann et al., 2012; Lin and Tegmark, 2017) motivate exponential mixtures with controlled approximation error (Beylkin and Monzón, 2005, 2010). PoST applies geometric spectra and position-adaptive scaling to linear recurrences (Cao, 2026). Building on this multiscale motivation, DAMI jointly realizes target timescales and input responses in GDN gates.
Memory Initialization. Chrono initialization uses anticipated temporal ranges, while LRU combines stable parameterization, eigenvalue initialization, and normalization (Tallec and Ollivier, 2018; Orvieto et al., 2023). LSUV calibrates activation variance sequentially using real samples (Mishkin and Matas, 2016). DAMI uses this layer-sequential approach to calibrate head-wise timescales and layer-wise Softplus sensitivities: it jointly determines A_log and dt_bias before training.
3 Method
We formulate head-wise timescales and layer-wise Softplus sensitivities for finite-state recurrences (Katharopoulos et al., 2020; Dao and Gu, 2024), motivated by persistent initialization structure. Figure 2 summarizes their joint calibration in DAMI.
3.1 Preliminary
Let denote the recurrent state at position for head in layer . In Gated DeltaNet (GDN) (Yang et al., 2025), the update can be written as
We omit layer and head indices for brevity. Here are key and value, is a scalar update coefficient, and is the decayed state. The query

Figure 2: Overview of DAMI initialization. (a) Head-wise timescales and layer-wise sensitivities define dual-axis targets. (b) Calibration proceeds layer by layer using projected activations without gradients. (c) Each head's dt_bias is solved before A_log using calibration-set statistics. (d) Schematic parameter layouts illustrate the head and layer axes.
reads . The explicit retention factor is , with
The two parameters to initialize are A_log and dt_bias. Both are independently parameterized per head in GDN: every head in every layer has its own scalar A_log and dt_bias. Together, they determine historical forgetting and the gate's response to projected activations.
KDA (Kimi Team, 2025) and GDN2 (Hatamizadeh et al., 2026) retain one A_log scalar per head but use key-channel dt_bias, rather than GDN's head-level scalar. Writing , GDN uses ; KDA/GDN2 use . Mamba-2 (Dao and Gu, 2024) also uses head-wise Softplus decay, whereas RWKV-7 (Peng et al., 2025) uses a sigmoid decay gate. Table 1 summarizes their distinct operators and the parameterizations evaluated here.
In the GDN family, native initialization samples uniformly and takes its logarithm to obtain A_log, using [0, 16) for GDN and [1, 16) for the default KDA implementation and GDN2. For
dt_bias, values are sampled log-uniformly from and transformed by inverse Softplus. The same sampling rules are used across layers, independently of input statistics.
We focus our analysis, initialization design, and ablations on GDN, and further evaluate DAMI's cross-architecture applicability on KDA, GDN2, Mamba-2, and RWKV-7. The latter two adaptations are described in Section 3.5.
3.2 Persistence of Initialization Structure
Following long-range initialization studies (Gu et al., 2022b; Orvieto et al., 2023), we compare initial and trained GDN memory parameters from our main runs. Pearson correlations for A_log and dt_bias are 0.926/0.939 for RANDOM, 0.989/0.949 for POST, and 0.985/0.871 for DAMI (Figure 3). These high correlations indicate that trained memory parameters retain statistical structure associated with initialization.
Our GDN retrieval comparisons fix model size, data, optimizer, and training budget; DAMI copies the corresponding RANDOM model's non-memory parameters. The joint dependence of decay on A_log, dt_bias, and activations (Equation (2))
See the official GDN implementation, default FLA implementation of KDA, and official GDN2 implementation.
| Model | Gate | A_log | dt_bias | Decayed state | State update |
|---|---|---|---|---|---|
| GDN | Head-level | Head-level | |||
| KDA | Head-level | Key-channel | |||
| GDN2 | Head-level | Key-channel | |||
| Mamba-2 | Head-level | Head-level | |||
| RWKV-7 | Head-level (frozen) | Key-channel |
Table 1: Gate parameterizations and state updates. , is sigmoid, and denotes element-wise multiplication. is scalar; are independent channel-wise coefficients. For Mamba-2, , with input vectors . For RWKV-7, , with normalized key and channel-wise coefficient .

Figure 3: Initial-trained Pearson correlations of GDN memory parameters.
motivates coupled behavioral targets.
3.3 Head-wise Timescale Allocation
GDN applies at each step. Taking the initial memory position as local time zero, let count subsequent tokens. The proportion retained along the explicit decay path is
During inference, is fixed, while each new token adds a Softplus term to . The multiplier and the input response therefore jointly control this envelope, which tracks multiplicative decay with interference from subsequent inputs set aside.
The retention factor quantifies the fraction of the initial contribution remaining after tokens. We define the -folding time as the token interval required for this proportion to reach . When one-step decay is approximately constant, cumulative retention has the standard exponential form
Larger implies slower decay; at , the envelope is approximately .
Natural-language dependencies span multiple distances: Altmann et al. (2012) connect long-range correlations to hierarchical structure, and Lin and Tegmark (2017) observe approximate power-law decay of character mutual information in English and French, motivating multiscale memory coverage.
Under approximately constant one-step decay, a head supplies a single exponential timescale. Cross-scale coverage instead motivates a mixture, using the Laplace representation and finite-range approximation (Beylkin and Monzón, 2005, 2010):
Here is an exponential component's decay rate and its weight. GDN's multihead output provides a structural counterpart to this mixture.
Each layer concatenates head outputs and applies an output projection (Vaswani et al., 2017). Let denote the vector from head , including preceding normalization or gating. Then
Partitioning by head gives
Equation (6) combines head components through projection blocks, resembling Equation (5). Separating content-dependent factors in an envelope approximation gives effective coefficients and temporal structure
The effective coefficients summarize content-dependent head contributions and their linear combination by the output projection at the envelope level.
Theorem 4.7 of PoST (Cao, 2026) supports geometric spacing through an exponential error rate for finite-range power-law approximation (Appendix A). We therefore use
Equation (3) links these target timescales to A_log through activations and dt_bias.
The input-response target is defined below, and both parameters are jointly calibrated in Section 3.5.
3.4 Layer-wise Input Sensitivity
Timescales describe decay speed, but dt_bias also changes the Softplus factor's response to activations. Its mean local sensitivity is defined as
Since Softplus has derivative , lower means a weaker response of this factor.
Figure 4 shows how bias moves the operating point along Softplus: its slope approaches zero in the negative regime and one in the positive regime, changing the factor's response to a fixed activation.

Figure 4: Effect of dt_bias on local Softplus sensitivity. Dashed and dotted curves show the asymptotic approximations; and .
Native GDN applies the same sampling rule across layers. Yet each layer's activation distribution is shaped by preceding projections, convolutions, and recurrent updates. Together with dt_bias, these distributions determine sensitivity in Equation (9), motivating depth-dependent response targets.
We adopt a low-high-low profile to balance token-level stability, content-dependent adaptation, and long-term retention: early layers receive low sensitivity, middle layers high sensitivity, and late layers low sensitivity. Section 4.3 evaluates this allocation.
We assign a target sensitivity to each layer, complementing the head-wise timescale spectrum in Section 3.3.
3.5 Joint Data-dependent Initialization
As illustrated in Figure 2(b)–(c), layers share head-wise timescales , while heads within each layer share a sensitivity target . Following the layer-sequential, data-driven approach of LSUV (Layer-Sequential Unit-Variance), introduced in All you need is a good init (Mishkin and Matas, 2016), DAMI calibrates sensitivity and timescale from shallow to deep layers.
For each layer, we collect projected activations without gradients and first solve by bisection
We then match the target timescale using the mean Softplus factor:
Here softplus and denotes the sample mean. Equation (11) compensates for the bias's effect on mean decay, coordinating the two targets; Appendix B gives the derivation. The calibrated output feeds the next layer. The output projection retains its native initialization and learns to combine heads during training.
Architecture-specific extensions. KDA/GDN2 retain channel-wise dt_bias, matching within-head means with small centered perturbations. Mamba-2 retains geometric head-wise spectra and scales static Softplus biases along depth to transfer the low-high-low profile. RWKV-7 instead schedules the static biases' mean sigmoid response and matches head-wise timescales; all three conditions use the same 160 frozen head-layer scales without adding trainable parameters. All adaptations preserve their state-update operators. Appendices C and D give details.
| Model | Single-Key NIAH-1 | Single-Key NIAH-2 | Multi-Key MK-NIAH | Avg. | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1K | 2K | 4K | 8K | 1K | 2K | 4K | 8K | 1K | 2K | 4K | ||
| GDN | 92.6 | 62.0 | 32.4 | 13.2 | 19.8 | 41.6 | 13.8 | 1.6 | 24.4 | 20.8 | 12.4 | 30.42 |
| +PoST | 93.2 | 64.8 | 35.6 | 14.6 | 47.6 | 47.6 | 2.4 | 9.4 | 23.6 | 21.4 | 8.2 | 33.49 |
| +DAMI | 95.4 | 84.0 | 53.8 | 24.2 | 89.6 | 55.6 | 13.0 | 12.8 | 25.0 | 22.0 | 12.6 | 44.36 |
| KDA | 63.8 | 29.4 | 16.8 | 5.6 | 88.8 | 25.6 | 1.2 | 3.8 | 23.0 | 18.2 | 14.0 | 26.38 |
| +PoST | 93.6 | 72.0 | 34.2 | 9.6 | 79.8 | 16.8 | 9.6 | 5.4 | 18.2 | 17.2 | 14.0 | 33.67 |
| +DAMI | 90.2 | 80.6 | 56.8 | 25.4 | 79.4 | 51.0 | 26.2 | 7.6 | 21.8 | 19.4 | 15.6 | 43.09 |
| GDN2 | 88.2 | 51.8 | 16.8 | 2.4 | 80.2 | 26.6 | 11.2 | 0.6 | 22.4 | 18.8 | 14.0 | 30.27 |
| +PoST | 96.0 | 82.0 | 46.2 | 8.8 | 40.6 | 34.2 | 10.0 | 1.2 | 22.2 | 16.8 | 10.2 | 33.47 |
| +DAMI | 98.0 | 84.8 | 45.0 | 12.6 | 70.2 | 71.6 | 29.0 | 6.4 | 23.8 | 21.6 | 17.8 | 43.71 |
| Mamba-2 | 22.8 | 5.4 | 1.6 | 1.0 | 37.0 | 14.8 | 8.6 | 0.6 | 5.8 | 6.8 | 5.0 | 9.95 |
| +PoST | 24.2 | 8.4 | 2.8 | 1.8 | 64.8 | 27.6 | 6.2 | 0.8 | 4.6 | 6.6 | 3.2 | 13.73 |
| +DAMI | 81.6 | 30.2 | 13.4 | 5.0 | 69.6 | 26.8 | 17.4 | 3.6 | 5.8 | 8.0 | 7.2 | 24.42 |
| RWKV-7 | 27.0 | 20.4 | 12.0 | 4.0 | 81.8 | 62.2 | 14.0 | 5.6 | 14.2 | 11.4 | 10.0 | 23.87 |
| +PoST | 42.4 | 14.4 | 20.6 | 8.4 | 78.4 | 20.6 | 4.6 | 3.4 | 12.0 | 13.4 | 9.4 | 20.69 |
| +DAMI | 99.8 | 46.6 | 4.4 | 0.8 | 72.2 | 37.8 | 11.2 | 3.4 | 19.2 | 15.4 | 10.0 | 29.16 |
Table 2: Answer-containment accuracy (%) on the fixed v1 RULER-style NIAH benchmark. Each task–length setting contains the same 500 pregenerated samples for all models. Bold denotes the best result within each architecture; Avg. is the unweighted mean over the 11 settings.
4 Experiments
We evaluate retrieval and general capabilities, ablate both initialization axes, and examine retrieval across distances.
4.1 Experimental Setup
Models and training. We evaluate GDN (Yang et al., 2025), KDA (Kimi Team, 2025), GDN2 (Hatamizadeh et al., 2026), Mamba-2 (Dao and Gu, 2024), and RWKV-7 (Peng et al., 2025) at approximately 100M parameters, each trained on 5B tokens with a maximum context of 4,096 tokens. Within each architecture, comparisons share parameterization and training recipe; GDN-family and Mamba-2 variants preserve Random’s non-decay initialization. RWKV-7 uses the common frozen-scale parameterization in Section 3.5; its selected Random/PoST checkpoints use seed 42 and DAMI uses seed 43. Architecture dimensions are in Appendix D.
Initialization schemes. Each architecture compares RANDOM, POST, and DAMI. Random uses the baseline initialization. Our PoST condition applies PoST-style spectral initialization (Cao, 2026), retaining Random’s dt_bias and excluding position-adaptive scaling. Its spectrum spans 0–8.318 for GDN-family models and Mamba-2; RWKV-7 solves frozen scales for geometric timescales. DAMI allocates geometric head-wise timescales from 1 to 4,096 tokens and a low-high-low layer profile (approximately 0.25–0.75–0.25 sensitivity for the GDN family). Section 3.5 and Appendix D detail the adaptations and configurations.
Evaluation protocol. Primary retrieval uses a fixed RULER-style NIAH subset (Hsieh et al., 2024): NIAH-1/2 at 1K, 2K, 4K, and 8K; MK-NIAH at 1K, 2K, and 4K. All models share 500 pregenerated samples per setting and fixed decoding settings. We report answer-containment accuracy and its unweighted mean over the 11 settings. General-capability evaluations use WikiText (Merty et al., 2017), WinoGrande (Sakaguchi et al., 2020), ARC-Easy/Challenge (Clark et al., 2018), OpenBookQA (Mihaylov et al., 2018), and Social IQa (Sap et al., 2019). Six real-world retrieval tasks at 2K follow BASED/GDN (Arora et al., 2024b; Yang et al., 2025). All evaluations use the same 15 trained checkpoints across five architectures.
4.2 Main Results
Table 2 reports retrieval performance under matched training budgets. DAMI improves average accuracy over RANDOM by 13.95, 16.71, 13.44, 14.47, and 5.29 percentage points for GDN, KDA, GDN2, Mamba-2, and RWKV-7, respectively. The gains over the corresponding PoST-style spectral controls are 10.87, 9.42, 10.24, 10.69, and 8.47 points. DAMI achieves the best average within all five architectures and the best result in 42 of 55 task–length comparisons, including ties.
| Model | WikiText ppl↓ | WinoG. acc↑ | ARC-E acc↑ | ARC-C acc↑ | OBQA acc↑ | SIQA acc↑ |
|---|---|---|---|---|---|---|
| GDN | 44.44 | 48.93 | 43.81 | 25.00 | 31.60 | 36.64 |
| +PoST | 44.83 | 48.78 | 43.90 | 24.74 | 30.20 | 37.15 |
| +DAMI | 45.27 | 52.09 | 44.07 | 23.72 | 31.80 | 37.00 |
| KDA | 42.04 | 51.30 | 44.11 | 24.32 | 30.60 | 37.56 |
| +PoST | 42.42 | 51.22 | 43.52 | 24.06 | 31.40 | 37.10 |
| +DAMI | 41.98 | 50.20 | 43.27 | 24.32 | 30.60 | 37.77 |
| GDN2 | 41.13 | 50.75 | 44.44 | 23.72 | 31.20 | 37.62 |
| +PoST | 41.64 | 49.96 | 44.40 | 24.06 | 31.40 | 37.82 |
| +DAMI | 40.68 | 51.07 | 45.16 | 24.49 | 29.80 | 38.28 |
| Mamba-2 | 49.47 | 49.64 | 45.54 | 23.38 | 31.20 | 37.05 |
| +PoST | 49.25 | 50.36 | 42.68 | 24.40 | 30.60 | 36.54 |
| +DAMI | 49.71 | 51.46 | 43.60 | 23.89 | 31.60 | 37.41 |
| RWKV-7 | 43.34 | 50.12 | 44.07 | 23.89 | 29.60 | 36.69 |
| +PoST | 43.74 | 50.51 | 44.23 | 24.06 | 31.00 | 36.39 |
| +DAMI | 44.84 | 50.91 | 43.90 | 24.57 | 29.80 | 37.15 |
Table 3: Language modeling and commonsense results. WikiText reports perplexity (lower is better); other tasks report accuracy (%), higher is better). Bold denotes the best result within each architecture. WinoG., ARC-E, ARC-C, OBQA, and SIQA denote WinoGrande, ARC-Easy, ARC-Challenge, OpenBookQA, and Social IQa, respectively.
At 8K, twice the training context, DAMI improves NIAH-1 for GDN, KDA, GDN2, and Mamba-2. RWKV-7 gains concentrate on NIAH-1 and MK-NIAH at 1K/2K.
General capabilities and real-world retrieval. Language modeling and commonsense performance remain broadly comparable (Table 3); DAMI leads 17 of 30 comparisons, including ties. For Mamba-2/RWKV-7, WinoGrande improves by 1.82/0.79 points over Random, and Social IQa scores are best within each architecture.
The six 2K real-world retrieval tasks also remain broadly comparable (Table 4). Mamba-2 with DAMI leads SQuAD, FDA, and DROP, raising its average from 3.89 to 4.28; RWKV-7 averages span 5.67–6.42 across schemes.
4.3 Ablation Studies
Need for Joint Initialization. Table 5 compares GDN Random/DAMI with variants restoring one parameter to Random while retaining the other's DAMI value; references reuse the main table. Throughout the ablations, NIAH averages lengths within each family, Overall averages 11 settings, and bold marks column maxima.
Full DAMI achieves an Overall accuracy of 44.36, compared with 30.42 for Random and 22.80/26.33 for randomizing A_log/dt_bias alone.
| Model | SWDE | SQuAD | FDA | TQA | NQ | DROP | Avg. |
|---|---|---|---|---|---|---|---|
| GDN | 9.18 | 18.53 | 2.00 | 0.17 | 0.14 | 2.16 | 5.36 |
| +PoST | 6.48 | 18.10 | 1.54 | 0.23 | 0.11 | 2.49 | 4.83 |
| +DAMI | 7.47 | 19.81 | 1.09 | 0.24 | 0.14 | 2.25 | 5.16 |
| KDA | 9.81 | 21.31 | 1.18 | 0.31 | 0.11 | 2.33 | 5.84 |
| +PoST | 8.91 | 19.44 | 2.18 | 0.26 | 0.08 | 2.30 | 5.53 |
| +DAMI | 8.46 | 20.27 | 1.27 | 0.07 | 0.03 | 2.35 | 5.41 |
| GDN2 | 10.35 | 21.75 | 1.91 | 0.33 | 0.42 | 2.10 | 6.14 |
| +PoST | 7.74 | 21.51 | 2.00 | 0.09 | 0.08 | 2.38 | 5.64 |
| +DAMI | 9.99 | 23.49 | 1.81 | 0.34 | 0.14 | 2.28 | 6.34 |
| Mamba-2 | 5.76 | 14.18 | 0.64 | 0.47 | 0.14 | 2.13 | 3.89 |
| +PoST | 5.22 | 14.41 | 0.27 | 0.37 | 0.36 | 2.23 | 3.81 |
| +DAMI | 5.22 | 16.96 | 0.91 | 0.11 | 0.22 | 2.28 | 4.28 |
| RWKV-7 | 9.36 | 23.56 | 2.81 | 0.21 | 0.08 | 2.50 | 6.42 |
| +PoST | 8.91 | 22.08 | 2.99 | 0.18 | 0.03 | 2.72 | 6.15 |
| +DAMI | 8.37 | 20.78 | 2.45 | 0.06 | 0.03 | 2.34 | 5.67 |
Table 4: Real-world retrieval at 2K tokens (%). TQA denotes TriviaQA; Avg. is the unweighted mean over six tasks. Bold denotes the best result within each architecture.
| Variant | NIAH-1 Avg.↑ | NIAH-2 Avg.↑ | MK-NIAH Avg.↑ | Overall Avg.↑ |
|---|---|---|---|---|
| Random | 50.05 | 19.20 | 19.20 | 30.42 |
| Random A_log | 49.15 | 2.40 | 14.87 | 22.80 |
| Random dt_bias | 42.55 | 16.90 | 17.27 | 26.33 |
| DAMI | 64.35 | 42.75 | 19.87 | 44.36 |
Table 5: GDN single-parameter replacement ablations (%). The named parameter is restored to Random; the other retains its DAMI value.
Randomizing A_log yields NIAH-2 accuracy of 2.40. The advantage of the joint configuration is consistent with the coupling in Equation (2).
Discussion on Time Scales. We evaluate the effects of timescale coverage and spacing. Restricting to 1–2048 or 1–1024 reduces Overall accuracy to 29.07 or 23.13 (Table 6). Linear spacing yields NIAH-1 accuracy close to DAMI (62.40 versus 64.35), but NIAH-2 accuracy is 5.65. These comparisons support the selected coverage and allocation.
| Variant | NIAH-1 Avg.↑ | NIAH-2 Avg.↑ | MK-NIAH Avg.↑ | Overall Avg.↑ |
|---|---|---|---|---|
| : 1–2048 | 47.95 | 17.30 | 19.60 | 29.07 |
| : 1–1024 | 22.05 | 25.50 | 21.40 | 23.13 |
| Linear spacing | 62.40 | 5.65 | 15.47 | 28.96 |
| DAMI | 64.35 | 42.75 | 19.87 | 44.36 |
Table 6: Effects of timescale coverage and spacing on GDN retrieval (%).
Discussion on Sensitivity. We compare increasing (L-H), decreasing (H-L), low-high-low (DAMI), and high-low-high (H-L-H) sensitivity profiles (Figure 5).

Figure 5: Normalized target sensitivity profiles across layers. The horizontal axis is normalized depth ; the vertical axis is . Curves indicate initialization targets.
DAMI leads all three NIAH families, reaching 44.36 Overall versus 26.85–32.85 (Table 7), supporting the representation-motivated allocation in Section 3.4.
| Shape | NIAH-1 Avg.↑ | NIAH-2 Avg.↑ | MK-NIAH Avg.↑ | Overall Avg.↑ |
|---|---|---|---|---|
| L-H | 54.70 | 19.55 | 19.40 | 32.29 |
| H-L | 50.55 | 9.15 | 18.87 | 26.85 |
| L-H-L (DAMI) | 64.35 | 42.75 | 19.87 | 44.36 |
| H-L-H | 60.05 | 16.60 | 18.27 | 32.85 |
Table 7: GDN retrieval with four layer-wise sensitivity profiles (%).
Shifting sensitivity by ±0.2 or moving its peak to layer 4/13 yields 24.31–33.31 Overall (Table 8). DAMI leads Overall, while Peak L4 leads MK-NIAH, showing the effect of profile level and peak location.
| Variant | NIAH-1 Avg.↑ | NIAH-2 Avg.↑ | MK-NIAH Avg.↑ | Overall Avg.↑ |
|---|---|---|---|---|
| Shift +0.2 | 45.25 | 6.10 | 20.67 | 24.31 |
| Shift -0.2 | 57.40 | 14.75 | 23.13 | 32.55 |
| Peak L4 | 51.25 | 22.25 | 24.13 | 33.31 |
| Peak L13 | 52.60 | 20.80 | 18.60 | 31.76 |
| DAMI | 64.35 | 42.75 | 19.87 | 44.36 |
Table 8: GDN sensitivity-level and peak-location perturbations (%). Shift denotes profile translation; Peak denotes the peak layer.

Figure 6: GDN retrieval accuracy by relative distance at four context lengths. Points show task-averaged accuracy in 16 shared bins.
4.4 Case Study
Retrieval by Distance. Figure 6 compares task-averaged GDN accuracy across relative retrieval distances at four context lengths, retaining all 500 samples per task–length setting. We normalize each target–query token gap by the token span from the background’s start to the query. DAMI maintains higher mean accuracy in distant bins at 1K, 2K, and 4K. Appendix D details binning and task averaging.
5 Conclusion
This work presents DAMI, a dual-axis memory initialization framework motivated by persistent correlations between initial and trained memory parameters in controlled GDN experiments. DAMI coordinates head-wise timescales and layer-wise input responses through joint calibration for GDN, KDA, and GDN2, with architecture-specific extensions to Mamba-2 and RWKV-7. Experiments across these five recurrent architectures show improved long-context retrieval with broadly comparable language modeling, commonsense reasoning, and real-world retrieval performance. GDN ablations demonstrate the benefit of jointly configuring the two memory parameters. These findings support treating initialization as a coordinated design choice for memory behavior, informed by the model’s actual input activations.
Limitations
This work focuses on decay-side initialization, coordinating memory timescales and input sensitivities within existing recurrent architectures. Our analysis and experiments characterize this design under each architecture's native write parameterization and state-update rules. The write side governs how incoming content is incorporated into the recurrent state, offering a complementary perspective on memory formation and its interaction with decay. Future work could jointly study decay-side and write-side initialization to clarify how their coordination balances the incorporation of new information with the retention of useful history.
References
Eduardo G. Altmann, Giampaolo Cristadoro, and Mirko Degli Esposti. 2012. On the origin of long-range correlations in texts. Proceedings of the National Academy of Sciences, 109(29):11582–11587.
Simran Arora, Sabri Eyuboglu, Aman Timalsina, Isys Johnson, Michael Poli, James Zou, Atri Rudra, and Christopher Ré. 2024a. Zoology: Measuring and improving recall in efficient language models. In International Conference on Learning Representations.
Simran Arora, Sabri Eyuboglu, Michael Zhang, Aman Timalsina, Silas Alberti, James Zou, Atri Rudra, and Christopher Re. 2024b. Simple linear attention language models balance the recall-throughput tradeoff. In Proceedings of the 41st International Conference on Machine Learning, volume 235, pages 1763–1840. PMLR.
Assaf Ben-Kish, Itamar Zimerman, Shady Abu-Hussein, Nadav Cohen, Amir Globerson, Lior Wolf, and Raja Giryes. 2024. DeciMamba: Exploring the length extrapolation potential of mamba. Preprint, arXiv:2406.14528.
Gregory Beylkin and Lucas Monzón. 2005. On approximation of functions by exponential sums. Applied and Computational Harmonic Analysis, 19(1):17–48.
Gregory Beylkin and Lucas Monzón. 2010. Approximation by exponential sums revisited. Applied and Computational Harmonic Analysis, 28(2):131–149.
Yang Cao. 2026. Optimal decay spectra for linear recurrences. Preprint, arXiv:2604.07658.
Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. 2018. Think you have solved question answering? try ARC, the AI2 reasoning challenge. Preprint, arXiv:1803.05457.
Tri Dao and Albert Gu. 2024. Transformers are SSMs: Generalized models and efficient algorithms through structured state space duality. In Proceedings of the 41st International Conference on Machine Learning, volume 235, pages 10041–10071. PMLR.
Albert Gu and Tri Dao. 2024. Mamba: Linear-time sequence modeling with selective state spaces. In First Conference on Language Modeling.
Albert Gu, Tri Dao, Stefano Ermon, Atri Rudra, and Christopher Ré. 2020. HiPPO: Recurrent memory with optimal polynomial projections. In Advances in Neural Information Processing Systems, volume 33, pages 1474–1487.
Albert Gu, Karan Goel, and Christopher Ré. 2022a. Efficiently modeling long sequences with structured state spaces. In International Conference on Learning Representations.
Albert Gu, Ankit Gupta, Karan Goel, and Christopher Ré. 2022b. On the parameterization and initialization of diagonal state space models. In Advances in Neural Information Processing Systems.
Ali Hatamizadeh, Yejin Choi, and Jan Kautz. 2026. Gated DeltaNet-2: Decoupling erase and write in linear attention. Preprint, arXiv:2605.22791.
Cheng-Ping Hsieh, Simeng Sun, Samuel Kriman, Shantanu Acharya, Dima Rekesh, Fei Jia, Yang Zhang, and Boris Ginsburg. 2024. RULER: What's the real context size of your long-context language models? Preprint, arXiv:2404.06654.
Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. 2020. Transformers are RNNs: Fast autoregressive transformers with linear attention. In Proceedings of the 37th International Conference on Machine Learning, volume 119, pages 5156–5165. PMLR.
Kimi Team. 2025. Kimi linear: An expressive, efficient attention architecture. Preprint, arXiv:2510.26692.
Henry W. Lin and Max Tegmark. 2017. Critical behavior in physics and probabilistic formal languages. Entropy, 19(7):299.
Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2017. Pointer sentinel mixture models. In International Conference on Learning Representations.
Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. 2018. 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, pages 2381–2391. Association for Computational Linguistics.
Dmytro Mishkin and Jiri Matas. 2016. All you need is a good init. In International Conference on Learning Representations.
Antonio Orvieto, Samuel L. Smith, Albert Gu, Anushan Fernando, Caglar Gulcehre, Razvan Pascanu, and Soham De. 2023. Resurrecting recurrent neural networks for long sequences. In Proceedings of the 40th International Conference on Machine Learning, volume 202. PMLR.
Bo Peng, Ruichong Zhang, Daniel Goldstein, Eric Alcaide, Xingjian Du, Haowen Hou, Jiaju Lin, Jiaxing Liu, Janna Lu, William Merrill, Guangyu Song, Kaifeng Tan, Saiteja Utpala, Nathan Wilce, Johan S. Wind, Tianyi Wu, Daniel Wuttke, and Christian Zhou-Zheng. 2025. RWKV-7 “goose” with expressive dynamic state evolution. Preprint, arXiv:2503.14456.
Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. 2020. WinoGrande: An adversarial winograd schema challenge at scale. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 8732–8740.
Maarten Sap, Hannah Rashkin, Derek Chen, Ronan Le Bras, and Yejin Choi. 2019. Social IQa: Commonsense reasoning about social interactions. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, pages 4463–4473. Association for Computational Linguistics.
Coretin Tallec and Yann Ollivier. 2018. Can recurrent neural networks warp time? In International Conference on Learning Representations.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30.
Songlin Yang, Jan Kautz, and Ali Hatamizadeh. 2025. Gated delta networks: Improving Mamba2 with delta rule. In International Conference on Learning Representations.
Songlin Yang, Bailin Wang, Yikang Shen, Rameswar Panda, and Yoon Kim. 2024a. Gated linear attention transformers with hardware-efficient training. In Proceedings of the 41st International Conference on Machine Learning, volume 235, pages 56501–56523. PMLR.
Songlin Yang, Bailin Wang, Yu Zhang, Yikang Shen, and Yoon Kim. 2024b. Parallelizing linear transformers with the delta rule over sequence length. In Advances in Neural Information Processing Systems.
Zhifan Ye, Kejing Xia, Yonggan Fu, Xin Dong, Jihoon Hong, Xiangchi Yuan, Shizhe Diao, Jan Kautz, Pavlo Molchanov, and Yingyan Celine Lin. 2025. Long-Mamba: Enhancing mamba's long context capabilities via training-free receptive field enlargement. In International Conference on Learning Representations.
Ruixing Zhang, Liangzhe Han, Boyi Liu, Jiayuan Zeng, and Leilei Sun. 2022. Dynamic graph learning based on hierarchical memory for origin-destination demand prediction. In Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence, pages 2383–2389. International Joint Conferences on Artificial Intelligence Organization.
Appendix
A Approximation Basis for Geometric Spectra
For spectral coverage, Theorem 4.7 of PoST (Cao, 2026) considers approximating on with exponentials, for and . Let be the set of such scalar exponential sums. The paper gives a minimax exponential error rate attainable with geometric spacing:
Here are independent of . The proof connects the problem to rational approximation through a Laplace transform; asymptotically uniform nodes in the log domain yield .
B Joint Calibration Derivation
Monotonicity in the bias permits bisection in Equation (10). Approximating the accumulation in Equation (3) by times the calibration-set mean Softplus factor and matching Equation (4) gives
Since dt_bias changes this mean, A_log must adjust jointly. Substituting the sample mean and yields Equation (11).
C Architecture-specific Adaptation Details
For Mamba-2, we retain a geometrically spaced head-wise decay spectrum and transfer the low-high-low layer profile by setting . The multipliers are resampled to 42 layers and normalized to unit geometric mean. This static adaptation preserves all other initial tensors.
For RWKV-7's sigmoid gate, we denote the native channel bias by dt_bias and the log decay scale by A_log (w_lora.lora.2.bias and decay_log_scale in code). All three conditions use 160 frozen head-layer scale values, extending the native constant log scale of -0.5 without adding trainable parameters. DAMI arranges the mean channel-wise sigmoid response of the static biases in a low-high-low profile and solves the scale to match the head-wise timescales. This target concerns the sigmoid gate response; the Softplus derivative target in Equation (9) applies to the GDN family. Both extensions preserve their respective state-update operators.
D Detailed Experimental Configurations
Model dimensions. All models use hidden size 512 and head dimension 64. GDN, KDA, and GDN2 have 18 layers and six heads, with 103.79M, 101.69M, and 112.25M parameters, respectively; each uses value expansion 2 and width-4 short convolutions. Mamba-2 has 42 layers, 16 heads, and 105.01M parameters, with expansion 2, state size 128, and width-4 convolution. RWKV-7 has 20 layers, eight heads, and 101.43M parameters. Each model is trained on 5B tokens with a maximum context of 4,096 tokens. The selected RWKV-7 Random/PoST checkpoints use seed 42, and DAMI uses 43.
Initialization settings. The PoST condition uses a six-head spectrum spanning 0–8.318 for the GDN family and a 16-head spectrum over the same range for Mamba-2. RWKV-7 retains Random's channel bias and solves frozen scales for eight geometric timescales. This condition uses spectral initialization only, with no position-adaptive scaling. GDN-family DAMI targets are {4096, 776.05, 147.03, 27.86, 5.28, 1} tokens. Its 18-layer sensitivity profile has endpoints 0.25 and a central peak of 0.748. KDA/GDN2 use centered channel perturbations with standard deviation 0.03, aligning within-head means with the GDN target. Mamba-2 resamples the layer multipliers to 42 layers and normalizes their geometric mean to one, as in Appendix C. RWKV-7 uses a 0.25–0.75–0.25 mean sigmoid-response profile and an eight-head geometric timescale ladder from 4,096 to 1.
Distance-based retrieval analysis. Figure 6 uses all 500 samples per task-length setting. Each bin averages task-specific accuracies with equal weights: NIAH-1, NIAH-2, and MK-NIAH for 1K–4K; NIAH-1 and NIAH-2 for 8K. The 16 shared bins start at equal widths; one boundary is minimally adjusted using sample positions alone to ensure each task contributes to every bin. Points use bin centers.