atlas

Research map / Architectures and efficiency / Attention and transformers

Learning to (Learn at Test Time): RNNs with Expressive Hidden States

ICML 2025 · Architectures and efficiency › Attention and transformers · approach: State space and recurrent sequence models · 15 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Test-Time Training (TTT) layers whose hidden state is a learned model updated by a self-supervised gradient step, instantiated as TTT-Linear and TTT-MLP, and shows they match or beat Mamba and Transformers on long-context language modeling up to 32k.

Problem

Existing RNN layers compress context into a fixed-size hidden state whose limited expressive power prevents them from exploiting long context, while self-attention has quadratic cost.

Approach

Make the RNN hidden state a machine learning model f with weights W, and the update rule one (mini-batch) gradient step on a self-supervised reconstruction loss, so the layer performs training at test time; the self-supervised task's views (theta_K, theta_V, theta_Q) are learned in the outer loop. A dual form enables efficient matmul-based computation.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
improve the linear attention implementation (ablation)Linear attention · Pileperplexity: 15.91 -> 15.23Helped
implement the linear-attention-equivalent layer as TTT (ablation)Linear attention improved · Pileperplexity: 15.23 -> 15.23No clear effect
add learnable W0 (ablation)TTT equivalence · Pileperplexity: 15.23 -> 15.27Hurt
add LayerNorm and a residual connection in f (ablation)TTT with learnable W0 · Pileperplexity: 15.27 -> 14.05Helped
use mini-batch TTT with b=16 instead of b=T=2048 (ablation)TTT with LN and residual in f · Pileperplexity: 14.05 -> 12.35Helped
add learnable eta (ablation)TTT with mini-batch TTT · Pileperplexity: 12.35 -> 11.99Helped
use the Mamba backbone (ablation)TTT with learnable eta · Pileperplexity: 11.99 -> 11.09Helped
use TTT-Linear or TTT-MLP instead of MambaMamba · Pile, 8k contextperplexityHelped
use TTT-Linear or TTT-MLP instead of MambaMamba · Books, 32k contextperplexityHelped
use TTT-MLP instead of TTT-Linear at matched FLOPsTTT-Linear · Books, short versus long contextperplexityMixed
use the Transformer backbone instead of the Mamba backbone (ablation)TTT layers · Pile and BooksperplexityHurt
use TTT-MLP instead of TTT-Linear (ablation)TTT layers with the Transformer backbone · Pile and BooksperplexityHelped

Surprising findings

Limitations

Experimental setup

Datasets: The Pile Books3

Benchmarks: The Pile (2k, 8k context perplexity) Books3 (1k-32k context perplexity)

Metrics: perplexity FLOPs latency (ms)

Baselines: Transformer++ Mamba linear attention DeltaNet TF finetune

Builds on: Mamba linear attention DeltaNet dynamic evaluation fast weight programmers

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy