Weighted Memory Tree: Remembering What Matters for Long-Horizon LLM Agents

AuthorsQuang Dao, Purvi Kathalkar, Kenneth Eaton

arXiv 20262026

TL;DR

Weighted Memory Tree uses dynamic retention scoring and lifecycle control to select active memories, boosting GAIA-Text accuracy by up to 13.39 points while cutting prompt tokens by 32.8%.

SharePost on XLinkedIn

Read our summary here, or open the publisher PDF on the next tab.

THE PROBLEM

Long-horizon agents drown in stale context and irrelevant history

Linear ReAct-style histories keep appending every step, so outdated, irrelevant, or misleading information accumulates and degrades reasoning quality over time.

GAIA-style multi-step research tasks with tools suffer when failed attempts and stale observations compete with valid evidence, driving up prompt cost and lowering accuracy.

HOW IT WORKS

Weighted Memory Tree architecture

Weighted Memory Tree combines a Hierarchical Memory Tree, Dynamic Retention Scoring, Memory Controller and Lifecycle Operations, and a Utility-Aware Prompt Synthesizer to manage agent memory.

Think of Weighted Memory Tree as a smart card catalog plus garbage collector: it files every task branch, scores usefulness, and folds or suppresses branches instead of keeping everything in RAM.

This lets Weighted Memory Tree construct compact, high-utility prompts that a plain context window cannot, preserving access to folded traces while suppressing low-utility or unreliable branches.

DIAGRAM

Execution loop and lifecycle of a task in Weighted Memory Tree

This diagram shows how Weighted Memory Tree runs the status-driven workflow from query initialization through scoring, folding, suppression, and termination.

DIAGRAM

Benchmark and ablation comparison pipeline for Weighted Memory Tree

This diagram shows how Weighted Memory Tree is evaluated on GAIA and GAIA-Text across memory variants and metrics.

PROCESS

How Weighted Memory Tree Handles a Status-driven Workflow

  1. 01

    Hierarchical Memory Tree

    Weighted Memory Tree initializes a root task from the user query and builds a task and action hierarchy in the Hierarchical Memory Tree for each execution step.

  2. 02

    Dynamic Retention Scoring

    Weighted Memory Tree assigns each memory a retention score using Dynamic Retention Scoring, updating scores from success or failure outcomes and missed selections.

  3. 03

    Memory Controller and Lifecycle Operations

    Weighted Memory Tree uses Memory Controller and Lifecycle Operations to fold completed branches, suppress low-priority branches, and reopen folded tasks when execution returns.

  4. 04

    Utility-Aware Prompt Synthesizer

    Weighted Memory Tree runs the Utility-Aware Prompt Synthesizer to select high-utility memories under a context budget and serialize them into the working context for the next reasoning step.

KEY CONTRIBUTIONS

Key Contributions

  • 01

    Weighted Memory Tree framework

    Weighted Memory Tree introduces a Hierarchical Memory Tree with Dynamic Retention Scoring and a Memory Controller that improves GAIA-Text accuracy by an average of 9.97 percentage points over Linear History.

  • 02

    Dynamic retention and lifecycle

    Weighted Memory Tree defines event-based retention scoring, branch-level priority, and lifecycle states to fold, suppress, and reopen branches while keeping full execution traces persistently stored.

  • 03

    Robustness to memory poisoning

    Weighted Memory Tree reduces attack success rate to 0.419 and poison retrieval rate to 0.097 in memory-poisoning experiments, while achieving the highest task success rate of 0.575 among all evaluated methods.

RESULTS

By the Numbers

Accuracy (%)

33.86% (Qwen3-8B, GAIA-Text)

+13.39 over Linear History

Tokens (M)

32.48M (Qwen3-8B, GAIA-Text)

-11.19M vs Linear History

Accuracy (%)

30.91% (Gemma 4 E4B, GAIA)

+4.85 over Linear History

Tokens (M)

69.45M (Llama-3.1-8B, GAIA)

-33.40M vs Linear History

On GAIA-Text and GAIA, which require multi-step reasoning and tool use, Weighted Memory Tree consistently increases accuracy while reducing total prompt tokens compared to Linear History. These numbers show that utility-aware memory selection can both improve task success and cut context-processing cost for long-horizon agents.

BENCHMARK

By the Numbers

On GAIA-Text and GAIA, which require multi-step reasoning and tool use, Weighted Memory Tree consistently increases accuracy while reducing total prompt tokens compared to Linear History. These numbers show that utility-aware memory selection can both improve task success and cut context-processing cost for long-horizon agents.

BENCHMARK

Performance on GAIA-Text with Qwen3-8B

Accuracy (%) on GAIA-Text for different memory systems using Qwen3-8B.

BENCHMARK

Prompt-token usage on GAIA-Text with Qwen3-8B

Total prompt tokens (millions) on GAIA-Text for different memory systems using Qwen3-8B.

KEY INSIGHT

The Counterintuitive Finding

Weighted Memory Tree reduces prompt-token usage by an average of 32.8% on GAIA-Text while increasing accuracy by 9.97 percentage points over Linear History.

This is counterintuitive because long-horizon agents usually gain performance by adding more context, yet Weighted Memory Tree shows that deciding what stays active matters more than storing everything.

WHY IT MATTERS

What this unlocks for the field

Weighted Memory Tree unlocks long-horizon agents that can keep rich execution histories without flooding the context window or propagating unreliable memories.

Builders can now design agents that fold, suppress, and select memory branches dynamically, making complex research, tool use, and security-sensitive workflows practical at smaller model scales.

~12 min read← Back to papers

Related papers

BenchmarkAgent Memory

Active Context Compression: Autonomous Memory Management in LLM Agents

Nikhil Verma

· 2026

Focus Agent adds start_focus, complete_focus, a persistent Knowledge block, and an optimized Persistent Bash plus String-Replace Editor scaffold to actively compress context during long software-engineering tasks. On five hard SWE-bench Lite instances against a Baseline ReAct agent, Focus Agent achieves 22.7% token reduction (14.9M → 11.5M) while matching 3/5 = 60% task success.

Agent Memory

ActMem: Bridging the Gap Between Memory Retrieval and Reasoning in LLM Agents

Xiaohui Zhang, Zequn Sun et al.

· 2026

ActMem transforms dialogue history into atomic facts via Memory Fact Extraction, groups them with Fact Clustering, links them through a Memory KG Construction module, and uses Counterfactual-based Retrieval and Reasoning for action-aware answers. On ActMemEval, ActMem reaches 76.52% QA accuracy with DeepSeek-V3, beating LightMem’s 63.97% by 12.55 points and NaiveRAG’s 61.54%.

Questions about this paper?

Paper: Weighted Memory Tree: Remembering What Matters for Long-Horizon LLM Agents

Answers use this explainer on Memory Papers.

Checking…