Abstract
Linear Recurrent Neural Networks (linear RNNs) have emerged as competitive alternatives to Transformers for sequence modeling, offering efficient training and linear-time inference. However, existing architectures face a fundamental trade-off between expressivity and efficiency, dictated by the structure of their state-transition matrices. While diagonal matrices used in architectures like Mamba, GLA, or mLSTM yield fast runtime, they suffer from severely limited expressivity. To address this, recent architectures such as (Gated) DeltaNet and RWKV-7 adopted a diagonal plus rank-1 structure, allowing simultaneous token-channel mixing, which overcomes some expressivity limitations with only a slight decrease in training efficiency. Building on the interpretation of DeltaNet's recurrence as performing one step of online gradient descent per token on an associative recall loss, we introduce DeltaProduct, which instead takes multiple ($n_h$) steps per token. This naturally leads to diagonal plus rank-$n_h$ state-transition matrices, formed as products of $n_h$ generalized Householder transformations, providing a tunable mechanism to balance expressivity and efficiency and a stable recurrence. Through extensive experiments, we demonstrate that DeltaProduct achieves superior state-tracking and language modeling capabilities while exhibiting significantly improved length extrapolation compared to DeltaNet. Additionally, we also strengthen the theoretical foundation of DeltaNet by proving that it can solve dihedral group word problems in just two layers.
Introduction: The Efficiency-Expressivity Trade-off
While Transformers dominate modern AI, their quadratic computational cost makes processing long sequences prohibitively expensive. Linear Recurrent Neural Networks (linear RNNs) like Mamba and Gated Linear Attention (GLA) offer a solution with linear-time inference. However, these models face a "fundamental trade-off" between efficiency and expressivity. Most linear RNNs utilize diagonal state-transition matrices, which are computationally efficient but struggle with complex state-tracking—the ability to remember and manipulate information over time.
Recent models like DeltaNet improved upon this by using a "rank-1" update (a single Householder reflection), which can be interpreted as taking one step of gradient descent to update the model's memory. Despite this improvement, DeltaNet still fails at complex logical tasks, such as the $S_5$ group word problem (tracking permutations of five objects), which serves as a proxy for the sophisticated reasoning required in advanced language modeling.
Methodology: Generalizing the Delta Recurrence
DeltaProduct generalizes the DeltaNet recurrence by increasing the number of optimization steps taken per token. Instead of a single gradient step, DeltaProduct takes $n_h$ steps. Mathematically, this results in a state-transition matrix $A(x_i)$ that is a product of $n_h$ generalized Householder transformations.
This geometric approach offers several advantages:
- Stability: The spectral norm of the product remains $\le 1$, ensuring that the model's "memory" does not explode during training on long sequences.
- Geometric Expressivity: By multiplying several Householder reflections, the model can represent complex rotations and non-symmetric transformations.
- Gating: A "Gated DeltaProduct" variant incorporates a forget gate, further enhancing the model's ability to manage its internal state.
Experimental Evaluation
The authors evaluated DeltaProduct across three distinct domains to test its logical limits and practical performance:
- State-Tracking/Group Theory: Synthetic tasks involving permutation groups ($S_3, S_4, A_5, S_5$).
- Formal Languages: Tasks from the Chomsky hierarchy, including Parity and Modular Arithmetic.
- Language Modeling: Training on FineWeb (up to 805M parameters) and evaluating on CodeParrot, TriviaQA, and OpenThoughts-114k Math. A key focus was length extrapolation—the ability to perform well on sequences much longer than those seen during training.
Key Results and Insights
DeltaProduct demonstrates significant improvements over its predecessors in both logical reasoning and long-context modeling.
Logical Superiority and Geometric Efficiency
DeltaProduct with $n_h=4$ successfully solves the $S_5$ permutation task, whereas DeltaNet ($n_h=1$) and diagonal models like Mamba fail completely. Interestingly, the model learns to exploit geometric shortcuts; for instance, solving the $S_4$ group problem (which theoretically requires three reflections) can be achieved with only two by exploiting an isomorphism to 3D rotations ($SO(3)$).
Length Extrapolation and Memory Management
In language modeling, DeltaProduct shows remarkably stable performance far beyond its training window. While DeltaNet's loss spikes when moving from 4k to 16k tokens, DeltaProduct’s loss remains nearly flat. Analysis of the effective rank of the hidden state reveals that DeltaProduct learns a superior "forgetting" mechanism. Unlike standard DeltaNet, whose memory becomes "cluttered" as sequences lengthen, DeltaProduct keeps its internal state lean and focused.
Scaling and Efficiency
For a fixed parameter budget, increasing the number of Householder products ($n_h$) yields better perplexity than simply increasing the head dimension of a standard DeltaNet. Despite the added complexity, an optimized Triton kernel implementation makes DeltaProduct's forward pass 20% faster than the original DeltaNet implementation.
Conclusion and Future Directions
DeltaProduct bridges the gap between efficient linear-time models and expressive Transformers by parameterizing state-transition matrices as products of multiple Householder transformations. While training complexity scales linearly with $n_h$, the gains in expressivity and stability are substantial.
Future work may explore adaptive $n_h$, allowing the model to dynamically adjust the number of update steps based on token difficulty. Additionally, parameter-sharing techniques like LoRA could reduce the overhead of higher $n_h$ values, further optimizing DeltaProduct for complex reasoning tasks where robust state-tracking is paramount.
Summary updated