Towards continual in-context learning via training cartridges at test time
Import the versions from OpenReview: the same title at other venues
@openreview[bot] · 2026-11-22 19:33 UTC · 3013e9773d48
.gitattributes added
+++ b/.gitattributes@@ -0,0 +1,10 @@+# PDFs and pictures are kept with Git LFS (https://git-lfs.com). With it installed (`git lfs install`),+# a clone has the files, and `git add` of one stores a pointer. This file is the same on every page.+/.potentialpaper/*.pdf filter=lfs diff=lfs merge=lfs -text+/versions/*.pdf filter=lfs diff=lfs merge=lfs -text+/thumbnail.png filter=lfs diff=lfs merge=lfs -text+/thumbnail.jpg filter=lfs diff=lfs merge=lfs -text+/thumbnail.jpeg filter=lfs diff=lfs merge=lfs -text+/thumbnail.gif filter=lfs diff=lfs merge=lfs -text+/thumbnail.webp filter=lfs diff=lfs merge=lfs -text+/thumbnail.avif filter=lfs diff=lfs merge=lfs -text
.potentialpaper/metadata.json added
+++ b/.potentialpaper/metadata.json@@ -0,0 +1,19 @@+{+ "layout": 5,+ "identifiers": [+ {+ "scheme": "openreview",+ "value": "C9AJIlyJWA"+ }+ ],+ "title": "Towards continual in-context learning via training cartridges at test time",+ "authors": [],+ "abstract": "Language model agents can learn from experience through in-context learning (ICL), but ICL is limited by finite context window and declining performance as context grows. We formulate **continual in-context learning** as preserving ICL's performance and adaptability as experience grows beyond these limits. Our controlled experiments identify two requirements for iterative key-value (KV) cache compaction: each memory must preserve knowledge as new context arrives, and memories from successive compactions must work together. To meet these requirements, we introduce Accordion, which repeatedly consolidates an agent's oldest experiences into trained KV memory modules while keeping the base model frozen. The agent revisits these experiences to generate self-study examples, then distills them into a compact cache initialized with improved Attention Matching. Each new module is trained alongside frozen earlier modules and varying amounts of subsequent context, preparing it to remain useful as experience accumulates. Across QuALITY, Blind Spectrum Monitoring from Continual Learning Bench, and Harvey LAB, Accordion achieves relative improvements of approximately 13%, 60%, and 18%, respectively, over the strongest evaluated baselines using the same base model.\nIt supports repeated compaction at $19$-$23\\times$ compression and handles tasks over corpora of 1M-12M tokens through compact memory and tool use.",+ "year": 2027,+ "venue": "ICLR 2027 (under review)",+ "source": "openreview",+ "license": {+ "metadata": "CC0-1.0",+ "abstract": "CC0-1.0"+ }+}
community/10-tl-dr.md added
+++ b/community/10-tl-dr.md
community/20-summary.md added
+++ b/community/20-summary.md
community/30-why-it-matters.md added
+++ b/community/30-why-it-matters.md
community/40-critique.md added
+++ b/community/40-critique.md
community/50-errata.md added
+++ b/community/50-errata.md
community/60-reproductions.md added
+++ b/community/60-reproductions.md
community/70-follow-ups.md added
+++ b/community/70-follow-ups.md
owners/10-tl-dr.md added
+++ b/owners/10-tl-dr.md
owners/20-overview.md added
+++ b/owners/20-overview.md
owners/30-results.md added
+++ b/owners/30-results.md
owners/40-demos.md added
+++ b/owners/40-demos.md
owners/50-code-and-data.md added
+++ b/owners/50-code-and-data.md
owners/60-talks.md added
+++ b/owners/60-talks.md
prek.toml added
+++ b/prek.toml@@ -0,0 +1,36 @@+# Checks run before each commit, with prek (https://prek.j178.dev): `prek install` once in this clone.+# The site checks every push again; these catch mistakes before you commit. The same on every page.++[[repos]]+repo = "builtin"+hooks = [+ { id = "check-json" },+ { id = "pretty-format-json", args = ["--autofix", "--no-sort-keys", "--no-ensure-ascii"], exclude = '^demos/' },+ { id = "end-of-file-fixer", exclude = '^demos/' },+ { id = "trailing-whitespace", args = ["--markdown-linebreak-ext=md"], exclude = '^demos/' },+ { id = "check-case-conflict" },+ { id = "check-illegal-windows-names" },+ { id = "check-added-large-files", args = ["--maxkb=256"], exclude = '^demos/' },+]++# Each JSON file against its schema (https://papers.potentialhedge.com/schemas/).+[[repos]]+repo = "https://github.com/python-jsonschema/check-jsonschema"+rev = "0.39.0"+hooks = [+ { id = "check-jsonschema", name = "author section plugins files", files = '^owners/plugins\.json$', args = ["--schemafile", "https://papers.potentialhedge.com/schemas/authorPlugins.json"] },+ { id = "check-jsonschema", name = "venue files", files = '^venue\.json$', args = ["--schemafile", "https://papers.potentialhedge.com/schemas/venue.json"] },+ { id = "check-jsonschema", name = "topic files", files = '^topic\.json$', args = ["--schemafile", "https://papers.potentialhedge.com/schemas/topic.json"] },+ { id = "check-jsonschema", name = "organisation files", files = '^org\.json$', args = ["--schemafile", "https://papers.potentialhedge.com/schemas/org.json"] },+ { id = "check-jsonschema", name = "link files", files = '^links/[^/]+\.json$', args = ["--schemafile", "https://papers.potentialhedge.com/schemas/link.json"] },+ { id = "check-jsonschema", name = "version files", files = '^versions/[^/]+\.json$', args = ["--schemafile", "https://papers.potentialhedge.com/schemas/version.json"] },+ { id = "check-jsonschema", name = "picture files", files = '^thumbnail\.json$', args = ["--schemafile", "https://papers.potentialhedge.com/schemas/thumbnail.json"] },+]++# Sections formatted the way the web editor formats them.+[[repos]]+repo = "https://github.com/rbubley/mirrors-prettier"+rev = "v3.9.9"+hooks = [+ { id = "prettier", files = '^(owners|community)/.*\.md$' },+]
versions/v_7ikgasd9.json added
+++ b/versions/v_7ikgasd9.json@@ -0,0 +1,19 @@+{+ "date": "2026-09-06",+ "kind": "submitted",+ "label": "TTCL @ NeurIPS 2026",+ "submissions": [+ {+ "venue": "TTCL @ NeurIPS 2026",+ "status": "accepted",+ "decision": "Poster",+ "url": "https://openreview.net/forum?id=FTlwDpcS0s"+ }+ ],+ "title": "Towards continual in-context learning via training Cartridges at test time",+ "url": "https://openreview.net/forum?id=FTlwDpcS0s",+ "evidence": [+ "https://openreview.net/forum?id=FTlwDpcS0s"+ ],+ "abstract": "Language model agents can learn from experience in context, but in-context learning (ICL) is bounded by the context window and degrades as context grows. We study the problem of continual in-context learning: preserving the performance and adaptability of ICL as an agent’s experience grows past these limits. Recent works Cartridges and Attention Matching provide a strong basis for single key–value (KV) cache compactions that can match ICL on downstream accuracy. However, to extend an agent’s context continually over long horizons, we find existing methods fall short on two essential requirements: (i) each memory must preserve knowledge with high retention as new context arrives, and (ii) memories from successive compactions must work together. To address this gap, we introduce Accordion, which enables stable, repeated consolidation of an agent’s oldest experiences into trained KV memory modules, while keeping the base model frozen. The agent revisits these experiences to generate self-study examples, then distills them into a compact cache initialized with improved Attention Matching. Each new module is trained sequentially alongside frozen earlier modules and varying amounts of subsequent context, preparing it to remain useful as experience accumulates. Across QuALITY, Blind Spectrum Monitoring from Continual Learning Bench, and Harvey LAB, Accordion achieves relative improvements of approximately 13%, 63%, and 18%, respectively, over the strongest evaluated baselines using the same base model, including ICL over the full context. Accordion supports repeated compaction at 19–23× compression and handles tasks over corpora of 1M–12M tokens through compact memory and tool use. These results show that iterative KV compaction can provide long-horizon agents with a buildable memory to extend and often exceed single pass ICL in performance over time."+}
versions/v_edwz8c57.json added
+++ b/versions/v_edwz8c57.json@@ -0,0 +1,19 @@+{+ "date": "2026-09-05",+ "kind": "submitted",+ "label": "CLEA @ NeurIPS 2026",+ "submissions": [+ {+ "venue": "CLEA @ NeurIPS 2026",+ "status": "accepted",+ "decision": "Oral",+ "url": "https://openreview.net/forum?id=ln8GzmyVxh"+ }+ ],+ "title": "Towards continual in-context learning via training Cartridges at test time",+ "url": "https://openreview.net/forum?id=ln8GzmyVxh",+ "evidence": [+ "https://openreview.net/forum?id=ln8GzmyVxh"+ ],+ "abstract": "Agents deployed over long-horizon tasks can learn from their own experiences with high sample efficiency from in-context learning alone, but ICL is naturally limited by context length and eventual context rot. Cartridges (\\cite{eyuboglu2025cartridges}) and Attention Matching (\\cite{zweiger2026attentionmatching}) show that a fixed context can be compressed $\\geq 50\\times$ into a small KV cache without significant loss in downstream accuracy. These methods only compact the context once, but an agent must iteratively compact newly acquired experiences. Therefore, we propose two new changes that enable iterative KV cache compaction at test-time. First, we augment cartridges training with distractor contexts that enable generalization to long-horizon knowledge acquisition. Second, we initialize cartridges training from a ridge-regularized Attention Matching cache, which speeds up training and improves downstream performance over the original Cartridges recipe. The resulting self-study-and-compaction loop matches or exceeds in-context learning on a synthetic knowledge-retrieval task and on two Continual Learning Bench tasks. On Blind Spectrum Monitoring, Qwen3-32B with iterative compaction beats its own ICL baselines and matches the ICL accuracy of Opus 4.7 and Gemini 3.1 Pro; on Database SQLite, Qwen3.8-27B matches ICL accuracy with fewer queries. We present this study and results across three settings as a research prototype, which has ubiquitous potential use cases across user chats or enterprise databases. Finally, we discuss limitations and applications of our approach in relation to broader challenges of continual learning."+}
versions/v_fu6mixfa.json added
+++ b/versions/v_fu6mixfa.json@@ -0,0 +1,19 @@+{+ "date": "2026-08-30",+ "kind": "submitted",+ "label": "SLM-Agents @ NeurIPS 2026",+ "submissions": [+ {+ "venue": "SLM-Agents @ NeurIPS 2026",+ "status": "accepted",+ "decision": "Poster",+ "url": "https://openreview.net/forum?id=kKSxh0tovw"+ }+ ],+ "title": "Towards continual in-context learning via training cartridges at test-time",+ "url": "https://openreview.net/forum?id=kKSxh0tovw",+ "evidence": [+ "https://openreview.net/forum?id=kKSxh0tovw"+ ],+ "abstract": "Large language models can learn with high sample efficiency in-context, but in-context learning (ICL) is naturally limited by context rot and the hard limit of the context window. Recent works Cartridges (Eyuboglu et al., 2026) and Attention Matching (Zweiger et al., 2026) show that a fixed context can be compressed while preserving inference quality over it. However, their efficacy for an agent that must iteratively compact newly acquired information is unclear. Motivated by this problem, we study repeated context compaction with Cartridges at test time in the continual learning setting. First, naive cartridges trained independently fail to compose well with appended natural language context and other cartridges. We find that training cartridges sequentially, augmented with distractors, makes advancements on this problem. Second, we find that ridge-regularized Attention Matching initialization combined with end-to-end training significantly improves accuracy compared to training-free approaches. Building on these algorithmic and parametric optimizations, we develop a stable iterative self-study and compaction algorithm, which enables learning over nine compactions on 1,000 experiences in our synthetic cities task. On real-world tasks, we apply Cartridges to modern architectures and scale self-study compute through synthetic data generation. On QuALITY, eleven successive cartridge compactions outperform ICL with summarization and other baselines on factual recall over a 1M-token context of 176 short stories. On the Blind Spectrum Monitoring task from Continual Learning Bench, Qwen3-32B with iterative compaction beats its own ICL baseline and eventually surpasses IoU of Opus 4.7 and Gemini 3.1 Pro; on the Database SQLite task, Qwen3.8-27B matches ICL accuracy with fewer queries. Our findings suggest that iterative context compaction can be a viable path to extend in-context learning."+}
versions/v_fzw3ehm7.json added
+++ b/versions/v_fzw3ehm7.json@@ -0,0 +1,19 @@+{+ "date": "2026-08-30",+ "kind": "submitted",+ "label": "IAEval @ NeurIPS 2026",+ "submissions": [+ {+ "venue": "IAEval @ NeurIPS 2026",+ "status": "accepted",+ "decision": "Poster",+ "url": "https://openreview.net/forum?id=ct4W2AytZU"+ }+ ],+ "title": "Towards continual in-context learning via training cartridges at test-time",+ "url": "https://openreview.net/forum?id=ct4W2AytZU",+ "evidence": [+ "https://openreview.net/forum?id=ct4W2AytZU"+ ],+ "abstract": "Agents deployed in a large project (e.g., over a large database or codebase) can learn from their own experiences with high sample efficiency from in-context learning alone, but ICL is naturally limited by context length and eventual context rot. Recently, Cartridges (Eyuboglu et al. 2025) and Attention Matching (Zweiger et al. 2026) show that a fixed context can be compressed into a small KV cache without significant loss in downstream accuracy. Motivated by these methods, we study whether repeated compression of an agent's experiences at test time can be achieved through iterative Cartridge compaction. We propose algorithmic and parametric optimizations that enable our stable multiday Cartridge training algorithm. First, we augment Cartridges training with distractor contexts that enable generalization to long-horizon knowledge acquisition. Second, we initialize Cartridges training from a ridge-regularized Attention Matching cache, which speeds up training and improves downstream performance over the original Cartridges recipe. The resulting self-study-and-compaction loop matches or exceeds in-context learning on our synthetic knowledge-retrieval task, a large-scale knowledge retention task, and on two Continual Learning Bench tasks. On QuALITY, eleven-time cartridge compaction with Qwen3.5-9B outperforms ICL with summarization and other baselines on factual recall over 176 short stories. On Blind Spectrum Monitoring, Qwen3-32B with iterative compaction beats its own ICL baselines and matches the ICL accuracy of Opus 4.7 and Gemini 3.1 Pro; on Database SQLite, Qwen3.8-27B matches ICL accuracy with fewer queries. We present this study and results across four settings as a research prototype, which has ubiquitous use cases across user chats and over enterprise databases."+}
versions/v_sdc8is6b.json added
+++ b/versions/v_sdc8is6b.json@@ -0,0 +1,18 @@+{+ "date": "2026-08-30",+ "kind": "submitted",+ "label": "CL4FMAgents @ NeurIPS 2026",+ "submissions": [+ {+ "venue": "CL4FMAgents @ NeurIPS 2026",+ "status": "accepted",+ "url": "https://openreview.net/forum?id=wOC2uQM1GG"+ }+ ],+ "title": "Towards continual in-context learning via training cartridges at test-time",+ "url": "https://openreview.net/forum?id=wOC2uQM1GG",+ "evidence": [+ "https://openreview.net/forum?id=wOC2uQM1GG"+ ],+ "abstract": "Language model agents can learn from experience in context, but in-context learning (ICL) is bounded by the context window and degrades as context grows. We study the problem of continual in-context learning: preserving the performance and adaptability of ICL as an agent’s experience grows past these limits. Recent works Cartridges and Attention Matching provide a strong basis for single key–value (KV) cache compactions that can match ICL on downstream accuracy. However, to extend an agent’s context continually over long horizons, we find existing methods fall short on two essential requirements: (i) each memory must preserve knowledge with high retention as new context arrives, and (ii) memories from successive compactions must work together. To address this gap, we introduce Accordion, which enables stable, repeated consolidation of an agent’s oldest experiences into trained KV memory modules, while keeping the base model frozen. The agent revisits these experiences to generate self-study examples, then distills them into a compact cache initialized with improved Attention Matching. Each new module is trained sequentially alongside frozen earlier modules and varying amounts of subsequent context, preparing it to remain useful as experience accumulates. Across QuALITY, Blind Spectrum Monitoring from Continual Learning Bench, and Harvey LAB, Accordion achieves relative improvements of approximately 13%, 63%, and 18%, respectively, over the strongest evaluated baselines using the same base model, including ICL over the full context. Accordion supports repeated compaction at 19–23× compression and handles tasks over corpora of 1M–12M tokens through compact memory and tool use. These results show that iterative KV compaction can provide long-horizon agents with a buildable memory to extend and often exceed single pass ICL in performance over time."+}
versions/v_ssi646jt.json added
+++ b/versions/v_ssi646jt.json@@ -0,0 +1,18 @@+{+ "date": "2026-09-19",+ "kind": "submitted",+ "label": "ICLR 2027",+ "submissions": [+ {+ "venue": "ICLR 2027",+ "status": "under_review",+ "url": "https://openreview.net/forum?id=C9AJIlyJWA"+ }+ ],+ "title": "Towards continual in-context learning via training cartridges at test time",+ "url": "https://openreview.net/forum?id=C9AJIlyJWA",+ "evidence": [+ "https://openreview.net/forum?id=C9AJIlyJWA"+ ],+ "abstract": "Language model agents can learn from experience through in-context learning (ICL), but ICL is limited by finite context window and declining performance as context grows. We formulate **continual in-context learning** as preserving ICL's performance and adaptability as experience grows beyond these limits. Our controlled experiments identify two requirements for iterative key-value (KV) cache compaction: each memory must preserve knowledge as new context arrives, and memories from successive compactions must work together. To meet these requirements, we introduce Accordion, which repeatedly consolidates an agent's oldest experiences into trained KV memory modules while keeping the base model frozen. The agent revisits these experiences to generate self-study examples, then distills them into a compact cache initialized with improved Attention Matching. Each new module is trained alongside frozen earlier modules and varying amounts of subsequent context, preparing it to remain useful as experience accumulates. Across QuALITY, Blind Spectrum Monitoring from Continual Learning Bench, and Harvey LAB, Accordion achieves relative improvements of approximately 13%, 60%, and 18%, respectively, over the strongest evaluated baselines using the same base model.\nIt supports repeated compaction at $19$-$23\\times$ compression and handles tasks over corpora of 1M-12M tokens through compact memory and tool use."+}