mlsanityData to 7 Oct 2026

The Pensieve Paradigm: Stateful Language Models Mastering Their Own Context

arXiv 2602.12108 ↗First posted 12 Feb 2026cs.AIcited by 8

Not on the map. Why?

Abstract (arXiv)

In the world of Harry Potter, when Dumbledore's mind is overburdened, he extracts memories into a Pensieve to be revisited later. In the world of AI, while we possess the Pensieve-mature databases and retrieval systems, our models inexplicably lack the "wand" to operate it. They remain like a Dumbledore without agency, passively accepting a manually engineered context as their entire memory. This work finally places the wand in the model's hand. We introduce StateLM, a new class of foundation models endowed with an internal reasoning loop to manage their own state. We equip our model with a suite of memory tools, such as context pruning, document indexing, and note-taking, and train it to actively manage these tools. By learning to dynamically engineering its own context, our model breaks free from the architectural prison of a fixed window. Experiments across various model sizes demonstrate StateLM's effectiveness across diverse scenarios. On long-document QA tasks, StateLMs consistently outperform standard LLMs across all model scales; on the chat memory task, they achieve absolute accuracy improvements of 10% to 20% over standard LLMs. On the deep research task BrowseComp-Plus, the performance gap becomes even more pronounced: StateLM achieves up to 52% accuracy, whereas standard LLM counterparts struggle around 5%. Ultimately, our approach shifts LLMs from passive predictors to state-aware agents where reasoning becomes a stateful and manageable process.

Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 13 of its 17 references that are in the map. First posted on arXiv 12 Feb 2026.

Builds on

13 of 17 references.

References · 13

  1. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  2. 2025Qwen3 Technical Reportcited by 8,195
  3. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
  4. 2024LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memorycited by 656
  5. 2017The NarrativeQA Reading Comprehension Challengecited by 590
  6. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
  7. 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 367
  8. 2025MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agentcited by 235
  9. 2023L-Eval: Instituting Standardized Evaluation for Long Context Language Modelscited by 232
  10. 2025BrowseComp-Plus: A More Fair and Transparent Evaluation Benchmark of Deep-Research Agentcited by 183
  11. 2024A Human-Inspired Reading Agent with Gist Memory of Very Long Contextscited by 140
  12. 2025Scaling Long-Horizon LLM Agent via Context-Foldingcited by 136
1 more
  1. 2024NovelQA: Benchmarking Question Answering on Documents Exceeding 200K Tokenscited by 31

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 8.

8 papers.