Muir: Linear Attention with Sensitivity-Allocated Gating and Matched-Filter Readout
Abstract
A linear attention architecture called Muir allocates gate capacity by sensitivity, uses matched-filter readout and a stable parallel update, improving language modeling, long-context recall, and training speed over Gated DeltaNet-2 and Transformer baselines.
Linear attention compresses context into a fixed-size key-value state for linear-time training and constant-memory inference. Gated delta-rule models decay this state and erase its prediction for an incoming key before writing a new value; Gated DeltaNet-2 (GDN-2) generalizes this with channel-wise decay and decoupled, full-rank erase and write gates. However, we show that state updates are far less sensitive to erasure than to writes: key activation and unit normalization concentrate key energy onto a sparse subset of channels, whereas value writes scale all channels, so the erase gate can be parameterized at lower rank. Furthermore, slow-decaying state rows accumulate much larger norms than fast rows, dominating unweighted readout and forcing stronger write-time erasure to suppress interference. Guided by this analysis, we introduce Muir, which fuses all gates into a sensitivity-allocated low-rank projection, re-weights state rows with a matched-filter readout gate, and reinvests the saved parameters in a wider feed-forward network. Because standard chunkwise algorithms become numerically unstable at the large chunk sizes needed to saturate wide matrix units, we design a parallel update for stable, efficient training. Across 166M-1.34B parameters, Muir lowers perplexity by 1.8-2.0% over GDN-2 and 2.5-3.6% over Transformer, raises commonsense accuracy by up to 1.9 points, and improves extractive recall over GDN-2. At 1.34B, Muir outperforms both baselines on multi-hop and multi-needle recall, extrapolates 2,560x from its 4K training length to 10M-token streams without perplexity drift, and maintains near-100% passkey retrieval to 1M tokens with static readout. Muir achieves these gains while matching GDN-2 throughput, reaching its 100B-token validation loss 1.2x faster, and training 2.7x faster than Transformer at 32K.
Community
Muir co-designs gated delta-rule linear attention with sensitivity-allocated low-rank gating (+30.4% wider FFN at iso-params), matched-filter readout to fix 100x slow-channel "glare" (+19.6 pts 5-hop Variable Tracking root retention at 1.34B), and a division-free block-Neumann kernel for wide-matrix-unit accelerators (TPUs). Consequently, Muir lowers perplexity across 166M-1.34B and streams 10M tokens in a constant 25 MB state (99.4% 1M passkey with static readout) while training 2.7x faster than Splash Attention at 32K.
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- CyFA: Linear Sequence Modeling with Relative-Time-Partitioned Memory (2026)
- Gated Slot Attention-2: Two-Sided Associative Memory Correction in Linear Attention (2026)
- Dual DeltaNet: Value-Side Memory Reorganization for Linear Attention (2026)
- LeapQuant: Efficient Linear Attention with Accurate Recurrent State Quantization (2026)
- RunningTensor: Generalizing Linear Attention to Higher-Order Recurrent States (2026)
- STEPQuant: When and Where Errors Matter in Delta-Rule Recurrent State Quantization (2026)
- Triadic Linear Attention: Three-Dimensional Recurrent States for Long-Context Sequence Modeling (2026)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend
I like that you studied why erase and write behave so differently before touching the gates, instead of just adding capacity. A lower-rank erase gate feels like a free win to me. Does the saving hold up at much longer contexts?
Great question!! Yes, it actually helps even more in (extreme) long contexts. Because the key energy concentration (~6-7 128 channels) is a per-token property of SiLU+L2-norm, even when the hidden state is evolved over millions of tokens, each single-step erasure only acts on ~6-7 channels. In fact, using a low-rank for erase gate is much more crucial for long-context modeling because it suppresses non-normal oblique residual (Rem. 3.3 in the paper) that would otherwise inflate across millions of steps.
Suppressing this non-normal residual (+ wider FFN) is also one of the reasons why Muir variant w/out the read gate also outperforms GDN-2. Hope this helps!! :)
The constant 25 MB state size is the detail that caught my eye here. For multilingual work — where you're processing documents that shift between languages with very different tokenization densities — that constant memory footprint is genuinely useful. I'm curious whether the sensitivity allocation holds up when channel sensitivity shifts dramatically between, say, a German and a Danish paragraph in the same document. Have you tested on code-switching corpora?
We haven't tested on multilingual corpora yet, but your question/setting hits on two really neat properties of Muir.
1- Because key sparsity is a geometric property of SiLU+L2-norm (Prop. 3.1), even if German and Danish paragraphs activated completely different subsets of channels, each token still concentrates its energy onto ~6-7 (of 128) channels, and the token-dependent low-rank projection dynamically modulates erasure across whichever channels fire.
2- A shift in tokenization density can be seen as a shift in token lag over which a semantic dependency has to survive (= a language with higher tokenization density has a longer lag). This is exactly where the token-dependent read gate would really help: as token density increases and stretches effective lags, the read gate can shift weight toward slow-decaying rows on the fly!!
I think a multilingual/multi-domain mix is an interesting (and natural) testbed for Muir.
Okay, this one made me smile: erasing a memory is apparently much less delicate than writing into it, so the erase gate can be smaller. Does that cheaper gate hold up when the context gets really long?
Yes, the write/erase asymmetry matters even more at extremely long contexts. From a "you don't need this much" standpoint, because SiLU+L2-norm concentrates each key onto ~6-7 (of 128) channels regardless of sequence length, a single-step erasure doesn't need higher rank. But it gets better!! Over millions of tokens, a dense erase gate injects jitter that inflates the spectral norm of the transition matrix (Rem. 3.3) and compounds over time; on the other hand, a low-rank erase gate projects the noise out. This is what primarily helps Muir (even without the read gate) extrapolate well beyond GDN-2.
Aside: In thinking about your comment, I looked up if write/erase asymmetry also applies to us humans. Funnily enough, any given memory cue apparently only lights up about 2-5% of neurons in the hippocampus (just like our sparse keys). Recording a new memory requires detailed rewiring across thousands of specific connections, while erasing/updating an old memory only takes a simple chemical switch acting on the few neurons that just fired. (I'm not a neuroscientist in any way, so I'm not sure if this is entirely accurate or not :))
Hope this helps!!
Get this paper in your agent:
hf papers read 2611.08376 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper