The Pensieve Paradigm: Stateful Language Models Mastering Their Own Context

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Liu, Xiaoyuan, Liang, Tian, Ma, Dongyang, Zhou, Deyu, Mi, Haitao, He, Pinjia, Wang, Yan
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866915794918572032
author Liu, Xiaoyuan
Liang, Tian
Ma, Dongyang
Zhou, Deyu
Mi, Haitao
He, Pinjia
Wang, Yan
author_facet Liu, Xiaoyuan
Liang, Tian
Ma, Dongyang
Zhou, Deyu
Mi, Haitao
He, Pinjia
Wang, Yan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2602_12108
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle The Pensieve Paradigm: Stateful Language Models Mastering Their Own Context
Liu, Xiaoyuan
Liang, Tian
Ma, Dongyang
Zhou, Deyu
Mi, Haitao
He, Pinjia
Wang, Yan
Artificial Intelligence
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.
title The Pensieve Paradigm: Stateful Language Models Mastering Their Own Context
topic Artificial Intelligence
url https://arxiv.org/abs/2602.12108