Weighted Memory Tree: Remembering What Matters for Long-Horizon LLM Agents
Organizations: Rose-Hulman Institute of Technology · Georgia Institute of Technology · Georgia Tech Research Institute
Abstract
Large language model (LLM) agents have demonstrated the ability to solve multi-step tasks requiring planning, tool use, and external information access, yet growing execution histories increase inference cost and expose reasoning to outdated, irrelevant, or misleading information, potentially degrading reasoning quality. Existing memory approaches organize or compress execution histories but provide limited mechanisms for deciding which memories remain active. We introduce the, a hierarchical memory system that organizes execution into tasks, subtasks, and actions while assigning each memory a dynamic retention score. Event-based updates and selection-based decay revise these scores, allowing WMT to preserve useful information, fold completed trajectories, suppress low-utility content, and retain access to folded context. We evaluate WMT on GAIA-Text using Qwen3-8B, Gemma 4 E4B, and Llama-3.1-8B, with ablations and memory-poisoning experiments. Relative to linear memory, WMT improves accuracy by an average of 9.97 percentage points while reducing prompt-token usage by 32.8%. Memory-poisoning experiments show that WMT limits the persistence and propagation of unreliable information. Our results suggest that effective long-horizon agent memory depends less on storing more information than on deciding which information should remain active.
Figures & tables
| Method | Qwen3-8B | Gemma 4 E4B | Llama-3.1-8B | |||
|---|---|---|---|---|---|---|
| Acc. (%) | Tokens (M) | Acc. (%) | Tokens (M) | Acc. (%) | Tokens (M) | |
| GAIA-Text | ||||||
| No Memory | 9.45 | 0.20 | 14.17 | 0.13 | 6.30 | 0.03 |
| Linear History | 20.47 | 43.67 | 24.41 | 65.27 | 9.45 | 73.96 |
| A1: Unweighted Tree | 15.75 | 39.24 | 25.20 | 53.90 | 9.45 | 77.13 |
| Full WMT | 33.86 | 32.48 | 33.07 | 37.85 | 17.32 | 51.17 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Memory Configuration | Qwen3-8B | Gemma 4 E4B | Llama-3.1-8B | |||
|---|---|---|---|---|---|---|
| Acc. (%) | Tokens (M) | Acc. (%) | Tokens (M) | Acc. (%) | Tokens (M) | |
| Tree Memory | 15.75 | 39.24 | 25.20 | 53.90 | 9.45 | 77.13 |
| Tree + Selection | 22.05 | 74.37 | 25.20 | 92.02 | 14.96 | 101.22 |
| Tree + Summary | 15.75 | 34.00 | 25.98 | 28.58 | 19.69 | 66.83 |
| Tree + Selection + Summary | 18.90 | 47.33 | 29.13 | 31.55 | 17.32 | 77.05 |
| Full WMT | 33.86 | 32.48 | 33.07 | 37.85 | 17.32 | 51.17 |
| Memory Configuration | Qwen3-8B | Gemma 4 E4B | Llama-3.1-8B | |||
|---|---|---|---|---|---|---|
| Acc. (%) | Tokens (M) | Acc. (%) | Tokens (M) | Acc. (%) | Tokens (M) | |
| Tree Memory | 18.18 | 58.46 | 25.45 | 65.09 | 11.52 | 101.91 |
| Tree + Selection | 21.21 | 100.51 | 26.67 | 105.57 | 16.36 | 134.15 |
| Tree + Summary | 15.15 | 49.83 | 24.85 | 36.02 | 16.97 | 94.25 |
| Tree + Selection + Summary | 15.76 | 66.84 | 28.48 | 42.68 | 20.00 | 112.44 |
| Full WMT | 29.70 | 42.69 | 30.91 | 46.64 | 24.85 | 69.45 |
| Metric | Linear Memory | Unweighted Tree (A1) | No Memory Controller (A2) | No Semantic Retrieval (A3) | Full WMT |
|---|---|---|---|---|---|
| Attack Success Rate | 0.995 | 0.631 | 0.601 | 0.680 | 0.419 |
| Poison Retrieval Rate | 0.246 | 0.125 | 0.158 | 0.139 | 0.097 |
| Infection Persistence | 1.000 | 0.009 | 1.000 | 0.009 | 0.009 |
| Blast Radius | 0.906 | 0.388 | 0.509 | 0.669 | 0.315 |
| Amplification Factor | 6.103 | 1.280 | 1.638 | 1.977 | 0.965 |
| Task Success Rate | 0.183 | 0.431 | 0.451 | 0.393 | 0.575 |
LLM Agent Memory
Large language model agent memory lets agents retain, organize, retrieve, and update information across interactions and long-running tasks.
See all 357 papers