Source-linked AI summary
PolyMemDB: A Polyglot Database System for AI Memory Management
Yu Wang, Jiaheng Lu
TL;DR
Long-term agent memory systems struggle to manage heterogeneous data and track provenance across conflicting facts. PolyMemDB combines polyglot storage with temporal-decay probabilistic inference and evidence-chain maintenance. In demonstrations, it produced provenance-grounded answers and represented conflicting memories with explicit reliability metrics.
Problem
Existing memory systems use single storage paradigms for heterogeneous data and lack fine-grained provenance mechanisms for maintaining conflicting long-term facts.
Method
PolyMemDB combines heterogeneous databases with a dynamic probabilistic memory graph that uses temporal decay, semiring inference, and provenance-aware graph updates.
Results
PolyMemDB generated provenance-grounded answers and computed explicit conflict and reliability metrics, including R ≈0.22 for a ten-month factual-conflict scenario.
Takeaways & Limitations
The demonstrations show that PolyMemDB can expose evidence chains and represent contradictory long-term memories without binary answers or state overwriting.
Abstract
from arXiv · showhide
With the widespread adoption of personal intelligent agents, users generate massive, heterogeneous data during long-term interactions. Leveraging this data as long-term memory helps reduce token overhead and deliver personalized experiences. However, existing memory systems face two primary limitations: they rely on single-storage paradigms that fragment multi-dimensional data, and they lack fine-grained data provenance to resolve long-term factual conflicts, thereby worsening LLM hallucinations. In this demonstration, we introduce PolyMemDB, a novel system tailored for managing agent memory. PolyMemDB has a polyglot storage architecture designed to track and manage various memory types, including graph, vector, probability and spatial-temporal data. To ensure factual consistency and reduce hallucinations, it features a probabilistic inference engine that integrates temporal decay with semiring aggregation, resolving long-term factual conflicts, providing detailed data provenance, and enabling users to trace reasoning chains transparently.
I. INTRODUCTION · A. Motivation and Contributions
Long-term agent memory improves performance and user experience by reusing historical context, but heterogeneous data and unresolved factual conflicts challenge existing single-storage systems. PolyMemDB addresses these issues through polyglot storage and provenance-aware probabilistic graph maintenance with temporal decay.
- A. Motivation and Contributions: By persistently structuring historical context, agent memory can reduce inference latency and token costs through reuse of semantically similar responses while improving user experience.Memory is presented as a key factor influencing system performance and user experience.
- A. Motivation and Contributions: PolyMemDB targets heterogeneous long-term agent memory that existing single-storage paradigms struggle to associate across entity networks, logical relationships, and spatio-temporal constraints.Long-term interactions generate massive, heterogeneous context whose diverse attributes are difficult to manage in unified storage.
- A. Motivation and Contributions: Unresolved provenance and temporal-probability integration create factual conflicts and increase the need to mitigate LLM hallucinations.The introduction identifies improved data provenance and conflict handling as urgent requirements for long-term memory systems.
- A. Motivation and Contributions: PolyMemDB combines multi-modal object, graph, spatio-temporal, and probabilistic databases to overcome traditional text-only and vector-based retrieval limitations.Its polyglot storage layer integrates heterogeneous components for multi-dimensional memory management.
- A. Motivation and Contributions: Its dynamic graph updates combine data provenance with temporal decay to integrate events and resolve conflicts among multi-source facts.The mechanism supports graph updates that preserve provenance while accounting for temporal change.
- A. Motivation and Contributions: Extending semiring inference to evidence chains enables conflict resolution and entity alignment while preserving interpretability and mitigating LLM hallucinations.Probabilistic memory graph maintenance links inference, provenance, and transparent reasoning over long-term interactions.
B. Comparison to Existing Systems
PolyMemDB is positioned against systems that specialize in temporal organization, graph-based memory, spatio-temporal retrieval, or conflict resolution. It combines polyglot spatio-temporal filtering with probabilistic inference and temporal decay for memory conflict handling.
- B. Comparison to Existing Systems: MemForest organizes time-related memory in a tree, updating only affected paths instead of rewriting the entire global memory state.
- B. Comparison to Existing Systems: PolyMemDB pushes complex spatio-temporal constraints to MobilityDB, jointly filtering dynamic time windows and geographic polygons beyond pure text relationships.
- B. Comparison to Existing Systems: MRAgent uses a Cue-Tag-Content graph with active reconstruction, while PolyMemDB extends semiring inference by storing historical observation sequences on memory-triplet edges and applying probabilistic inference with temporal decay.
II. SYSTEM OVERVIEW
PolyMemDB organizes agent-memory management into three stages: memory ingestion and indexing, polyglot storage, and inference with cascaded question answering. It combines multimodal fact processing, feature-based storage routing, and tiered retrieval for subsequent reasoning.
- System workflow: PolyMemDB’s workflow comprises Memory Ingestion & Indexing, a Polyglot Storage Layer, and Inference & Cascaded QA.
- Memory Ingestion & Indexing: Memory ingestion decomposes inputs into atomic facts using LLMs and VLMs for alignment, resolution, extraction, normalization, and confidence estimation.
- Polyglot Storage Layer: The storage layer routes normalized facts by multi-dimensional features across graph, probabilistic, spatio-temporal, vector, and raw-context stores.Neo4j supports relationship graphs and long-term trajectories, ProvSQL stores event confidence, and MobilityDB manages spatio-temporal constraints.
- Inference & Cascaded QA: Inference uses a top-down, three-tier federated retrieval mechanism that begins with low-latency Graph QA and combines probabilistic and spatio-temporal filtering for logical inference.If the first tier yields no answer, the system triggers a fallback mechanism to enter the next tier.
III. PROBABILISTIC MEMORY GRAPH MAINTENANCE
PolyMemDB maintains agent memory as a dynamic probabilistic graph that combines temporal decay with probabilistic inference for event consolidation and conflict resolution. It preserves historical evidence chains and aggregates conflicting or missing evidence into an interpretable reliability score to support factual consistency.
- Memory Graph Formalization and Dynamic Update: PolyMemDB updates a dynamic memory graph using temporal decay and probabilistic inference to address event consolidation and conflicts in long-term agent memory.
- Memory Graph Formalization and Dynamic Update: The memory graph G = (V, E, α) represents heterogeneous entities, directed labeled relationships, and attributes, while each fact records polarity, LLM-assigned confidence, and observation time.
- Data Provenance and Evidence Chain Construction: Rather than overwriting graph states, PolyMemDB stores each relationship’s time-ordered historical observation sequence, preserving evidence provenance across observations.
- Probabilistic Inference Based on Temporal Decay: Using the semiring framework from probabilistic databases such as ProvSQL, PolyMemDB assigns each fact a decayed weight w_i = c_i·λ^(T−i), where λ controls temporal discounting.
- Probabilistic Inference Based on Temporal Decay: PolyMemDB derives positive drive, negative inhibition, conflict, and ignorance states, then combines them into net evidence reliability R ∈ [−1, 1] that reflects support, refutation, disputes, and insufficient evidence.The directional term S_action − S_inaction distinguishes supported from refuted facts, while the multiplier 1−S_conflict−S_ignorance penalizes disputes or missing evidence; when R ≈ 0, the maximum intermediate state indicates the cause.
IV. DEMONSTRATION
The demonstration showcases PolyMemDB through long-session provenance-grounded question answering, spatio-temporal itinerary and memory evolution, and probabilistic inference for resolving factual conflicts. Its interfaces expose reasoning chains and evidence so agents can answer complex historical questions without binary hallucinations.
- System Demonstration: The demonstration combines a FastAPI and Pydantic-AI backend with an interactive visual dashboard for extracting and inferring information across long periods.Attendees interact with the system through the conference demonstration interface.
- Scenario 1: Long-Session QA with Fine-Grained Provenance: PolyMemDB exposes a long-session QA workflow that retrieves a 20% answer, parses the reasoning chain, and lists supporting triplets and observational facts.The scenario uses a 48-session LongMemEval conversation and demonstrates fine-grained provenance for long-range dependencies.
- Scenario 2: Spatio-Temporal Memory Evolution: A second scenario extracts and summarizes a graduation-trip itinerary from lengthy historical dialogue while handling complex spatio-temporal constraints.The itinerary is presented through the spatio-temporal interface shown in Fig. 3a, alongside historical mapping and dynamic time-window filtering in Fig. 3.
- Scenario 3: Dynamic Probabilistic Inference for Factual Conflicts: With temporal decay λ = 0.8 and semiring aggregation, PolyMemDB assigns Alice’s running history 47.2% positive and 52.3% conflict states.The engine computes a 4D cognitive distribution from recent marathon evidence and historical setbacks including knee pain and heat exhaustion.
- Scenario 3: Dynamic Probabilistic Inference for Factual Conflicts: The provenance-grounded response characterizes Alice as highly committed to running while acknowledging physical and motivational hurdles rather than producing a naive binary answer.This demonstrates conflict-aware guidance without brute-force overwriting contradictory memories.