Beyond a Million Tokens: Benchmarking and Enhancing Long-Term Memory in LLMs

Mohammad Tavakoli, Alireza Salemi, Carrie Ye, Mohamed Abdalla, Hamed Zamani, J Ross Mitchell

As Large Language Models (LLMs) like Gemini and GPT-4 push context windows toward a million tokens and beyond, a critical question emerges: Can these models actually remember and reason over such vast amounts of information, or are they just getting lost in the noise?

A new paper, "Beyond a Million Tokens: Benchmarking and Enhancing Long-Term Memory in LLMs," argues that current benchmarks are too simple to answer this. The authors introduce BEAM, a massive new benchmark for testing memory up to 10 million tokens, and LIGHT, a cognitive-inspired framework that significantly boosts LLM performance on long-context tasks.

TL;DR

The authors present BEAM, a benchmark of 100 coherent, multi-domain conversations scaling up to 10M tokens, designed to test complex memory abilities like contradiction resolution and event ordering. To solve these challenges, they propose LIGHT, a framework that equips LLMs with episodic memory, working memory, and a "scratchpad" for salient facts, outperforming standard long-context models by up to 12.7%.

What Problem Does This Paper Address?

While we now have models with 1M+ token context windows, evaluating their "long-term memory" has been flawed. Most existing benchmarks create "long" contexts by artificially stitching together unrelated snippets from different users. This lacks narrative coherence—the model doesn't have to follow a single story or a developing relationship. Furthermore, most tests only check for simple fact recall (the "needle in a haystack" test) rather than complex reasoning.

The authors identify a "reasoning gap": even models that can technically "see" a million tokens often fail to resolve contradictions or track how information evolves over a long conversation.

Methods

The paper introduces two major contributions:

1. BEAM (The Benchmark)

To create realistic long-form data, the authors developed an automated pipeline to generate 100 highly coherent conversations. Unlike previous datasets, these follow a structured "conversation plan" that includes user profiles, relationship graphs, and explicit timelines.

Figure 1: Overview of BEAM generation process. In the first stage, conversation plans are created for each chat seed. In the second stage, user utterances are generated from the conversation plans. In the third stage, assistant responses are produced. In the fourth stage, probing questions are generated based on the targeted memory abilities and corresponding conversation plans. In the final stage, invalid probing questions are filtered out, and nuggets are created for the validated set.

2. LIGHT (The Framework)

Inspired by human cognitive science, the authors propose LIGHT, which moves away from treating context as one giant block of text. Instead, it uses three complementary systems:

  • Episodic Memory: A long-term index of the full conversation used for retrieval-augmented generation (RAG).
  • Working Memory: A buffer containing the most recent user-assistant turns to maintain immediate flow.
  • Scratchpad: A persistent, compressed "semantic layer" where the model records salient facts, user preferences, and state changes after every turn.
The LIGHT framework integrates episodic retrieval, a working memory buffer, and a summarized scratchpad to generate responses.

Datasets

The primary dataset is the newly created BEAM benchmark. It consists of:

  • 100 conversations across 19 domains (Coding, Math, Health, Finance, etc.).
  • Lengths ranging from 100K to 10M tokens.
  • 2,000 validated questions targeting 10 memory dimensions, including new tasks like Contradiction Resolution (detecting inconsistent statements) and Event Ordering (reconstructing sequences).

Key Insights and Ideas

  • Context Size $\neq$ Reasoning Power: The experiments show that even models with 1M token windows (like Gemini 2.0 Flash) see performance drop sharply as dialogues lengthen. Simply having a "big window" isn't enough for deep reasoning.
  • The Power of the "Gist": The "Scratchpad" was a standout component. By maintaining a summarized version of key facts and user instructions, the model avoided common failures in Information Extraction and Instruction Following, even when the original context was millions of tokens away.
  • Structured Memory is Scalable: LIGHT showed its greatest gains at the 10M token mark. Because it doesn't rely solely on the raw context window, it can handle lengths that currently exceed the native limits of almost all production LLMs.

Key Results

The authors tested LIGHT against strong baselines, including vanilla long-context models and standard RAG systems.

  • Consistent Improvement: LIGHT improved performance by 3.5% to 12.69% on average across different backbone models (GPT-4.1-nano, Gemini 2.0 Flash, Qwen 2.5).
  • Massive Gains at Scale: At the 10M token length, LIGHT achieved dramatic improvements—up to +155.7% for Llama-4-Maverick compared to the long-context baseline.
  • Ability-Specific Wins: The framework was particularly effective for Summarization (+160.6% gain) and Preference Following (+76.5%), proving that structured memory helps models stay "in character" and aware of user needs over time.

Limitations and Future Work

Despite the success of LIGHT, the authors note that Contradiction Resolution remains a significant challenge for all models. Detecting when a user says something that contradicts a statement from 500,000 tokens ago is still an open problem.

Additionally, while LIGHT is more efficient than processing 10M tokens raw, the process of updating the scratchpad and episodic index after every turn adds computational overhead. Future work may focus on optimizing these updates to make real-time, multi-million token conversations more commercially viable.

Summary updated

Abstract

Evaluating the abilities of large language models (LLMs) for tasks that require long-term memory and thus long-context reasoning, for example in conversational settings, is hampered by the existing benchmarks, which often lack narrative coherence, cover narrow domains, and only test simple recall-oriented tasks. This paper introduces a comprehensive solution to these challenges. First, we present a novel framework for automatically generating long (up to 10M tokens), coherent, and topically diverse conversations, accompanied by probing questions targeting a wide range of memory abilities. From this, we construct BEAM, a new benchmark comprising 100 conversations and 2,000 validated questions. Second, to enhance model performance, we propose LIGHT-a framework inspired by human cognition that equips LLMs with three complementary memory systems: a long-term episodic memory, a short-term working memory, and a scratchpad for accumulating salient facts. Our experiments on BEAM reveal that even LLMs with 1M token context windows (with and without retrieval-augmentation) struggle as dialogues lengthen. In contrast, LIGHT consistently improves performance across various models, achieving an average improvement of 3.5%-12.69% over the strongest baselines, depending on the backbone LLM. An ablation study further confirms the contribution of each memory component.
BibTeX
@inproceedings{tavakoli2026beyond,
  author = {Mohammad Tavakoli and Alireza Salemi and Carrie Ye and Mohamed Abdalla and Hamed Zamani and J Ross Mitchell},
  title = {{Beyond a Million Tokens: Benchmarking and Enhancing Long-Term Memory in LLMs}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=y59hf5lrMn},
}
Figure