Manuscript Offprint

arXiv:2610.08553

DeltaTTT: Layerwise Optimization for Nonlinear Recurrent Memory

Yining Li, Dongchen Han, Jie Fu, Gao Huang

ABSTRACT

Sequential test-time training adapts a memory network through successive updates, each computing an inner-loop gradient based on the network's previous state. Intuitively, this state dependence should allow each update to account for what the memory has already learned and better incorporate new information. However, we find that this expected advantage does not consistently materialize in nonlinear memories: a fixed-base parallel TTT baseline outperforms its serial counterpart. Our exploratory experiments point to a key underlying difficulty: nonlinear memories can be harder to optimize than linear ones within a single pass over the sequence. To alleviate this optimization difficulty, we introduce DeltaTTT, which replaces joint inner-loop optimization of a two-layer memory network with layerwise learning. Each layer is assigned a local prediction target and updated through a state-dependent delta rule. This formulation retains a nonlinear readout while enabling chunkwise parallel computation. Experiments on DeltaNet and LaCT backbones show improvements in language modeling and retrieval over their recurrent baselines.

1 INTRODUCTION

In sequence modeling, Test-Time Training (TTT) compresses past key-value pairs into the parameters of a small inner network through online updates (Sun et al., 2024). By default, the updates are sequential, each computing an inner-loop gradient based on the network's previous state. Intuitively, this state dependence should improve memory learning: each update can account for what the network has already learned and better incorporate new information.

This intuition is supported by results on linear memories. DeltaNet replaces the state-independent additive writes of linear attention with residual corrections based on the current memory, achieving stronger associative recall and supporting the value of state-dependent updates (Yang et al., 2024). However, this expected advantage does not consistently materialize for nonlinear memories. In a LaCT-derived language model (Zhang et al., 2025), we compare serial updates, which evaluate each chunk at the current fast weights, with a fixed-base parallel baseline, which evaluates updates at a shared initial state and accumulates them causally. We find that the parallel baseline achieves better downstream results despite computing its updates without considering earlier writes. This result motivates us to revisit how nonlinear memory is optimized in serial TTT.

To examine memory optimization more directly, we fit standalone linear and two-layer MLP memories to fixed K/V sequences extracted from a pretrained full-attention model, using key-value reconstruction as the objective. A linear memory can achieve lower reconstruction error within a single epoch, while the MLP's advantage emerges with additional epochs. These observations suggest that greater expressivity alone is insufficient: the write rule must also realize that capacity within the limited inner-update budget, usually one epoch for TTT.

We therefore ask: if jointly optimizing a nonlinear memory can be less effective than optimizing a linear one within a single pass, can we optimize it more effectively layer by layer? This motivates DeltaTTT, which retains a nonlinear multilayer memory while equipping each linear layer with a

†^{\dagger}Corresponding author.

(a) TTT: Joint Inner Gradient

Figure

Joint objective and update

ℓt=12∥Bϕ(Akt)−vt∥22\ell_{t}=\frac{1}{2}\|B\phi(A k_{t})-v_{t}\|_{2}^{2} Δ(A,B)=−ηt∇A,Bℓt\Delta(A,B)=-\eta_{t}\nabla_{A,B}\ell_{t}

(b) DeltaTTT: Layerwise Delta Updates

Figure

Pre variant: ht=ϕ(At−1kt)h_t = \phi(A_{t-1}k_t)

First-layer local objective

ℓA,t(A)=12∥Akt−vt∥22∇AℓA,t=(At−1kt−vt)kt⊤At=At−1−αt∇AℓA,t\begin{aligned}\ell_{A,t}(A)&=\frac{1}{2}\|Ak_t-v_t\|_2^2\\\nabla_{A}\ell_{A,t}&=(A_{t-1}k_t-v_t)k_t^\top\\A_t&=A_{t-1}-\alpha_t\nabla_{A}\ell_{A,t}\end{aligned}

Second-layer local objective

ℓB,t(B;ht)=12∥Bht−vt∥22∇BℓB,t=(Bt−1ht−vt)ht⊤Bt=Bt−1−βt∇BℓB,t\begin{aligned}\ell_{B,t}(B;h_t)&=\frac{1}{2}\|Bh_t-v_t\|_2^2\\\nabla_{B}\ell_{B,t}&=(B_{t-1}h_t-v_t)h_t^\top\\B_t&=B_{t-1}-\beta_t\nabla_{B}\ell_{B,t}\end{aligned}

(c) Nonlinear Readout

Figure

Read with updated memories

ot=Btϕ(Atqt)o_{t}=B_{t}\phi(A_{t}q_{t})

Figure 1: Joint and layerwise optimization of nonlinear recurrent memory. (a) TTT jointly optimizes both layers through a shared reconstruction objective. (b) DeltaTTT assigns a local reconstruction objective to each layer and performs layerwise delta-rule updates. (c) Both methods use the nonlinear readout after the writes.

local reconstruction target and its own delta-rule update. Given its inputs and targets, each layer admits efficient chunkwise parallel evaluation, while the nonlinear composition and dependencies between layers are preserved. This design aims to combine the expressive capacity of nonlinear memories with effective single-pass optimization and the computational efficiency of the delta rule.

Our contributions are threefold. 1) We show that serial nonlinear TTT can underperform fixed-base parallel TTT, and use fixed-K/V reconstruction experiments to highlight the difficulty of optimizing nonlinear memories within a single pass. 2) To alleviate this optimization difficulty, we propose DeltaTTT, which replaces joint inner-loop optimization of a two-layer memory network with layer-wise learning, assigning each layer a local prediction target and a state-dependent delta-rule update. This formulation retains a nonlinear readout and enables chunkwise parallel computation while preserving exact tokenwise updates. 3) We evaluate DeltaTTT with 0.5B-parameter language models trained on 92.5B tokens, demonstrating improvements in language modeling and retrieval over recurrent baselines on both DeltaNet and LaCT backbones.

References (35)