Fixed-Point RNNs: From Diagonal to Dense in a Few Iterations

Sajad Movahedi, Felix Sarnthein, Nicola Muca Cirone, Antonio Orvieto · OpenReview

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.

The FP-RNN framework parameterizes a dense RNN as the fixed point of a diagonal RNN with a channel mixer.

Instead of building a dense RNN directly, the authors define it implicitly as the fixed point of a diagonal one:

  1. 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.
  2. Stability and Convergence: Leveraging the Banach Fixed-Point Theorem, the authors ensure stability by constraining transition matrices and channel mixers to be contractive.
  3. FP-Mamba: This framework is applied to the Mamba architecture, introducing matrix-valued states and shifted hidden state dependence.
  4. 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$).

Test accuracy on the $A_5$ state-tracking task. Increasing iterations $\ell$ allows the model to solve longer sequences, interpolating between diagonal and dense expressivity.
  • 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

BibTeX
@inproceedings{movahedi2025fixed,
  author = {Sajad Movahedi and Felix Sarnthein and Nicola Muca Cirone and Antonio Orvieto},
  title = {{Fixed-Point RNNs: From Diagonal to Dense in a Few Iterations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=KT8y9pFgJE},
}
Figure