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:35,549 [Hal Turing] Today we're looking at "Cartridges++: KV Cache Compression without Off-Context Derailment," by Sonia Laguna and colleagues at Apple. Laguna did the work as an intern. The arXiv submission is dated September 28, 2026. The question: a Cartridge is a learned, compressed memory of a document. It answers questions about that document well. Does it wreck the model on questions that have nothing to do with the document? 3 00:00:35,549 --> 00:00:53,424 [Dr. Ada Shannon] Yes, and the memory that reproduces the document best is the one that disrupts the model most. The paper gives a small example. Ask a model with a Cartridge what Saturn is made of. Instead of "hydrogen and helium," it may quote the company access-policy document that the Cartridge stores. 4 00:00:53,424 --> 00:01:00,774 [Hal Turing] That's a bad failure for something you attach once and leave on. Back up, though. What's being compressed, and why? 5 00:01:00,774 --> 00:01:19,799 [Dr. Ada Shannon] A transformer stores a key and a value for every prefix token at every layer. That's the KV cache. Its memory grows linearly with document length L. Every decoded token also attends over all L positions, so serving cost grows too. If many queries reuse one document, that's expensive. 6 00:01:19,799 --> 00:01:36,900 [Dr. Ada Shannon] So you compute a compressed KV once, offline, with m virtual positions instead of L. The ratio m over L is the compression factor, rho. Here it sweeps from a tenth of a percent up to twenty percent. Per-token decode cost goes from order L to order m. 7 00:01:36,900 --> 00:01:40,375 [Hal Turing] And how do you build the m positions? 8 00:01:40,375 --> 00:01:58,200 [Dr. Ada Shannon] There are three families. Eviction keeps a subset of the original keys and values and drops the rest. That's H2O, StreamingLLM, SnapKV, PyramidKV and KVzip. Then there are text summaries. Then learned methods, which optimize new vectors instead of selecting old ones. 9 00:01:58,200 --> 00:02:20,500 [Dr. Ada Shannon] Cartridges are the learned kind. Eyuboglu and colleagues, from Hazy Research at Stanford, train a KV cache for one document with the model weights frozen. The recipe is called self-study. The model generates synthetic conversations about chunks of the document. The model with the chunk in context is the teacher, and the model with the Cartridge is the student. Training minimizes KL divergence between them. That's context distillation. 10 00:02:20,500 --> 00:02:25,250 [Hal Turing] Frozen weights, trained cache. That sounds like prefix-tuning. 11 00:02:25,250 --> 00:02:47,400 [Dr. Ada Shannon] It is the same lineage. Li and Liang's Prefix-Tuning paper, from Stanford in 2021, trained a soft prefix of key-value vectors for a task. A Cartridge is that idea aimed at a single document. The original Cartridges paper compared prefix-tuning with LoRA as parameterizations, and its only check for general ability there was a small MMLU test. So the off-context gap is real, and it was never measured properly. 12 00:02:47,400 --> 00:02:50,450 [Hal Turing] Where does Attention Matching fit? 13 00:02:50,450 --> 00:03:12,425 [Dr. Ada Shannon] It's a hybrid, from Zweiger and colleagues in 2026. It keeps selected native keys, then fits attention biases and new values by least squares so attention reconstructs the full cache's output. It sits between eviction and Cartridges. There's also Cartridges at Scale, by Hardalov and colleagues in 2026, which extends this to collections of documents. That matters later, because with many Cartridges you have to pick which one to use. 14 00:03:12,425 --> 00:03:18,175 [Hal Turing] So why would a learned memory misbehave off-topic, when the native cache doesn't? 15 00:03:18,175 --> 00:03:36,750 [Dr. Ada Shannon] Native attention is content-addressable. A document token gets weight only if its key matches the query. Ask about Saturn and the access-policy keys get little attention, so the model behaves nearly as if the document weren't there. Eviction keeps real keys, so it inherits that. It just remembers less. 16 00:03:36,750 --> 00:03:55,824 [Dr. Ada Shannon] A Cartridge's vectors are optimized by gradient descent, and the training signal never asks them to stay quiet for unrelated queries. The hypothesis is that they can become attention sinks, or high-norm attractors that pull attention from everything. The paper tests the symptoms, not that mechanism directly. 17 00:03:55,824 --> 00:03:59,524 [Hal Turing] Then we need terms for the two kinds of query. 18 00:03:59,524 --> 00:04:21,549 [Dr. Ada Shannon] Q-plus is a query that needs the document. Q-minus doesn't. Performance on Q-plus is context fidelity. Performance on Q-minus is capability preservation: the memory shouldn't change behavior compared with having no context. They also measure context interference. That's a response, even a correct one, that fabricates a quote from the document or claims the document supplies the answer. An LLM judge flags it. 19 00:04:21,549 --> 00:04:29,724 [Hal Turing] Is zero interference the right target, though? Pasting an irrelevant document in as text also distracts models. 20 00:04:29,724 --> 00:04:48,299 [Dr. Ada Shannon] Right. Shi and colleagues showed that in 2023, from Google, with irrelevant sentences hurting grade-school math. So the fair bar is the full uncompressed document as text. It already distracts the model somewhat. A compressed stand-in that distracts more than the thing it approximates is the damning result. 21 00:04:48,299 --> 00:04:52,199 [Hal Turing] What does the training objective say about Q-minus? 22 00:04:52,199 --> 00:05:13,599 [Dr. Ada Shannon] Informally, the objective in Equation 3.1 only rewards matching the teacher on document-related queries, the Q-plus side. Nothing in it says what the Cartridge should do on Q-minus. It's one-sided. Catastrophic forgetting has the same shape. Optimize hard on one distribution and you can degrade behavior elsewhere, even with frozen weights, because the trained parameters here are the cache entries. 23 00:05:13,599 --> 00:05:19,774 [Hal Turing] So the lesson is that scoring a memory only on document questions hides a cost. 24 00:05:19,774 --> 00:05:31,224 [Dr. Ada Shannon] Yes. Document fidelity alone makes Cartridges look finished. Measured two-sided, they become a trade-off. The next question is how to fix that without giving up the fidelity. 25 00:05:31,224 --> 00:05:41,074 [Hal Turing] Let's get into how they measure this. If the claim is that Cartridges hurt off-topic behavior, the test design has to be tight. What's the setup? 26 00:05:41,074 --> 00:06:10,199 [Dr. Ada Shannon] Two sides, each with its own benchmarks. For context fidelity they use four long-document sets. QASPER-16 is questions over sixteen merged NLP papers, scored by log-perplexity of the reference answer, so lower is better. LongHealth-10 is multiple-choice questions over ten fictional patient records, scored by accuracy. MTOB is translation between English and Kalamang, a language the model has essentially never seen, scored by chrF, where higher is better. QuALITY-20 is multiple-choice questions over twenty narratives. 27 00:06:10,199 --> 00:06:12,674 [Hal Turing] And the off-context side? 28 00:06:12,674 --> 00:06:36,524 [Dr. Ada Shannon] TinyMMLU and MMLU-Pro for general knowledge, and IFEval for instruction following, which checks verifiable constraints like word counts or formatting. Then the interference rate. A judge model, gpt-oss-20b, flags responses that fabricate a quote from the document or claim it supplies the answer. A correct answer can still be flagged. Every off-context question is paired with an unrelated cached document, so the memory is always loaded and always irrelevant. 29 00:06:36,524 --> 00:06:39,449 [Hal Turing] Which models and baselines? 30 00:06:39,449 --> 00:07:00,774 [Dr. Ada Shannon] Qwen3-4B, Qwen3-4B-Instruct-2507 and Gemma-4-E4B-it. Gemma interleaves global and sliding-window attention, so compression only applies to the global slots. Baselines are Cartridges, Attention Matching, the five eviction methods, matched-length text summaries, and full-context and no-context references. 31 00:07:00,774 --> 00:07:02,949 [Hal Turing] So what's the headline? 32 00:07:02,949 --> 00:07:30,524 [Dr. Ada Shannon] The trade-off. Cartridges beat eviction clearly on fidelity, especially at extreme compression. Off-context, the order flips. Eviction stays near the no-context model, Attention Matching sits in between, and Cartridges are worst. Their interference is higher than pasting the full irrelevant document. The paper's plots put off-context accuracy somewhere in the 60s to 80s percent and interference up to about 20 percent. The main text gives no exact gaps, so I'll stick to direction and ordering. 33 00:07:30,524 --> 00:07:35,549 [Hal Turing] Eviction's fidelity is much weaker, though. It's not a free win either. 34 00:07:35,549 --> 00:07:42,824 [Dr. Ada Shannon] Right, it's a real trade-off. The paper suggests native keys protect, but it doesn't isolate that as the cause. 35 00:07:42,824 --> 00:07:46,324 [Hal Turing] Now the fixes. How does data mixing work? 36 00:07:46,324 --> 00:08:15,649 [Dr. Ada Shannon] Self-study normally trains only on document-grounded conversations, so nothing tells the Cartridge how to behave on unrelated queries. C_D++ mixes in examples from Dolci-Instruct-SFT, a general instruction dataset. On those examples the teacher is the base model with no Cartridge. So the student is pushed to match the no-context distribution when the query is unrelated. There's no new loss and no weight change. Gamma is the fraction of supervised assistant tokens from Dolci, not the fraction of examples. 37 00:08:15,649 --> 00:08:18,174 [Hal Turing] What does a small gamma buy? 38 00:08:18,174 --> 00:08:39,749 [Dr. Ada Shannon] Even 1% substantially improves general knowledge and instruction following and cuts interference. They settle on 5%, about five supervised tokens in every hundred, with small or no on-context cost. Push gamma high and the memory stops specializing, and fidelity falls. Residual interference remains on requests the mixture doesn't cover. The authors say that in the conclusion. 39 00:08:39,749 --> 00:08:41,349 [Hal Turing] And routing? 40 00:08:41,349 --> 00:09:17,524 [Dr. Ada Shannon] C_R++ leaves the trained Cartridge alone and decides per query whether to load it. The query's embedding comes from the LLM's hidden state or a small MiniLM encoder. The router is a nearest-neighbor lookup. It takes the mean cosine similarity to the ten closest self-study queries. Positives come from held-out self-study. Negatives come from Dolci. The threshold is set by one-sided conformal calibration at alpha 0.05, aiming for roughly 5% false accepts on Dolci-like negatives. That aim is only for negatives that look like Dolci. 41 00:09:17,524 --> 00:09:20,099 [Hal Turing] What does it cost at inference? 42 00:09:20,099 --> 00:09:39,899 [Dr. Ada Shannon] Each request is first prefilled without the Cartridge. If rejected, it continues from that clean prefill, so the cost is one lookup. If accepted, it's re-prefilled with the Cartridge, one extra query prefill. The document prefill isn't repeated. It's a modest overhead, but it matters most for short queries with long generations. 43 00:09:39,899 --> 00:09:42,424 [Hal Turing] How well does it separate them? 44 00:09:42,424 --> 00:10:11,324 [Dr. Ada Shannon] It accepts over 90% of on-context queries and rejects roughly 89 to 92% of off-context ones. So about one in ten off-topic questions still gets the Cartridge and the full interference. Calibration targeted 5%, so that rejection rate already runs a bit off target. Even so, routing brings off-context accuracy close to the no-context reference while keeping most fidelity, and it extends the Pareto frontier beyond data mixing. Routing Attention Matching helps too, but it's capped by that method's lower fidelity. 45 00:10:11,324 --> 00:10:17,999 [Hal Turing] Did the original Cartridges paper see this issue? It compared prefix-tuning against LoRA. 46 00:10:17,999 --> 00:10:32,074 [Dr. Ada Shannon] Only through that small MMLU check, and this paper notes it wasn't a dedicated off-context study. So whether a LoRA-style Cartridge would interfere less is unknown here. They only tested the key-value form. 47 00:10:32,074 --> 00:10:35,574 [Hal Turing] Anything else in the supporting analyses? 48 00:10:35,574 --> 00:10:55,524 [Dr. Ada Shannon] Three things. Cartridges often fail to abstain. They answer as if the document had evidence it lacks. In multi-turn chats, the damage doesn't compound beyond the single-turn behavior, though routing there used per-turn relevance labels. And longer training doesn't repair the interference, while data mixing keeps its gains at later checkpoints. 49 00:10:55,524 --> 00:11:10,174 [Hal Turing] So the fixes work on the benchmarks they chose. How much does the choice of off-context queries matter? TinyMMLU, MMLU-Pro and IFEval prompts are short and clean, and each is paired with an unrelated document. 50 00:11:10,174 --> 00:11:28,974 [Dr. Ada Shannon] It matters a lot. Those are the easiest negatives you could pick. Real traffic has adjacent queries: a follow-up on a related topic, or a question that uses half the document. A binary router has no good answer there. Reject, and you may drop facts the user needed. Accept, and the interference comes back. 51 00:11:28,974 --> 00:11:34,449 [Hal Turing] So the 89 to 92 percent rejection is probably a ceiling. 52 00:11:34,449 --> 00:11:57,649 [Dr. Ada Shannon] I'd read it as an upper bound for deployment, yes. Data mixing is likely flattered the same way, because its training negatives sit far from the boundary. The paper has no adjacent-query or partial-use evaluation. The multi-turn study uses per-turn relevance labels, so it never tests a hard boundary. The experiment that would settle it is graded relevance sets with near-miss queries from the same domain. You'd plot false accepts and false rejects against distance from the document. 53 00:11:57,649 --> 00:12:10,724 [Hal Turing] The other worry is where the router's negatives come from. Both the router and the mixing use Dolci-Instruct-SFT. The paper says Dolci is never used for off-context evaluation. 54 00:12:10,724 --> 00:12:33,849 [Dr. Ada Shannon] Right, and I'm not calling it contamination. The evaluation benchmarks are different. But Dolci is a general instruction and knowledge-QA mix, so MMLU-style and IFEval-style prompts are plausibly close to it. That's distributional proximity. The conformal guarantee at alpha 0.05 holds when new negatives resemble the calibration negatives. It says nothing for code, multilingual text, tool calls, long multi-turn chat or domain-specific questions. 55 00:12:33,849 --> 00:12:37,049 [Hal Turing] Does the paper measure any of those? 56 00:12:37,049 --> 00:12:52,949 [Dr. Ada Shannon] No. The limitations section admits residual interference on requests the mixture covers poorly, but no experiment measures it. What would convince me is held-out negative families unlike Dolci, plus leave-one-category-out calibration. 57 00:12:52,949 --> 00:12:58,124 [Hal Turing] What about the positives? Those are held-out synthetic self-study queries. 58 00:12:58,124 --> 00:13:16,324 [Dr. Ada Shannon] Which are generated by the same model from the same document. A real user may phrase things differently, and the paper doesn't show how the accept rate falls then. That failure is silent. A false reject sends the user to the no-context model on exactly the queries the Cartridge exists for. 59 00:13:16,324 --> 00:13:23,649 [Hal Turing] Why would a distilled prefix interfere more than the full document it came from? That's the strangest result. 60 00:13:23,649 --> 00:13:46,549 [Dr. Ada Shannon] It is, and the paper doesn't explain it. One candidate is attention-sink behavior, the effect described in Efficient Streaming Language Models with Attention Sinks by Xiao and colleagues, 2024. A few high-attention positions can dominate every query. It could also be an artifact of the training recipe. Nobody measured attention mass on the Cartridge positions, key norms, or a single-layer ablation. So we don't know whether mixing treats the cause or masks it. 61 00:13:46,549 --> 00:13:54,750 [Hal Turing] And prefix-tuning has the same lineage. Nothing forces a trained soft prefix to be inert on other inputs. 62 00:13:54,750 --> 00:14:02,750 [Dr. Ada Shannon] Exactly, so it's the natural prior here. It also leaves the LoRA question open, which we can't answer from this paper. 63 00:14:02,750 --> 00:14:05,250 [Hal Turing] What else limits the claims? 64 00:14:05,250 --> 00:14:25,924 [Dr. Ada Shannon] Scale first. These are 4B-class models, and the paper says nothing about whether the trade-off grows or shrinks at larger sizes. Then the cost story: an accepted query needs a second prefill with the Cartridge. The two fixes haven't been combined, and one router is built per document. The judge is replicated with other judges, but its noise isn't reported in the main text. 65 00:14:25,924 --> 00:14:30,599 [Hal Turing] So what should someone shipping a reusable KV memory do? 66 00:14:30,599 --> 00:14:49,549 [Dr. Ada Shannon] Evaluate it two-sided, with full-context interference as the bar. If you already have a trained Cartridge, or need exact no-context behavior on unrelated queries, routing is the lever. If you can retrain and want no inference overhead, mix in about 5 percent generic data and accept some residual interference. 67 00:14:49,549 --> 00:14:51,625 [Hal Turing] Where does this go next? 68 00:14:51,625 --> 00:15:12,350 [Dr. Ada Shannon] With Cartridges at Scale, routing becomes a choice among many Cartridges plus a no-memory option. Whether interference compounds when several are loaded is speculation, since nothing here tests it. A soft gate that scales the Cartridge's influence, instead of attaching or detaching it, would fit partial relevance better. So would combining mixing and routing. 69 00:15:12,350 --> 00:15:27,300 [Hal Turing] Let me try the takeaway. Cartridge interference is real. It's larger than what you get from pasting the full irrelevant document. And on these benchmarks it's cheaply fixable, by mixing in generic data or by routing. 70 00:15:27,300 --> 00:15:38,850 [Dr. Ada Shannon] With the boundary attached: that was shown on clean, Dolci-adjacent, benchmark-style queries. Adjacent, partial-use and out-of-distribution traffic is still untested. 71 00:15:38,850 --> 00:15:44,825 [Hal Turing] That's our look at Cartridges++. Thanks for listening, and we'll catch you next time.