The RNN
Compresses the sequence into a fixed-size state. Cost stays linear; capacity does not grow with the sequence.
CONTEXT JAMMING / MEMORY CACHING
How checkpointing a recurrent memory turned the choice between an RNN and a Transformer into a single tunable coordinate.
For a decade the field treated fixed-memory recurrence and growing-memory attention as opposed designs with opposed cost curves. Behrouz and colleagues propose that the opposition is partly an artifact of never naming the axis between them—and that the axis is how often a memory checkpoint is saved (§3).
An RNN and a Transformer are not two architectures. They are two settings of N.
01 · The cast
The difference is not whether the model has memory. It is how finely the past is retained (§3, Eqs. 4–5).
Compresses the sequence into a fixed-size state. Cost stays linear; capacity does not grow with the sequence.
Caches every past token. Access is direct, but compute becomes quadratic and inference KV memory grows.
Compresses each segment into a learned state, then caches those states. Segment count sets the position between the endpoints.
02 · Coordinate reversal
Split a length-L sequence into N segments and retrieve from the online memory plus the cached segment memories. Update remains O(L); retrieval adds O(N) work per token, giving O(NL), with 1 ≤ N ≤ L (§3.1, “Memory Complexity”).
03 · Checkpoints or compressors
Tokens are training samples and the memory state acts like parameters. Each segment begins from the previous segment’s last state, preserving an optimizer checkpoint against forgetting (§3.4).
Each cached memory is a self-contained representative of one segment. Independent initialization prevents one segment’s state from interfering with another (§3.4).
The authors report that each choice has advantages and disadvantages; §5.6 does not establish a universal winner.
04 · The simplest aggregation
Residual Memory applies the same query to the online memory and every cached state, then sums the outputs (Eq. 7). For a strictly linear matrix memory, that construction collapses: the matrices can be pre-summed into one fixed-size memory (Eqs. 12–13).
05 · Averaging the memories
Memory Soup interpolates cached-memory parameters first and applies the query once to the resulting input-dependent memory M* (Eqs. 14–15). For a linear memory it is mathematically equivalent to GRM. With a deep nonlinear memory such as DLA or Titans, parameter interpolation constructs a new retrieval function and the equivalence breaks (§3.2).
Linearity makes souping weights before the query identical to summing weighted outputs.
06 · Routing the cache
SSC scores cached segments by the same connector-to-mean-pooled-content similarity, chooses Top-k, and retrieves only those memories plus the online one (Eqs. 16–17). Segment summaries can be precomputed, scoring is parallelizable, and only selected memories must be loaded onto the accelerator (§3.3).
Each token activates a subset of parameters for writing and a larger subset for reading: a sparse unified memory whose block granularity is set by segment size. — paraphrase of §3.3, “Effective Memory”
07 · The collapse
Set segment size to one and use a value-less vector memory: each state stores one projected token (Eq. 18). Cache those states, softmax-normalize γ (Eq. 19), and reparameterize each state as v′ᵢ. The remaining expression is a softmax-weighted sum of value vectors gated by an input projection—the gated global attention block (Eq. 20).
M₁⁽ᵗ⁾ = bK + xₜWKEach step changes one term in the construction.
The neighboring hybrid result is also limited but revealing: a vector-memory compressor followed by global attention is equivalent to checkpoint-style MC with segment size one in the paper’s oversimplified construction (Eqs. 21–24). With normalization and feed-forward layers, expressivity can differ (§4.1).
08 · Where to cut
Equal segments of size C=L/N cost O(p·L²/C). Logarithmic segmentation writes L in binary and uses the powers of two corresponding to set bits; 37=(100101)₂ becomes 32, 4, 1, with O(p·L log L) cost (§4.2, Fig. 3).
The cheaper scheme loses resolution in the distant past. At 16K, a single early memory can be forced to compress 8K tokens; §5.2 uses this to explain Log-Linear++ weakness on long-context NIAH. Constant-size variants outperform it in Tables 1–3.
09 · The evidence
| Model | Metric | Base | + GRM | Locator |
|---|---|---|---|---|
| Titans (LMM) | 8-task average | 56.82 | 58.33 | Table 1 |
| Titans (LMM) | Wikitext perplexity ↓ | 15.60 | 15.37 | Table 1 |
| DLA | 8-task average | 53.72 | 55.96 | Table 1 |
| Titans (LMM) | S-NIAH-3 @ 16K | 21.2 | 32.2 | Table 2 |
| DLA | S-NIAH-3 @ 16K | 4.0 | 18.2 | Table 2 |
| DLA | Retrieval average | 30.51 | 38.03 | Table 3 |
| Titans (LMM) | Retrieval average | 31.75 | 40.50 | Table 3 |
| Transformer | Retrieval average | 41.00 | — | Table 3 |
Values transcribed verbatim. No rounding, interpolation, or recomputation.
Across the reported variants the recurring ordering is GRM ≥ Memory Soup ≥ SSC > Log-Linear++ > base, while SSC offers the strongest efficiency trade-off. Figure 4 places MC variants between Transformers and RNNs in throughput and reports that the efficiency gap widens with context.
MC can also be applied after pre-training by caching inference-time states and decoding with an unweighted moving average. The authors say this meaningfully improves length extrapolation, but provide no numeric result for that claim (§4.3, final paragraph).
10 · Where it still loses
11 · Context Jamming extension
The conceptual reversal rhymes with Kinematic Space: there, a place becomes an interval coordinate; here, an architecture choice becomes segment count. This is an editorial analogy, not a citation or mathematical connection.
Transformer-XL (N° 15) is structural affinity plus documented lineage: it caches previous-segment hidden states and appears in MC’s related work. MC expands that instinct into learned, gated, routed retrieval over past segment memories.
Kinematic Space (N° 03) is an editorial analogy only. Both replace a coordinate system and index by position and scale; there is no citation, shared authorship, or formal relationship.
12 · Epistemic ledger
13 · Field guide
The current segment’s memory state, still being updated.
The final learned memory state saved from a completed segment.
A contiguous chunk compressed into one memory state.
The online memory output plus the sum of cached-memory outputs (Eq. 7).
Residual retrieval with input- and segment-dependent weights (Eqs. 8–10).
Input-dependent interpolation of memory parameters before a query is applied (Eqs. 14–15).
Top-k retrieval from cached memories chosen by a contextual router (Eqs. 16–17).
The scoring rule that selects cached segments relevant to a query.
Keeping only the k highest-scoring cached memories.
A segment summary formed by averaging its token representations.
A recurrent matrix-valued memory with linear-time updates.
A recurrent architecture whose memory is a learned deep module.
A test-time memorization architecture used as one MC base model.
Sliding Window Linear Attention, another recurrent update rule tested with MC.
A hierarchical recurrent design using logarithmically many states.
The binary-indexed data structure motivating log-linear segmentation.
The objective used to update an associative memory from keys and values.
The view that a model trains an internal memory during its forward pass.
A state updated to map keys to values or learned representations.
A memory whose mapping depends only on keys.
Compression without a separate operation that explicitly removes local correlation.
The width limiting a compressed memory state’s representational capacity.
Storing attention keys and values for raw past positions; not MC’s compressed segment states.
Needle-In-A-Haystack retrieval tests.
Multi-Query Associative Recall.
A suite of long-context understanding tasks.
A language-model uncertainty metric; lower is better.
Using a model beyond the context lengths seen in training.
Averaging trained model parameters, the inspiration for Memory Soup.
Sparse conditional routing across parameter blocks, the inspiration for SSC.
14 · Source notes
Behrouz, Ali, Zeman Li, Yuan Deng, Peilin Zhong, Meisam Razaviyayn, and Vahab Mirrokni. “Memory Caching: RNNs with Growing Memory.” arXiv:2602.24281v1, 27 February 2026. Google Research, Cornell University, and University of Southern California.
Open the primary source ↗