跳到正文
arXiv cs.AI· Mayank Mishra, Shawn Tan, Ion Stoica, Joseph E. Gonzalez, Tri Dao·· 12 小时前AI 评分38

M²RNN:采用矩阵值状态的非线性 RNN,面向可扩展语言建模

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

AI 导读

研究者提出 M²RNN,一种隐藏状态为矩阵值、状态转移为非线性表达的 RNN 架构,并指出非线性 RNN 的语言建模性能受状态大小限制,其状态扩展机制可高效利用 tensor core。

正文 · 原文

View PDF HTML (experimental)

Abstract: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.
Subjects: Machine Learning (cs.LG); Artificial Intelligence (cs.AI)
Cite as: arXiv:2603.14360 [cs.LG]
  (or arXiv:2603.14360v3 [cs.LG] for this version)
  https://doi.org/10.48550/arXiv.2603.14360

arXiv-issued DOI via DataCite

Submission history

From: Mayank Mishra [view email]
[v1] Sun, 15 Mar 2026 12:53:09 UTC (921 KB)
[v2] Wed, 13 May 2026 23:29:01 UTC (944 KB)
[v3] Fri, 16 Oct 2026 00:31:17 UTC (794 KB)

来源:arXiv cs.AI · arxiv.org