arXiv cs.CL· Hee Seung Hwang, Sanghyuk Chun, Xindi Wu, Olga Russakovsky, Zhiwei Deng·· 13 小时前AI 评分31
MERLIN:用二阶路由改进多状态线性注意力,提升长上下文建模
Multi-State Linear Attention with Generalized Second-Order Routing
AI 导读
MERLIN(MomEnt Routing for multi-state LINear attention)通过追踪每个上下文分段 key 的一阶与二阶矩,让查询同时恢复对齐的均值与方差,实现更内容感知的多状态聚合。
正文 · 原文
Abstract:Self-attention plays a key role in long-sequence modeling, but its quadratic time complexity fundamentally limits the scaling of Large Language Models. Recently, Multi-State Linear Attention (MSLA) mechanisms have been proposed to make sequence modeling more efficient by splitting the context into segments and compressing each in its own memory state. MSLA aggregates the information extracted from each memory state using only the mean alignment between a query and each segment's keys, ignoring how the alignment is distributed within the segment. In order to model the relevance of a segment to a query more comprehensively and incorporate the variance of the alignment in the aggregation, we propose MERLIN (MomEnt Routing for multi-state LINear attention), a method that tracks the first and second moments of each segment's keys. Using the moments of keys, a query can recover both the mean and the variance of its alignment with each segment to perform a more content-aware aggregation of per-state readouts. Experiments on multi-state variants of Gated DeltaNet-1.3B and Mamba-2-780M show that MERLIN consistently outperforms existing aggregation methods on various long-context tasks. In particular, MERLIN outperforms baselines on RULER needle-in-a-haystack and long-context QA (+8.3% for Gated DeltaNet-1.3B and +7.0% for Mamba-2-780M) and diverse subtasks in LongBench (+13.5% and +12.0%). It even outperforms baselines that consume 4x more memory. MERLIN provides a simple and general routing mechanism for improving long-context capabilities of MSLA models.
| Subjects: | Computation and Language (cs.CL) |
| Cite as: | arXiv:2610.37645 [cs.CL] |
| (or arXiv:2610.37645v1 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2610.37645 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Hee Seung Hwang [view email]
[v1]
Tue, 27 Oct 2026 17:55:49 UTC (335 KB)
来源:arXiv cs.CL · arxiv.org