Source-linked AI summary

HGP:An on-device personalized agent memory via hybrid graph storage

Ran Zhou, Xueming Han, Jiaheng Liu, Yuyao Zhang, Fanyu Meng, Junlan Feng, Yuxiang Ren

arXiv:2610.10071v1cs.AI

TL;DR

Personalized LLM agents must handle heterogeneous traces and retain user preferences and constraints, while flat memories can blur memory types and relations. HGP combines personalized routing with type-specific graph memories and working-memory state trajectories. Across LoCoMo and PAL-Set, the paper reports improved memory recall and personalization; on PAL-Set Selection, its S-score is 35.58, 6.36 above HippoRAG2.

  • Problem

    Flat memory designs blur memory types and relations, while personalized agents need to route heterogeneous traces and retrieve user-specific preferences and constraints across turns.

    Source: §1 · pp. 1–2
  • Method

    HGP combines a lightweight self-enhancement router with type-specific graph memories and working-memory state trajectories that capture implicit constraints.

    Source: §1 · p. 2
  • Results

    Across LoCoMo and PAL-Set, experiments validate improvements in memory-recall accuracy and personalization; on PAL-Set Selection, HGP's S-score of 35.58 exceeds HippoRAG2 (29.22) by +6.36.

    Source: §1 · p. 2, §4.2 · p. 7, §5 · p. 9
  • Takeaways & Limitations

    Routing statistics indicate that HGP amortizes supervision cost over time while supporting cost-efficient, structured personalization.

    Source: §5 · p. 9

    Benchmarks lack explicit working-memory annotations for systematic quantitative evaluation, and graph construction and maintenance add offline computation and storage costs beyond the latency-critical online on-device setting.

    Source: §6 · p. 9

Abstract

from arXiv · show

LLM-based agents face challenges in personalized interactive tasks due to heterogeneous, multi-typed, and implicitly constrained long-term traces. Existing memory mechanisms struggle with accurate routing and retrieval, especially on-device where personalization is critical. Most methods use single-vector representations, blurring type distinctions and relational structure. We propose HGP, a hybrid graph memory framework. HGP employs a lightweight self-enhancement classifier for personalized memory routing and constructs episodic, semantic, and procedural memories as graphs. It also extracts working memory as a state trajectory to capture current state and implicit constraints, ensuring reliable decision-making. The classifier reduces large-model calls, enabling on-device deployment, while graph storage enables accurate retrieval and incremental user profile refinement. Experiments on two benchmarks show that on PAL-Set solution selection, HGP achieves an S-score of 35.58, nearly 7 points above the strongest baseline. Code and data are at https://github.com/Ouan6/HGP-.git.

1 Introduction

Personalized agents need to route heterogeneous interaction traces and retain user-specific preferences and constraints across turns. HGP addresses this with personalized routing and type-specific graph memories, including a working-memory state trajectory.

1 Introduction

  • Flat memory pools can blur memory types and relations, while inaccurate routing can store traces in the wrong type and cause cascading retrieval errors.Reliable personalization also requires carrying user preferences and behavioral habits into later decisions.Source: §1 · p. 1
  • On-device personalization calls for low-supervision routing that adapts to user-varying memory distributions and preserves distinct memory attributes and relations.In this setting, online routing and retrieval run locally, while graph construction and classifier updates occur asynchronously.Source: §1 · pp. 1–2
  • HGP organizes episodic, semantic, and procedural memories as type-specific event graphs, knowledge graphs, and rule trees, with working-memory state trajectories capturing implicit constraints.The state trajectory graphs preserve dynamic working-memory context.Source: §1 · p. 2
  • A confidence-based LLM-assisted policy lets a lightweight classifier take over personalized routing and reuse low-confidence LLM annotations for incremental training.The classifier adapts to user-specific memory distributions while reducing supervision cost.Source: §1 · p. 2
  • Experiments on LoCoMo and PAL-Set report consistent improvements in personalization quality and decision reliability over strong baselines.The paper also analyzes working memory's robustness under implicit constraints.Source: §1 · p. 2

2 Related Work

Related work spans long-context and retrieval approaches, graph-structured memory, and persistent agent-memory systems. HGP's stated distinction is personalized routing of heterogeneous user traces into type-specific graph stores.

2.1 Long-context Modeling and Retrieval-Augmented Memory.

  • Long-context modeling and retrieval augmentation offer complementary ways to access information, but larger contexts do not ensure effective use or continuously structure user-specific interaction patterns.The section cites “Lost in the Middle” (Liu et al., 2023) as evidence that salient information may be accessed unevenly within long contexts.Source: §2.1 · p. 2

2.2 Graph-structured memory.

  • Graph-structured memory represents relations for structured storage and retrieval, while HGP focuses on routing heterogeneous user traces into distinct type-specific graph structures for personalization (Sun et al., 2025).The section characterizes much prior work as focused on structure-aware retrieval or task-agnostic agent memory.Source: §2.2 · p. 2

2.3 Agent memory system.

  • Prior agent-memory work motivates persistent and cognitively inspired memory, while HGP routes memory writes among stores rather than routing inputs across models (Chen et al., 2023; Ong et al., 2025).HGP sends only low-confidence traces for LLM annotation and caches those labels for incremental classifier updates.Source: §2.3 · p. 3

3 Methodology

HGP combines personalized memory routing with hybrid graph storage, retaining distinct memory structures and retrieving them together to inform responses with long-term information and current constraints.

3 Methodology

  • HGP pairs a self-enhancement classifier for input routing with hybrid graph storage for heterogeneous memory types.The classifier/LLM routing component is paired with storage that preserves memory structure.Source: §3 · p. 3, Figure 1 · p. 4

3.1 Personalized Memory Routing

  • A confidence threshold retains classifier labels for downstream memory construction or defers segments to the LLM for annotation and incremental training.The classifier is periodically updated from accumulated labeled examples, while the threshold shifts routing toward the classifier over time.Source: §3.1 · p. 3

3.2 Hybrid Graph Storage

  • HGP uses hybrid graph storage to preserve the distinct structures of heterogeneous memory types and their relations.The framework details separate graph structures for episodic, semantic, and procedural memories, plus working memory.Source: §3.2 · p. 3, §3 · p. 3

3.2.1 Episodic Memory – Event Graph

  • Episodic memory is an Event Graph that links situated episodes to contextual entities and other episodes through typed relations.The links can represent temporal order and contextual association; accumulated event graphs can support abstraction into higher-level knowledge.Source: §3.2.1 · pp. 3–4

3.2.2 Semantic Memory – Knowledge Graph

  • Semantic memory stores decontextualized facts, relations, and preferences in a knowledge graph, representing regularities that generalize across contexts.It can be routed directly or abstracted from accumulated episodic event graphs.Source: §3.2.2 · p. 4

3.2.3 Procedural Memory – Rule Tree Graph

  • Procedural memory represents reusable behavioral strategies and decision flows as a Rule Tree whose nodes encode conditions, actions, or intermediate goals.Its edges encode dependencies; the memory can come from the classifier or be abstracted from episodic event graphs.Source: §3.2.3 · p. 5

3.2.4 Working Memory – State Trajectory Graph

  • Working memory represents current user or system states and their transitions as a State Trajectory Graph for ongoing interaction or task reasoning.It maintains short-lived context extracted from recent episodic memory and updates it during interaction; graph modeling represents state evolution.Source: §3.2.4 · p. 5

3.2.5 Query Retrieval Workflow

  • For each query, HGP retrieves evidence in parallel from episodic, semantic, procedural, and working-memory graphs, then merges the subgraphs into LLM context.The response is grounded in long-term memory as well as the user's current state and implicit constraints.Source: §3.2.5 · p. 5

4 Experiments

Experiments compare HGP with retrieval and memory baselines on LoCoMo and PAL-Set, then examine memory components, working-memory behavior, and classifier routing.

4.1 Experimental Setup

  • Evaluation covers LoCoMo long-term memory questions and PAL-Set Solution Proposal QA and Selection, using lexical metrics and LLM judging alongside the benchmark S-score.LoCoMo includes 10 multi-session conversations with about 200 QA pairs each; PAL-Set uses user logs and interaction histories.Source: §4.1 · pp. 5–6

4.2 Main Results

  • 65.08 Judge, 42.09 BLEU-1, and 20.54 EM give HGP the best overall LoCoMo results on those metrics, with competitive F1 (45.07).HGP outperforms Mem0 by +4.45 Judge and +5.34 BLEU-1; Open-domain results are strongest, while temporal questions remain challenging.Source: §4.2 · p. 6, Table 1 · p. 6
  • 35.58 S-score on PAL-Set Selection surpasses HippoRAG2 (29.22) by +6.36; HGP also leads Solution QA on LLM-judge (7.46) and BLEU-2/3/4 (8.67/4.70/2.78).Non-memory baselines improve only marginally over Vanilla (w/o log) on Selection (+4.66 to +4.90).Source: §4.2 · p. 7, Table 2 · p. 7

4.3 Ablation Study

  • Typed-vector memory improves Selection over Unified-vector (33.66 vs. 25.15), and full HGP raises S-score further to 35.58.The ablation contrasts collapsing all memories into one vector space with preserving memory types but removing graph structure.Source: Table 3 · p. 7, §4.3 · p. 8
  • Removing episodic memory lowers Selection S-score from 35.58 to 28.83 (Δ= −6.75), while removing semantic memory causes the largest Selection drop (Δ= −9.87).Removing episodic memory also lowers Solution QA BLEU and judge score; removing semantic memory lowers the judge score from 7.46 to 7.23.Source: §4.3 · p. 8
  • Removing procedural memory lowers Selection by Δ= −2.48, while its Solution QA effect is minor, consistent with its role in strategic guidance rather than direct factual evidence.The judge score shifts from 7.46 to 7.31 and BLEU-4 from 2.78 to 2.76.Source: §4.3 · p. 8

4.4 Working Memory Analysis

  • In the implicit-medication scenario, HGP retrieves the unfinished pre-meal reminder and suggests dinner, while vanilla and Mem0 fail to remind the user.The working-memory state is presented as “pre-meal medication: pending” in the figure and as “unfinished” in the observation.Source: Figure 2 · p. 7, §4.4 · p. 8
  • 0.9339 macro-F1, 0.9105 micro-F1, and 4.98 ms latency accompany a 66.4% reduction in LLM calls, from 2400 to 807, as routing shifts to the classifier.The routing mix changes from LLM-dominant to classifier-dominant through incremental training every 200 samples.Source: §4.4 · p. 8, Figure 3 · p. 8, Table 4 · p. 9

5 Conclusion

HGP addresses personalization under cross-user heterogeneity and distribution shift with self-enhancement routing and hybrid graph storage. Experiments on LoCoMo and PAL-Set validate improved memory recall and personalization, while future work targets finer graph modeling, cross-memory consistency, and broader interactive tasks.

5 Conclusion

  • HGP combines self-enhancement routing with hybrid graph-based storage to support cost-efficient, structured personalization under cross-user heterogeneity and distribution shift.The conclusion frames these as responses to the central challenge of robust and adaptive personalization in LLM-based agents.Source: §5 · p. 9
  • Experiments on LoCoMo and PAL-Set validate improvements in memory-recall accuracy and personalization, and routing statistics show supervision cost amortized over time.Source: §5 · p. 9
  • Future work will explore finer-grained memory graphs, cross-memory consistency constraints, and broader interactive tasks and tool-augmented agents.Source: §5 · p. 9

6 Limitations

HGP’s evaluation and implementation have several stated limits, including the absence of benchmark annotations for working memory and additional graph costs. Further limitations concern retrieval and the reliability of LLM-as-a-judge evaluation.

6 Limitations

  • Existing benchmarks lack explicit working-memory annotations, preventing systematic quantitative evaluation of working-memory performance.The authors identify datasets with ground-truth state trajectories as a direction for rigorous assessment.Source: §6 · p. 9
  • Graph construction and maintenance add offline computation and storage costs; the on-device claim primarily covers latency-critical online routing and retrieval.A more complete end-to-end cost analysis is left for future work.Source: §6 · p. 9
  • The work focuses mainly on graph storage, leaving finer-grained retrieval and pruning mechanisms for further study.Source: §6 · p. 9
  • LLM-as-a-judge evaluation may retain biases despite standardized prompts and temperature 0.0, so its reliability warrants continued attention.Source: §6 · p. 9

A More Experiment Details

The PAL-Set Solution QA evaluation uses an LLM judge prompted to assess generated solutions across multiple dimensions, with positive and negative references to calibrate judgments.

A.1 Prompts for PAL-Set Solution QA

  • The judge receives the generated solution, task question, available conversation context, and positive and negative reference solutions.Source: §A.1 · p. 11
  • The prompt asks the judge to score requirement satisfaction, semantic correctness, step completeness, and user-level personalization.Source: §A.1 · p. 11
  • Positive and negative references calibrate judgments and penalize common error patterns; outputs must be strictly formatted JSON, with temperature fixed at 0.0.The prompt template is used to compute the LLM-judge scores reported in Table 2.Source: §A.1 · p. 11

A.2.1 Hyperparameter Sensitivity Analysis

The router’s 27-configuration sensitivity analysis finds similar macro-F1 scores across settings, while balancing accuracy, stability, and latency motivates the default configuration used in the main experiments.

A.2.1 Hyperparameter Sensitivity Analysis

  • The analysis varies initial threshold τ0, decay rate β, and lower bound τmin across three values each, yielding 27 settings.Source: §A.2.1 · p. 11
  • The combined configuration score balances macro-F1, its variability, and latency exceeding the minimum observed average latency.It penalizes performance variability and latency above the optimum to favor accurate, stable, and efficient settings.Source: §A.2.1 · p. 11
  • Macro-F1 varies within a very small range across 27 configurations; configuration #21 reaches 0.9528 macro F1 but has 5.93 ms latency, while #1 has 4.23 ms latency and 0.9490 macro F1.Source: §A.2.1 · p. 11
  • 0.9474 macro F1 and 4.44 ms latency are achieved by default configuration #5 (τ0 = 0.9, β = 0.05, τmin = 0.5), near configuration #1’s trade-off.The comparison reports differences of 0.0016 in macro-F1 and 0.21 ms in latency; Table 5 presents the hyperparameter configurations and highlights the selected setting.Source: §A.2.1 · pp. 11–12, Table 5 · p. 13
  • Configuration #5 is selected over #1 because β = 0.05 supports more effective online threshold updates, whereas β = 0.02 would leave the threshold nearly unchanged and under-adapt.The authors also cite experimental-protocol consistency and a negligible gap from the best configuration.Source: §A.2.1 · p. 12

A.2.2 Stage-wise Performance of the Self-Enhancement Classifier

The classifier’s macro F1 rises across incremental training rounds using LLM-labeled low-confidence samples. The retrieval example shows how HGP combines evidence from its hybrid graph memory with a query to generate a response.

A.2.2 Stage-wise Performance of the Self-Enhancement Classifier

  • 0.8980 macro F1 at S0 rises to 0.9554 at S5, an absolute gain of 5.74 percentage points as incremental training proceeds.The largest gains occur in the first two rounds (+1.82 and +1.20 points), then diminish; Table 6 reports performance across stages.Source: §A.2.2 · p. 13, Table 6 · p. 13
  • Low-confidence training predictions are relabeled by an LLM, cached, and used for incremental training, while disjoint test subsets are evaluated once each without training or LLM inference.The protocol is described as preventing data leakage across evaluation steps.Source: §A.2.2 · p. 14

B Retrieval Workflow Example

  • For a query, HGP retrieves evidence from episodic, semantic, procedural, and working-memory graphs, merges the subgraphs, and passes the context with the query to the LLM.Figure 5 illustrates this retrieval workflow in a personalized health-management scenario.Source: B Retrieval Workflow Example · p. 14, Figure 5 · p. 14

C Details of special case

In the health-assistant case, working memory retrieves an incomplete pre-meal medication task and prompts the agent to address it before dinner recommendations. The appendices describe LLM-based operators that turn episodic traces into semantic profiles and procedural rules.

C Details of special case

  • Working memory retrieves the incomplete pre-meal medication task and prompts the agent to remind the user before offering dinner recommendations.The case highlights that this actionable constraint comes from short-horizon execution state, not long-term facts, preferences, or strategies.Source: C Details of special case · pp. 14–15, Figure 6 · p. 15
  • The case illustrates that long-term memory retrieval alone cannot guarantee compliance with implicit actionable constraints; tracking short-term states supports behavioral consistency and safety.The scenario tests whether the agent acts on a medication task from dialogue history when the user asks only for dinner recommendations.Source: C Details of special case · pp. 14–15

D Abstraction Operators for Semantic and Procedural Memory from Episodic Memory (LLM Prompts)

  • Two LLM-prompt abstraction operators convert episodic event graphs into structured semantic and procedural memories.Asem extracts static factual knowledge, while Aproc extracts reusable rules, workflows, and decision strategies.Source: D Abstraction Operators for Semantic… · p. 15

D.1 Semantic Abstraction Operator Asem

  • Asem builds user-profile knowledge graphs from episodic interactions, extracting attributes, preferences, skills, and long-term constraints as semantic triples.The prompt structures the extracted knowledge as a knowledge graph.Source: §D.1 · p. 15, Figure 7 · p. 16

D.2 Procedural Abstraction Operator Aproc

  • Aproc outputs reusable rules in JSON with triggers, steps, tags, and tree-structured workflows; it returns an empty list when no clear workflow exists.The rules are stored in the procedural memory graph Gproc.Source: §D.2 · p. 15, Figure 8 · p. 17
Loading 2610.10071v1…