Paper deep dive
PolyMemDB: A Polyglot Database System for AI Memory Management
Yu Wang, Jiaheng Lu
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 92%
Last extracted: 8/27/2026, 5:37:13 AM
Summary
The paper introduces PolyMemDB, a polyglot database system designed for managing long-term memory in personal intelligent agents. It addresses limitations of existing systems by using a multi-modal storage architecture (graph, vector, probabilistic, and spatio-temporal databases) and a probabilistic inference engine that combines temporal decay with semiring aggregation to resolve factual conflicts and reduce LLM hallucinations through fine-grained data provenance.
Entities (10)
Relation Signals (8)
Alice โ hasmemory โ running
confidence 95% ยท We asks the question โDid Alice enjoy running?โ across 10 months of history
PolyMemDB โ reduces โ LLM Hallucinations
confidence 95% ยท To ensure factual consistency and reduce hallucinations, it features a probabilistic inference engine
PolyMemDB โ uses โ ProvSQL
confidence 95% ยท stores event confidence in a probabilistic database (relying on ProvSQL)
PolyMemDB โ uses โ MobilityDB
confidence 95% ยท parses complex spatio-temporal constraints for management by a spatio-temporal database (relying on MobilityDB)
PolyMemDB โ uses โ Neo4j
confidence 95% ยท It not only utilizes a graph database (Neo4j) to maintain entity topology
PolyMemDB โ uses โ ChromaDB
confidence 95% ยท embedding vectors and raw context content are persisted into a vector database (relying on ChromaDB)
PolyMemDB โ comparesto โ MemForest
confidence 90% ยท Unlike MemForest, which focuses on text-time indexing... PolyMemDB addresses the scheduling problem of heterogeneous multi-dimensional data.
PolyMemDB โ comparesto โ HyperMem
confidence 90% ยท Unlike... HyperMem, which focuses on homogeneous hypergraph structures, PolyMemDB addresses the scheduling problem of heterogeneous multi-dimensional data.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract: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.
Tags
Links
- Source: https://arxiv.org/abs/2608.25577v1
- Canonical: https://arxiv.org/abs/2608.25577v1
Trouble viewing inline? Open PDF directly โ
Full Text
18,929 characters extracted from source content.
Expand or collapse full text
PolyMemDB: A Polyglot Database System for AI Memory Management Yu Wang University of Helsinki yu.wang@helsinki.fi Jiaheng Lu University of Helsinki jiaheng.lu@helsinki.fi Abstractโ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 expe- riences. 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 prove- nance to resolve long-term factual conflicts, thereby worsening large language model (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 The rapid advancement of agent technology based on LLMs has enabled the creation of personal assistants capable of managing long-term interactive tasks. In this context, the mem- ory mechanism has emerged as a key factor influencing both system performance and user experience [1]. By structuring and persistently storing the historical context generated during an agentโs operation, it is possible not only to reduce inference latency and token costs through the reuse of semantically similar responses but also to accurately capture usersโ person- alized preferences and enable the agent to abstract higher-order generalized knowledge from them [1]. However, in real-world scenarios, the management and maintenance of long-term memory face two core challenges: 1) Bottlenecks in the unified storage and multi-dimensional association of heterogeneous data: Long-term interactions gen- erate massive amounts of heterogeneous context with diverse attributes (such as complex entity networks, logical relation- ships, and spatio-temporal constraints). Existing systems gen- erally rely on a single storage paradigm, making it difficult to support efficient storage and retrieval of multimodal heteroge- neous information; 2) Lack of data provenance tracking when dealing with long-term factual conflicts: During long-term memory evolution, systems typically employ coarse-grained state overwriting and lack factual maintenance mechanisms Source code: https://github.com/wangyu-1999/PolyMemDB that integrate temporal sequences and probability, resulting in an urgent need to improve data provenance capabilities and the ability to address LLM hallucinations. To tackle these challenges, we developed and implemented PolyMemDB, which combines multi-modal storage, graph databases, and spatio-temporal indexing technologies. It also features graph updates that integrate data provenance with temporal decay, facilitating conflict resolution for multi-source facts. In this demonstration, our core contributions are sum- marized as follows: โข Polyglot storage layer with multiple databases: We integrated various heterogeneous storage components, including multi-modal object storage, graph databases, spatio-temporal databases, and probabilistic databases. This architecture addresses the limitations of traditional text-only and vector-based retrieval. โข Probabilistic memory graph maintenance: To address the challenges of event integration and factual conflicts in long-term interactions, we introduce a dynamic graph update mechanism that combines temporal decay and data provenance. By extending semiring inference in probabilistic databases to the evidence chain, the system can resolve conflicts and align entities, thereby mitigating LLM hallucinations while preserving interpretability. B. Comparison to Existing Systems Recent research has explored various aspects of structured representations and retrieval mechanisms for agent memory. For example, at the level of data organization, MemForest [2] approaches memory as a problem focused on efficient time- based writes, creating a tree structure that organizes time- related information and allows updates to occur only along specific paths within the tree. This method avoids the need to rewrite the entire global memory state. HyperMem [3] improves traditional graph databases by introducing a three- tier hypergraph model of topics, fragments, and facts, using hyperedges to capture complex dependencies among dis- crete memory fragments. Unlike MemForest, which focuses on text-time indexing, and HyperMem, which focuses on homogeneous hypergraph structures, PolyMemDB addresses the scheduling problem of heterogeneous multi-dimensional data. PolyMemDB abandons the single-storage paradigm and introduces a polyglot storage architecture at the lower level. It not only utilizes a graph database (Neo4j) to maintain entity arXiv:2608.25577v1 [cs.DB] 26 Aug 2026 Stage 1: Multi-modal Extr. (LLM & VLM Alignment) ร Stage 2: Fact Norm. & Conf. (LLM Estimation Initial Score) ฬ Stage 3: Graph Const. (LLM & Neo4j) Stage 4: Cross-Modal Index. (Text, Image & Audio Vectors) Stage 5: Probab. Est. (ProvSQL) Stage 6: Spatio-temporal Extr. (MobilityDB) รรซร Multi-modal Corpora Text, Image, Audio, Video... ร External Foundation Models (LLM, VLM & Embedding APIs) Neo4j Memory Graph) ChromaDB Vector Store Object Store Raw Media รป ProvSQL Probabilistic DB ย MobilityDB Spatio-temporal DB Tier 1: Graph QA Subgraph Traversal Tier 2: Dense Retrieval Top-ํRAG Fallback Tier 3: Multi- modal Retrieval Raw Source Retrieval ยฅFinal Response รณ Memory Ingestion & Indexing รต Polyglot Storage Layer Inference & Cascaded QA p No p No โ Yes โ Yes Fig. 1. PolyMemDB architecture: multi-modal ingestion, polyglot storage, and cascaded QA routing. topology but also pushes complex spatio-temporal constraints directly down to a spatio-temporal database (MobilityDB) for joint filtering of dynamic time windows and geographic polygons, overcoming the limitation of existing systems that can only process pure text relationships. At the level of conflict resolution mechanisms, MRAgent [4] constructs a โCue-Tag-Contentโ graph and relies on an active reconstruction mechanism, enabling the LLM to iteratively ex- plore and prune paths based on intermediate states during the retrieval phase. PolyMemDB extends the semiring inference in probabilistic databases. For memory triplets, PolyMemDB appends a historical observation sequence to the edge attributes and, through probabilistic inference and temporal decay, com- putes distribution vectors for positive drive, negative inhibi- tion, and evidence conflict at the database level. This enables PolyMemDB to provide fine-grained data provenance while resolving cognitive conflicts through underlying mathematical inference, thereby enhancing the systemโs reliability. I. SYSTEM OVERVIEW As shown in Fig. 1, the workflow of PolyMemDB comprises three core stages: First, in the Memory Ingestion & Indexing, the system de- composes the input data into atomic facts. During this process, PolyMemDB leverages LLMs and vision language models (VLMs) to perform entity alignment, execute coreference resolution and ellipsis recovery, and complete named entity extraction, fact normalization, and confidence estimation. Subsequently, it enters the Polyglot Storage Layer. To fully capture the complex associations in the data, Poly- MemDB performs targeted extraction and routing of storage for normalized facts based on their multi-dimensional features. Specifically, the system constructs entities, attributes, and their evolutionary trajectories across long periods into a connected relationship graph (relying on Neo4j), providing structural support for subsequent complex chain inference; it stores event confidence in a probabilistic database (relying on ProvSQL); and parses complex spatio-temporal constraints for manage- ment by a spatio-temporal database (relying on MobilityDB). Meanwhile, embedding vectors and raw context content are persisted into a vector database (relying on ChromaDB) and object storage, respectively. Finally, when responding to user interactions, the system triggers the Inference & Cascaded QA. To balance inference overhead and recall accuracy, PolyMemDB designs a top- down, three-tier federated retrieval mechanism. The system first executes Tier 1 (Graph QA), prioritizing low-latency sub- graph traversal and jointly utilizing the probabilistic database and spatio-temporal index for rule filtering and logical in- ference; if this tier yields no answer, it triggers a fallback mechanism to enter Tier 2 (Dense Retrieval), utilizing the queryโs embedding vectors to perform Top-k semantic retrieval of structured facts within the vector database; if sufficient evidence is still not found, the system ultimately drills down to Tier 3 (multi-modal Retrieval) to directly retrieve raw data snippets, thereby generating the final response. I. PROBABILISTIC MEMORY GRAPH MAINTENANCE Event consolidation and conflict resolution are core chal- lenges in long-term memory management for agents. To this end, PolyMemDB designs a dynamic graph update mechanism that combines temporal decay and probabilistic inference. Memory Graph Formalization and Dynamic Update: PolyMemDB formalizes the agentโs memory as a memory (a) Main dashboard.(b) Evidence panel. Fig. 2. PolyMemDB UI: (a) Main dashboard for query and graph visualization; (b) Evidence panel showing probabilistic facts. graph G = (V,E,ฮฑ). Here, V is the set of heterogeneous entities (e.g., PERSON, CONCEPT, etc.); E โ V รLร V is the set of directed relationship edges; and ฮฑ is the attribute labeling function. We define a single fact as a tuple f i = โจฯ i ,c i ,t i โฉ. Here, ฯ i โ +,โ denotes the sentiment polarity of the evidence, c i โ [0, 1] is the initial confidence assigned by the LLM, and t i is the timestamp of the fact observation. Before inserting a fact into the memory graph, the system retrieves the Top-k local subgraphs via semantic similarity retrieval as context, which the agent uses to autonomously decide whether to create or update nodes or edge relationships, thereby maximizing the accuracy of entity alignment. Data Provenance and Evidence Chain Construction: To effectively mitigate LLM hallucinations and preserve the inter- pretability of raw materials, PolyMemDB abandons the simple state overwriting mechanism. For any triplet e = (u,l,v)โ E in the graph, the system appends and maintains a historical observation sequence F = (f 1 ,f 2 ,...,f T ) (satisfying t 1 โค t 2 โค ยท โค t T ) in its edge attributes. This mechanism fully preserves the evidence observed at different time points. Probabilistic Inference Based on Temporal Decay: When calculating the confidence of a specific triplet, we extend the semiring framework found in probabilistic databases (e.g., ProvSQL [5]). Since the influence of real-world events decays over time, we introduce an exponential decay factor ฮปโ (0, 1]. For a fact f i in the sequence with a temporal distance index of โ i = Tโi, its dynamic weight is calculated as w i = c i ยทฮป Tโi . Based on the inclusion-exclusion principle, we partition the evidence sequence F into a positive set F + and a negative set F โ , and calculate their cumulative joint confidences, respectively, as defined in (1): P + = 1โ Y f i โF + (1โ w i ), P โ = 1โ Y f j โF โ (1โ w j ) (1) Based on P + and P โ derived from (1), PolyMemDB com- putes four intermediate cognitive states to capture the interac- tions between conflicting evidence: positive drive S action = P + (1โ P โ ), negative inhibition S inaction = P โ (1โ P + ), evidence conflict S conflict = P + P โ , and absence of evidence S ignorance = (1โ P + )(1โ P โ ). To comprehensively evaluate the factual reliability, Poly- MemDB aggregates these intermediate states into a Net Evi- dence Reliability score, denoted as Rโ [โ1, 1]: R = (S action โ S inaction )ยท (1โ S conflict โ S ignorance ) (2) Here, R compactly integrates all evidence dimensions. The base term (S action โ S inaction ) establishes the directional truthfulness, yielding a positive score for supported facts and a negative score for refuted ones. The multiplier (1โS conflict โ S ignorance ) serves as a dynamic penalty, reducing the net reliability R when there are significant factual disputes or insufficient evidence. When Rโ 0, identifying the maximum intermediate state (arg max) clearly distinguishes whether the low score stems from contradictory facts (S conflict ) or an evidence void (S ignorance ). In the subsequent QA stage, pro- viding R and these decomposed distributions as quantitative references empowers the LLM to avoid binary hallucinations and generate nuanced, provenance-grounded answers. IV. DEMONSTRATION PolyMemDBโs backend relies on FastAPI and Pydantic-AI, while its frontend provides an interactive visual dashboard. At the conference demonstration, attendees will experience how PolyMemDB extracts and infers information from conversa- tions spanning long periods. Scenario 1: Long-Session QA with Fine-Grained Prove- nance. As shown in Fig. 2a, we introduce a long-session case (ID: d905b33f) from the LongMemEval [6] benchmark. This conversation spans 48 sessions; following ingestion by PolyMemDB, a memory graph containing 229 entities and 221 relationships was successfully constructed. Through the interactive analysis interface, attendees can track the systemโs complete process of answering a question: First is the 1 โ (a) Knowledge view.(b) Global map.(c) Filtered map. Fig. 3. spatio-temporal UI: (a) Itinerary extraction; (b) Global historical map; (c) Map filtering by dynamic time window. Query Input (e.g., entering a question involving long-range dependencies: โWhat percentage discount did I get on the book by my favorite author?โ), followed by the completion of 2 โ Answer Generation (the retrieval outputs 20%). Sub- sequently, through 3 โ Reasoning Chain Parsing, the interface shows attendees how the LLM arrived at the final answer. To demonstrate that the answer is not an LLM hallucination, the system lists all relevant triplets supporting this answer, the observational facts attached to the edges, and the positive drive probability calculated based on temporal decay within the 4 โ Evidence panel. Finally, the interface 5 โ shows the core relational subgraph of the matched entities to reduce visual clutter, while 6 โ presents the raw corpus. Scenario 2: Spatio-Temporal Memory Evolution. To demonstrate PolyMemDBโs capabilities in handling complex spatio-temporal constraints and long-term context summariza- tion, we designed a second demonstration scenario (based on the extended LongMemEval [6] case ID: e47becba). When the user asks the system to summarize the โgraduation tripโ itinerary from a lengthy historical dialogue, PolyMemDB not only automatically extracts and generates a structured itinerary response (as shown in Fig. 3a), but also provides an interactive analysis dashboard to visualize the spatio-temporal evolution of heterogeneous memories intuitively: First, through the Global Spatio-Temporal Map, the system panel lists all geo- graphical locations and associated facts mentioned in the long conversation (Fig. 3b); subsequently, attendees can operate the interfaceโs 1 โ Dynamic Time Selector to set a specific time window. When limited to the โgraduation trip planning period,โ the system automatically filters out irrelevant locations (Noise Reduction), precisely highlights the 5 Italian cities the user plans to visit on the 3 โ Geospatial Map (Fig. 3c), and synchronously renders a 2 โ Fine-grained Fact List in the panel to trace the underlying evidence sources of these spatio- temporal memories. Scenario 3: Dynamic Probabilistic Inference for Factual Conflicts. We asks the question โDid Alice enjoy running?โ across 10 months of history (simplified in Fig. 4). Using temporal decay (ฮป = 0.8) and semiring aggregation. The engine computes a 4D cognitive distribution. Although Aliceโs recent marathon completion drives a strong positive state (S action = 47.2%), historical setbacks like knee pain and heat exhaustion trigger a dominant conflict state (S conflict = 52.3%), penalizing the overall net reliability (R โ 0.22). ย Fact 3 (Conf: 0.85) Alice set a new 10K per- sonal best. E Fact 7 (Conf: 0.60) Alice felt dizzy in 35ยฐC heat and walked. ย Fact 10 (Conf: 0.95) Alice completed a full marathon. ySemiring (ํ + ) 1โ ร (1โ ํค + ํ ) โ 0.99 ySemiring (ํ โ ) 1โ ร (1โ ํค โ ํ ) โ 0.52 ํค 7 = ํ 7 ํ 3 ํค 3 = ํ 3 ํ 7 ํค 10 = ํ 10 ํ 0 Time ํก ํก 3 ํก 7 ํก 10 ํ ํํํกํํํ ํ + (1โ ํ โ ) 47.2% ํ ํํํํ ํํํํก ํ + ํ โ 52.3% ํ ํํํํํกํํํ ํ โ (1โ ํ + ) <1% ํ ํํํํํํํํํ (1โ ํ + )(1โ ํ โ ) <1% Joint Distribution S ฬ (Alice) -[enjoys]-> (running) R= (ํ ํํํกํํํ โ ํ ํํํํํกํํํ ) ยท (1โ ํ ํํํํ ํํํํก โ ํ ํํํํํํํํํ ) R โ 0.22 Fig. 4. Probabilistic inference pipeline. Decayed historical facts are aggre- gated into a 4D distribution and synthesized into a net reliability score to resolve factual conflicts. Empowered by these explicit metrics and the evidence chain, the LLM avoids binary hallucinations. Instead of a naive โyes,โ it generates a strictly provenance-grounded response: concluding that while Alice is highly committed to running, her relationship with the sport is complex and tempered by specific physical and motivational hurdles. This demonstrates PolyMemDBโs capability to guide agents through contradic- tory memories without needing to brute-force overwrite their states. REFERENCES [1] Z. Zhang, Q. Dai, X. Bo, C. Ma, R. Li, X. Chen, J. Zhu, Z. Dong, and J.-R. Wen, โA Survey on the Memory Mechanism of Large Language Model- based Agents,โ ACM Transactions on Information Systems, vol. 43, no. 6, p. 1โ47, Nov. 2025. [2] H. Chen, Z. Zhang, W. Pei, B. He, M. Wu, J. Zeng, M. Heinrich, W. Wu, and H. Zhang, โMemForest: An Efficient Agent Memory System with Hierarchical Temporal Indexing,โ May 2026. [3] J. Yue, C. Hu, J. Sheng, Z. Zhou, W. Zhang, T. Liu, L. Guo, and Y. Deng, โHyperMem: Hypergraph memory for long-term conversations,โ 2026. [4] S. Ji, Y. Li, and B. Hooi, โMemory is reconstructed, not retrieved: Graph memory for LLM agents,โ 2026. [5] P. Senellart, L. Jachiet, S. Maniu, and Y. Ramusat, โProvSQL: Provenance and probability management in PostgreSQL,โ Proceedings of the VLDB Endowment (PVLDB), vol. 11, no. 12, p. 2034โ2037, 2018. [6] D. Wu, H. Wang, W. Yu, Y. Zhang, K.-W. Chang, and D. Yu, โLong- MemEval: Benchmarking chat assistants on long-term interactive mem- ory,โ in The Thirteenth International Conference on Learning Represen- tations, Oct. 2024.