arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.07658cs.LGcs.AIcs.CL
收藏

线性递归模型的最优衰减谱

Optimal Decay Spectra for Linear Recurrences

Yang Cao

AI总结:

本文提出PoST框架,通过谱重参数化和位置自适应缩放,实现线性递归模型的最优衰减谱,提升长上下文处理能力。

摘要:

线性递归模型在处理序列时具有线性时间复杂度,但通常存在长距离记忆不足的问题。本文将此问题归因于衰减谱:对于N个通道,随机初始化使最小谱隙降为O(N^{-2}),导致亚指数误差exp(-Ω(N/log N));线性间隔避免了坍塌但退化为exp(-O(N/sqrt(T))),在长上下文中实际为代数级。本文引入位置自适应谱衰减(PoST),一种架构无关的框架,结合两种机制:(1)谱重参数化,结构上强制几何间隔的对数衰减率,证明在O(exp(-cN/log T))速率上最优;(2)位置自适应缩放,唯一能消除静态谱的尺度不匹配(仅N log t/log T个通道在位置t有效)的机制,通过拉伸谱到实际依赖范围,将速率提升到O(exp(-cN/log t))。此缩放原生诱导分数不变性:脉冲响应成为尺度无关的,通道在相对和绝对时间坐标之间插值。PoST可无缝集成到任何对角线线性递归中而无开销。本文在Mamba-2、RWKV-7、Gated DeltaNet、Gated Linear Attention和RetNet上实例化。在180M-440M规模预训练中显示一致的零样本语言建模改进,Mamba-2在长上下文检索中取得显著提升,其他架构表现竞争或更优。代码:https://github.com/SiLifen/PoST。

英文摘要:

Linear recurrent models offer linear-time sequence processing but often suffer from suboptimal long-range memory. We trace this to the decay spectrum: for $N$ channels, random initialization collapses the minimum spectral gap to $O(N^{-2})$, yielding sub-exponential error $\exp(-Ω(N/\log N))$; linear spacing avoids collapse but degrades to $\exp(-O(N/\sqrt{T}))$, practically algebraic over long contexts. We introduce Position-Adaptive Spectral Tapering (PoST), an architecture-agnostic framework combining two mechanisms: (1) Spectral Reparameterization, which structurally enforces geometrically spaced log-decay rates, proven minimax optimal at rate $O(\exp(-cN/\log T))$; and (2) Position-Adaptive Scaling, the provably unique mechanism that eliminates the scale mismatch of static spectra (where only $N\log t/\log T$ of $N$ channels are effective at position $t$) by stretching the spectrum to the actual dependency range, sharpening the rate to $O(\exp(-cN/\log t))$. This scaling natively induces fractional invariance: the impulse response becomes scale-free, with channels interpolating between relative and absolute temporal coordinates. PoST integrates into any diagonal linear recurrence without overhead. We instantiate it across Mamba-2, RWKV-7, Gated DeltaNet, Gated Linear Attention, and RetNet. Pre-training at 180M-440M scales shows consistent zero-shot language modeling improvements, significant long-context retrieval gains for Mamba-2 (MQAR and NIAH), and competitive or improved performance across other architectures. Code: https://github.com/SiLifen/PoST.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑