For years, researchers navigating the "Sequence Modeling Trinity" have been forced to choose two out of three desirable traits: parallel training, cheap inference, and high expressive power. Transformers offer parallel training and high expressivity but suffer from expensive inference. Traditional nonlinear RNNs (like LSTMs) offer cheap inference and expressivity but are notoriously sequential, creating a massive bottleneck during training.
Recently, Linear RNNs (LRNNs) such as Mamba, RWKV, and DeltaNet have emerged as a "best of both worlds" solution. They behave like traditional RNNs at inference time but can be trained in parallel like Transformers. However, a theoretical gap has remained: Why exactly does removing the nonlinearity from the hidden state update make them so much easier to parallelize? Is there a fundamental limit to how much computational power we can pack into a parallelizable model?
This paper answers these questions by drawing a tight connection between types of RNNs and standard computational complexity classes, proving why LRNNs are fundamentally easier to parallelize than their nonlinear counterparts.
Theoretical Framework: Circuits and Complexity
To understand the parallelism barrier, the authors map different RNN architectures to complexity classes by viewing them as computational circuits. They ask: How deep does a circuit need to be to simulate this model?
The analysis focuses on "bounded fan-in" circuits, where each gate has a limited number of inputs, closely mirroring how real hardware like GPUs operates. The researchers also conduct a precision analysis, distinguishing between models using log-precision (standard floating-point) and polynomial-precision (high-precision arithmetic). Finally, they bridge deep learning and formal languages through automata theory, showing which types of theoretical machines (like Weighted Finite Automata or Counter Machines) each RNN variant can simulate.
The Parallelism Barrier and the LRNN Hierarchy
The complexity analysis yields several profound insights into the nature of sequence models:
- The Sequential Bottleneck of Nonlinear RNNs: The authors prove that nonlinear RNNs are $\mathsf{P}$-complete (under polynomial precision) or $\mathsf{L}$-complete. In complexity theory, $\mathsf{P}$-complete problems are considered "inherently sequential." The nonlinearity allows these models to simulate "stacks" or "counter machines," enabling them to solve problems involving nested structures or complex connectivity. However, this same power means you cannot significantly speed them up by adding more processors. No amount of clever engineering can fully eliminate this sequential bottleneck.
- LRNNs are "Nearly" Log-Depth: In contrast, LRNNs fall into the complexity class $\mathsf{PNC}^1$. They can be viewed as log-depth arithmetic circuits and simulated with a depth of $O(\log n \log^* n)$. To put this in perspective, for a sequence of one million tokens, this represents only about three times the "wall-clock" depth of a Transformer. This theoretical foundation explains why LRNNs feel as fast as Transformers in practice.
- A Fine-Grained Hierarchy of LRNNs: Not all LRNNs are created equal. The paper identifies a hierarchy based on the model's update mechanism. Diagonal-Plus-Low-Rank (DPLR) models (like DeltaNet and RWKV-7) are $\mathsf{PNC}^1$-complete, making them more expressive than simpler Permutation-Diagonal (PD) models, which are $\mathsf{NC}^1$-complete. DPLR models can solve complex algebraic problems that simpler LRNNs cannot grasp.
Experimental Validation
To validate these theoretical bounds, the authors evaluated Nonlinear RNNs, RWKV-7, DeltaNet, Mamba, and standard Transformers on synthetic benchmarks designed to test length generalization (training on short sequences and testing on much longer ones).
- Sorted Deterministic Graph Connectivity (DGC): This is an $\mathsf{L}$-complete problem that requires tracking paths through a graph—a true "parallelism killer." The paper establishes a conditional separation: LRNNs cannot solve $\mathsf{L}$-complete problems unless the fundamental hierarchy of complexity classes collapses. Experiments confirmed this: only the nonlinear RNN achieved near-perfect accuracy on long, out-of-distribution sequences. Transformers and all LRNN variants failed as the graph size increased.
- Iterated $3 \times 3$ Matrix Multiplication (IMM): This $\mathsf{PNC}^1$-complete problem tests a model's ability to perform complex algebraic reasoning over time. Here, the more advanced DPLR models (RWKV-7 and DeltaNet) performed significantly better than Mamba and Transformers, proving that their "linear but sophisticated" updates provide a massive boost in algebraic reasoning.
Limitations and the Hybrid Frontier
While the theoretical framework is robust, the authors note a few limitations. First, the proofs assume a "rational semiring" (exact arithmetic). In practice, real-world 16-bit or 8-bit quantization might introduce behaviors not captured by this idealized theory. Second, the paper focuses on expressivity (what models can represent) rather than trainability (how easily they can be optimized using gradient descent). A model might be theoretically powerful but practically impossible to optimize.
Ultimately, these findings point toward a new frontier in architecture design: Hybrid Models. By mixing Transformer layers, LRNNs, and perhaps even small amounts of nonlinear RNN layers (as seen in models like Jamba or Samba), researchers can balance the trade-off between sequential reasoning power and parallel training efficiency. Finding the optimal ratio of these components is the next big challenge in sequence modeling.
Summary updated