MEMENTO teaches 8B model to manage long-context notes
Researchers trained Qwen3-8B to compact long books into notes, lifting book QA accuracy to 67.8% in a 20K-token window. Here's how it works in practice.
Source: arXiv Computation and LanguageA new long-context agent called MEMENTO, built on the 8-billion-parameter Qwen3-8B model, has been trained to keep its own working notes so it can answer questions about books far longer than its context window, according to the arXiv paper. The result matters because it suggests that how an agent manages what it remembers may matter as much as how much context it is given in the first place.
What is MEMENTO and what problem does it address?
MEMENTO is presented in the arXiv paper as a long-context agent designed to handle inputs that exceed a fixed-size context window. The authors, Yunfan Zhang, Taehoon Hwang, Kathleen McKeown and Smaranda Muresan, frame the core difficulty as context management: an agent must decide what to retain, what to discard, and how to carry useful information forward when the original material can no longer fit in view.
That problem is familiar to anyone building agents over documents, transcripts, codebases or other long-running tasks. A model may start with plenty of room, but as a task continues, earlier observations accumulate. If everything is kept, the window fills. If material is dropped carelessly, the agent may lose the detail it needed to answer correctly later. MEMENTO is an attempt to learn that selection process rather than relying on a fixed rule for trimming history.
The paper was submitted to arXiv on 30 October 2026 and listed under Computation and Language, according to the arXiv listing. The authors describe MEMENTO as trained to manage its context through compaction, a strategy in which the model replaces its history with a note it generates itself before continuing in a fresh window.
Why is compaction difficult for off-the-shelf agents?
Compaction sounds straightforward: summarise what has happened, discard the rest, and continue from the summary. In practice, according to the authors, off-the-shelf agentic models including GPT-5.5 and GLM-5.3 often produce notes that are ineffective for the task ahead. A note can be fluent and still omit the names, dates, relationships or qualifications that a later question depends on.
The paper also reports that reinforcement learning on its own rarely leads a model to discover useful note-taking behaviour. That is an important distinction for practitioners. Rewarding a final answer may not be enough to teach an agent how to write an intermediate note, because the connection between a good note and a good final answer is indirect. The agent has to learn to preserve information whose value may only become clear many steps later.
For developers, this helps explain a common failure mode in long-running agents. The model is not necessarily incapable of reasoning over the material in front of it. It may instead be failing at the bookkeeping layer: deciding what deserves to survive a context reset. MEMENTO is aimed squarely at that layer, treating note quality as a learnable skill rather than assuming a general model will do it well without specific training.
How was MEMENTO trained to write its own notes?
The training approach described in the paper has two stages. First, the authors bootstrap note-taking by fine-tuning on synthetic trajectories that are annotated with notes generated in hindsight. In other words, the model is shown examples of how a trajectory might be condensed after the fact, giving it a starting pattern for what a useful compaction note looks like.
Second, that behaviour is reinforced with reinforcement learning. According to the paper, the reward combines three elements: whether the final answer is correct, heuristics intended to judge note quality, and confidence calibration. The combination is notable because it rewards more than a lucky final answer. It also encourages notes that meet certain quality criteria and a sense of when the model should be confident in what it has retained.
The authors report a further behaviour that emerged at test time. Although MEMENTO was trained only to compact into a fresh window, it extended to strategies such as context folding and confidence-based backtracking. Context folding, in this description, implies bringing earlier material back into view in a more compact or selective form, while confidence-based backtracking suggests revisiting earlier work when confidence is low. The paper presents these as behaviours the trained agent exhibited beyond the exact strategy it was trained for, rather than as separately programmed features.
What results did MEMENTO report on book-level question answering?
The evaluation reported in the paper focuses on book-level question answering across four benchmarks, with books of up to 2.5 million tokens. In that setting, MEMENTO raised Qwen3-8B's accuracy from 36.9% to 67.8%, according to the authors, while never holding more than 20,000 tokens in context at once.
The comparison points are central to the paper's argument. MEMENTO outperformed a GPT-5.5 agent in the same harness, which scored 13.1%, and also outperformed GPT-5.5 with the full book in context, which scored 56.7%, at less than one fiftieth of the cost, according to the paper. That comparison is intended to show that giving a model the whole book is not automatically the best strategy if the model has not learned to use that material effectively.
MEMENTO also nearly matched a much larger GLM-5.3 agent, which scored 69.3%, at one ninth of the cost, according to the paper. The authors further report that it came within 6.4 points of GLM-5.3 with full context, at one twenty-sixth of the cost. The GLM-5.3 agent is described in the paper as roughly one hundred times larger than Qwen3-8B.
Those figures should be read as the authors' reported results on their benchmarks, not as a general claim about every long-context task. The paper's evidence is specific to book-level question answering across the four benchmarks used, with books up to 2.5 million tokens. Even within that scope, the pattern is clear: a small model with learned compaction performed close to a much larger agent while operating with a much smaller active context.
What does this mean for builders of long-context agents?
For builders, the practical lesson is to treat context management as part of the system design, not as an afterthought. If an agent must process material longer than its window, the quality of its intermediate notes can determine whether it succeeds. A summary that reads well may still be a poor working memory if it drops the details a later step requires.
The training recipe also offers a useful template. Bootstrapping from hindsight-annotated examples, then reinforcing with a reward that covers answer correctness, note quality and confidence calibration, addresses the problem that reinforcement learning alone rarely discovers useful note-taking. That sequence may be relevant beyond books, for example in agents that browse, code, research or monitor documents over many steps, although the paper's reported evidence is limited to the book question-answering setting described above.
Cost is the other implication. The paper reports large cost differences between MEMENTO and the larger-model comparisons, at less than one fiftieth of the cost of the GPT-5.5 agent comparison and one ninth of the cost of the GLM-5.3 agent comparison. For teams paying per token, a strategy that keeps the active window at or below 20,000 tokens while retaining accuracy could change the economics of long-document agents, provided the approach transfers to their own tasks.
There are also open questions the paper does not settle. The reported results do not by themselves show how MEMENTO would perform on other long-context tasks, other model families, or settings where the relevant information is distributed differently. Readers should therefore treat MEMENTO as evidence for learned compaction in book-level question answering, and as a prompt to test similar ideas in their own workflows.
How can readers explore this idea with Grafy?
Grafy does not claim to offer MEMENTO or a compaction-training feature, so the genuine connection is at the level of exploring long documents and comparing how different models handle them. Readers can upload or open papers and PDFs in Grafy Reader to question a document with AI, and can use Grafy Chat to compare how several models summarise the same long source and what each summary preserves or drops.
That comparison is a practical way to see the problem MEMENTO addresses. Take a long paper or book, ask different models to produce a working note for a later question, and then test whether the note retains the details needed to answer accurately. The exercise will not reproduce the paper's training method, but it can help readers judge where context management succeeds or fails in their own use.
Frequently asked questions
Was MEMENTO trained only to compact into a fresh window?
Yes. According to the paper, MEMENTO was trained only to compact into a fresh window. The authors report that, at test time, it nevertheless extended to strategies such as context folding and confidence-based backtracking. Those additional behaviours were presented as emergent extensions of the trained compaction strategy, not as the sole objective of training.
Did MEMENTO learn note-taking through reinforcement learning alone?
No. The paper says reinforcement learning alone rarely discovers useful note-taking behaviour. The authors therefore first bootstrapped note-taking by fine-tuning on synthetic trajectories annotated with notes generated in hindsight, and only then reinforced it with reinforcement learning using a combined reward for correctness, note quality and confidence calibration.
How much context did MEMENTO hold at once during book question answering?
MEMENTO never held more than 20,000 tokens in context during the reported book-level question answering evaluation. That limit applied even though the books in the benchmarks reached up to 2.5 million tokens. In that setting, the authors report accuracy rising from 36.9% for Qwen3-8B to 67.8% for MEMENTO.
Source: arXiv:2611.00244


