Skip to main content
QUICK REVIEW

[Paper Review] Walking Down the Memory Maze: Beyond Context Limit through Interactive Reading

Howard Chen, Ramakanth Pasunuru|arXiv (Cornell University)|Oct 8, 2023
Topic ModelingComputer Science9 citations
TL;DR

MemWalker treats long texts as interactive tasks where an LLM builds a memory tree of segment summaries and navigates it to answer queries, surpassing fixed-context limits without fine-tuning.

ABSTRACT

Large language models (LLMs) have advanced in large strides due to the effectiveness of the self-attention mechanism that processes and compares all tokens at once. However, this mechanism comes with a fundamental issue -- the predetermined context window is bound to be limited. Despite attempts to extend the context window through methods like extrapolating the positional embedding, using recurrence, or selectively retrieving essential parts of the long sequence, long-text understanding continues to be a challenge. We propose an alternative approach which instead treats the LLM as an interactive agent, allowing it to decide how to read the text via iterative prompting. We introduce MemWalker, a method that first processes the long context into a tree of summary nodes. Upon receiving a query, the model navigates this tree in search of relevant information, and responds once it gathers sufficient information. On long-text question answering tasks our method outperforms baseline approaches that use long context windows, recurrence, and retrieval. We show that, beyond effective reading, MemWalker enhances explainability by highlighting the reasoning steps as it interactively reads the text; pinpointing the relevant text segments related to the query.

Motivation & Objective

  • Investigate how to perform long-context question answering without extending the LLM's fixed context window.
  • Propose a two-stage method that builds a memory tree from long texts and navigates it for answering queries.
  • Evaluate MemWalker against recurrence, retrieval, and full-context baselines on long-context QA datasets.
  • Assess how interactive reading and working memory affect explainability and navigation reliability.

Proposed method

  • Two-stage MemWalker pipeline: (1) memory tree construction by chunking text into segments and recursively summarizing into a tree; (2) navigation where the LLM traverses the tree to answer a query.
  • Zero-shot prompting with triage and leaf prompts to control navigation actions and ensure parsable outputs.
  • Working memory mechanism stores and carries information from visited nodes to maintain coherence during traversal.
  • Reasoning-grounded navigation: each decision is preceded by a natural-language rationale before selecting an action.
  • Evaluation uses Stable Beluga 2 (70B) as the base LLM and compares against full-context, recurrence, and retrieval baselines.
  • Memory tree parameters include max_t nodes per parent and segment sizes tuned per dataset.

Experimental results

Research questions

  • RQ1Can interactive memory-based reading enable long-context QA beyond fixed context windows without model fine-tuning?
  • RQ2How does MemWalker compare to recurrence and retrieval baselines on long-context QA tasks?
  • RQ3What is the impact of reasoning prompts and working memory on navigation accuracy and error recovery?

Key findings

  • MemWalker outperforms recurrence and retrieval baselines on long-context QA tasks across QuALITY, SummScreenFD, and GovReport.
  • In long-context settings, MemWalker surpasses open long-context models and some full-context baselines, especially when the text length exceeds the original model context.
  • A strong reasoning-capable LLM (e.g., Stable Beluga 2 70B) benefits from reasoned navigation, improving accuracy; weaker models may degrade with forced reasoning.
  • Working memory substantially boosts performance, with notable degradation when it is removed.
  • MemWalker shows the ability to revert and recover from stray navigation paths, maintaining reasonable recovery rates across datasets.
  • Only reading a subset of the long text (via the memory tree) is often sufficient to answer questions, illustrating reading efficiency.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.