arXiv:2603.14360cs.LGcs.AI2026-03被引 3

用矩阵状态的非线性RNN提升语言模型长序列建模能力

M$^2$RNN: Non-Linear RNNs with Matrix-Valued States for Scalable Language Modeling

  • 设计矩阵值状态的M²RNN,实现更强表达力的非线性状态转移
  • 在70亿参数模型上比同类架构低0.4-0.5困惑度,状态尺寸缩小3倍
  • 单层替换即显著提升性能,适合高效构建大模型长程依赖结构

Transformer虽并行性好,但受限于TC⁰复杂度,无法处理实体追踪与代码执行等高阶任务。本文重新研究非线性RNN用于语言建模,提出矩阵到矩阵RNN(M²RNN):具有矩阵值隐藏状态和强表达力的非线性状态转移机制。实证表明,非线性RNN性能受限于状态规模,并通过状态扩展机制高效利用张量核心。实验显示,M²RNN在训练未见长度序列中实现完美状态追踪泛化;在混合架构中,相比等效的门控DeltaNet,7B MoE模型困惑度降低0.4-0.5,且递归层状态尺寸缩小3倍。仅替换一层即可获得接近全模型性能提升,对训练吞吐影响小。此外,单层M²RNN嵌入的Hybrid Gated DeltaNet在LongBench上比最优线性注意力混合架构最高提升8点,证明非线性RNN是高效可扩展语言模型的关键组件。

原文摘要 · Abstract (English)

Transformers are highly parallel but are limited to computations in the TC$^0$ complexity class, excluding tasks such as entity tracking and code execution that provably require greater expressive power. Motivated by this limitation, we revisit non-linear Recurrent Neural Networks (RNNs) for language modeling and introduce Matrix-to-Matrix RNN (M$^2$RNN): an architecture with matrix-valued hidden states and expressive non-linear state transitions. We demonstrate that the language modeling performance of non-linear RNNs is limited by their state size, and show how the state size expansion mechanism enables efficient use of tensor cores. Empirically, M$^2$RNN achieves perfect state tracking generalization at sequence lengths not seen during training. These benefits also translate to large-scale language modeling. In hybrid settings that interleave recurrent layers with attention, Hybrid M$^2$RNN outperforms equivalent Gated DeltaNet hybrids by $0.4$-$0.5$ perplexity points on a 7B MoE model, while using $3\times$ smaller state sizes for the recurrent layers. Notably, replacing even a single recurrent layer with M$^2$RNN in an existing hybrid architecture yields accuracy gains comparable to Hybrid M$^2$RNN with minimal impact on training throughput. Further, the Hybrid Gated DeltaNet models with a single M$^2$RNN layer also achieve superior long-context generalization, outperforming state-of-the-art hybrid linear attention architectures by up to $8$ points on LongBench. Together, these results establish non-linear RNN layers as a compelling building block for efficient and scalable language models.

RNN长序列建模语言模型矩阵状态

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。