Explore the research collection
3 entries · Follow this search
- Paper
ParaTTT: Parallelizing Test-Time Training Layers with Deep Memories
Test-time training (TTT) layers make a recurrent model's memory a small neural network trained online by gradient descent - more expressive than the linear fast-weight memories of Gated DeltaNet and Mamba-2, whose updates are a single delta-rule step. The cost: a nonlinear memory's gradient at each token must be evaluated at weights produced by every earlier update, a sequential dependency. TTT-MLP and Titans break it with block-wise evaluation (gradients for a whole block computed at the block-entry weights), which only approximates token-by-token learning and still runs several times slower than chunkwise-parallel linear recurrences. ParaTTT (PTTT) instead parallelizes arbitrarily deep nonlinear memories by iteratively refining an estimate of the inner-loop gradient trajectory: each refinement is three chunkwise-parallel passes (a forward pass building the feature trajectory implied by the current gradient estimate, an exact gated-delta-rule pass computing the readout trajectory and its feature gradients, and a backward pass producing a new estimate), each pass itself a composition of existing parallel linear-recurrence kernels. The exact online gradient-descent recurrence is a fixed point of the iteration; geometric convergence is proven for a two-layer variant under contraction conditions. Decoding needs no iterations - it runs the exact recurrence. Convergence in practice: on trained models, top-1 agreement with the exact recurrence is ~60% with no iteration, ~90% at N=1, ~94% at N=2, saturating near 98% (the bf16 noise floor); at 4K context, N=2 matches the output error of TTT-MLP's block approximation (b~5) in 32x less time. Speed: a ParaTTT layer at N=2 costs 4.7x a Gated DeltaNet layer and the model keeps roughly one-third the throughput of the linear baselines, but trains 4.9x faster than TTT-MLP end-to-end (37.9k vs 7.8k tokens/s per 8xMI325X node at 340M); TTT-MLP's block form is 5.5x slower per layer at 4K and 8.5x at 16K. Quality (24-layer backbones, SlimPajama, same recipe/order/seed; memory = one hidden layer of width = head dimension, with hidden-layer delta rule and centered readout): at 340M/15.7B tokens, ParaTTT has the best perplexity of the recurrent models (WikiText-103 25.46 vs GDN 26.57, Mamba-2 26.99, TTT-MLP 26.12; Transformer 25.34) and by far the best LAMBADA (26.93 vs 29.66/45.87/40.35; Transformer 39.25), with recall well above the linear recurrences (SWDE 41.9 vs 32.5/25.8; FDA 20.3 vs 17.8/5.7) and the best 32K needle-in-a-haystack of any model tested (16.0, Transformer 10.5). At 1.3B/100B tokens it again leads the recurrences on perplexity (Wiki 15.21, LAMBADA 9.00 - best overall) and recall (SWDE 62.8 vs GDN 59.0, Mamba-2 56.7), though softmax attention still wins most recall and long-context metrics at this scale (SWDE 75.3, NIAH 78.1 at 4K vs 53.8). Caveats: the convergence guarantee covers only the two-layer variant under sufficient contraction conditions; models adapt to their training iteration count (best near training N; training at N=5 improves all four recall tasks but worsens LAMBADA 26.93->28.44 and collapses 32K NIAH 16.0->5.8); the LaCT comparison strips LaCT's sliding-window attention branch, which the authors note prior TTT layers rely on; code repo is a placeholder ('Code to come'). For the fast-weight thread: this is the parallelization fix that makes deep nonlinear memories trainable at linear-recurrence-like cost structure - a per-layer cost of ~4.7x Gated DeltaNet buys the best recurrent recall in the comparison, with exact (iteration-free) decoding.
- Paper
Depth Memory
Reframes depth mixing as memory management. The Depth Memory framework describes PreLN (one additive residual stream), Attention Residuals (a growing key–value cache of every earlier layer output — explicit depth memory), and mHC (an expanded residual stream — implicit depth memory) as streams with Read/Write operators, then proposes Linear Depth Memory (LDM): three streams per token — the standard residual stream, a fixed-size matrix-valued associative memory M, and an inverse-covariance stream P. M is maintained as the EXACT solution of a "depth regression" — least squares over past layers, fitting a linear map that reconstructs earlier layer outputs v_i from their keys k_i — solved online by recursive least squares (Sherman–Morrison) with learnable per-layer forgetting factors, dynamic importance weights, and a ridge penalty. Each write is an error-correcting rank-1 update M ← M + u·κᵀ (u = current prediction error, κ = RLS gain from P); reads add a gated memory retrieval to the residual stream, x + γ⊙M(g⊙q). Depth can afford the exact solve that sequence mixing cannot, because layers are already evaluated sequentially — this is test-time regression (delta rule / MesaNet lineage) transplanted from the sequence axis to the depth axis, and the fixed-size RLS state replaces AttnRes's depth-growing cache. Memory is split into G=16 groups with per-group covariance; main config D_k=8 (memory matrix 8D entries/token, 2× mHC's 4D). Hardware-aware implementation: the RLS recurrence is reversible, so the backward pass unwinds states from the final M instead of storing one per layer, and windowed writes (E=4) defer updates within a window — CuTe DSL kernels for Hopper/Blackwell. Results on FineWeb-Edu with per-method LR sweeps and ~1% extra parameters over PreLN: 400M (Llama-like, 50B tokens) validation PPL 12.08 vs Block AttnRes 12.12, mHC 12.23, Full AttnRes 12.35, PreLN 12.73 — lowest also on WikiText-2 (20.70) and LAMBADA (19.10); zero-shot average 50.46, second to Block AttnRes (50.61). 1.5B (Qwen-like, 100B tokens): validation PPL 9.15 vs mHC 9.25, Block AttnRes 9.26, PreLN 9.48; WikiText-2 14.21 and LAMBADA 8.42, both lowest; highest zero-shot average (59.71). A D_k=4 variant whose memory matrix matches mHC's state size still beats mHC on all three perplexities. Throughput (B200, 1.7B–14B): exceeds Full AttnRes in every setting and mHC in all training and most inference settings; competitive with Block AttnRes, especially in decode. Ablations (400M, 15B tokens): the separate residual stream is load-bearing — memory-only layer input (+1.88 PPL) or replacing the stream with the layer output (+0.87) both fall below PreLN (+0.78); replacing RLS with a delta rule (+0.06) or plain outer-product update (+0.07) still beats PreLN but not RLS; storing the residual stream instead of layer outputs hurts most among addressing choices (+0.33); disabling forgetting is a wash (−0.01). On the DepthBench aspect-ratio protocol, LDM beats PreLN at every width/depth ratio at 400M and 1.6B and is lowest at every 1.6B ratio; the deepest 400M shape is the lone exception (HC slightly better). Caveats: quality evidence stops at 1.5B / 100B tokens (larger scales appear only in throughput tests); LDM can add peak training memory; all results first-party, no independent reproduction.
- Paper
Efficient Reasoning with Flow Language Models
Flow Language Models (FLMs) are continuous-state diffusion LMs trained by conditional flow matching: they interpolate Gaussian noise to one-hot clean targets, train a clean-token cross-entropy objective, and at inference Euler-integrate the learned ODE over N denoising steps, discretizing to tokens only at the very end. Discrete diffusion baselines pass a single categorical value per position between steps, discarding alternative-token probability mass. The paper's theory: the FLM state is exactly a temporal superposition of candidate-sequence vertices, so historical support for non-top-1 candidates persists; that retained support can change prediction margins even within a fixed hard state (a margin span of Δ implies worst-case reproduction error ≥ |Δ|/2 for hard-state-only readouts); and decoder-risk bounds show the continuous state can strictly lower prediction risk vs the hard projection. Empirically, on Maze10/15/20 at 4 denoising steps with matched model sizes, FLM beats the best discrete baseline by +1.2/+18.0/+21.2 percentage points of exact sequence accuracy (99.5/99.1/91.3), with FLM already at 95.9% on Maze15 in a single step; FLM stays ahead of MDLM across three model sizes and 1–512 steps and reaches the 95% target on Maze15 with 36.5% fewer parameters (88.25M vs 139.00M). On Sudoku-Extreme (86.88M), FLM leads at 1–2 steps (21.0%/36.7% vs 19.2%/36.2%) but enhanced discrete samplers overtake from 16 steps onward; the 1-step edge transfers zero-shot to Standard Sudoku (29.5% vs 27.1%). Mechanism evidence: at t=0.80, 23.8% of cells in the accumulated state retain a second candidate ≥0.05 (vs 4.9% in the instantaneous prediction), and interventions removing non-top-1 information degrade recovery (Natural ≥ Top-2 > Top-1), so the retained alternatives are actually used — this is the error-preemption effect where alternative digits fade across steps and let FLMs correct initial mistakes. Wall-clock: FLM is fastest at N=1 on all tasks (0.151s vs 0.303s MDLM on Maze20), comparable at N=64.