TL;DR
This paper introduces TierMem, a novel memory system for long-horizon AI agents that balances the efficiency of summaries with the verifiability of raw logs. By intelligently escalating to raw data only when summaries are insufficient, TierMem significantly reduces computational costs while maintaining high accuracy, addressing a key limitation in current AI memory systems.
What Problem Does This Paper Address?
AI agents that operate over long periods (weeks or months) need to remember past interactions. Storing everything raw is computationally expensive and impractical. The common solution is to compress interaction histories into summaries. However, this "write-before-query" approach is problematic: decisions about what information to keep are made before the agent knows what future questions will require. This can lead to "unverifiable omissions," where crucial details (like specific allergies or constraints) are dropped, making it impossible for the agent to provide a faithful, auditable answer. While always using raw logs ensures accuracy, it's prohibitively slow and costly. TierMem aims to bridge this gap by providing a memory system that is both efficient and trustworthy.
Methods
TierMem employs a two-tier memory hierarchy:
- Tier-1: Provenance Index (Summary Memory): This is a fast index of concise summaries. Crucially, each summary entry is linked to its original raw log page(s) via provenance pointers. This allows the system to quickly locate the source of the summary.
- Tier-2: Immutable Paged Raw Log (Raw Memory): This stores the complete interaction history in immutable, fixed-size pages, serving as the authoritative source of truth.
The core of TierMem's innovation lies in its inference-time evidence allocation strategy. When a query arrives:
- Default to Tier-1: The system first queries the fast summary index.
- Lightweight Router: A trained router assesses if the retrieved summaries contain sufficient, explicit evidence to answer the query.
- ANSWER or ESCALATE:
- If sufficient, the agent answers directly from the summaries (fast path).
- If insufficient, the system escalates to Tier-2. This escalation is "provenance-guided," meaning it prioritizes checking the raw log pages linked to the insufficient summaries. If needed, it can perform a limited search for additional evidence.
- Verified Write-Back: After a successful escalation and grounding, TierMem distills the newly verified, crucial findings into new Tier-1 summary units. These new units are also linked to their raw sources, enabling online consolidation and improving future summary-based answers.
Datasets
The paper evaluates TierMem on two long-horizon conversational memory benchmarks:
- LoCoMo: Used for training and evaluating the router and overall system performance.
- LongMemEval: Used to assess performance on tasks with long-range dependencies.
The authors also construct a specific dataset for training the router using a "hindsight labeling strategy" and a subset of the Long-Range Understanding (LRU) competency benchmark.
Key Insights and Ideas
- The "Write-Before-Query" Barrier is Fundamental: The paper clearly articulates that the core problem isn't just imperfect summarization, but an inherent structural risk of compressing information before knowing its future relevance.
- Inference-Time Evidence Allocation is Key: The most impactful idea is shifting the decision of what evidence to use from write-time (when uncertainty is high) to inference-time (when the query is known). This allows for dynamic, query-aware retrieval.
- Provenance is the Bridge: The provenance links between summaries and raw logs are critical. They enable targeted escalation and ensure that even when summaries are insufficient, the system can efficiently find the necessary raw evidence.
- Verified Write-Back for Amortization: Consolidating verified findings back into the summary tier is crucial for long-term efficiency. It means that once a piece of information is proven necessary and grounded, it becomes readily available for future queries, reducing the need for repeated escalations.
- Router as a Semantic Cache Controller: The lightweight router acts as an intelligent controller, deciding when to leverage the fast, cheap summary cache and when to incur the cost of accessing the deeper, more reliable raw log.
Key Results
- Accuracy-Efficiency Trade-off: TierMem significantly improves the accuracy-efficiency frontier. On LoCoMo, it achieves 0.851 accuracy (close to the raw-only 0.873) while reducing input tokens by 54.1% and latency by 60.7%.
- Mitigating Unverifiable Omissions: TierMem dramatically reduces the Unverifiable Omission Rate (UOR), a metric quantifying evidence loss during summarization.
- Effective Routing: The trained router successfully distinguishes between queries answerable by summaries and those requiring escalation, with minimal overhead.
- Provenance Pointers Improve Escalation: Enabling provenance pointers leads to a 1.5pp accuracy gain, particularly on escalated queries, by guiding the search to relevant raw pages.
- Consolidation Reduces Future Costs: Over time, verified write-back increases the proportion of queries answered by summaries alone, reducing overall costs.
Limitations and Future Work
- False Cache Hits: The router sometimes incorrectly decides to answer from summaries when escalation is needed (false cache hits). This is attributed to a conservative bias in sufficiency checking, leading to unnecessary escalations and increased cost. Future work could focus on better calibration of sufficiency detection.
- Escalation Pipeline Improvements: Even when escalation is correctly triggered, the final answer can still be wrong. This suggests that improvements are needed in the raw evidence retrieval itself, the quality of the raw data, and the generation process to extract and synthesize information more effectively.
- Write-Time Compression Strategies: While TierMem addresses inference-time allocation, the paper notes that reducing lossy abstraction at write-time (e.g., retaining more specific details) could further mitigate issues.
Summary updated