Full text not available for this paper
ParaTTT: Parallelizing Test-Time Training Layers with Deep Memories
Summary (Overview)
-
Novel parallelization algorithm: The paper introduces ParaTTT (PTTT), an algorithm that parallelizes test-time training (TTT) layers with arbitrarily deep nonlinear memories by iteratively refining estimates of the inner-loop gradient trajectory.
-
Fixed-point formulation: The exact online gradient descent recurrence is shown to be a fixed point of the ParaTTT iteration, with a proven geometric convergence rate for a two-layer variant under sufficient contraction conditions.
-
Dramatic speedup over prior work: At 4K context, two PTTT refinement steps evaluate the inner-loop trajectory 32× faster than TTT-MLP's block approximation at matched error, and full 340M models train 4.9× faster than TTT-MLP.
-
Competitive language modeling performance: Models trained at 340M and 1.3B parameters match or exceed Gated DeltaNet and Mamba-2 baselines, with better recall on SWDE and FDA tasks, remaining competitive with same-size Transformers.
-
Practical convergence: Only 2 refinement iterations are needed in practice, with trained models achieving ~94% top-1 agreement with the exact sequential recurrence at N=2, saturating near 98% at the bf16 noise floor.
Introduction and Theoretical Foundation
Background: The Expressivity–Parallelism Tradeoff
Softmax attention scales poorly to long contexts due to quadratic compute and linear key–value cache growth. Recurrent language models address both problems by processing sequences in linear time with fixed-size states. Modern recurrent architectures (Gated DeltaNet, Mamba-2, gated linear attention) admit chunkwise-parallel evaluation: tokens within chunks are processed in parallel via dense matrix multiplications, while only the recurrent state propagates sequentially across chunks.
The central question: How can we make recurrent memory more expressive without sacrificing parallel evaluation?
Test-Time Training (TTT)
TTT treats the recurrent state as the weights of a small neural network trained online via gradient descent:
With a linear memory (), this recovers the delta rule of DeltaNet/Gated DeltaNet. A nonlinear memory can adapt its features as well as its readout, but creates a sequential dependency: each token changes the weights at which the next token's gradient must be evaluated.
The Block Approximation Problem
Existing methods (TTT-MLP, Titans) use a block-wise approximation:
This creates a fidelity–speed tradeoff: larger blocks reduce sequential depth but more coarsely approximate token-by-token learning.
Theoretical Foundation
The key insight is that the gradient step at each token is an outer product of the pre-activation gradient and the layer input:
Given a guess of the hidden-layer gradients , this recurrence becomes linear in its state with known coefficients, reducing to a collection of linear recurrences (gated linear attention or Gated DeltaNet) that admit exact chunkwise-parallel kernels.
Methodology
Memory Architecture
The recurrent state is the set of weights of an -layer MLP:
Each weight decomposes as , where is trained by backpropagation and is the recurrent state.
Sequential Recurrence (the Target)
The ParaTTT Iteration
Each refinement consists of three chunkwise-parallel passes:
Step 1: Parallel forward pass. Given the current estimate , unroll the hidden-layer recurrence:
This is gated linear attention with keys , values , and gates . A "shifted" scan reads the state before the token's own write.
Step 2: Readout trajectory and its gradient. The readout runs exactly as a Gated DeltaNet on the features. The feature gradient is computed via:
where is the update token writes to the readout.
Step 3: Parallel backward pass. Propagate feature gradients through hidden layers via transposed reads:
The estimate is updated by a damped Picard step:
Convergence Guarantees
Proposition 1 (Fixed point): The gradient sequence of the sequential recurrence is a fixed point of the iteration. Without damping, every iteration makes the estimate at one more token exact, so iterations reproduce the sequential recurrence exactly.
Theorem 1 (Geometric convergence for L=2 with soft clipping): With soft clip , the iteration map is globally Lipschitz with constant:
where and . If , the iteration converges geometrically:
Practical Design Choices
- Delta rule for hidden layers: Replaces gated linear attention with a gated delta rule that erases stale writes, giving substantially better recall.
- Centering: provides a nonzero readout Jacobian at initialization while keeping the initial output zero.
- Hyperparameters: with hidden width , SiLU activation, per-head gain, , iterations during training.
Empirical Validation / Results
Language Modeling Performance (Table 1)
340M parameters, 24 layers, 15.7B tokens:
| Model | Wiki↓ | Lamb↓ | PIQA↑ | Hella↑ | ARC-e↑ | Wino↑ | ARC-c↑ | BoolQ↑ | SciQ↑ | SWDE↑ | FDA↑ | TQA↑ | DROP↑ | 4K↑ | 8K↑ | 16K↑ | 32K↑ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GDN | 26.57 | 29.66 | 65.2 | 36.5 | 47.1 | 51.5 | 24.1 | 56.6 | 78.4 | 32.5 | 17.8 | 35.7 | 15.3 | 25.9 | 17.0 | 13.7 | 9.3 |
| Mamba2 | 26.99 | 45.87 | 65.7 | 35.1 | 45.5 | 51.9 | 23.4 | 57.8 | 75.2 | 25.8 | 5.7 | 30.6 | 12.6 | 8.1 | 3.0 | 1.1 | 1.2 |
| Transformer | 25.34 | 39.25 | 64.3 | 35.8 | 46.3 | 52.8 | 22.4 | 60.8 | 76.7 | 54.6 | 28.4 | 40.5 | 14.5 | 38.6 | 23.2 | 16.3 | 10.5 |
| TTT-MLP | 26.12 | 40.35 | 65.2 | 35.1 | 46.3 | 50.8 | 23.3 | 58.5 | 77.2 | 33.1 | 16.2 | 35.2 | 13.9 | 31.5 | 20.4 | 13.0 | 12.4 |
| PTTT (ours) | 25.46 | 26.93 | 65.3 | 37.7 | 48.6 | 51.2 | 24.1 | 59.8 | 79.0 | 41.9 | 20.3 | 39.6 | 14.4 | 32.6 | 20.7 | 15.6 | 16.0 |
1.3B parameters, 24 layers, 100B tokens:
| Model | Wiki↓ | Lamb↓ | PIQA↑ | Hella↑ | ARC-e↑ | Wino↑ | ARC-c↑ | BoolQ↑ | SciQ↑ | SWDE↑ | FDA↑ | TQA↑ | DROP↑ | 4K↑ | 8K↑ | 16K↑ | 32K↑ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GDN | 15.78 | 10.56 | 72.2 | 54.9 | 60.0 | 58.9 | 28.1 | 53.9 | 86.7 | 59.0 | 27.0 | 52.9 | 15.2 | 50.8 | 34.1 | 18.8 | 17.5 |
| Mamba2 | 15.42 | 11.62 | 73.6 | 53.5 | 58.0 | 54.1 | 28.2 | 53.9 | 87.7 | 56.7 | 21.5 | 54.5 | 14.8 | 33.4 | 19.6 | 11.3 | 4.9 |
| Transformer | 15.04 | 10.91 | 71.5 | 53.5 | 58.0 | 56.4 | 29.9 | 57.7 | 88.3 | 75.3 | 31.9 | 53.7 | 15.2 | 78.1 | 56.7 | 43.4 | 17.4 |
| PTTT (ours) | 15.21 | 9.00 | 71.9 | 56.0 | 61.0 | 58.6 | 29.9 | 61.3 | 89.2 | 62.8 | 28.1 | 53.7 | 15.0 | 53.8 | 37.1 | 17.5 | 14.7 |
Efficiency Results
- ParaTTT scales linearly in : one layer at costs 4.7× a GDN layer
- TTT-MLP's block-sequential form is 5.5× slower than ParaTTT at and 8.5× at
- Full 340M model trains at 37.9k tokens/s per node vs 7.8k for TTT-MLP (a 4.9× speedup)
Convergence Analysis
- At , matches the error of TTT-MLP at block size in 32× less time
- approaches the bf16 noise floor
- Trained models: ~60% top-1 agreement without iteration, ~90% at , ~94% at , saturating near 98%
Synthetic Tasks
- Cumulative parity: ParaTTT reaches 96–100% at lengths up to 256, 79–90% at 512, 78–80% at 1024, while GDN/Mamba-2 fall to 52–55% at 1024
- k-hop: ParaTTT and GDN solve every ; Mamba-2 breaks at
- MQAR: ParaTTT and GDN solve up to 32 pairs; only attention solves 64 pairs
Theoretical and Practical Implications
Theoretical Contributions
-
Fixed-point formulation: Establishes that the exact online gradient descent recurrence is a fixed point of the ParaTTT iteration, with no contraction assumption needed for this result.
-
Geometric convergence guarantee: Provides explicit Lipschitz bounds and convergence rates under sufficient contraction conditions (), independent of sequence length.
-
Finite-step exactness: Without damping, iterations reproduce the sequential recurrence exactly in exact arithmetic.
Practical Implications
-
Resolving the expressivity–efficiency tradeoff: ParaTTT narrows the long-standing gap between the expressivity of nonlinear recurrence and the efficiency of parallel sequence processing.
-
No attention branch needed: Prior TTT architectures (LaCT, Titans) rely on sliding-window attention branches; ParaTTT is a pure recurrence updated at every token.
-
Exact decoding: Decoding requires no iteration—one exact gradient step from cached weights—so affects only prefill cost.
-
Centering is crucial: The centered readout is necessary to unlock gains from refinement; without it, models perform well without iteration but gain little from additional refinement.
-
Training-iteration adaptation: Models adapt to the finite- prefill used during training, though exact recurrent decoding remains strong on recall tasks.
Conclusion
ParaTTT (PTTT) introduces a principled algorithm for parallelizing test-time training layers with arbitrarily deep memories through iterative refinement of the inner-loop gradient trajectory. The key contributions are:
-
Algorithm: Three chunkwise-parallel passes per refinement (forward, readout+gradient, backward) that compose modified instances of existing parallel recurrences.
-
Theory: Proof that the exact online recurrence is a fixed point, with geometric convergence for a two-layer variant under contraction conditions.
-
Empirical results: 32× faster than TTT-MLP at matched error, 4.9× faster full-model training, competitive or superior language modeling performance versus linear recurrent baselines, and stronger recall on most tasks.
-
Practical efficiency: Only 2 refinement iterations suffice in practice; decoding requires no iteration.
Future directions include extending the readout to other linear recurrent updates (momentum, preconditioning), deeper memories, and further analysis of the expressivity of the converged fixed point.
Related papers
- Last-Iterate Stationarity of Muon with Finitely Many Newton-Schulz Iterations
Finite-step Muon achieves last-iterate gradient convergence on general nonconvex objectives via input stabilization with fixed steps, or via decreasing learning rates paired with increasing momentum under stochastic noise.
- Continue or Restart? The Limits of Early Failure Prediction in Coding Agents
Early execution prefixes from coding agents cannot distinguish successful from failed attempts on the same task, making uninterrupted continuation superior to cold restarts across nearly all budget configurations.
- Accordion: Elastic-Depth Inference via Fixed-Prefix Layer Looping
Accordion enables one MoE model to serve five inference budgets via fixed-prefix layer looping, gaining 3.01 points across 37 tasks while retaining unlooped-path quality.