# M2RNN: Non-Linear RNNs with Matrix-Valued States for Scalable Language Modeling

*Mayank Mishra, Shawn Tan, Ion Stoica, Joseph Gonzalez, Tri Dao*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/156010) · [OpenReview](https://openreview.net/forum?id=1BghQYvh91) · [alphaXiv](https://www.alphaxiv.org/abs/2603.14360) · [Open on the map](../papers.html#p156010)

Category: [Efficient LLM Inference & Training](../pcat/14.md) › [Mixture-of-Experts Data Mixing](../pgroup/305.md) · Type: new method · Keywords: non-linear RNNs, matrix-valued states, language modeling, expressivity, tensor-core efficiency, state-tracking

Areas: [Model Architectures & Sequence Modeling](../areas/architectures.md) › Language Model Architectures › State Space Models

## Summary
M2RNN introduces matrix-valued hidden states and non-linear transitions to boost expressivity, achieving perfect state-tracking and improved language modeling efficiency.

## Explained to a 5-year-old
The authors made a new kind of brain for computers that stores memories as special grids instead of simple numbers. This grid memory lets the brain keep track of many things at once, like a character’s name even after a long story. Because the grid can hold more information, the brain can be smaller and still work really well. When the brain reads long texts, it can answer questions about them better than before. This makes building big language computers easier and faster for everyone.

## Explained to a 5-year-old, longer
Computers that read and write words, like chatbots, often use a special kind of memory to remember what they have seen. The usual memory works like a single number that changes a little each time a new word appears. The new idea is to use a bigger memory that looks like a grid of numbers, which can hold many pieces of information at once. This grid memory works like a board that can store many colors and shapes, not just one color. By using this richer board, the computer can keep track of characters, actions, and events even when they are far apart in the text. It helps the computer remember a name mentioned early in a story when the story goes on for many sentences. The grid also lets the computer think in a more flexible way, like solving small puzzles as it reads. Because the grid can hold more information, the computer does not need as many tiny parts to work well. This means the overall computer can be smaller, use less energy, and be cheaper to build. The new memory also works smoothly with existing computer hardware, so it can be used right away. It allows the computer to understand longer passages without forgetting important details. This improvement makes the computer better at answering questions about long texts. It also helps the computer generate more coherent and accurate responses. Overall, the new grid memory makes language computers smarter, smaller, and more efficient.

## For a technical reader
The paper proposes matrix-valued hidden states with non-linear transitions, using outer-product expansion for tensor-core efficiency. It shows that such layers close the expressivity gap of transformers, achieving perfect state-tracking and reducing recurrent state size three-fold while improving perplexity and benchmark scores. The approach integrates seamlessly into hybrid models, offering a compact yet powerful alternative to existing attention mechanisms.

## Problem
Current transformer-based models are limited to TC0 computations, which cannot capture tasks like entity tracking and code execution that provably require higher computational expressivity. This limits their ability to model certain sequential dependencies.

## Method
The approach uses matrix-valued hidden states and non-linear state transitions, employing outer-product state expansion to enable efficient tensor-core utilization. It integrates these layers into hybrid architectures for scalable training while reducing state size. The design aims to preserve expressivity with fewer parameters.

## Results
The approach attains perfect state-tracking on unseen sequence lengths, cuts recurrent state size three-fold while lowering perplexity by 0.5 points on a 7B MoE model, and improves LongBench scores by up to 8 points over hybrid linear-attention baselines.

## Contributions
The work demonstrates that non-linear RNNs can close the expressivity gap of transformers by using matrix-valued states, and shows that outer-product expansion enables efficient tensor-core usage. It also provides empirical evidence that a single non-linear RNN layer can significantly boost hybrid language models while reducing parameter count.

## Practical relevance
This work provides a scalable, parameter-efficient building block for future language models, enabling more expressive sequential modeling on existing hardware.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/156010)
