The Missing Memory Hierarchy: Demand Paging for LLM Context Windows
- URL: http://arxiv.org/abs/2603.09023v1
- Date: Mon, 09 Mar 2026 23:38:32 GMT
- Title: The Missing Memory Hierarchy: Demand Paging for LLM Context Windows
- Abstract summary: We present Pichay, a demand paging system for context windows.<n>In live deployment over 681turns, the system reduces context consumption by up to 93% (5,038KB to 339KB).<n>Under extreme sustained pressure, the system remains operational but exhibits the expected thrashing pathology, with repeated fault-in of evicted content.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: The context window of a large language model is not memory. It is L1 cache: a small, fast, expensive resource that the field treats as the entire memory system. There is no L2, no virtual memory, no paging. Every tool definition, every system prompt, and every stale tool result occupies context for the lifetime of the session. The result is measurable: across 857 production sessions and 4.45 million effective input tokens, 21.8% is structural waste. We present Pichay, a demand paging system for LLM context windows. Implemented as a transparent proxy between client and inference API, Pichay interposes on the message stream to evict stale content, detect page faults when the model re-requests evicted material, and pin working-set pages identified by fault history. In offline replay across 1.4 million simulated evictions, the fault rate is 0.0254%. In live production deployment over 681turns, the system reduces context consumption by up to 93% (5,038KB to 339KB); under extreme sustained pressure, the system remains operational but exhibits the expected thrashing pathology, with repeated fault-in of evicted content. The key observation is that the problems the field faces, such as context limits, attention degradation, cost scaling, lost state across sessions, are virtual memory problems wearing different clothes. The solutions exist: working set theory (Denning, 1968), demand paging, fault-driven replacement policies, and memory hierarchies with multiple eviction-managed levels. We describe the architecture of a full memory hierarchy for LLM systems (L1 through persistent storage), report on the first three levels deployed in production use (L1 eviction, L2 fault-driven pinning, L3 model-initiated conversation compaction), and identify cross-session memory as the remaining frontier.
Related papers
- Memory as a Controlled Process: Learned Adaptive Memory Management for LLM Agents [72.3752981234916]
Large Language Model (LLM) agents increasingly rely on external memory systems to accumulate experience across tasks.<n>We present Memory as a Controlled Process (MemCon), a framework that models memory operations as a Markov Decision Process.<n>MemCon consistently outperforms multiple memory baselines by up to 15.2 points in task success while reducing token consumption by 5-20%.
arXiv Detail & Related papers (2026-07-15T08:32:40Z) - CALMem : Application-Layer Dual Memory for Conversational AI [0.0]
CALMem is an application-layer dual memory architecture that gives conversational assistants virtually effective context without any modification to the underlying model.<n>A token-budget-adaptive injection mechanism, called the MOIM, automatically retrieves and injects relevant past context each turn.<n>We describe the architecture, design decisions, and performance characteristics, and analyse the trade-offs that guided each implementation choice.
arXiv Detail & Related papers (2026-05-20T05:23:57Z) - MemLens: Benchmarking Multimodal Long-Term Memory in Large Vision-Language Models [50.25006399944962]
Memory is essential for large vision-language models to handle long, multimodal interactions.<n>MEMLENS is a benchmark for memory in multimodal multi-session conversations.<n>We evaluate 27 LVLMs and 7 memory-augmented agents.
arXiv Detail & Related papers (2026-05-14T14:41:17Z) - MEME: Multi-entity & Evolving Memory Evaluation [76.57263966646404]
MEME defines six tasks spanning the full space defined by the multi-entity and evolving axes.<n> evaluating six memory systems spanning three memory paradigms on 100 controlled episodes.<n>We find that all systems collapse on dependency reasoning under the default configuration.
arXiv Detail & Related papers (2026-05-12T17:55:10Z) - Memori: A Persistent Memory Layer for Efficient, Context-Aware LLM Agents [0.0]
Existing approaches force vendor lock-in and rely on injecting large volumes of raw conversation into prompts.<n>We introduce Memori, an LLM-agnostic persistent memory layer that treats memory as a data structuring problem.
arXiv Detail & Related papers (2026-03-20T13:26:38Z) - LMEB: Long-horizon Memory Embedding Benchmark [49.57481835614834]
We introduce the Long-horizon Memory Embedding Benchmark (LMEB), a comprehensive framework that evaluates embedding models' capabilities.<n>LMEB spans 22 datasets and 193 zero-shot retrieval tasks across 4 memory types.<n>We evaluate 15 widely used embedding models, ranging from hundreds of millions to ten billion parameters.
arXiv Detail & Related papers (2026-03-13T02:09:57Z) - HTM-EAR: Importance-Preserving Tiered Memory with Hybrid Routing under Saturation [0.42303492200814446]
HTM-EAR is a hierarchical tiered memory substrate that integrates HNSW-based working memory with archival storage.<n>When L1 reaches capacity, items are evicted using a weighted score of importance and usage.<n>We compare the full system against variants without cross-encoder re-ranking, without routing gates, with LRU eviction, and an oracle with unbounded memory.
arXiv Detail & Related papers (2026-02-27T15:35:04Z) - Exploring Multimodal LMMs for Online Episodic Memory Question Answering on the Edge [9.701124246177661]
We investigate the feasibility of using Multimodal Large Language Models (MLLMs) for real-time online episodic memory question answering.<n>Experiments on the QAEgo4D-Closed benchmark analyze the performance of Multimodal Large Language Models (MLLMs) within strict resource boundaries.
arXiv Detail & Related papers (2026-02-25T22:30:56Z) - Contextual Memory Virtualisation: DAG-Based State Management and Structurally Lossless Trimming for LLM Agents [0.0]
We propose Contextual Memory Virtualisation (CMV), a system that treats accumulated LLM understanding as version-controlled state.<n> CMV models session history as a Directed Acyclic Graph (DAG) with formally defined snapshot, branch, and trim primitives.<n>A single-user case-study evaluation shows that trimming remains economically viable under prompt caching.
arXiv Detail & Related papers (2026-02-25T20:52:52Z) - AMV-L: Lifecycle-Managed Agent Memory for Tail-Latency Control in Long-Running LLM Systems [0.0]
We present AMV-L, a memory-management framework that treats agent memory as a managed systems resource.<n>AMV-L improves throughput by 3.1x and reduces latency by 4.2x (median), 4.7x (p95), and 4.4x (p99), while reducing the fraction of requests exceeding 2s from 13.8% to 0.007%.
arXiv Detail & Related papers (2026-02-22T00:11:20Z) - MemCtrl: Using MLLMs as Active Memory Controllers on Embodied Agents [53.44122827359892]
We propose MemCtrl, a framework that uses Multimodal Large Language Models (MLLMs) for pruning memory online.<n>-augmented MLLMs show an improvement of around 16% on average, with over 20% on specific instruction subsets.
arXiv Detail & Related papers (2026-01-28T18:31:17Z) - Agentic Learner with Grow-and-Refine Multimodal Semantic Memory [50.81667005063605]
ViLoMem is a dual-stream memory framework that constructs compact, schema-based memory.<n>It encodes visual distraction patterns and logical reasoning errors, enabling MLLMs to learn from their successful and failed experiences.
arXiv Detail & Related papers (2025-11-26T18:55:08Z) - LightMem: Lightweight and Efficient Memory-Augmented Generation [72.21680105265824]
We introduce a new memory system called LightMem, which strikes a balance between the performance and efficiency of memory systems.<n>Inspired by the Atkinson-Shiffrin model of human memory, LightMem organizes memory into three complementary stages.<n>Experiments on LongMemEval with GPT and Qwen backbones show that LightMem outperforms strong baselines in accuracy (up to 10.9% gains) while reducing token usage by up to 117x.
arXiv Detail & Related papers (2025-10-21T17:58:17Z) - video-SALMONN S: Streaming Audio-Visual LLMs Beyond Length Limits via Memory [51.03819128505358]
Video-SALMONN S is first to process 3-hour videos at 1 FPS and 360p resolution under a fixed memory budget.<n>A test-time-training memory module continually updates token representations to capture long-range dependencies.<n>A prompt-dependent memory reader retrieves context-relevant content from fixed-size memory.
arXiv Detail & Related papers (2025-10-13T08:20:15Z) - vTensor: Flexible Virtual Tensor Management for Efficient LLM Serving [53.972175896814505]
Large Language Models (LLMs) are widely used across various domains, processing millions of daily requests.
Large Language Models (LLMs) are widely used across various domains, processing millions of daily requests.
arXiv Detail & Related papers (2024-07-22T14:37:58Z) - Efficient Memory Management for Large Language Model Serving with
PagedAttention [44.70922552274376]
High throughput serving of large language models (LLMs) requires sufficiently many requests at a time.
Existing systems struggle because the key-value cache ( KV cache) memory for each request is huge and grows and shrinks dynamically.
We propose PagedAttention, an attention algorithm inspired by the classical virtual memory and paging techniques in operating systems.
arXiv Detail & Related papers (2023-09-12T12:50:04Z) - Recurrent Dynamic Embedding for Video Object Segmentation [54.52527157232795]
We propose a Recurrent Dynamic Embedding (RDE) to build a memory bank of constant size.
We propose an unbiased guidance loss during the training stage, which makes SAM more robust in long videos.
We also design a novel self-correction strategy so that the network can repair the embeddings of masks with different qualities in the memory bank.
arXiv Detail & Related papers (2022-05-08T02:24:43Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.