1 00:00:01,000 --> 00:00:09,300 [Hal Turing] Alrighty! Thanks for tuning in! Hello AI world! I am your host, Hal Turing, and my co-host is Dr. Ada Shannon. 2 00:00:09,300 --> 00:00:49,875 [Hal Turing] Today we're looking at "Memory Caching: RNNs with Growing Memory," a February 2026 arXiv paper by Ali Behrouz and colleagues Zeman Li, Yuan Deng, Peilin Zhong, Meisam Razaviyayn, and Vahab Mirrokni. The authors are at Google Research, Google DeepMind, and the University of Southern California. The question is whether a recurrent model can keep checkpoints of its own memory, so that its memory grows with the sequence and closes the recall gap with Transformers. Cost would land somewhere between linear and quadratic. There's also a second question: does averaging the weights of those cached memories do anything beyond just adding up their outputs? 3 00:00:49,875 --> 00:01:08,125 [Dr. Ada Shannon] Recurrent models forget on recall-heavy tasks, and this paper gets back much of that recall without paying for full attention. The weight-averaging idea, which they call Memory Soup, is the part I'd test hardest. I'll set up the problem first, because the cache only makes sense once you see what's being cached. 4 00:01:08,125 --> 00:01:12,150 [Hal Turing] Start with the forgetting. What does it cost in practice? 5 00:01:12,150 --> 00:01:34,000 [Dr. Ada Shannon] Take a needle-in-a-haystack test. You bury a passkey, a number, or a UUID in thousands of tokens of filler, then ask for it at the end. A Transformer keeps every key and value in its KV cache, so it can look the needle up exactly. That cache grows with context, and attention compute is quadratic. A recurrent model squeezes the whole past into one fixed-size state. If the needle doesn't survive the squeeze, it's gone. 6 00:01:34,000 --> 00:01:38,599 [Hal Turing] And linear attention is the simplest version of that squeeze? 7 00:01:38,599 --> 00:02:00,399 [Dr. Ada Shannon] Yes. Katharopoulos and colleagues showed in "Transformers are RNNs," out of Idiap and EPFL in 2020, that if you replace softmax with a kernel, the past collapses into a matrix. Each step does M_t equals M_{t-1} plus v_t times k_t transposed. Reading is a matrix-vector product with the query. That matrix is the same size at token ten and token ten thousand. 8 00:02:00,399 --> 00:02:06,074 [Hal Turing] So it's a lookup table that everything gets written into, and it never gets bigger. 9 00:02:06,074 --> 00:02:28,924 [Dr. Ada Shannon] Right, and writes overwrite each other. Newer models make the memory richer. In Titans, by Behrouz, Zhong, and Mirrokni at Google in 2025, the memory is a small MLP. As tokens stream in, its weights get gradient steps on a regression loss, which asks the memory to map each key to its value. Titans adds momentum and a forgetting term. Deep Linear Attention, or DLA, also uses an MLP memory, with a Hebbian-style objective. 10 00:02:28,924 --> 00:02:34,424 [Hal Turing] Training inside the forward pass sounds odd. Where does that framing come from? 11 00:02:34,424 --> 00:02:52,824 [Dr. Ada Shannon] It's the test-time memorization view, which this group calls nested learning. The forward pass is an inner optimization loop, and the memory is trained on the sequence's own key-value pairs. Every state along the way is a checkpoint of that loop. That's what makes caching checkpoints a natural move. 12 00:02:52,824 --> 00:02:56,125 [Hal Turing] So what is Memory Caching, concretely? 13 00:02:56,125 --> 00:03:17,650 [Dr. Ada Shannon] Split the sequence into N segments. At the end of each segment, freeze the memory and cache it. A token then reads from the live online memory plus all the cached ones. Per-token cost grows with the number of cached memories, so total cost is about N times L. With N equal to one, you have the plain recurrent model. With one cached memory per token, you recover gated attention. N is a dial between the two. 14 00:03:17,650 --> 00:03:21,250 [Hal Turing] What are the variants for combining those memories? 15 00:03:21,250 --> 00:03:42,925 [Dr. Ada Shannon] Four names for now. Residual memory sums the outputs of the cached memories. Gated Residual Memory, GRM, weights them per token. Sparse Selective Caching uses a router to pick only the top few memories. Memory Soup merges the memories' parameters into one module and reads from that. Part 2 covers the mechanics. The thread to follow is whether soup beats the simple gated version. 16 00:03:42,925 --> 00:03:46,175 [Hal Turing] Before that, how do we read the results? 17 00:03:46,175 --> 00:04:08,650 [Dr. Ada Shannon] Four kinds of evidence. Language-modeling perplexity is lower-is-better. Commonsense accuracy is higher-is-better. Needle-in-a-haystack accuracy is higher-is-better, and it tests direct lookup over distance. In-context retrieval, on datasets like SWDE, SQuAD, and FDA, is accuracy at pulling facts out of the document you supplied. Retrieval is the capability caching is supposed to restore. 18 00:04:08,650 --> 00:04:11,900 [Hal Turing] Now the soup part. Where does that come from? 19 00:04:11,900 --> 00:04:32,300 [Dr. Ada Shannon] Wortsman and colleagues, starting at the University of Washington, published "Model soups" in 2022. They fine-tuned several models from the same pretrained initialization, averaged the weights, and got better accuracy than the best single model, with no extra inference cost. This isn't free, though. It works because those fine-tunes sit in one loss basin, with no barrier along the straight line between them. 20 00:04:32,300 --> 00:04:35,025 [Hal Turing] Who established that condition? 21 00:04:35,025 --> 00:04:55,500 [Dr. Ada Shannon] Frankle and colleagues, with Jonathan Frankle at MIT, in their 2020 work on linear mode connectivity. Networks that share an early training trajectory tend to be linearly connected. Independently initialized networks usually aren't. Ainsworth and colleagues, in the 2023 Git Re-Basin paper, showed you often need to permute the hidden units to align them first. 22 00:04:55,500 --> 00:05:02,050 [Hal Turing] So for Memory Soup the open question is whether the cached memories actually share a basin. 23 00:05:02,050 --> 00:05:10,225 [Dr. Ada Shannon] Yes. Keep that condition in mind. I'm saving the verdict until we've seen how the paper builds its memories and what it measures. 24 00:05:10,225 --> 00:05:20,400 [Hal Turing] Let's start with the simplest way to use the cached memories. Residual memory just sums them, right? And I'd guess that collapses for a linear memory. 25 00:05:20,400 --> 00:05:43,375 [Dr. Ada Shannon] Yes, it collapses. The online memory and every cached memory get queried with the same q, and the outputs are added. For a linear memory that's just a sum of matrices times q, so you could pre-add the cached ones into one fixed matrix. The paper says so itself. Gated Residual Memory, GRM, fixes that by putting a weight on each segment's output. The weight depends on the current token, so nothing can be pre-summed. You have to query every cached memory for every token. 26 00:05:43,375 --> 00:05:45,550 [Hal Turing] Where do the weights come from? 27 00:05:45,550 --> 00:06:07,025 [Dr. Ada Shannon] Equation 10. A learned projection of the current token, called u, gets compared by dot product with the mean-pooled tokens of each segment. A softmax turns those scores into weights. So the weight reflects how similar this token is to what that segment contained. The authors argue a plain projection of the token alone would only give position-based filtering, because it ignores what the segment holds. 28 00:06:07,025 --> 00:06:10,975 [Hal Turing] So one forward pass per cached memory, per token. 29 00:06:10,975 --> 00:06:27,075 [Dr. Ada Shannon] Right. That's the N in the O(N·L) cost. Now Memory Soup. Instead of mixing outputs, you mix parameters. Same γ weights, but applied to the memory's weight matrices. Each token builds its own merged network, and you run one forward pass through it. 30 00:06:27,075 --> 00:06:30,900 [Hal Turing] When does that match GRM, and when doesn't it? 31 00:06:30,900 --> 00:06:53,225 [Dr. Ada Shannon] For a linear memory they're identical, because a weighted sum of matrices applied to q equals the weighted sum of each matrix applied to q. That's why the SWLA rows in the tables are a single line. For an MLP memory with non-linear layers, averaging weights and then running the network is not averaging the outputs. The paper pitches that as a new, token-specific non-linear retrieval function. That's the claim to hold up against the results. 32 00:06:53,225 --> 00:06:55,400 [Hal Turing] And the third variant? 33 00:06:55,400 --> 00:07:14,250 [Dr. Ada Shannon] Sparse Selective Caching. An MoE-style router scores each cached segment against the token using those same pooled summaries, keeps the top k, and queries only those plus the online memory. The pooled scores can be precomputed, so the cached states don't have to sit on the accelerator. It's the cheap option. 34 00:07:14,250 --> 00:07:23,550 [Hal Turing] Now the design choice in Section 3.4. Are the cached memories checkpoints of one training run, or independent compressors? 35 00:07:23,550 --> 00:07:49,450 [Dr. Ada Shannon] Two options. Either each segment's memory starts from the previous segment's final state, so they're snapshots along one optimization path. Or each starts from its own independent initial point. The paper says each has pros and cons, but I couldn't find which one produced the reported soup numbers. There's no interpolation-loss check and no alignment analysis. Whether averaging those weights is even sensible depends on the conditions we covered: one basin, or aligned networks. So that stays open for the soup results. 36 00:07:49,450 --> 00:07:53,150 [Hal Turing] What did they train, and how do they handle cost? 37 00:07:53,150 --> 00:08:34,300 [Dr. Ada Shannon] Models at 760 million parameters on 30 billion tokens, and 1.3 billion on 100 billion. The default context is 4K tokens with 256-token segments, and the retrieval tasks use 16K. Equal-size segments cost roughly L squared over the segment length, so Transformer-shaped growth with a smaller constant. The baseline, Log-Linear++, is their own modification of the log-linear attention of Guo and colleagues, 2025. It uses logarithmically growing segments, so cost is L log L, but the distant past gets coarse resolution. They also describe a post-training version that applies caching at inference to existing models, but I'm not leaning on it. 38 00:08:34,300 --> 00:08:39,525 [Hal Turing] Okay, the language modeling and commonsense table. Does caching help? 39 00:08:39,525 --> 00:08:59,475 [Dr. Ada Shannon] Yes, across every base model. On Titans at 1.3 billion parameters, the commonsense average goes from about 56.8 to 58.3 with GRM. And constant segments beat Log-Linear++. The surprise is soup. It lands at 57.9 there, so it keeps most of the gain but trails GRM. 40 00:08:59,475 --> 00:09:03,175 [Hal Turing] Is that gap meaningful? It's under half a point. 41 00:09:03,175 --> 00:09:37,850 [Dr. Ada Shannon] The paper reports no seeds or error bars, so I can't say. But the direction repeats. On DLA at 1.3 billion, GRM is about 56.0 and soup 55.1. At 760 million it's nearly a tie, 51.41 against 51.33. Soup's main win is a Wikitext perplexity of 22.78 versus 22.91 on that same DLA model, plus a few single-task cells. If soup were a real expressivity gain, I'd expect it ahead on deep memories. It's behind or tied in all four deep configurations, so this table doesn't support the pitch. 42 00:09:37,850 --> 00:09:41,250 [Hal Turing] Retrieval is where this should matter most. 43 00:09:41,250 --> 00:10:03,900 [Dr. Ada Shannon] It is, and the gap widens. These tasks pull facts from a supplied document. Titans with GRM averages 40.5, and the Transformer averages 41.0. Soup gets 38.4. On DLA it's 38.0 for GRM against 35.1 for soup. The uncached bases sit around 31 and 30.5, so soup recovers about three-quarters of GRM's gain on Titans and about three-fifths on DLA. 44 00:10:03,900 --> 00:10:07,325 [Hal Turing] Why would merging weights hurt exact lookup? 45 00:10:07,325 --> 00:10:23,650 [Dr. Ada Shannon] A hypothesis, not something the paper tests. Averaging blurs memories together before anything reads them, while GRM reads each one intact and then mixes. Soup is still well above the uncached models, so it's a weaker aggregator, not a failed one. 46 00:10:23,650 --> 00:10:25,825 [Hal Turing] What about the ablations? 47 00:10:25,825 --> 00:10:39,225 [Dr. Ada Shannon] Making the weights context-independent hurts, and so does removing gating, so the gating design earns its place. The rows for shared u and q are zeros in the extracted text, so I'm ignoring them. 48 00:10:39,225 --> 00:10:54,650 [Hal Turing] Here's what bothers me about soup. The pitch is that merging weights builds a new non-linear retrieval function. If that were real, soup should win where the memory is deep. Instead the simple output mix beats it almost everywhere. Why? 49 00:10:54,650 --> 00:11:16,675 [Dr. Ada Shannon] The long-range needle tests point the same way. At 4K and 8K the passkey task saturates at 100 for both GRM and soup, so it tells us nothing. The gap opens at 16K. On the hardest case, the UUID needle, Titans alone finds it about 21 times in 100. Soup gets about 29 and GRM about 32. DLA on the numeric needle is starker, about 55 for GRM and 40 for soup. 50 00:11:16,675 --> 00:11:22,625 [Hal Turing] So nothing in the long-range results shows the extra non-linearity helping. 51 00:11:22,625 --> 00:11:43,250 [Dr. Ada Shannon] Right. Soup is slightly behind GRM in every Titans cell that isn't tied at 100. But each cell is a single run and there's no variance, so I wouldn't lean on any one number. The direction is consistent across three tables, which is different from proof. And the few soup wins, like the DLA 760M perplexity and a couple of PIQA and Wino cells, are small enough that one seed could flip them. 52 00:11:43,250 --> 00:11:48,125 [Hal Turing] What explains the direction? Is it that the weights aren't averageable? 53 00:11:48,125 --> 00:12:15,175 [Dr. Ada Shannon] That's one hypothesis, and the paper doesn't test it. Wortsman's soups worked for fine-tunes from one shared initialization. Frankle's work links that to a shared early trajectory, and Git Re-Basin says independent starts need permutation alignment first. Section 3.4's checkpoint design plausibly meets the shared-trajectory condition. The independent-compressor design wouldn't, and the paper never says which one produced the soup rows. Either way, it shows no loss along the interpolation path. 54 00:12:15,175 --> 00:12:24,500 [Hal Turing] Even with a clean basin, these weights hold context-specific state, not general knowledge. Blending two of them blends two contexts. 55 00:12:24,500 --> 00:12:40,700 [Dr. Ada Shannon] That's my second hypothesis, and it fits the needle drop. GRM reads each memory intact and then mixes the answers. Soup blurs the memories before reading, which should hurt exact lookup. Again, that's our interpretation, not a result in the paper. 56 00:12:40,700 --> 00:12:46,975 [Hal Turing] Then there's the efficiency claim. One forward pass through one merged module sounds cheap. 57 00:12:46,975 --> 00:13:09,150 [Dr. Ada Shannon] Look at where γ comes from. It's computed per token, so every token needs its own merged parameter set. Building it means touching all N cached memories, so the cost is on the order of N times the memory size per token. GRM's N forward passes against a query are the same order. So soup saves at most a constant. It could even lose on hardware, because shared weights allow batched matrix multiplies and a fresh parameter set per token doesn't. 58 00:13:09,150 --> 00:13:11,025 [Hal Turing] Did they measure it? 59 00:13:11,025 --> 00:13:21,650 [Dr. Ada Shannon] Not for soup. The throughput figure covers the variants in general, with no soup-specific speed or memory number. Any speedup claim for soup is unmeasured. 60 00:13:21,650 --> 00:13:24,750 [Hal Turing] Is anything else left unsaid? 61 00:13:24,750 --> 00:13:45,275 [Dr. Ada Shannon] Yes. A deep-memory checkpoint is a full set of MLP weights per segment, and with short segments that could add up to more state than the KV cache it replaces. The paper reports no bytes of state, so we can't tell. And without a control that gives the base model matching compute or parameters, we can't attribute the gain to growing memory rather than extra gating. 62 00:13:45,275 --> 00:13:47,100 [Hal Turing] So what's solid? 63 00:13:47,100 --> 00:14:15,950 [Dr. Ada Shannon] Memory Caching itself. It improves every recurrent base, Titans with GRM lands near the Transformer on retrieval, it beats Log-Linear++, and it's cheaper than attention at long context. The caveats are real: the models are 1.3 billion parameters or smaller, contexts reach 16K, there are no error bars, and the paper itself says the comparison covers a subset of baselines. Log-Linear++ is also the authors' own modified reimplementation, not the published baseline. 64 00:14:15,950 --> 00:14:18,750 [Hal Turing] For someone choosing a variant? 65 00:14:18,750 --> 00:14:41,650 [Dr. Ada Shannon] GRM is the best-supported choice. SSC is the cheaper option when you can't afford every cached memory, though it gives up some retrieval. I'd skip soup until it's tested properly. That means a matched-compute comparison, a loss curve along the path between segment memories, and variance over seeds. A soup restricted to SSC's top-k memories would also cut the per-token merge. Beyond that, the paper points to richer pooling and routing as future work. 66 00:14:41,650 --> 00:15:03,375 [Hal Turing] So caching a recurrent model's memory states recovers much of the recall that a fixed state loses, and GRM is the best-supported way to combine them. But the paper doesn't show that merging weights adds expressivity or saves compute. At these scales the plain output mix does as well or better. Thanks for listening, and goodbye.