Manuscript Offprint

arXiv:2611.06414

Twists and Turns: A Graph-Based Benchmark and Framework for Long-Term Memory in Exploration Tasks

Chongyuan Dai, Yaling Shen, Zirui Song, Junfeng Liao, Jinpeng Hu, Xiuying Chen

Chongyuan Dai♠ Yaling Shen♥ Zirui Song♠ Junfeng Liao♠ Jinpeng Hu♣ Xiuying Chen♣

♣ Mohamed bin Zayed University of Artificial Intelligence (MBZUAI)

♥ Monash University

♣ Hefei University of Technology

Long-term problem-solving processes, such as scientific research and software development, proceed along an evolving trial-and-error trajectory toward a central goal. We term these exploration tasks, which require models to remember not only facts but also how solutions are tested against intermediate outcomes and early attempts are continually revised or revived. However, existing long-term memory research focuses on factual recall and updates, overlooking the interconnected nature of exploration. We observe that exploration processes naturally form graphs, with branching approaches linked by revisions and reconsiderations. Motivated by this, we propose LExMEM, a graph-guided benchmark designed to evaluate Memory in Long-term Exploration tasks. We model exploration processes as graphs and introduce an evolutionary mechanism to increase their structural complexity, yielding 224 dialogues and 2,018 question-answer instances derived from graph structures. Building on the same insight, we propose LExGRAPH, a graph-based memory framework that incrementally organizes dialogues into interconnected memory nodes and retrieves evidence through hybrid retrieval and neighbor expansion. Extensive experiments demonstrate that LExMEM poses a significant challenge to existing retrieval-and memory-based systems, whereas LExGRAPH achieves superior performance and generalizes effectively to external benchmarks. Codes and datasets are available at https://github.com/mbzuai-nlp/LExMem.

1. Introduction

Recent large language models (LLMs) have demonstrated impressive capabilities across a wide spectrum of tasks, including open-domain dialogue (Zhou et al., 2024; Xu et al., 2025b), code generation (Shi et al., 2026), and scientific research (Haase and Pokutta, 2025; Su et al., 2025). Long-term memory is essential for sustaining these interactions, enabling models to retain and utilize information accumulated over time. Therefore, numerous benchmarks and frameworks have been developed to evaluate and enhance this capability (Gutiérrez et al., 2024; Gutiérrez et al., 2025; Wang et al., 2026; Xu et al., 2026). One line of research investigates memory for user personas and personal facts in extended conversations (Maharana et al., 2024; Zhong et al., 2024; Jiang et al., 2025; Wu et al., 2025; Zhao et al., 2025; Li et al., 2026). In parallel, evaluations have expanded to task-oriented scenarios (Hu et al., 2026; Shen et al., 2026). For instance, MemoryCode requires models to follow coding instructions that are introduced and updated across sessions (Rakotonirina et al., 2025), while RealMem investigates whether agents can track the states of ongoing projects (Bian et al., 2026). Collectively, existing benchmarks primarily assess the recall of information, ranging from personal facts to evolving task details.

However, real-world problem solving often involves exploration tasks, where conversations evolve through iterative trial and error toward a central goal. As illustrated in Figure 1, such tasks involve testing tentative approaches against empirical evidence and continually revising decisions based on intermediate outcomes. Yet, existing benchmarks overlook the dynamics of exploration, leaving it unclear how effectively models can reason over interrelated information, trace the rationale of extended inquiry, and aggregate findings scattered across prolonged interactions (Maharana et al.,

Figure

Figure 1: An illustrative exploration task modeled as a graph. We highlight two branches, whose exploration steps are interconnected by relations.

2024; Hu et al., 2026; Li et al., 2026). Furthermore, existing memory frameworks organize dialogue history around semantic similarity (Xu et al., 2025a; Rezazadeh et al., 2025), topical clustering (Tan et al., 2025; Fang et al., 2026), and entity relations (Chhikara et al., 2025; Edge et al., 2025; Guo et al., 2025), overlooking the procedural dependencies required in sustained exploration.

In this paper, we propose LExMEM, a graph-guided benchmark for evaluating MEMORY in Long-term Exploration tasks. To this end, we leverage directed graphs to model exploration steps and their dependencies, enabling the systematic construction of complex exploration trajectories and relationship-aware questions. Specifically, we develop a three-stage construction pipeline. First, we construct exploration graphs and introduce an evolutionary mechanism to increase their structural complexity. Second, we instantiate these graphs with scientific research and software design tasks, and further expand each node into multi-turn dialogue blocks. Finally, we extract structural subgraphs to generate QA instances that evaluate memory of interconnected exploration steps. The resulting LExMEM contains 224 dialogues and 2,018 QA instances across three graph-derived question types. Extensive experiments reveal that LExMEM poses substantial challenges to existing retrieval and memory frameworks, particularly in aggregating information scattered throughout exploration.

To address these challenges, we introduce LExGRAPH, a GRAPH-based memory framework designed to maintain structured context in Long-term Exploration. Rather than relying on predefined graphs, LExGRAPH incrementally constructs a memory graph from raw dialogues, organizing information into nodes connected by hierarchical and cross-branch dependencies. During inference, it retrieves relevant nodes and traverses their connections to integrate scattered evidence for reasoning. Experiments demonstrate that LExGRAPH consistently outperforms existing retrieval and memory systems on LExMEM and generalizes effectively to external memory benchmarks.

References (100)

Couldn't load all references. Reload the page to try again.