Abstract
Linear recurrent neural networks (RNNs) and state-space models (SSMs) such as Mamba have become promising alternatives to softmax-attention as sequence mixing layers in Transformer architectures. Current models, however, do not exhibit the full state-tracking expressivity of RNNs because they rely on channel-wise (i.e. diagonal) sequence mixing. In this paper, we investigate parameterizations of a large class of dense linear RNNs as fixed-points of parallelizable diagonal linear RNNs. The resulting models can naturally trade expressivity for efficiency at a fixed number of parameters and achieve state-of-the-art results on the commonly used toy tasks $A_5$, $S_5$, copying, and modular arithmetics.
Introduction: The Diagonality Gap
In the quest for efficient sequence mixers, linear RNNs and State-Space Models (SSMs) like Mamba have emerged as strong contenders to the $O(T^2)$ attention mechanism. Their efficiency stems from using diagonal transition matrices, which allow for parallel computation across sequence lengths via parallel scans.
However, this efficiency comes at a cost known as the Diagonality Gap. Theoretical research indicates that diagonal models lack the expressivity required for complex state-tracking tasks—the ability to maintain and update a sophisticated internal world state. While classical LSTMs utilize dense transitions and can track state effectively, they are inherently sequential and slow. Fixed-Point RNNs (FP-RNNs) bridge this gap by defining dense RNNs as the fixed points of parallelizable diagonal ones.
Methods: The Fixed-Point Framework
The core innovation of FP-RNNs is the use of fixed-point iteration to achieve dense recurrence without sacrificing parallelizability.
Instead of building a dense RNN directly, the authors define it implicitly as the fixed point of a diagonal one:
- Implicit Parameterization: A diagonal RNN is augmented with a channel mixer ($Q_t$). By iterating this layer $\ell$ times, the hidden states converge to a fixed point ($h^*$), which mathematically represents a dense RNN.
- Stability and Convergence: Leveraging the Banach Fixed-Point Theorem, the authors ensure stability by constraining transition matrices and channel mixers to be contractive.
- FP-Mamba: This framework is applied to the Mamba architecture, introducing matrix-valued states and shifted hidden state dependence.
- Efficient Training: Through implicit differentiation, gradients are computed only at the final fixed point, ensuring memory efficiency comparable to standard diagonal layers.
Key Insights: Trading Time for Expressivity
FP-RNNs introduce a unique "dial" for model performance: the number of iterations ($\ell$).
- Interpolation as a Knob: At $\ell=1$, the model behaves like a standard diagonal SSM. Increasing $\ell$ allows the model to "interpolate" toward the expressivity of a dense RNN.
- Adaptive Computation: The model can adapt its computational effort to the task's difficulty. Simple tasks may require only a few iterations, while complex state-tracking tasks utilize more.
- Parallelism vs. Expressivity: Because each iteration remains a diagonal parallel scan, the model maintains hardware efficiency while gaining the power of dense recurrence.
Experimental Results
The authors evaluated FP-RNNs across several challenging benchmarks designed to expose the weaknesses of diagonal models:
- State-Tracking ($A_5$, $S_5$): FP-Mamba achieves near-perfect accuracy on these tasks, where standard Mamba and Transformers typically fail completely.
- Copying Task: A single-layer FP-Mamba matches or exceeds the performance of multi-layer alternatives like GatedDeltaNet, proving that fixed-point dynamics significantly boost memory capacity.
- Language Modeling: On a 2-billion token FineWeb subset, FP-Mamba achieved lower validation perplexity than standard Mamba with the same parameter count, converging in fewer than 10 iterations.
Conclusion and Future Work
FP-RNNs demonstrate that a small increase in sequential computation can yield significant gains in model expressivity. While the iterations add some sequential overhead, the model remains much more hardware-friendly than traditional dense RNNs. Future work includes developing fused GPU kernels to further reduce wall-clock time and exploring acceleration techniques like Anderson acceleration to reach fixed points even faster.
Summary updated