Learning to (Learn at Test Time): RNNs with Expressive Hidden States
ELVIA analysis
Independent review pending
The inspected fixed-minibatch-gradient construction and nonlinear primal/dual equivalence are valid. A Major issue is demonstrated in the released optimized decoding route: CUDA graph replay freezes the within-minibatch position used by the update coefficient and rotary encoding. A reachable layer-state example changes the output even after normalization. This compromises the semantic correctness of the released decoding-latency reproduction route, without establishing an error in JAX perplexities, prefill latency or historical timing values. Local indexing and nonparametric-formulation issues are Minor; historical run correspondence remains Needs Evidence.
Problem 1. Captured decoding freezes within-minibatch phase
MajorEvidence and reasoning
Problem statement
Released kernel benchmark implements TTT decoding and reproduces its throughput behavior.
Graph replay with Python integer offset. Minibatch16, prompt16/generate16 capturesphase15 versus actualphase0. Valid64dim biasz, q=k0, value rate1/128.
Proof
The inference-kernel release explicitly presents its script as reproducing the paper’s prefill/decode throughput, associated with Section 3.3 and Figure 8, p. 8. Its shipped benchmark enables CUDA graphs. The captured decoding route does not implement the position-dependent TTT state transition at each replay.
All code anchors in this problem are inside . The dependency is explicit:
- `benchmark_prefill_decode.py:115--124` calls generation with `cg=True`.
- `ttt/generation.py:281--282` sets the Python integer `seqlen_offset` to `max_seqlen-decoding_seqlen` during capture.
- `ttt/modeling_ttt.py:389--393` uses that integer modulo to select ; lines – create position IDs from the same integer, overriding any supplied IDs. Lines – use the resulting phase in rotary encoding.
- Graph dispatch keys include batch size, decoding length, prefill status and final-token status, but no within-batch position (`generation.py:245--263`). Replay copies only input IDs (`315--318`); the allocated position tensor is unused.
CUDA graph replay does not rerun the Python argument/index selection performed at capture [cuda]. Therefore incrementing the outer Python offset does not update those captured operations. The current last-token Boolean selects the correct commit/reset branch, but cannot repair the coefficient or rotary phase inside that graph.
For the shipped prompt length and generation length capture occurs at offset phase The initialized coefficient is therefore always instead of the intended sequence The error directly reaches in the decoding kernel; it is not an unused index.
A reachable normalized-output witness. A second supported setting, prompt length and generation length captures at offset phase The first subsequent decode evaluation has actual offset phase Let head dimension be normalization epsilon normalization scale/bias and effective gated learning rate Set At the start of a minibatch take cached bias zero gradient buffers, current query/key zero and value This bias is reachable from zero bias: a preceding 16-token prefill with zero queries/keys, first value and remaining values zero produces it under the same frozen-gradient update and final coefficient
Since and are centered and orthogonal, the normalization-loss gradient is exactly The correct and captured biases are and Applying the actual output normalization gives the first four coordinates The maximum difference is This independent real-arithmetic calculation uses the inspected layer formulas, not author-code execution. Queries/keys are zero, so rotary effects cannot explain away or cancel the coefficient witness. It does not claim a measured fp16/GPU error or a particular language-model score.
Impact, counterevidence and repair scope. The released decoding benchmark times a different state transition from the specified model, a direct failure of its core inference-reproduction role. That supports Major without requiring measured speed loss. It does not establish that the published historical timing used this commit. Ordinary `cg=False` evaluation recomputes the phase. Normal prefill bypasses replay, so the prefill-only timing route is not invalidated. JAX training/perplexity results are separate.
The README openly limits the release to random-token fp16 A100 benchmarking and excludes real serving. Those disclosures limit deployment claims but do not establish correctness of the captured recurrence. The asserted numerical agreement in the README was not independently reproduced and is not bound to a capture-aware validation trace. A repair must supply dynamic phase-dependent inputs or correctly distinguish all phase-dependent graphs, then verify state/output agreement. No such implementation repair or GPU rerun was performed.
Possible revision
Supply dynamic phase or phase-specific graphs, verify outputs and retime.
Problem 2. One-based minibatch anchor off by one
MinorEvidence and reasoning
Problem statement
t'=t-mod(t,b) is the previous minibatch endpoint for tokens1,...,T.
,W0zero,squared(W-1)loss,
Proof
Section 2.4, p. 4, defines as the previous minibatch endpoint. For one-based tokens, at this gives rather than zero. The intended anchor is
With and the intended frozen-anchor updates give The literal formula combined with equation (5) gives The prose, illustration, appendix and inspected source all support the intended previous-minibatch anchor. This is a localized specification error, not evidence that the implemented dual update is wrong. The corrected indexing is algebraically verified.
Possible revision
t'=b
Problem 3. Nonparametric arguments and density conditions
MinorEvidence and reasoning
Problem statement
Printed fixedQ/K kernel yields preceding attention output and supports AppendixB density construction.
Explicit two-dimensional Q/K/V and basis inputs. Density example Q=K=center1 on R.
Proof
Theorem 2, p. 6, uses with the current query as its first argument, reversing the fixed roles used earlier. Appendix B’s density-estimation interpretation also requires a normalizable kernel and specified domain/base measure.
For a fixed-parameter witness let At the preceding attention convention gives scores and output The printed kernel gives scores and output The example also survives the literal query projection in equation (4), since
Using a projected query with score restores the intended weighted-average identity. Query/raw-input arguments must be stated consistently. Thus the family-level inclusion of self-attention remains valid; the issue does not refute the proposed parametric TTT layers. Separately, scalar and center give nonintegrable over This is not a Euclidean density kernel without additional conditions. Finite positive weights still define the normalized regression algebra. Asymmetry alone is not the objection.
Possible revision
Use with specify density conditions separately.
Supporting record & provenance
Work status
Current version
Version 1
Minhao Liu · Initial report · Version 1
Independent review pending
Original claim and review scope
Similar to Transformer, TTT-Linear and TTT-MLP can keep reducing perplexity by conditioning on more tokens, while Mamba cannot after 16k context.
Published ICML 2025 proceedings PDF (PMLR 267); PDF p. 1, Abstract
Actual review scope
The recorded inspection concerns these source locations: Paper Section3.3/Fig8p8; r03 README/benchmark; generation.py245-318; modeling_ttt.py389-403,1396-1401; Section 2.4 p. 4; Theorem 2 Eqs8-9p6; AppendixBp15.