Source-linked AI summary

RunningTensor: Generalizing Linear Attention to Higher-Order Recurrent States

Luca Herranz-Celotti, Vincent Guigue

arXiv:2609.12814v1cs.LGcs.AI

TL;DR

Linear attention and state-space models use linear-time recurrences but retain matrix-valued memory that limits memory and expressivity. RunningTensor generalizes the recurrent state to an order-o tensor, and its evaluations report improvements over linear-attention and SSM baselines on synthetic recall and downstream tasks.

  • Problem

    Linear attention and state-space models have linear-time recurrences, but their matrix-valued state limits memory and expressivity.

    Source: §1 · p. 1
  • Method

    RunningTensor uses an order-o tensor state updated by rank-1 outer products and read with o−1 vector queries; order 2 recovers linear attention.

    Source: §1 · pp. 1–2
  • Results

    RunningTensor improves over linear-attention and SSM baselines on synthetic multi-query recall and improves on several language-understanding and non-synthetic retrieval downstreams after pretraining.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The reported evaluations suggest higher-order recurrent state can provide useful additional memory capacity beyond matrix-valued state.

    Source: §1 · p. 2

Abstract

from arXiv · show

Linear attention and state-space models provide linear-time sequence modeling, but their recurrent memory remains a second-order tensor (a matrix), limiting the order of interactions that can be represented in the state. We introduce the RunningTensor, which generalizes this memory to an order-$o$ tensor, updated by a rank-1 outer product and read by contracting against $o-1$ vector queries. Order $2$ recovers linear attention; we study order $3$ as a proof of concept, retaining both recurrent and parallel forms while remaining linear in sequence length $T$ and improving working memory capacity from $\mathcal{O}(W^2)$ to $\mathcal{O}(W^o)$. On synthetic multi-query associative recall, RunningTensor outperforms linear-attention and SSM baselines. After pretraining, it also improves performance on language-understanding and non-synthetic retrieval tasks, suggesting that higher-order recurrent state can provide useful additional memory capacity beyond matrix-valued state.

1 Introduction

Linear attention and state-space models offer linear-time sequence modeling but retain matrix-valued recurrent memory, limiting memory and expressivity. RunningTensor generalizes the recurrent state to higher-order tensors and improves on linear-attention and SSM baselines in the reported evaluations.

  • Linear attention and state-space models replace quadratic sequence-length costs with linear recurrences, but their matrix state limits memory and expressivity.Source: §1 · p. 1
  • RunningTensor uses an order-o tensor state, updated by a rank-1 outer product and read through o−1 vector queries; order 2 recovers linear attention.Source: §1 · pp. 1–2
  • State size scales from O(W) for vector RNNs to O(W²) for linear attention and O(W^o) for order-o RunningTensor, while a full pass remains linear in T.Source: §1 · p. 2
  • The instantiated model adds data-dependent forget gates, query-skip gates, and ConcOnlyC, a near-parameter-free channel mix.Source: §1 · p. 2
  • RunningTensor improves over linear-attention and SSM baselines on synthetic multi-query recall and improves on several language-understanding and non-synthetic retrieval downstreams after pretraining.Source: §1 · p. 2

2 Methodology: The RunningTensor

The methodology recasts linear attention as equivalent recurrent and parallel forms, then generalizes its matrix state to a third-order tensor with additional gates and a delta update. The models are trained end-to-end under shared next-token-prediction conditions.

2.1 Preliminary: Linear Attention

  • The linear-attention formulation has a recurrent view for linear-time inference and a matrix view for parallel training, with causality enforced by a lower-triangular mask.The recurrent and unrolled forms are equivalent.Source: §2.1 · p. 2

2.2 The RunningTensor architecture

  • The RunningTensor uses a third-order state read by contracting two modes with vector queries; order 2 reduces to causal linear attention, and the construction extends to higher orders.The paper restricts its implementation to order 3 for simplicity.Source: §2.2 · pp. 2–3
  • Data-dependent forgetting reweights past context, while query-skip gates let the readout use both state axes, one axis, or neither.Expanded queries and keys are L2-normalized to keep pairwise dot products bounded and improve delta-rule stability.Source: §2.2 · p. 3
  • The tensor delta rule subtracts the prior state's prediction from the value before applying an overwrite gate, and uses chunk-parallel training with stepwise recurrent inference.The subtracted prediction removes the component already represented along the expanded key and query pair.Source: §2.2 · p. 3

2.3 Training and Optimization

  • All models use next-timestep prediction and cross-entropy under matched 0.6B-parameter training conditions on FineWeb-Edu 100BT [18].The learning rate was selected using one day of Qwen training and then shared across models.Source: §2.3 · p. 4

3 Results

RunningTensor matches perfect MQAR F1 across evaluated sequence lengths, with fewer parameters than attention and competitive latency. The component-ablation table evaluates RunningTensor variants under the same protocol.

3.1 Synthetic retrieval (MQAR)

  • RunningTensor matches perfect MQAR F1 across evaluated lengths with fewer parameters than attention, while remaining faster than attention and the best SSM.Matrix-state and second-order baselines degrade as context grows; ∆Net falls short of the tensor delta variant at 2048 tokens.Source: §3.1 · p. 4, Table 1 · p. 5

3.2 Component ablation

  • Table 2 compares RunningTensor variants on MQAR validation F1 at dmodel = 128 under the Table 1 protocol.The text distinguishes GDN from the full architecture by whether gout passes through the temporal filter.Source: Table 2 · p. 5, §3.2 · p. 5

4 Related Work

Related work develops efficient alternatives to quadratic self-attention through linear attention, state-space and gated recurrent models, and online-learning or hybrid approaches.

Linear Attention and Fast Weight Mechanisms

  • Linear attention uses kernel-based similarity for associative computation, while Performer approximates softmax attention with random features [4] [20] [21].RetNet adds decay and rotational structure, and Gated Linear Attention incorporates learnable gating [22] [23].Source: §4 · p. 5

State Space Models and Gated Linear RNNs

  • State-space models evolved from fixed or structured transitions toward input-dependent gating, while related linear recurrent architectures share similar computational principles [5] [31] [32] [33] [34] [36].Selective state updates remove dependence on previous hidden states to preserve parallelism [38] [39].Source: §4 · pp. 5–6

Delta Rule, Online Learning, and Hybrid Architectures

  • The delta rule offers greater memory capacity than Hebbian-style updates, while stability and scalability challenges motivate parallelization, normalization, and structured approximations [12] [13] [41].Hybrid architectures combining attention with linear recurrent or SSM layers are presented as a practical balance between efficiency and performance [45].Source: §4 · p. 6
Loading 2609.12814v1…