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:46,650 [Hal Turing] Today's paper is MEMORILLA: Latent Semantic Memory for LLMs. It's an October 2026 arXiv preprint from Adibvafa Fallahpour and colleagues at Stanford, with Jure Leskovec among the corresponding authors. Other affiliations include the University of Toronto, Penn, MIT, the Vector Institute and the Arc Institute. The claim: a small trained module reads a whole collection of stored document embeddings and hands a frozen language model just 16 vectors. Those 16 vectors supposedly beat pasting text into the prompt. 3 00:00:46,650 --> 00:01:00,325 [Dr. Ada Shannon] Right, and the headline is that it beats the compared memory systems on average while giving the decoder a tiny fraction of the document tokens. Whether that holds up is the interesting part. Let's start with the problem. 4 00:01:00,325 --> 00:01:20,599 [Hal Turing] Here's a scenario. Three months ago you were polishing an email with an assistant, and in passing you revealed you hate small talk and like blunt feedback. Today you ask for advice on a hard conversation with your manager. Nothing in today's question overlaps with that old chat. Obvious fix: just search the old chats. 5 00:01:20,599 --> 00:01:41,274 [Dr. Ada Shannon] Search fails twice there. The old chat shares no words with the question, so similarity search may not surface it. And even if it does, the signal is spread out. One chat shows bluntness, another shows a dislike of meetings, a third shows how you handle conflict. No single chunk answers the question. You need to integrate across many, and top-k retrieval takes the few most similar chunks and stops. 6 00:01:41,274 --> 00:01:46,424 [Hal Turing] Before we go further, set the stage. The model here is frozen, right? 7 00:01:46,424 --> 00:02:06,275 [Dr. Ada Shannon] Frozen means the weights never change. So whatever it should know about your history, a long book, or an agent's past actions can only arrive through its input. Memory becomes a question of what goes into the prompt. One more term: closed-book means the same model answers from the question alone, with no documents. That's the floor, and we'll lean on it later. 8 00:02:06,275 --> 00:02:15,875 [Hal Turing] So the standard options. RAG embeds chunks, takes the top-k closest to the question, and pastes them as text. Or you paste everything. 9 00:02:15,875 --> 00:02:59,400 [Dr. Ada Shannon] Full context has its own problem. Long windows are expensive, and models can get worse as the window grows. Liu and colleagues showed the lost-in-the-middle effect in 2023, and Du and colleagues in 2025 showed that length alone can hurt even when retrieval is perfect. Then there are agent memory systems. MemGPT, from Charles Packer and colleagues at Berkeley in 2023, lets the model page information in and out like an operating system. Mem0, by Prateek Chhikara and colleagues in 2025, uses an LLM to extract and update structured facts. MemoRAG, from Qian and colleagues at the 2025 Web Conference, builds a global memory that writes clue queries. A-MEM is in the same family. They organize the text more cleverly, but they all end by putting selected text in the prompt. 10 00:02:59,400 --> 00:03:03,325 [Hal Turing] So the bottleneck is the prompt being made of words. 11 00:03:03,325 --> 00:03:24,050 [Dr. Ada Shannon] Yes. The alternative is soft tokens. These are vectors with the same size as a word embedding, fed straight into the model, corresponding to no word. Compression methods like ICAE, AutoCompressors and xRAG squeeze a document into a few of them. Most are built without seeing the question, and xRAG compresses just one retrieved document into one token. 12 00:03:24,050 --> 00:03:35,525 [Hal Turing] Hold on. If the compression doesn't know the question, it can't know what to emphasize. A summary of your chats written blind might keep your job title and drop the bluntness thing. 13 00:03:35,525 --> 00:03:59,425 [Dr. Ada Shannon] Exactly the weakness. A question-blind summary has to serve every future query. Memorilla's pitch is that the readout depends on the query. There's also a third family that stores model-internal states, like LongMem, MemoryLLM, M+ and Cartridges. Cartridges, from Eyuboglu and colleagues at ICLR 2026, trains a model-specific cache for each corpus. Memorilla instead trains one reader that accepts new collections without per-corpus optimization. 14 00:03:59,425 --> 00:04:02,625 [Hal Turing] What's the lineage? This sounds familiar. 15 00:04:02,625 --> 00:04:33,399 [Dr. Ada Shannon] Three ancestors. Perceiver, by Andrew Jaegle and colleagues at DeepMind in 2021, uses a small fixed array of learned latent vectors that cross-attend over a huge input. Cost grows with the input only through the read, and the output size is fixed. BLIP-2, by Junnan Li, Dongxu Li, Savarese and Hoi in 2023, built the Q-Former, a small trained bridge between a frozen image encoder and a frozen LLM that emits soft tokens. And Lester, Al-Rfou and Constant's 2021 prompt tuning showed learned soft prompts can steer a frozen model. 16 00:04:33,399 --> 00:04:38,449 [Hal Turing] Prompt tuning's prompt is one fixed learned vector per task, though. 17 00:04:38,449 --> 00:04:53,074 [Dr. Ada Shannon] Right, and that's my reading of the contrast, not the paper's wording. Memorilla's tokens are generated per query from stored content. Whether that's more than a Perceiver or a Q-Former is something we'll come back to once we've seen the evidence. 18 00:04:53,074 --> 00:05:11,175 [Hal Turing] So concretely: each chunk gets embedded once and kept as a vector. That's the persistent store, the same thing a dense retriever would build. At question time the module returns 16 memory tokens, always 16 however big the collection, and they go in front of the question. 19 00:05:11,175 --> 00:05:31,550 [Dr. Ada Shannon] Yes. Evaluation spans three families plus an agent test. Personalization: PersonaMem-v2, the authors' synthetic PersonalizationV4, and LaMP-4 and LaMP-7. Long-document QA: NarrativeQA and TriviaQA. Knowledge-intensive QA: FactKG and PubMedQA. Then a TextWorld game agent. 20 00:05:31,550 --> 00:05:33,800 [Hal Turing] What should people listen for? 21 00:05:33,800 --> 00:05:48,275 [Dr. Ada Shannon] Two questions. Does the module gain by reading the store, or by what it learned in training about answer formats? And is the comparison fair when the module trains on these benchmarks and most baselines don't? Keep those in your pocket. 22 00:05:48,275 --> 00:05:57,350 [Hal Turing] Let's walk the mechanism with one running example. You have 200 old chats and one new question. What happens on the write side? 23 00:05:57,350 --> 00:06:13,425 [Dr. Ada Shannon] Each chat chunk goes through a frozen Qwen3-Embedding-4B once and becomes a single vector, about 5 kilobytes. That's the whole store. It's the same index a dense retriever would build, so the write cost is shared with RAG, not removed. 24 00:06:13,425 --> 00:06:15,550 [Hal Turing] And at question time? 25 00:06:15,550 --> 00:06:47,125 [Dr. Ada Shannon] The question gets one embedding. The module holds 16 learned slots, which are just vectors. First each slot is nudged by the question embedding, so every slot keeps its identity but now carries some sense of what's being asked. Then those 16 cross-attend over all 200 stored vectors, through two blocks, each followed by a feed-forward layer. Finally a linear projection takes them from the encoder's 2,560 dimensions to the decoder's 4,096. Those 16 vectors are prepended to the question text, and the frozen Qwen3-8B proceeds as usual. 26 00:06:47,125 --> 00:06:53,699 [Hal Turing] So the nudge is what the blind summary lacked. The slots know what to look for before they read. 27 00:06:53,699 --> 00:07:09,325 [Dr. Ada Shannon] Yes. Top-k RAG makes a hard choice: these five chunks, nothing else. This is a soft, weighted read over everything. It stops helping where you'd expect. Sixteen vectors can't hold an exact string, so a specific name or number can get blurred. 28 00:07:09,325 --> 00:07:11,325 [Hal Turing] How is it trained? 29 00:07:11,325 --> 00:07:54,175 [Dr. Ada Shannon] Only the module trains, 194,123,776 parameters, on four H100s. The loss is next-token cross-entropy on the answer only. There are three stages. Stage 1 is about 1.98 million Wikipedia examples where the 16 tokens must carry enough content for the decoder to write a paraphrase. Stage 2 is about 1.34 million examples from ten reading-comprehension, QA and summarization sets. Stage 3 mixes the training splits of all eight evaluation benchmarks, plus five extra epochs on the two personalization sets, PersonaMem-v2 and PersonalizationV4. Training and test users are disjoint. I'm stating that as fact now, because it matters later. 30 00:07:54,175 --> 00:07:58,401 [Hal Turing] I noticed that, and I'm filing it. What are the baselines? 31 00:07:58,401 --> 00:08:20,401 [Dr. Ada Shannon] Everyone shares the same Qwen3-Embedding-4B and the same frozen Qwen3-8B. RAG at one, five and fifty chunks, full context, Mem0, MemoRAG and LLMLingua-2 are all zero-shot. Closed-book is the floor. The one trained baseline is xRAG, with a 27.3-million-parameter bridge trained per benchmark, turning one retrieved chunk into one token. 32 00:08:20,401 --> 00:08:24,751 [Hal Turing] Now results. How can 16 tokens beat everything? 33 00:08:24,751 --> 00:08:47,001 [Dr. Ada Shannon] Start with the benchmark. FactKG asks whether a claim is true given a knowledge graph. Scored as accuracy, higher is better. Memorilla gets about four more claims right per hundred than pasting in everything, 84.33 against 80.43, while reading about one token for every 108 of full context. Across all eight tasks it has the best average, about 7.8 points above the best compact baseline, xRAG. 34 00:08:47,001 --> 00:08:51,876 [Hal Turing] That still sounds backwards. Less information, better answers. 35 00:08:51,876 --> 00:09:13,751 [Dr. Ada Shannon] Longer windows can hurt even when retrieval is perfect. FactKG claims also need several facts combined, and a long dump buries them. But it's not a clean sweep. On PubMedQA, only 100 questions, the whole source is 324 tokens, and Memorilla trails the best text baselines by eight to ten questions out of a hundred. On NarrativeQA and PV4, MemoRAG edges it, while reading far more text. 36 00:09:13,751 --> 00:09:18,601 [Hal Turing] So it loses where the exact words matter and the text is short. 37 00:09:18,601 --> 00:09:20,201 [Dr. Ada Shannon] That's the pattern. 38 00:09:20,201 --> 00:09:24,101 [Hal Turing] PersonaMem-v2 next. What does it test? 39 00:09:24,101 --> 00:09:56,676 [Dr. Ada Shannon] The model must pick the answer that fits a user's never-stated preferences. The model writes free text, which is embedded, and counts as correct if its nearest neighbor among the candidate answers is the gold one. Accuracy again. Closed-book gets about 26 out of 100. Every untrained baseline stays near it, best 28.76, including full context reading about 2,000 times as many tokens. Memorilla gets about 45. Gains on LaMP-7 and LaMP-4, where ROUGE-L measures word overlap with the reference text, are smaller but in the same direction. 40 00:09:56,676 --> 00:10:00,326 [Hal Turing] That jump is enormous. Is it the reading? 41 00:10:00,326 --> 00:10:21,976 [Dr. Ada Shannon] The architecture ablation says the readout design matters. Same data, similar budget, trained from scratch on a Qwen3-4B decoder. Query-blind and parameter-matched pooling land around 29 to 31, cosine top-16 selection about 34. Memorilla gets 44. So conditioning the slots first beats both pooling and hard selection by roughly 10 to 15 points. 42 00:10:21,976 --> 00:10:26,151 [Hal Turing] But the Q-Former is right there at 43.3. 43 00:10:26,151 --> 00:10:42,001 [Dr. Ada Shannon] Which tells you novelty over a BLIP-2-style bridge is modest on this task. And your instinct is the right one: every reader in that table is trained. This ablation compares readers with each other. It doesn't tell us whether the store matters at all. 44 00:10:42,001 --> 00:10:45,726 [Hal Turing] Exactly. So why the huge jump is still open. 45 00:10:45,726 --> 00:10:48,301 [Dr. Ada Shannon] Open, and we'll pull it apart shortly. 46 00:10:48,301 --> 00:10:51,976 [Hal Turing] Then cost. Does the flat-serving claim hold? 47 00:10:51,976 --> 00:11:14,251 [Dr. Ada Shannon] In their setup, yes, and narrowly. On one H100, batch size one, Memorilla takes about 0.74 seconds whether it holds one document or 512. Full context goes from about the same at one document to nearly 20 seconds at 512, roughly 27 times longer. The module forward pass is about 2 milliseconds. The store for a 200-chat user is about a megabyte, versus a KV cache thousands of times larger. 48 00:11:14,251 --> 00:11:15,776 [Hal Turing] And RAG? 49 00:11:15,776 --> 00:11:31,876 [Dr. Ada Shannon] Not timed, nor Mem0 or MemoRAG. Full context is the most expensive comparison available, on a non-paged Hugging Face stack the authors say affects it. The honest claim is flat cost as history grows, not faster single queries. 50 00:11:31,876 --> 00:11:35,076 [Hal Turing] Last item. Why 16 tokens? 51 00:11:35,076 --> 00:11:54,351 [Dr. Ada Shannon] Trained from scratch, going to 128 slots made PersonaMem-v2 and PV4 drop, so they settled on 16. Dropping slots from a trained 16-slot model also hurts: at four slots PersonaMem-v2 is barely above closed-book. Why capacity behaves this way we'll get to in a moment. 52 00:11:54,351 --> 00:12:02,051 [Hal Turing] We left open whether the big personalization jump comes from reading the store. What does the paper actually show? 53 00:12:02,051 --> 00:12:25,301 [Dr. Ada Shannon] Two things, both narrow. On FactKG, with a 4B decoder, they replaced every document embedding with Gaussian noise and the module dropped about six points. The Q-Former dropped about five. So the store is being used. The trained query-blind readers also did clearly worse on the same data. What's missing is any empty, shuffled, or another-user's-chats run on PersonaMem-v2, LaMP-4, or LaMP-7. Those are the tasks where the result is hardest to interpret. 54 00:12:25,301 --> 00:12:28,151 [Hal Turing] Why those tasks specifically? 55 00:12:28,151 --> 00:13:06,701 [Dr. Ada Shannon] Closed-book is already a strong floor there, and a trained module can pick up answer style and format without reading anything. Three pieces of evidence. First, xRAG, a one-token bridge trained per benchmark, collects roughly three-quarters of the LaMP-7 gain. Second, the module trains on gold-answer text, and the scorer is nearest-neighbor in embedding space, so matching the style of a correct answer pays. Third, the noisy-store FactKG number, about 76.6 by my arithmetic from the reported drop, is still well above the 8B closed-book score. But that's a different decoder, and the 4B closed-book number isn't reported, so I can't say how much of it is prior. 56 00:13:06,701 --> 00:13:10,426 [Hal Turing] So the verdict is not that it's mostly prior. 57 00:13:10,426 --> 00:13:22,051 [Dr. Ada Shannon] No. The verdict is unmeasured, with evidence on both sides. Reading is real on FactKG. On the personalization tasks, nobody has separated reading from priors. 58 00:13:22,051 --> 00:13:29,026 [Hal Turing] Then training fairness. The module sees millions of examples and the zero-shot baselines see none. 59 00:13:29,026 --> 00:14:09,751 [Dr. Ada Shannon] About 3.3 million examples across Stages 1 and 2, then the Stage 3 mixture, with extra epochs on PersonaMem-v2 and PV4. Only xRAG is matched, and it's one chunk into one token. The paper does include a control. LoRA means adding small low-rank adapter matrices to a model's weights and training only those. They trained a rank-130 LoRA on Qwen3-4B, 268 million parameters, on the same per-task rows with no documents. Memorilla leads, but the decoder differs, the LoRA gets no retrieved text, and it skips the curriculum. The authors also say the PubMedQA and LaMP-7 gaps are within noise. 60 00:14:09,751 --> 00:14:12,351 [Hal Turing] What's the control you'd want? 61 00:14:12,351 --> 00:14:29,726 [Dr. Ada Shannon] A LoRA or prefix-tuned Qwen3-8B trained on the same mixture, with and without retrieved text, plus a trained RAG baseline. Otherwise 'frozen LLM plus trained interface beats untrained pipelines' doesn't show a latent interface beats a text one. 62 00:14:29,726 --> 00:14:33,651 [Hal Turing] Is anything about the setup in the paper's favor? 63 00:14:33,651 --> 00:14:53,501 [Dr. Ada Shannon] Yes. The decoder stays frozen, so the store is portable and the LLM keeps its abilities. All baselines share the encoder and decoder, and retrieval depth was swept. Against that: one seed, no intervals, PubMedQA at 100 questions, TriviaQA at 500, and Mem0 and MemoRAG running on 4B memory models. 64 00:14:53,501 --> 00:14:55,301 [Hal Turing] Where does it lose? 65 00:14:55,301 --> 00:15:35,926 [Dr. Ada Shannon] Exact detail. On NarrativeQA, 'why' and 'how' questions favor Memorilla, while 'who' and 'which' favor plain retrieval by about three points. The authors flag that question type is confounded with answer length. On FactKG, RAG-50 falls from roughly 79 to 52 percent as facts per claim go from one to four, while Memorilla stays in the 80s. But 73.5 percent of claims have more than 50 chunks, so part of that gap is evidence RAG-50 never retrieves. The methods also err differently. The union of what each solves alone is an oracle bound, not a built hybrid. And shared errors skew heavily toward true claims, which looks like a false-leaning threshold, so some of the benchmark behavior is calibration. 66 00:15:35,926 --> 00:15:41,051 [Hal Turing] That fits the lineage. BLIP-2 struggled with OCR and counting. 67 00:15:41,051 --> 00:15:59,526 [Dr. Ada Shannon] Right. Perceiver's cost grows with the input only through the read, so input count isn't the limit. The fixed output budget is. The K sweep shows it: FactKG, TriviaQA, and NarrativeQA keep improving as K grows, while PersonaMem-v2 and PV4 got worse at 128. 68 00:15:59,526 --> 00:16:03,176 [Hal Turing] So what's new over Perceiver and the Q-Former? 69 00:16:03,176 --> 00:16:23,576 [Dr. Ada Shannon] Conditioning the slots on the query before they read, no self-attention, and about 190 million parameters against about 269 for the Q-Former. The measured edge is under a point on PersonaMem-v2 and about two on FactKG. It's a careful, efficient bridge with evidence that conditioning first matters. It isn't a new class of mechanism. 70 00:16:23,576 --> 00:16:27,301 [Hal Turing] Now TextWorld, the continual learning claim. 71 00:16:27,301 --> 00:17:01,151 [Dr. Ada Shannon] GRPO is a reinforcement-learning method that compares a group of rollouts and needs no critic. avg@3 is the mean solve rate over three samples per game. pass@3 is the share of games solved at least once in three tries. With K=8 and a 4B decoder, the full-history baseline solved 10 of 40 held-out games at pass@3, and the trained memory solved 15. An untrained module did worse than none, so the gain comes from learning the interface, not from extra tokens. Budget exhaustion dropped from 71 to 58 percent of rollouts. 72 00:17:01,151 --> 00:17:03,801 [Hal Turing] But is that continual learning? 73 00:17:03,801 --> 00:17:22,576 [Dr. Ada Shannon] Only in a narrow sense: the store grows during an episode while the decoder stays frozen. Not overwriting prior knowledge holds by construction, because no LLM weights change. There's no forgetting test, no uncertainty on a five-game difference, and the module trained on that game distribution. 74 00:17:22,576 --> 00:17:25,051 [Hal Turing] Practically, who should care? 75 00:17:25,051 --> 00:17:47,601 [Dr. Ada Shannon] People whose evidence is spread across many documents and whose decoder context is tight. A store about 7,266 times smaller than a KV cache, with per-user deletion by removing embeddings, is attractive. It doesn't fit exact lookup, and the ethics note itself says embeddings can still encode sensitive information. Everything is Qwen encoder plus Qwen decoder, on benchmark families it trained on. Coding is unknown. 76 00:17:47,601 --> 00:17:49,851 [Hal Turing] So what do we take away? 77 00:17:49,851 --> 00:18:19,701 [Dr. Ada Shannon] A small trained reader over frozen embeddings can give a frozen 8B model better answers than pasted text on integration-heavy tasks, using 16 tokens, and query-conditioned reading is what makes it work. The boundary is that the paper doesn't separate reading from task priors on PersonaMem-v2 and the LaMP tasks, and it loses on exact-detail questions. The experiment that settles it: empty, shuffled, and other-user stores, next to a matched LoRA reader on Qwen3-8B. 78 00:18:19,701 --> 00:18:27,301 [Hal Turing] Reading versus priors, unmeasured, and exact detail still wants text. Thanks for listening, everyone.