Rust in Everything
← Papers

Muir: Linear Attention with Sensitivity-Allocated Gating and Matched-Filter Readout

Tushaar Gangavarapu, Gil Tabak, Clemens JS Schaefer

2026-11-06▲ 5arXiv 2611.08376v1Hugging Face

AI-generated from the full paper (deepseek-flash). It may contain mistakes; check the original.

TL;DR

Muir reallocates channel-wise gate parameters in gated delta-rule linear attention using a write-versus-erase sensitivity analysis, a matched-filter query readout, and a boundary-pivoted chunkwise kernel, improving language modeling, recall, and long-context stability over GDN-2 and Transformer.

Problem

Channel-wise gated delta-rule models such as GDN-2 allocate dense full-rank erase and write gates, which consumes 2d^2 parameters and shrinks FFN width under an iso-parameter budget. State rows decay at different rates, so slow-decaying rows accumulate larger norms and dominate unweighted readout, forcing stronger write-time erasure that overwrites stored associations. Channel-wise decay also breaks commutation with rank-one erasure, making standard chunkwise parallel training numerically unstable at the large chunks needed for wide matrix-unit accelerators.

Method

The paper analyzes GDN-2 state updates and shows that writes affect the state unconditionally through the value vector, whereas erase perturbations are weighted by squared key energy and state-row energy; SiLU activation and unit normalization concentrate key energy, so the erase gate can be lower rank than the write gate. It derives a stationary row-energy law and a lag-dependent matched-filter readout gain that reweights state rows at query time. Muir fuses all five gates into one low-rank projection with asymmetric ranks and adds a static times dynamic query readout gain, then reinvests saved parameters in a wider FFN. It also introduces a boundary-pivoted chunkwise kernel that splits relative decays without division or full-chunk 3D decay tensors and solves within-chunk triangular systems with block matrix multiplications.

Results

  • Across 166M–1.34B parameters, Muir lowers validation NLL over GDN-2 and Transformer. §1
  • Muir reaches GDN-2's 100B-token validation loss 1.2× faster and trains 2.7× faster than Transformer at 32K while matching GDN-2 throughput. §Abstract100B (not found in the paper)32K (not found in the paper)
  • Static matched-filter readout maintains near-100% passkey retrieval at 1M tokens, reported as 90.0% zero-shot and 99.4% post-cooldown. §5.2.3
  • Dynamic readout gain cuts tail perplexity drift on 10M-token streams by 3.6× relative to static gain, which drifts +0.017 nats past 32K. §5.2.310M (not found in the paper)32K (not found in the paper)
  • In the 1.34B ablation, sensitivity-allocated Muir with dynamic readout achieves lower FineWeb-Edu validation NLL than GDN-2 while using a wider FFN. §5.3
  • Mechanistic probes report that trained state is 13× more sensitive to write than erase perturbations, learned readout reduces energy spread and write-time erasure, and root-needle multi-hop retention improves from 37% to 45%. §7

Limitations

  • Stated in §7: under a fixed gate-rank budget, static and dynamic readout trade single-horizon retention against multi-lag adaptability; static readout preserves write rank for single-needle lookup to 1M tokens but cannot match varying lags or hold flat perplexity on 10M-token streams, whereas dynamic readout adapts per token but limits single-needle retention beyond 32K when write rank is halved.
  • Stated in §7: Splash Attention remains faster at short contexts below 11K because its Pallas kernel fuses masking and block contractions in VMEM while XLA materializes chunk temporaries in HBM.
  • Leaves open: the experiments cover 166M–1.34B parameters trained on 100B tokens and TPU7x throughput; larger scales, other wide-matrix-unit accelerators, and end-to-end GPU kernel performance are not tested.

Key points

  • GDN-2 uses dense full-rank d by d erase and write gate projections, consuming 2d^2 parameters and shrinking FFN width under iso-parameter budgets. §1
  • Proposition 3.1 gives expected squared sensitivities: write sensitivity is ||v_t||_2^2, while erase sensitivity sums k_{t,j}^2 ||S_hat_{t,j,:}||_2^2 over key channels. §3.1
  • SiLU and unit normalization concentrate key energy on eta_eff much less than d_k channels; a biased low-rank erase bottleneck preserves active-channel erase control while avoiding high-rank oblique residual variance. §3.1
  • Proposition 3.4 gives stationary row energy m_j^* = c_j sigma_v^2 divided by 1 - lambda_j + 2 lambda_j bbar_j c_j, with effective memory horizon tau_eff,j. §3.1
  • Proposition 3.6 gives a lag-dependent matched-filter gain gamma_j^*(ell) proportional to abar_{ell,j}/m_j^*, and Remark 3.7 argues no static gain is optimal across different retrieval lags. §3.1
  • Muir fuses all five gates into one low-rank projection with asymmetric ranks r_f,r_b,r_g,r_w,r_q = 64,64,128,128,128 and total rank R_tot = 512. §4
  • The boundary-pivoted chunkwise kernel avoids dividing keys by cumulative decay and avoids materializing full-chunk 3D decay tensors, solving triangular systems through block matrix multiplications. §4.2
  • At 1.34B, Muir improves multi-hop and multi-needle recall over both baselines and extrapolates from 4K training length to 10M-token streams without perplexity drift. §Abstract

Mind map

Muir
Problem
GDN-2 dense erase and write gates
State row norm imbalance
Chunkwise instability on wide MXUs
Theory
Write sensitivity exceeds erase
Low-rank erase sufficient
Stationary row-energy law
Matched-filter readout
Static vs dynamic gain tradeoff
Architecture
Fused five-gate low-rank projection
Asymmetric ranks 64 64 128 128 128
Dynamic query gain gamma_t
Wider FFN at iso-parameters
Kernel
Boundary-pivoted chunkwise solve
Division-free relative decays
Block triangular inversion
Stable large chunks
Results
Lower NLL and perplexity
Better commonsense and recall
Long-context extrapolation
Throughput matches GDN-2
Limitations
Static vs dynamic readout tradeoff
Short-context Splash Attention faster
Scale limited to 1.34B