TL;DR
HGP (Hybrid Graph Personalized memory) is a new framework that gives LLM agents a structured, multi-layered memory system instead of a simple "flat" vector pool. By using a self-improving classifier to route information into specialized graph structures—covering events, facts, rules, and current task states—HGP significantly improves an agent's ability to follow implicit user constraints and provide deeply personalized responses while remaining efficient enough for on-device use.
What Problem Does This Paper Address?
As we move toward LLM agents that act as long-term companions or personal assistants, "memory" becomes a bottleneck. Most current systems use Retrieval-Augmented Generation (RAG) to store interaction history as a flat list of text chunks converted into vectors.
This approach has two major flaws:
- Structural Blurring: It treats all information the same. A user’s permanent allergy (semantic memory) is mixed with a one-time event like "I went to the store yesterday" (episodic memory) and a specific way they like their coffee brewed (procedural memory). This makes accurate retrieval difficult.
- The Routing Bottleneck: Determining which piece of new information belongs in which memory category is computationally expensive if you ask a Large Language Model (LLM) every time, but traditional classifiers often fail to adapt to a specific user's unique interaction patterns.
HGP aims to solve these by creating a structured, hybrid graph storage system that can be deployed on-device with minimal latency.
Methods
The HGP framework consists of two primary innovations:
1. Self-Enhancement Classifier
To keep the system fast and "on-device," HGP avoids calling a heavy LLM for every memory routing decision. Instead, it uses a lightweight BERT-based classifier.
- Confidence-based Gating: If the classifier is sure about where a piece of info goes, it routes it directly. If it’s unsure, it "defers" to an LLM.
- Continual Learning: The LLM’s corrections are cached and used to periodically fine-tune the lightweight classifier. Over time, the classifier "learns" the user's specific distribution of information, and LLM calls drop significantly.
2. Hybrid Graph Storage
HGP organizes memory into four distinct graph-based structures, as seen in the overview:
- Episodic Memory (Event Graph): Tracks "what happened" using nodes for people, time, and location.
- Semantic Memory (Knowledge Graph): Distills stable facts and preferences (e.g., "User is allergic to aspirin").
- Procedural Memory (Rule Tree): Stores workflows and strategies (e.g., "If the user asks for dinner, suggest low-salt options").
- Working Memory (State Trajectory Graph): This is the "short-term" layer that tracks the current status of ongoing tasks (e.g., "medication reminder: pending").
Datasets
The authors evaluated HGP on two major long-term memory benchmarks:
- LoCoMo: A dataset featuring 10 multi-session conversations with roughly 200 QA pairs each, testing single-hop, multi-hop, and temporal reasoning.
- PAL-Set: A benchmark focused on personalized agent logs, specifically testing the agent's ability to propose and select solutions based on a user's historical preferences and constraints.
Key Insights and Ideas
- Working Memory is the Secret Sauce: One of the most interesting findings is the role of the "State Trajectory Graph." While other memories handle the past, working memory tracks the now. In a healthcare scenario, if a user asks for dinner recommendations, HGP can proactively remind them to take their pre-meal medication because it explicitly tracks that the "medication task" is currently "incomplete."
- Graph Structure > Flat Vectors: The ablation studies showed that simply "typing" the memory (separating categories) helps, but adding the graph relations (connecting events to entities) provides the biggest boost in retrieval accuracy.
- Amortized Supervision: The self-enhancement mechanism allows the system to start with high LLM oversight and gradually transition to a nearly autonomous, lightweight local model, reducing LLM calls by over 66%.
Key Results
HGP demonstrated substantial improvements over state-of-the-art baselines like Mem0 and HippoRAG2:
- PAL-Set Performance: HGP achieved an S-score of 35.58, which is nearly 7 points higher than the strongest baseline (HippoRAG2) and 15 points higher than a vanilla RAG system.
- LoCoMo Accuracy: It reached the highest overall "LLM-as-a-Judge" score (65.08), showing particular strength in open-domain tasks where diverse memory types must be synthesized.
- Efficiency: The local classifier operates at an average latency of 4.98 ms, roughly 360x faster than using a fixed LLM router.
Limitations and Future Work
Despite the strong results, the authors note a few hurdles:
- Benchmark Gaps: Current benchmarks don't have explicit "working memory" annotations, making it hard to quantitatively measure state-tracking performance beyond qualitative case studies.
- Maintenance Costs: While retrieval is fast, the construction and maintenance of these complex graphs still require significant offline computation.
- Consistency: Future work will need to address "cross-memory consistency"—ensuring that if a user changes a preference in an episodic event, the semantic knowledge graph updates accordingly to avoid contradictions.
Summary updated