Conceptio › Archive › arXiv CS
arXiv CS open access

DAMI: Dual-Axis Memory Initialization for Enhanced Long-Context Retrieval in Gated Linear Attention

Zhangchi Feng et al. · arxiv_cs
arXiv CS · Papers
Open Source ↗Direct PDF ↓
artificial-intelligenceknowledge-representationreasoning
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 DeltaN
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

DAMI: Dual-Axis Memory Initialization for Enhanced Long-Context Retrieval in Gated Linear Attention

arXiv:2610.41994v1 [cs.AI] 30 Oct 2026

Zhangchi Feng1,2 Harry Jiang2 Yangyifei Luo1 Ray Zhang2 Richong Zhang2,* 1 SpeedAI 2 CCSE, School of Computer Science and Engineering, Beihang University muller@feichixingchen.com 2409281700@qq.com yifei@feichixingchen.com 2227613285@qq.com * Corresponding author: zhangrc@act.buaa.edu.cn

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

1

(a) Memory timescales

(b) Input sensitivity

Evidence: cagey-endive: 6795569 Query: What is the number for cagey-endive?

symptomatic-mayonnaise: 5775782 faulty-e-reader: 7541683

devilish-blister: 8819396

Near

⋯

⋯

⋯

Mid

⋯

⋯

E⋯

Q

Far

⋯E

⋯

⋯

Q

E

Retention Dₕ(s) = exp(−s/τₕ)

Q

Query: number for faulty-e-reader? Shallow → Middle → Deep

Random: uniformly high H H H

Random: similar timescales

8819396 ×

Recent-pair bias

1

L

0

Random: uniformly low L L

5771696 ×

Evidence–query distance →

Mixed memories

DAMI: diverse timescales 1

L

DAMI: low–high–low H L

7541683 ✓

0

Evidence–query distance →

Correct association

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.

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;

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

1

Our code is available at https://speedai.com/ research/dami.

1

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 realworld retrieval remain broadly comparable. Our main contributions are:

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.

• We identify persistent correlations between initial and trained GDN memory parameters, motivating structured initialization. • We introduce DAMI, jointly configuring headwise timescales and layer-wise sensitivities, with extensions to Mamba-2 and RWKV-7.

3

• Five-architecture experiments demonstrate improved retrieval with broadly comparable general capabilities; GDN ablations establish the benefit of the joint configuration.

2

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.

Related Work

3.1

Gated Recurrences and Long-Context Retrieval. Linear attention compresses history into a fixedsize state (Katharopoulos et al., 2020). GLA, DeltaNet, and the GDN family improve recurrence through gating and the delta rule (Yang et al., 2024a,b, 2025; Kimi Team, 2025; Hatamizadeh et al., 2026); Mamba develops selective state spaces and state space duality (Gu and Dao, 2024; Dao and Gu, 2024). Zoology and RULER distinguish computational efficiency from effective recall through retrieval evaluations (Arora et al., 2024a; Hsieh

Preliminary

Let St,ℓ,h ∈ Rdk ×dv denote the recurrent state at position t for head h in layer ℓ. In Gated DeltaNet (GDN) (Yang et al., 2025), the update can be written as Set−1 = exp(gt )St−1 , (1)  St = Set−1 + βt kt vt⊤ − kt⊤ Set−1 . We omit layer and head indices for brevity. Here kt , vt are key and value, βt is a scalar update coefficient, and Set−1 is the decayed state. The query 2

(b) Layer-sequential calibration

Head-wise timescales

Layer ℓ − 1 Xℓ

Layer ℓ

(calibrated)

(current)

Xℓ+1

Layer ℓ + 1

⋯

(next)

Calibration tokens

τmin 1

2

3

4

Gate projection

5

(per head h)

Head index h (H = 6)

Projected activations Zℓ,h Calibration samples ⋯

Geometric spacing, shared across layers

Layer–head targets

0 1 2 3 4 5 6

0

1 2 3 4 5 Head index h

0

1 2 3 4 5 Head index h

Sensitivity

Low

Early 0

1

(c) Joint calibration

4 5

Late 6

Low

0 1 2 3 4 5

Head index h (H = 6)

Selected (ℓ, h) = (3, 2) τh: head timescale S : layer sensitivity ⋆ ℓ

τh

⋯

1 Sensitivity matching

2 Timescale matching

Solve dt_bias

Solve A_log

𝔼z[σ(z + dt_bias)] = Sℓ⋆ Mean sensitivity

High

3

Per-head in layer ℓ

dt_bias

Projected activations Zℓ,h

Sℓ⋆

2

(τh, Sℓ⋆)

Assign parameters

1

S

calibrated dt_biasℓ,h

Alog,ℓ,h = −log τh −log 𝔼z[φ(z + dt_bias)] φ = Softplus

⋆ ℓ

0

Softplus

dt_bias

Sample mean

dt_bias affects sensitivity and mean decay.

Closed form

Layer depth ℓ

0

Layer depth ℓ

⋯

x₁ x₂ x₃ ⋯ xₜ

log τ

(d) Initialized parameters A_log

Calibration set D

τmax

No gradients

Layer depth ℓ

(a) Dual-axis targets

0 1 2 3 4 5 6

Parameter tensors

Initialized decay gate gt = −exp(Alog) φ(zt + dt_bias)

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 ot = St⊤ qt . The explicit retention factor is exp(gt ), with

dt_bias, values are sampled log-uniformly from [10−3 , 10−1 ] and transformed by inverse Softplus. The same sampling rules are used across layers, independently of input statistics.2 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.

gt,ℓ,h = − exp(Alog,ℓ,h )  · softplus zt,ℓ,h + dt_biasℓ,h ,

(2)

zt,ℓ,h = proj(xt )ℓ,h . 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ℓ,h,k , rather than GDN’s head-level scalar. Write ing St−1 = Dt St−1 , GDN uses Dt = egt I; KDA/GDN2 use Dt = Diag(egt ). 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 exp(Alog ) 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

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 R ANDOM, 0.989/0.949 for P O ST, 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 R ANDOM model’s non-memory parameters. The joint dependence of decay on A_log, dt_bias, and activations (Equation (2)) 2

See the official GDN implementation, default FLA implementation of KDA, and official GDN2 implementation.

3

Gate gt

Model GDN KDA GDN2 Mamba-2 RWKV-7

dt_bias

Decayed state

Head-level Key-channel Key-channel Head-level Key-channel

et−1 = egt St−1 S et−1 = Diag(egt )St−1 S et−1 = Diag(egt )St−1 S et−1 = egt St−1 S et−1 = Diag(egt )St−1 S

A_log

Alog

−e ϕ(zt + dt_bias) −eAlog ϕ(zt,k + dt_biask ) −eAlog ϕ(zt,k + dt_biask ) −eAlog ϕ(zt + dt_bias) −eAlog σ(zt,k + dt_biask )

Head-level Head-level Head-level Head-level Head-level (frozen)

State update et−1 + βt kt (v ⊤ − k⊤ S et−1 ) St = S t t et−1 + βt kt (v ⊤ − k⊤ S et−1 ) St = S t t et−1 + kt [(wt ⊙ vt )⊤ − (bt ⊙ kt )⊤ S et−1 ] St = S et−1 + ∆t Bt x⊤ St = S t et−1 + k̃t v ⊤ − pt (κ̂⊤ St−1 ) St = S t t

Table 1: Gate parameterizations and state updates. ϕ = softplus, σ is sigmoid, and ⊙ denotes element-wise multiplication. βt is scalar; bt , wt are independent channel-wise coefficients. For Mamba-2, ∆t = ϕ(zt + dt_bias), with input vectors Bt , xt . For RWKV-7, pt = at ⊙ κ̂t , with normalized key κ̂t and channel-wise coefficient at .

1.0

A_log

dt_bias

0.939

0.989 0.949

0.926

0.985

Larger τℓ,h implies slower decay; at s = τℓ,h , the envelope is approximately 1/e. Natural-language dependencies span multiple distances: Altmann et al. (2012) connect longrange correlations to hierarchical structure, and Lin and Tegmark (2017) observe approximate powerlaw 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. Crossscale coverage instead motivates a mixture, using the Laplace representation and finite-range approximation (Beylkin and Monzón, 2005, 2010): Z ∞ 1 s−β = λβ−1 exp(−λs) dλ Γ(β) 0

0.871

0.5

0 Random

PoST

DAMI

Figure 3: Initial–trained Pearson correlations of GDN memory parameters.

motivates coupled behavioral targets. 3.3

Head-wise Timescale Allocation

GDN applies exp(gt,ℓ,h ) at each step. Taking the initial memory position as local time zero, let s count subsequent tokens. The proportion Dℓ,h (s) retained along the explicit decay path is Dℓ,h (s) =

s Y

≈

H−1 X

wh exp(−λh s),

s > 0, β > 0.

h=0

(5) Here λh is an exponential component’s decay rate and wh 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 õt,ℓ,h denote the vector from head h, including preceding normalization or gating. Then Partitioning WO,ℓ = [ WO,ℓ,0 · · · WO,ℓ,H−1 ] by head gives

exp(gt,ℓ,h )

t=1

= exp[− exp(Alog,ℓ,h )Lℓ,h (s)] , (3) s X Lℓ,h (s) = softplus(zt,ℓ,h + dt_biasℓ,h ). t=1

During inference, exp(Alog,ℓ,h ) is fixed, while each new token adds a Softplus term to Lℓ,h (s). 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 Dℓ,h (s) quantifies the fraction of the initial contribution remaining after s tokens. We define the e-folding time τℓ,h as the token interval required for this proportion to reach 1/e. When one-step decay is approximately constant, cumulative retention has the standard exponential form Dℓ,h (s) ≈ exp(−s/τℓ,h ). (4)

yt,ℓ = WO,ℓ ConcatH−1 h=0 (õt,ℓ,h ) =

H−1 X

WO,ℓ,h õt,ℓ,h .

(6)

h=0

Equation (6) combines head components through projection blocks, resembling Equation (5). Separating content-dependent factors in an envelope approximation gives effective coefficients cℓ,h and temporal structure Kℓ (s) =

H−1 X h=0

4

cℓ,h exp(−s/τℓ,h ).

(7)

The effective coefficients cℓ,h summarize contentdependent 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   h λmax H−1 λh = λmin , (8) λmin τh = λ−1 h ,

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 Sℓ⋆ to each layer, complementing the head-wise timescale spectrum in Section 3.3.

h = 0, . . . , H − 1,

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

3.5

As illustrated in Figure 2(b)–(c), layers share headwise timescales {τh }H−1 h=0 , while heads within each layer share a sensitivity target Sℓ⋆ . 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 Zℓ,h without gradients and first solve by bisection X 1 (10) σ(z + dt_biasℓ,h ) = Sℓ⋆ . |Zℓ,h |

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 Sℓ,h (dt_bias) := Ez [σ(z + dt_bias)] .

(9)

Since Softplus has derivative σ(z +dt_bias), lower S 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.

6

z∈Zℓ,h

We then match the target timescale using the mean Softplus factor: Alog,ℓ,h = − log τh   − log Ez∼Zℓ,h ϕ(z + dt_biasℓ,h ) . (11) Here ϕ = softplus and Ez∼Zℓ,h 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.

Á(u) = log(1 + e u )

sensitivity e u (negative limit) High 0 u (positive limit)

Á (4) ¼ 0:982

Á(u)

4 Transition region

2 Low sensitivity Á 0 (¡4) ¼ 0:018

Architecture-specific extensions. KDA/GDN2 retain channel-wise dt_bias, matching withinhead 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.

0 −6

−4

−2 0 2 u = z + dt_bias

Joint Data-dependent Initialization

4

6

Figure 4: Effect of dt_bias on local Softplus sensitivity. Dashed and dotted curves show the asymptotic approximations; ϕ′ (−4) ≈ 0.018 and ϕ′ (4) ≈ 0.982.

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 5

Single-Key NIAH-1

Single-Key NIAH-2

Multi-Key MK-NIAH

Model

1K

2K

4K

8K

1K

2K

4K

8K

1K

2K

4K

Avg.

GDN +PoST +DAMI

92.6 93.2 95.4

62.0 64.8 84.0

32.4 35.6 53.8

13.2 14.6 24.2

19.8 47.6 89.6

41.6 47.6 55.6

13.8 2.4 13.0

1.6 9.4 12.8

24.4 23.6 25.0

20.8 21.4 22.0

12.4 8.2 12.6

30.42 33.49 44.36

KDA +PoST +DAMI

63.8 93.6 90.2

29.4 72.0 80.6

16.8 34.2 56.8

5.6 9.6 25.4

88.8 79.8 79.4

25.6 16.8 51.0

1.2 9.6 26.2

3.8 5.4 7.6

23.0 18.2 21.8

18.2 17.2 19.4

14.0 14.0 15.6

26.38 33.67 43.09

GDN2 +PoST +DAMI

88.2 96.0 98.0

51.8 82.0 84.8

16.8 46.2 45.0

2.4 8.8 12.6

80.2 40.6 70.2

26.6 34.2 71.6

11.2 10.0 29.0

0.6 1.2 6.4

22.4 22.2 23.8

18.8 16.8 21.6

14.0 10.2 17.8

30.27 33.47 43.71

Mamba-2 +PoST +DAMI

22.8 24.2 81.6

5.4 8.4 30.2

1.6 2.8 13.4

1.0 1.8 5.0

37.0 64.8 69.6

14.8 27.6 26.8

8.6 6.2 17.4

0.6 0.8 3.6

5.8 4.6 5.8

6.8 6.6 8.0

5.0 3.2 7.2

9.95 13.73 24.42

RWKV-7 +PoST +DAMI

27.0 42.4 99.8

20.4 14.4 46.6

12.0 20.6 4.4

4.0 8.4 0.8

81.8 78.4 72.2

62.2 20.6 37.8

14.0 4.6 11.2

5.6 3.4 3.4

14.2 12.0 19.2

11.4 13.4 15.4

10.0 9.4 10.0

23.87 20.69 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

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.

We evaluate retrieval and general capabilities, ablate both initialization axes, and examine retrieval across distances. 4.1

Evaluation protocol. Primary retrieval uses a fixed RULER-style NIAH subset (Hsieh et al., 2024): NIAH-1/2 at 1K, 2K, 4K, and 8K; MKNIAH 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 (Merity 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.

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 frozenscale parameterization in Section 3.5; its selected Random/PoST checkpoints use seed 42 and DAMI uses seed 43. Architecture dimensions are in Appendix D.

4.2

Initialization schemes. Each architecture compares R ANDOM, P O ST, 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 Mamba2; RWKV-7 solves frozen scales for geometric timescales. DAMI allocates geometric head-wise timescales from 1 to 4,096 tokens and a low–high–

Main Results

Table 2 reports retrieval performance under matched training budgets. DAMI improves average accuracy over R ANDOM 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. 6

Model

WikiText ppl↓

WinoG. acc↑

ARC-E acc↑

ARC-C acc↑

OBQA acc↑

SIQA acc↑

GDN +PoST +DAMI

44.44 44.83 45.27

48.93 48.78 52.09

43.81 43.90 44.07

25.00 24.74 23.72

31.60 30.20 31.80

36.64 37.15 37.00

KDA +PoST +DAMI

42.04 42.42 41.98

51.30 51.22 50.20

44.11 43.52 43.27

24.32 24.06 24.32

30.60 31.40 30.60

37.56 37.10 37.77

GDN2 +PoST +DAMI

41.13 41.64 40.68

50.75 49.96 51.07

44.44 44.40 45.16

23.72 24.06 24.49

31.20 31.40 29.80

37.62 37.82 38.28

Mamba-2 +PoST +DAMI

49.47 49.25 49.71

49.64 50.36 51.46

45.54 42.68 43.60

23.38 24.40 23.89

31.20 30.60 31.60

37.05 36.54 37.41

RWKV-7 +PoST +DAMI

43.34 43.74 44.84

50.12 50.51 50.91

44.07 44.23 43.90

23.89 24.06 24.57

29.60 31.00 29.80

36.69 36.39 37.15

SWDE

SQuAD

FDA

TQA

NQ

DROP

Avg.

GDN +PoST +DAMI

9.18 6.48 7.47

18.53 18.10 19.81

2.00 1.54 1.09

0.17 0.23 0.24

0.14 0.11 0.14

2.16 2.49 2.25

5.36 4.83 5.16

KDA +PoST +DAMI

9.81 8.91 8.46

21.31 19.44 20.27

1.18 2.18 1.27

0.31 0.26 0.07

0.11 0.08 0.03

2.33 2.30 2.35

5.84 5.53 5.41

GDN2 +PoST +DAMI

10.35 7.74 9.99

21.75 21.51 23.49

1.91 2.00 1.81

0.33 0.09 0.34

0.42 0.08 0.14

2.10 2.38 2.28

6.14 5.64 6.34

Mamba-2 +PoST +DAMI

5.76 5.22 5.22

14.18 14.41 16.96

0.64 0.27 0.91

0.47 0.37 0.11

0.14 0.36 0.22

2.13 2.23 2.28

3.89 3.81 4.28

RWKV-7 +PoST +DAMI

9.36 8.91 8.37

23.56 22.08 20.78

2.81 2.99 2.45

0.21 0.18 0.06

0.08 0.03 0.03

2.50 2.72 2.34

6.42 6.15 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.

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, ARCEasy, 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.

Variant

NIAH-1 Avg.↑

NIAH-2 Avg.↑

MK-NIAH Avg.↑

Overall Avg.↑

Random Random A_log Random dt_bias DAMI

50.05 49.15 42.55 64.35

19.20 2.40 16.90 42.75

19.20 14.87 17.27 19.87

30.42 22.80 26.33 44.36

Table 5: GDN single-parameter replacement ablations (%). The named parameter is restored to Random; the other retains its DAMI value.

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

Model

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.

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.

Variant

NIAH-1 Avg.↑

NIAH-2 Avg.↑

MK-NIAH Avg.↑

Overall Avg.↑

τ : 1–2048 τ : 1–1024 Linear spacing DAMI

47.95 22.05 62.40 64.35

17.30 25.50 5.65 42.75

19.60 21.40 15.47 19.87

29.07 23.13 28.96 44.36

Table 6: Effects of timescale coverage and spacing on GDN retrieval (%).

7

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).

Random

PoST

(a) 1K context

DAMI

(b) 2K context

100

1.0 0.8 0.6 0.4 0.2 0.0 0.0

Mean accuracy (%)

Normalized target sensitivity

50

0.2 0.4 0.6 0.8 Normalized depth r` = (` ¡ 1)=(L ¡ 1) L-H H-L

1.0

0 0

50

100

0

(c) 4K context

50

100

(d) 8K context

100 50

L-H-L (DAMI) H-L-H

0 0

NIAH-2 Avg.↑

MK-NIAH Avg.↑

Overall Avg.↑

L-H H-L L-H-L (DAMI) H-L-H

54.70 50.55 64.35 60.05

19.55 9.15 42.75 16.60

19.40 18.87 19.87 18.27

32.29 26.85 44.36 32.85

4.4

5

NIAH-2 Avg.↑

MK-NIAH Avg.↑

Overall Avg.↑

Shift +0.2 Shift −0.2 Peak L4 Peak L13 DAMI

45.25 57.40 51.25 52.60 64.35

6.10 14.75 22.25 20.80 42.75

20.67 23.13 24.13 18.60 19.87

24.31 32.55 33.31 31.76 44.36

100

Case Study

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.

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 MKNIAH, showing the effect of profile level and peak location. NIAH-1 Avg.↑

50

Retrieval by Distance. Figure 6 compares taskaveraged 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.

Table 7: GDN retrieval with four layer-wise sensitivity profiles (%).

Variant

0

Figure 6: GDN retrieval accuracy by relative distance at four context lengths. Points show task-averaged accuracy in 16 shared bins.

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. NIAH-1 Avg.↑

100

Relative retrieval distance (%)

Figure 5: Normalized target sensitivity profiles across layers. The horizontal axis is normalized depth rℓ = (ℓ−1)/(L−1); the vertical axis is (Sℓ⋆ −Smin )/(Smax − Smin ). Curves indicate initialization targets.

Shape

50

Table 8: GDN sensitivity-level and peak-location perturbations (%). Shift denotes profile translation; Peak denotes the peak layer.

8

Limitations

structured state space duality. In Proceedings of the 41st International Conference on Machine Learning, volume 235, pages 10041–10071. PMLR.

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.

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.

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.

Ali Hatamizadeh, Yejin Choi, and Jan Kautz. 2026. Gated DeltaNet-2: Decoupling erase and write in linear attention. Preprint, arXiv:2605.22791.

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.

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.

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.

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.

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.

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.

Gregory Beylkin and Lucas Monzón. 2005. On approximation of functions by exponential sums. Applied and Computational Harmonic Analysis, 19(1):17–48.

Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2017. Pointer sentinel mixture models. In International Conference on Learning Representations.

Gregory Beylkin and Lucas Monzón. 2010. Approximation by exponential sums revisited. Applied and Computational Harmonic Analysis, 28(2):131–149.

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.

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.

Dmytro Mishkin and Jiri Matas. 2016. All you need is a good init. In International Conference on Learning Representations.

Tri Dao and Albert Gu. 2024. Transformers are SSMs: Generalized models and efficient algorithms through

9

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.

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.

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 ZhouZheng. 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. Corentin 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. LongMamba: Enhancing mamba’s long context capabilities via training-free receptive field enlargement. In International Conference on Learning Representations.

10

Appendix A

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.

Approximation Basis for Geometric Spectra

For spectral coverage, Theorem 4.7 of PoST (Cao, 2026) considers approximating s−β on [1, T ] with H exponentials, for β ∈ (0, 1) and T > 1. Let ΣH be the set of such scalar exponential sums. The paper gives a minimax exponential error rate attainable with geometric spacing: EH := inf ∥s−β − f (s)∥L∞ [1,T ] f ∈ΣH   π2H . ≤ C1 exp − log T + C2

D

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.

(12)

Here C1 , C2 > 0 are independent of H. The proof connects the problem to rational approximation through a Laplace transform; asymptotically uniform nodes in the log domain yield log λh+1 − log λh ≈ const.

B

Joint Calibration Derivation

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 positionadaptive 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.

Monotonicity in the bias permits bisection in Equation (10). Approximating the accumulation in Equation (3) by s times the calibration-set mean Softplus factor and matching Equation (4) gives −1 τℓ,h = exp(Alog,ℓ,h )   · Ez softplus(z + dt_biasℓ,h ) .

(13)

Since dt_bias changes this mean, A_log must adjust jointly. Substituting the sample mean and τℓ,h = τh yields Equation (11).

C

Detailed Experimental Configurations

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 ϕ(dt_biasnew ℓ,h ) = mℓ ϕ(dt_biasRandom ). The multipliers m ℓ are reℓ,h sampled 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

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.

11

Related documents

Record · ID 1514953 · SHA-256 7c0cfe3158da18e9
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive