mlsanityData to 14 Oct 2026

Context Compaction Theory

arXiv 2608.01326 ↗First posted 2 Aug 2026cs.DS cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) have a bounded context window. The context window is the maximum input size an LLM can consume for a single inference. AI agents rely on a process called context compaction to fit their state within the context window when calling an LLM. Despite its ubiquity, context compaction has received essentially no formal analysis. In this paper, we initiate a formal study of context compaction. We first introduce a framework consisting of two games that capture the two algorithmic strategies for context compaction used by contemporary AI agents in practice. The Context Selection Game models context compaction algorithms that select a subset of an agent's accumulated state to retain. The Context Generation Game models context compaction algorithms that summarize an agent's state by an arbitrary message of bounded length. We then prove an equivalence between the Context Generation Game and one-way communication complexity. The minimum context compaction budget for answering a set of queries within a target error is equal to the one-way communication complexity of the induced communication problem at the same error. Known bounds from communication complexity therefore transfer directly to context compaction. We also show that the Context Selection Game corresponds to a restricted class of one-way communication protocols. Any gap between selection and generation is therefore a gap between two classes of communication protocols. We prove that there exists a set of queries for which generation needs strictly less budget than selection. The equivalence between the Context Generation Game and one-way communication also lets us measure how well a deployed context compaction algorithm performs on a query relative to the optimal strategy. As an example, we present a case study that evaluates Anthropic's context compaction endpoint on set membership queries.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 20 of its 45 references that are in the map. First posted on arXiv 2 Aug 2026.

Builds on

20 of 45 references.

References · 20

  1. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  2. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
  3. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
  4. 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 832
  5. 2025Agent Laboratory: Using LLM Agents as Research Assistantscited by 425
  6. 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 348
  7. 2023Compressing Context to Enhance Inference Efficiency of Large Language Modelscited by 189
  8. 2017The Case for Learned Index Structurescited by 188
  9. 2025ACON: Optimizing Context Compression for Long-horizon LLM Agentscited by 136
  10. 2025Recursive Language Modelscited by 104
  11. 2019A Model for Learned Bloom Filters, and Optimizing by Sandwichingcited by 64
  12. 2019Adaptive Learned Bloom Filter (Ada-BF): Efficient Utilization of the Classifiercited by 15
8 more
  1. 2026Latent Context Compilation: Distilling Long Context into Compact Portable Memorycited by 13
  2. 2019Meta-Learning Neural Bloom Filterscited by 10
  3. 2023Fast Partitioned Learned Bloom Filtercited by 6
  4. 2015Communication Complexity (for Algorithm Designers)cited by 5
  5. 2013How to Approximate A Set Without Knowing Its Size In Advancecited by 3
  6. 2024Adversary Resilient Learned Bloom Filterscited by 2
  7. 2026Hallucination is a Consequence of Space-Optimality: A Rate-Distortion Theorem for Membership Testingcited by 2
  8. 2025On the Brittleness of LLMs: A Journey around Set Membershipcited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.