FIELD NOTES / 001 · PAPER READING

Can a model learn what to remember while it is processing a sequence?

Meet Titans.

A visual reading of Titans: Learning to Memorize at Test Time.

Titans treats limited-window attention as short-term memory and adds a neural long-term memory whose parameters can be updated at test time. The paper also adds persistent, data-independent memory and explores three ways to combine these components.

01 — WHY ANOTHER MEMORY?

Attention remembers precisely, but only inside its window.

The paper frames attention as a short-term memory: it can model direct dependencies among tokens in the active context, but its cost grows quadratically with context length. Recurrent approaches scale better by compressing history, but that compression can limit what survives.

TOY WINDOW / WHAT FALLS OUT?event 6 / 9

Current context

only the latest three toy events

Long-term trace

illustrative, not Titans output

The point is not simply “more tokens.” Titans introduces a separate learned memory intended to encode an abstraction of earlier history.

02 — WHAT GETS REMEMBERED?

Surprise becomes the learning signal.

The long-term memory is trained as an online associative memory. For an incoming token, Titans uses the gradient of the memory loss as a measure of momentary surprise: a larger gradient means the new input differs more from what the memory currently predicts.

The paper does not rely on momentary surprise alone. It carries past surprise forward through a momentum-like term, so a surprising event can keep influencing nearby updates instead of disappearing immediately.

Attention models the current window directly; the paper treats this role as short-term memory.

03 — THE UPDATE RULE

Remember, carry surprise, forget.

The memory state is updated with three ingredients: retained old memory, past surprise, and the gradient from the current input. An adaptive forgetting gate can decay old memory when capacity should be freed.

TEACHING ANALOGY / TURN THE DIALSnot model output
Mₜ = (1 − αₜ)Mₜ₋₁ + Sₜ   ·   Sₜ = ηₜSₜ₋₁ − θₜ∇ℓ
retained memory
0.48
surprise update
0.60
toy total
1.08

The important idea is literal: the neural memory’s weights are changed during test-time processing rather than only retrieving a fixed stored vector.

04 — HOW TITANS USES MEMORY

One memory module, three architecture choices.

The paper proposes three Titans variants. They differ in where the neural memory enters the computation, so “Titans” is a family rather than one single wiring diagram.

retrieved memory becomes context for attention

MAC retrieves long-term memory for the current segment and concatenates it, together with persistent memory, into the context processed by attention.

05 — WHAT THE PAPER SHOWS

It is a mechanism paper with broad sequence-model experiments.

The authors evaluate Titans on language modeling, common-sense reasoning, time-series tasks, and long-context retrieval tests. The paper reports that the family is competitive with the tested Transformer and modern recurrent baselines, and demonstrates very long-context needle-in-a-haystack behavior.

This page is an explanation of the mechanism, not an independent reproduction of those benchmark results. The most useful thing to carry forward is the separation between short-term attention, test-time neural memory, and persistent task memory.

THE PAPER IN ONE LINEmechanism summary

Keep the current context precise with attention; let a separate neural memory learn associations from the stream; control what persists through surprise, momentum, and forgetting.

Main paper
Behrouz, Zhong & Mirrokni — Titans: Learning to Memorize at Test Time · NeurIPS 2025 PDF ↗Proceedings page ↗
← all notesnext: Lost in the middle ↗