MRNN: Non-Linear RNNs with Matrix-Valued States for Scalable Language Modeling
Abstract
Transformers are limited to computations in the TC complexity class, excluding tasks such as entity tracking and code execution that provably require greater expressivity. Motivated by this, we revisit non-linear Recurrent Neural Networks (RNNs) and introduce Matrix-to-Matrix RNN (MRNN): an architecture with matrix-valued hidden states and non-linear state transitions. We show that (i) the language modeling gap of non-linear RNNs is primarily a state-size gap, not a non-linearity penalty, and (ii) outer-product state expansion enables efficient tensor-core utilization. Empirically, MRNN achieves perfect state-tracking generalization at sequence lengths beyond training. These gains transfer to large-scale language modeling: at 7B MoE, Hybrid MRNN outperforms Hybrid Gated DeltaNetby perplexity points using smaller recurrent states, and replacing even a single recurrent layer with MRNN matches Hybrid MRNN accuracy with minimal throughput cost. Hybrid Gated DeltaNetwith a single MRNN layer also outperforms state-of-the-art hybrid linear-attention architectures by up to points on LongBench. Together, these results establish non-linear RNN layers as a compelling building block for efficient and scalable language models.
Related papers
See more related submissions when the market opens.