Hierarchical Graph Memory for LLM Agents with Path-level Localization and Rewrite

arXiv cs.AI Papers

Summary

This paper introduces HiGram, an evolving hierarchical graph memory framework for LLM agents that features path-level localization and coordinated rewriting to improve retrieval efficiency and answer quality in long-term reasoning tasks.

arXiv:2608.05095v1 Announce Type: new Abstract: Agents for long term reasoning require a memory that can be efficiently and effectively updated over time, as new facts and external feedback continue to arrive. Recently, graph memory has been adopted to offer structural organization for multi-hop retrieval and reasoning. However, existing methods store all memories in a flat graph, and accumulated historical memories can introduce irrelevant contexts and increase the cost of evidence selection during retrieval. Moreover, they typically update memory units independently, requiring repeated unit-wise rewrite to cover related changes. To address these issues, we propose HiGram, an evolving hierarchical graph memory framework with path-level localization and rewriting. Specifically, we first propose a hierarchical graph memory, which organizes the memory into coarse-to-fine architecture composed of upper-level nodes and MemoryUnits, thereby reducing the amount of irrelevant information during retrieval. We further propose MicroGraph-based path-level localization, which leverages query and update conditioned MicroGraphs to identify support subgraph and evidence path before rewrite. Finally, we propose a coordinated rewriting method that jointly revises intra-unit memory and inter-unit dependencies, enable valid dependency structures updating in the localized evidence path. Experiments on benchmarks for long-term conversational question answering and conflict-aware memory evaluation demonstrate that our method demonstrate substantial improvements over baselines in answer quality and token efficiency. Besides, our method improves answer accuracy and query-valid evidence selection under dynamic, static, and conditional conflicts.
Original Article
View Cached Full Text

Cached at: 08/06/26, 07:43 AM

# Hierarchical Graph Memory for LLM Agents with Path-level Localization and Rewrite
Source: [https://arxiv.org/html/2608.05095](https://arxiv.org/html/2608.05095)
###### Abstract

Agents for long term reasoning require a memory that can be efficiently and effectively updated over time, as new facts and external feedback continue to arrive\. Recently, graph memory has been adopted to offer structural organization for multi\-hop retrieval and reasoning\. However, existing methods store all memories in a flat graph, and accumulated historical memories can introduce irrelevant contexts and increase the cost of evidence selection during retrieval\. Moreover, they typically update memory units independently, requiring repeated unit\-wise rewrite to cover related changes\. To address these issues, we proposeHiGram, an evolving hierarchical graph memory framework with path\-level localization and rewriting\. Specifically, we first propose a hierarchical graph memory, which organizes the memory into coarse\-to\-fine architecture composed of upper\-level nodes and MemoryUnits, thereby reducing the amount of irrelevant information during retrieval\. We further propose MicroGraph\-based path\-level localization, which leverages query and update conditioned MicroGraphs to identify support subgraph and evidence path before rewrite\. Finally, we propose a coordinated rewriting method that jointly revises intra\-unit memory and inter\-unit dependencies, enable valid dependency structures updating in the localized evidence path\. Experiments on benchmarks for long\-term conversational question answering and conflict\-aware memory evaluation demonstrate that our method demonstrate substantial improvements over baselines in answer quality and token efficiency\. Besides, our method improves answer accuracy and query\-valid evidence selection under dynamic, static, and conditional conflicts\.

## 1Introduction

Long\-term reasoning agents require memory mechanisms that can be efficiently and effectively updated over time as new facts, corrections, and external feedback continue to arrive\. Recent memory\-augmented systems improve long\-horizon interaction by storing conversation histories, retrieving relevant experiences, compressing previous contexts, or maintaining personalized memory stores\(Zhonget al\.[2024](https://arxiv.org/html/2608.05095#bib.bib2); Packeret al\.[2023](https://arxiv.org/html/2608.05095#bib.bib4); Leeet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib5); Chhikaraet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib6)\)\. However, continuously evolving memory introduces new challenges\. The system should not only retrieve relevant historical information but also maintain its memory structure appropriately, thereby ensuring efficient access to reliable evidence for subsequent reasoning\.

Graph\-based memory has recently been adopted to provide structural organization for entities, relations, events, and temporal information, supporting multi\-hop retrieval and reasoning\(Xuet al\.[2026](https://arxiv.org/html/2608.05095#bib.bib3); Rasmussenet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib7); Chhikaraet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib6)\)\. However, existing graph memory approaches often lack explicit coarse\-to\-fine organization for efficiently locating query\-relevant evidence regions during memory maintenance\. As accumulated historical memories grow, retrieval over this flat structure may introduce substantial irrelevant context, thereby increasing the cost of evidence selection\. Moreover, these methods typically update memory units independently\. Since answers are generally supported by interconnected evidence paths rather than isolated facts, independent unit\-wise updates may omit relevant evidence and allow outdated dependencies to remain involved in subsequent reasoning\. Repeated rewriting is therefore required to cover all related changes, leading to unbearable token consumption and low update efficiency\.

To tackle these issues, we argue that the existing methods suffer from a mismatch between the granularity of memory organization and updates and that of the evidence structures used for reasoning\. Retrieval operates over an continuously expanding overall graph, whereas an answer typically depends on only a small amount of localized evidence\. Although an update may target a single memory unit, its effects can propagate along evidence paths\. The memory system should therefore first localize the query\-relevant subgraph, then identify the affected evidence paths based on the update, and jointly revise memory states and their dependencies within the bounded region\. This process reduces irrelevant retrieval and repeated rewriting\.

Based on this motivation, we proposeHiGram, an evolving hierarchical graph memory framework with path\-level localization and rewriting\. Specifically, we first propose a hierarchical graph memory architecture with a coarse\-to\-fine structure composed of upper\-level nodes and MemoryUnits\. The upper\-level nodes represent abstractions for MemoryUnits according to their subjects, object categories, and contexts, while MemoryUnits preserve fine\-grained factual information and explicit dependencies\. This organization reduces the amount of irrelevant information during retrieval without traversing the entire graph memory\. We further propose MicroGraph\-based path\-level localization for reasoning and rewriting\. Given a query and an update, we first construct temporary MemoryUnits and extract anchors to locate relevant MicroGraphs and construct a localized support subgraph\. We then identify evidence path affected by both the current query and update, determining the rewrite path before any memory rewrite\. Finally, we propose a coordinated rewriting method that jointly revises intra\-unit memory and inter\-unit dependencies within the localized evidence path\. The intra\-unit rewriting updates the internal states of affected MemoryUnits according to the new update, while the inter\-unit rewriting rewrites dependency structures to maintain valid evidence connections\. By coordinating memory state updates and dependency rewrites, the framework enables memory evolution while avoiding repeated unit\-level modifications\.

We evaluateHiGramon benchmarks for long\-term conversational question answering LoCoMo\(Maharanaet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib1)\)and conflict\-aware memory evaluation MemConflict\(Taoet al\.[2026](https://arxiv.org/html/2608.05095#bib.bib8)\)\.

Experimental results demonstrate that our method achieves substantial improvements over strong baselines in answer quality and token efficiency\. Furthermore, our method improves answer accuracy and query\-valid evidence selection under dynamic, static, and conditional conflicts\. Our contributions are as follows:

- •We proposeHiGram, a hierarchical graph memory framework, which organizes memory into coarse\-to\-fine structures, reducing irrelevant context and localizaiton cost caused by accumulated historical memories\.
- •We further propose a MicroGraph\-based path\-level localization method, which identifies a support subgraph and affected evidence path, thereby determining a narrowed explicit rewrite region\.
- •We also design a coordinated rewriting method that jointly revises the internal states of MemoryUnits and their dependencies within the localized region\.

![Refer to caption](https://arxiv.org/html/2608.05095v1/x1.png)Figure 1:An overview ofHiGram\. Our method organizes memory into a hierarchical graph structure with upper\-level nodes connecting MemoryUnits that store factual information\. Then, given a query and an update, our MicroGraph\-based path\-level localization module retrieves relevant memory MicroGraphs to build a support subgraph, and identifies the affected evidence path\. Lastly, coordinated rewriting updates MemoryUnit states and dependency structures within the localized evidence path to maintain consistent memory updates\.
## 2Related Work

#### Long\-Term and Structured Memory\.

Long\-term memory has become essential for LLM agents operating across multiple sessions\. Early approaches store dialogue histories, reusable experiences, or compressed memories\(Xuet al\.[2022](https://arxiv.org/html/2608.05095#bib.bib13); Luet al\.[2023](https://arxiv.org/html/2608.05095#bib.bib12); Zhonget al\.[2024](https://arxiv.org/html/2608.05095#bib.bib2); Wanget al\.[2023a](https://arxiv.org/html/2608.05095#bib.bib10)\)\. Later studies improve memory scalability through hierarchical management, virtual context expansion, and latent memory mechanisms\(Packeret al\.[2023](https://arxiv.org/html/2608.05095#bib.bib4); Wanget al\.[2023a](https://arxiv.org/html/2608.05095#bib.bib10); Leeet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib5); Wanget al\.[2024](https://arxiv.org/html/2608.05095#bib.bib11)\), with recent methods further exploring multi\-level organization for long\-horizon reasoning\(Sun and Zeng[2025](https://arxiv.org/html/2608.05095#bib.bib56); Wuet al\.[2026](https://arxiv.org/html/2608.05095#bib.bib57); Zhanget al\.[2025](https://arxiv.org/html/2608.05095#bib.bib58); Kanget al\.[2025](https://arxiv.org/html/2608.05095#bib.bib59); Liet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib53)\)\. Agent\-oriented frameworks incorporate reflection, self\-improvement, and evolving user profiles to support long\-term adaptation and personalization\(Parket al\.[2023](https://arxiv.org/html/2608.05095#bib.bib14); Shinnet al\.[2023](https://arxiv.org/html/2608.05095#bib.bib15); Yaoet al\.[2023b](https://arxiv.org/html/2608.05095#bib.bib54); Liuet al\.[2023](https://arxiv.org/html/2608.05095#bib.bib16); Yuanet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib17)\)

Structured memory methods further explore graph\-based and temporal architectures to organize entities, relations, and historical information\(Xuet al\.[2026](https://arxiv.org/html/2608.05095#bib.bib3); Chhikaraet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib6); Rasmussenet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib7); Gutiérrezet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib34); Anokhinet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib35); Edgeet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib30)\)\. As memory grows, operating on the entire memory graph introduces irrelevant information and increases evidence localization costs\. Few recent and concurrent works adopt hierarchical graph memory to organize memories through abstraction or evolution\(Wuet al\.[2026](https://arxiv.org/html/2608.05095#bib.bib57); Zhanget al\.[2025](https://arxiv.org/html/2608.05095#bib.bib58)\), but mainly focus on memory consolidation rather than coarse\-to\-fine localization of graph\-based evidence structures\. In comparison, HiGram organizes MemoryUnits into coarse\-grained regions through a hierarchical memory architecture for efficient memory access\.

#### Evidence Localization for Reasoning and Memory Maintenance\.

Recent memory systems study how to organize, retrieve, and update stored information to support long\-term agent adaptation\(Zhonget al\.[2024](https://arxiv.org/html/2608.05095#bib.bib2); Packeret al\.[2023](https://arxiv.org/html/2608.05095#bib.bib4); Xuet al\.[2026](https://arxiv.org/html/2608.05095#bib.bib3); Chhikaraet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib6); Kanget al\.[2025](https://arxiv.org/html/2608.05095#bib.bib59); Liet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib53)\)\. Structured memory approaches further maintain temporal and personalized information through graph\-based representations\(Rasmussenet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib7)\)\. Recent studies show that effective reasoning requires query\-conditioned evidence localization rather than simply expanding context\(Karpukhinet al\.[2020](https://arxiv.org/html/2608.05095#bib.bib23); Guuet al\.[2020](https://arxiv.org/html/2608.05095#bib.bib24); Liuet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib29); Trivediet al\.[2023](https://arxiv.org/html/2608.05095#bib.bib28); Edgeet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib30); Guoet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib31); Liet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib32); Sarthiet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib33); Yaoet al\.[2023a](https://arxiv.org/html/2608.05095#bib.bib37); Bestaet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib36)\)\. However, existing memory maintenance methods mainly focus on storing, linking, or revising individual memory units, without explicitly identifying affected evidence structures before modification\. In evolving memory systems, new updates may influence multiple dependent memories beyond directly matched information\. HiGram addresses this limitation by introducing path\-level localization, which jointly considers query\- and update\-conditioned evidence to identify affected evidence paths and determine the rewrite region before memory revision\.

#### Continual Memory Update and Conflict\-Aware Revision\.

Maintaining memory consistency under evolving information requires modeling temporal validity, conflicts, and historical changes\. Temporal knowledge graph methods capture evolving facts through temporal representations\(Allen[1983](https://arxiv.org/html/2608.05095#bib.bib41); Trivediet al\.[2017](https://arxiv.org/html/2608.05095#bib.bib40); Caiet al\.[2022](https://arxiv.org/html/2608.05095#bib.bib39); Qinet al\.[2021](https://arxiv.org/html/2608.05095#bib.bib42)\), while recent memory systems study lifecycle management including storage, update, consolidation, and preservation\(Packeret al\.[2023](https://arxiv.org/html/2608.05095#bib.bib4); Zhonget al\.[2024](https://arxiv.org/html/2608.05095#bib.bib2); Wanget al\.[2023a](https://arxiv.org/html/2608.05095#bib.bib10),[2024](https://arxiv.org/html/2608.05095#bib.bib11); Chhikaraet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib6); Rasmussenet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib7); Kanget al\.[2025](https://arxiv.org/html/2608.05095#bib.bib59)\)\. Continual knowledge revision and conflict\-aware memory studies further investigate incorporating new information while maintaining consistency\(Menget al\.[2022](https://arxiv.org/html/2608.05095#bib.bib61),[2023](https://arxiv.org/html/2608.05095#bib.bib60); Chenet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib62); Mitchellet al\.[2022](https://arxiv.org/html/2608.05095#bib.bib63); Xuet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib43); Wanget al\.[2023b](https://arxiv.org/html/2608.05095#bib.bib44); Phamet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib45)\)\. However, existing approaches mainly revise individual memory units or isolated facts, requiring repeated global searches to identify relevant memories for each update\. HiGram addresses this limitation through MicroGraph\-based localization and coordinated rewriting, which jointly updates MemoryUnit states and inter\-unit dependencies within the localized evidence region\.

## 3The Proposed Method

As illustrated in Figure[1](https://arxiv.org/html/2608.05095#S1.F1),HiGrammaintains an hierarchical graph memory and performs memory localization and rewriting through three stages\. First, the hierarchical graph memory organization builds an abstraction structure over MemoryUnits, enabling coarse\-grained access to relevant memory\. Second, MicroGraph\-based path\-level localization narrows the search space and identifies the path affected by the query and update before rewrite\. Lastly, coordinated rewriting updates MemoryUnit states and their dependencies within the localized region\.

### 3\.1Hierarchical Memory Organization

We represent the memory atttas a hierarchical graph memoryGt=\(𝒱t,ℰt\)G\_\{t\}=\(\\mathcal\{V\}\_\{t\},\\mathcal\{E\}\_\{t\}\)\. The node set is defined as

𝒱t=𝒱tsub∪𝒱tcat∪𝒱tctx∪ℳt,\\mathcal\{V\}\_\{t\}=\\mathcal\{V\}\_\{t\}^\{\\mathrm\{sub\}\}\\cup\\mathcal\{V\}\_\{t\}^\{\\mathrm\{cat\}\}\\cup\\mathcal\{V\}\_\{t\}^\{\\mathrm\{ctx\}\}\\cup\\mathcal\{M\}\_\{t\},\(1\)where𝒱tsub\\mathcal\{V\}\_\{t\}^\{\\mathrm\{sub\}\},𝒱tcat\\mathcal\{V\}\_\{t\}^\{\\mathrm\{cat\}\}, and𝒱tctx\\mathcal\{V\}\_\{t\}^\{\\mathrm\{ctx\}\}denote subject nodes, object\-category nodes, and context nodes, which serve as upper\-level nodes, andℳt\\mathcal\{M\}\_\{t\}denotes the set of MemoryUnits that store fact\. The upper\-level nodes organize factual memories according to their roles and form an abstraction layer, which make the localization and rewriting more efficient\.

Then, the edge set of the hierarchical graph memory is defined as

ℰt=ℰtsub∪ℰtobj∪ℰtctx∪ℰtdep,\\mathcal\{E\}\_\{t\}=\\mathcal\{E\}\_\{t\}^\{\\mathrm\{sub\}\}\\cup\\mathcal\{E\}\_\{t\}^\{\\mathrm\{obj\}\}\\cup\\mathcal\{E\}\_\{t\}^\{\\mathrm\{ctx\}\}\\cup\\mathcal\{E\}\_\{t\}^\{\\mathrm\{dep\}\},\(2\)whereℰtsub⊆𝒱tsub×ℳt\\mathcal\{E\}\_\{t\}^\{\\mathrm\{sub\}\}\\subseteq\\mathcal\{V\}\_\{t\}^\{\\mathrm\{sub\}\}\\times\\mathcal\{M\}\_\{t\},ℰtobj⊆𝒱tobj×ℳt\\mathcal\{E\}\_\{t\}^\{\\mathrm\{obj\}\}\\subseteq\\mathcal\{V\}\_\{t\}^\{\\mathrm\{obj\}\}\\times\\mathcal\{M\}\_\{t\}andℰtctx⊆𝒱tctx×ℳt\\mathcal\{E\}\_\{t\}^\{\\mathrm\{ctx\}\}\\subseteq\\mathcal\{V\}\_\{t\}^\{\\mathrm\{ctx\}\}\\times\\mathcal\{M\}\_\{t\}denotes the connections between each MemoryUnit with its corresponding subject, object category, and contextual information, andℰtdep⊆ℳt×ℳt\\mathcal\{E\}\_\{t\}^\{\\mathrm\{dep\}\}\\subseteq\\mathcal\{M\}\_\{t\}\\times\\mathcal\{M\}\_\{t\}denotes the dependency edges that connect MemoryUnits, representing explicit evidence dependencies\.

Each MemoryUnit represents an independently retrievable and editable fact\. It records detailed information including the subject, relation, object, object category, transaction time, context, confidence, current status, etc\. The status of a MemoryUnit indicates whether it is active, superseded, outdated, or pending\. Active MemoryUnits participate in current evidence retrieval\. Superseded and pending units preserve historical assertions after memory evolution, while outdated units indicate dependent evidence whose supporting information is no longer valid\. These non\-active units remain in the graph to maintain revision history but are excluded from the localization step\.

This hierarchical design separates organization from factual storage\. Upper\-level nodes provide coarse access, while MemoryUnits store fine\-grained information and dependency structures\. Compared with flat graph memory that directly searches over all historical facts, our organization enable identifying relevant regions and then accesses corresponding MemoryUnits\. This design reduces unnecessary localization over accumulated memories and provides a structured basis for subsequent evidence localization\.

### 3\.2MicroGraph\-based Path\-Level Localization

#### MicroGraph construction

Based on the hierarchical graph memory, we organize memory into MicroGraphs as localized regions rather than additional memory layers during localization\. Specifically, a MicroGraphBt,j⊆GtB\_\{t,j\}\\subseteq G\_\{t\}is a subgraph of the global hierarchical graph memory determined by a pair of subject node and object\-category node, the subject node identifies the entity\-centered memory region, while the object\-category node provides a coarse semantic constraint over stored facts\. We choose these two attributes because they are stable across temporal updates and provide efficient access before detailed evidence path selection which jointly define a localized region\. Each MicroGraph corresponds to a pair of nodes:

Bt,j=\(vt,jsub,vt,jcat\),vt,jsub∈𝒱tsub,vt,jcat∈𝒱tcat,B\_\{t,j\}=\(v\_\{t,j\}^\{\\mathrm\{sub\}\},v\_\{t,j\}^\{\\mathrm\{cat\}\}\),\\quad v\_\{t,j\}^\{\\mathrm\{sub\}\}\\in\\mathcal\{V\}\_\{t\}^\{\\mathrm\{sub\}\},\\quad v\_\{t,j\}^\{\\mathrm\{cat\}\}\\in\\mathcal\{V\}\_\{t\}^\{\\mathrm\{cat\}\},\(3\)and the associated MemoryUnits are defined as

ℳt​\(Bt,j\)=\{mi∈ℳt∣si=vt,jsub,oi=vt,jcat\},\\mathcal\{M\}\_\{t\}\(B\_\{t,j\}\)=\\left\\\{m\_\{i\}\\in\\mathcal\{M\}\_\{t\}\\mid s\_\{i\}=v\_\{t,j\}^\{\\mathrm\{sub\}\},o\_\{i\}=v\_\{t,j\}^\{\\mathrm\{cat\}\}\\right\\\},\(4\)wheremim\_\{i\}is a MemoryUnit,sis\_\{i\}is its subject node, andoio\_\{i\}is its object\-category node\. A MicroGraph does not introduce additional memory content\. Instead, it represents a localized region of the global graph memory that contains the corresponding MemoryUnits, context nodes, and dependency edges, enabling efficient retrieval and evidence localization\.

Given a queryqtq\_\{t\}and an available update textutu\_\{t\}, we first construct temporary MemoryUnitsℳttemp\\mathcal\{M\}\_\{t\}^\{\\mathrm\{temp\}\}\. These units follow the MemoryUnit schema but remain outside the graph memory during localization\. Only update\-derived units are committed after rewriting\.

The anchor extractor obtains the subject nodes and object\-category nodes from temporary MemoryUnits:

𝒜t=anch⁡\(ℳttemp\),\\mathcal\{A\}\_\{t\}=\\operatorname\{anch\}\\left\(\\mathcal\{M\}\_\{t\}^\{\\mathrm\{temp\}\}\\right\),\(5\)whereanch⁡\(⋅\)\\operatorname\{anch\}\(\\cdot\)extracts the anchors used for MicroGraph localization\. The extracted anchors are used to identify relevant MicroGraphs\. The candidate MicroGraphs are defined as

ℬtcand=\{B∈ℬt\|∃mi∈ℳt​\(B\):\{si,oi\}∩𝒜t≠∅\},\\displaystyle\\mathcal\{B\}\_\{t\}^\{\\mathrm\{cand\}\}=\\left\\\{B\\in\\mathcal\{B\}\_\{t\}\\;\\middle\|\\;\\exists m\_\{i\}\\in\\mathcal\{M\}\_\{t\}\(B\):\\\{s\_\{i\},o\_\{i\}\\\}\\cap\\mathcal\{A\}\_\{t\}\\neq\\varnothing\\right\\\},

\(6\)whereℳt​\(B\)\\mathcal\{M\}\_\{t\}\(B\)denotes the MemoryUnits associated with MicroGraphBB\. The candidate MicroGraphs are then ranked according to their relevance to the extracted anchors\. We denote the relevance score asR​\(B,𝒜t\)R\(B,\\mathcal\{A\}\_\{t\}\), which measures the subject matching and object\-category compatibility between the anchors and the MemoryUnits associated with each MicroGraph\. The top\-KgK\_\{g\}MicroGraphs are selected as the localized memory region:

ℬ^t=TopKKg⁡\(ℬtcand,R\)\.\\widehat\{\\mathcal\{B\}\}\_\{t\}=\\operatorname\{TopK\}\_\{K\_\{g\}\}\\left\(\\mathcal\{B\}\_\{t\}^\{\\mathrm\{cand\}\},R\\right\)\.\(7\)The MemoryUnits associated withℬ^t\\widehat\{\\mathcal\{B\}\}\_\{t\}, together with their subject nodes, object\-category nodes, context nodes, and dependency edges, form the support subgraphGS,tG\_\{S,t\}\.

#### Path\-level localization\.

Although the support subgraph narrows the search space, it still contains multiple evidence structures\. Since updates may affect only specific evidence paths, we further perform path\-level localization to identify the evidence path for subsequent rewriting\. An evidence path represents a connected chain within the localized subgraph, where the involved MemoryUnits and dependency edges collectively support the answer to the current query\. Within the localized evidence subgraphGS,tG\_\{S,t\}, we enumerate connected MemoryUnit paths for evidence selection and update\-impact analysis\. Adjacent MemoryUnits are connected through explicit dependency edges or valid structural relations retained inGS,tG\_\{S,t\}\. We enumerate up toKpK\_\{p\}candidate paths inGS,tG\_\{S,t\}by following these connections, denoted as𝒫tcand\\mathcal\{P\}\_\{t\}^\{\\mathrm\{cand\}\}\.

Each candidate path is further evaluated according to its relevance to the temporary MemoryUnits, denoted asϕH​\(P,ℳttemp\),\\boldsymbol\{\\phi\}\_\{H\}\\left\(P,\\mathcal\{M\}\_\{t\}^\{\\mathrm\{temp\}\}\\right\),, which captures the consistency between a candidate path and the temporary MemoryUnits\. The scoring function considers the matching of MemoryUnit attributes, dependency consistency, temporal validity, and contextual compatibility\. The affected evidence path is selected as

P^t=argmaxP∈𝒫tcandϕH\(P,ℳttemp\)\)\.\\widehat\{P\}\_\{t\}=\\arg\\max\\nolimits\_\{P\\in\\mathcal\{P\}\_\{t\}^\{\\mathrm\{cand\}\}\}\\boldsymbol\{\\phi\}\_\{H\}\\left\(P,\\mathcal\{M\}\_\{t\}^\{\\mathrm\{temp\}\}\\right\)\)\.\(8\)The MemoryUnits inP^t\\widehat\{P\}\_\{t\}and their associated dependency edges define the rewrite region for coordinated rewriting\.

Table 1:Performance comparison of different question categories on LoCoMo\. The best results are shown inBoldand the second\-best results areunderlined\.

### 3\.3Coordinated Rewriting

The goal of coordinated rewriting is not to overwrite historical memories, but to maintain a consistent evidence structure where updated facts and their dependent conclusions remain valid\. After path\-level localization identifiesP^t\\widehat\{P\}\_\{t\}, we perform coordinated rewriting within the fixed evidence region\. The temporary MemoryUnitsℳttemp\\mathcal\{M\}\_\{t\}^\{\\mathrm\{temp\}\}are first matched with the MemoryUnits inP^t\\widehat\{P\}\_\{t\}to identify the affected MemoryUnits\. Then, the intra\-unit rewriting updates the internal states of these MemoryUnits based on the temporary updates, while the status of updated MemoryUnits are set as active because they represent the current valid evidence\. The state changes of updated MemoryUnits further determine the affected dependency relations\. Inter\-unit rewriting next revises the dependency structures connected to the affected MemoryUnits and examines whether the related MemoryUnits require additional updates according toℳttemp\\mathcal\{M\}\_\{t\}^\{\\mathrm\{temp\}\}\. Both rewriting operations are performed within the same localized evidence region and are updated together:

Gt\+1=Update⁡\(Gt,Rewriteinter⁡\(Rewriteintra⁡\(P^t,ℳttemp\),ℳttemp\)\)\.\\displaystyle G\_\{t\+1\}=\\operatorname\{Update\}\\Big\(G\_\{t\},\\operatorname\{Rewrite\}\_\{\\mathrm\{inter\}\}\\Big\(\\operatorname\{Rewrite\}\_\{\\mathrm\{intra\}\}\(\\widehat\{P\}\_\{t\},\\mathcal\{M\}\_\{t\}^\{\\mathrm\{temp\}\}\),\\mathcal\{M\}\_\{t\}^\{\\mathrm\{temp\}\}\\Big\)\\Big\)\.

\(9\)whereRewriteintra⁡\(⋅\)\\operatorname\{Rewrite\}\_\{\\mathrm\{intra\}\}\(\\cdot\)updates the internal states of affected MemoryUnits andRewriteinter⁡\(⋅\)\\operatorname\{Rewrite\}\_\{\\mathrm\{inter\}\}\(\\cdot\)revises the dependency relations according to the updated MemoryUnits\. This coordination enables memory states and dependency structures to evolve with respect to the same update evidence\. MemoryUnits and relations outside the rewrite region remain unchanged\. The detailed rewriting methods are as follows\.

#### Intra\-unit rewriting\.

For each temporary MemoryUnitm¯j∈ℳttemp\\bar\{m\}\_\{j\}\\in\\mathcal\{M\}\_\{t\}^\{\\mathrm\{temp\}\}, we identify the matched MemoryUnitmim\_\{i\}within the affected pathP^t\\widehat\{P\}\_\{t\}\. The rewriting process preserves existing records and updates the internal state and valid\-time information of affected MemoryUnits according to the new evidence\. Ifm¯j\\bar\{m\}\_\{j\}introduces a new memory, it is committed as an active MemoryUnit\. If it updates an existing memory, the corresponding MemoryUnit state is revised according to the temporal and contextual consistency withm¯j\\bar\{m\}\_\{j\}\.

#### Inter\-unit rewriting\.

The state revision of an affected MemoryUnit may influence other MemoryUnits whose evidence depends on it\. Our method identifies the directly dependent MemoryUnits within the evidence path:

𝒟t​\(mi\)=\{m∈ℳt​\(P^t\)\|\(mi,m\)∈ℰtdep\},\\mathcal\{D\}\_\{t\}\(m\_\{i\}\)=\\left\\\{m\\in\\mathcal\{M\}\_\{t\}\(\\widehat\{P\}\_\{t\}\)\\;\\middle\|\\;\(m\_\{i\},m\)\\in\\mathcal\{E\}\_\{t\}^\{\\mathrm\{dep\}\}\\right\\\},\(10\)whereℳt​\(P^t\)\\mathcal\{M\}\_\{t\}\(\\widehat\{P\}\_\{t\}\)denotes the MemoryUnits contained in the affected evidence path\. Dependency edges are directed from supporting MemoryUnits to dependent MemoryUnits\.

After intra\-unit rewriting, we examine whether the dependencies of each MemoryUnit in𝒟t​\(mi\)\\mathcal\{D\}\_\{t\}\(m\_\{i\}\)remain valid under the updated evidence\. A dependent MemoryUnit is preserved when its supporting evidence remains consistent\. Otherwise, it is marked as outdated and excluded from the current evidence view\. The dependencies of an updated MemoryUnit are not directly inherited from the original MemoryUnit\. The updated MemoryUnit may have a different evidence scope and thus cannot always support the original downstream conclusions\. Dependencies involving the updated MemoryUnit are retained only when supported by valid evidence, preventing unsupported derived conclusions\.

## 4Experiments

We evaluate HiGram by answering the following four research questions:

- •RQ1:Can HiGram improve long\-term QA quality and token efficiency?
- •RQ2:Can HiGram maintain consistent memory under different conflicts?
- •RQ3:How do memory organization and evidence localization affect performance?
- •RQ4:How does HiGram compare with different memory update strategies?

### 4\.1Experimental Setup

#### Datasets and Evaluation Metrics\.

We evaluate HiGram on two commonly used benchmarks for agent memory\.

LoCoMo\(Maharanaet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib1)\)contains long\-term conversations together with questions and reference answers derived from them\. The questions are divided into five categories: Single Hop, Multi\-Hop, Open Domain, Temporal, and Adversarial\. For each category, we report token\-level F1, BLEU\-1 \(BLEU\), and the LLM\-as\-Judge score \(LLM\-J\)\.

F1 and BLEU measure lexical overlap between the generated and reference answers, whereas LLM\-J evaluates semantic correctness\. Besides, Token Length reports the total number of input and output tokens used by the final answer generation call, excluding offline memory construction and update\.

![Refer to caption](https://arxiv.org/html/2608.05095v1/x2.png)Figure 2:Results of ablation of Memory Organization and Evidence Localization on LoCoMo\.*w/o MicroGraph*removes MicroGraph organization\.*w/o Support Subgraph*removes the localized support region\.MemConflict\(Taoet al\.[2026](https://arxiv.org/html/2608.05095#bib.bib8)\)contains long interaction histories with conflicts divided by three categories\. The Dynamic subset tests temporal validity\. The Static subset measures resistance to incorrect replacement\. The Conditional \(Cond\) subset tests whether a value applies under the current condition\. Following the benchmark, we adopt different metrics for different categories including Answer Accuracy \(AA\), Update Order Consistency Score \(UOCS\) which measures consistency under update order for dynamic conflicts, Conflict Recognition Score \(CRS\) which measures recognition of static conflicts, Macro Answer Accuracy \(Macro\-AA\) which is the unweighted average over the three conflict types, SEH@3 which records whether the gold evidence appears among the top three retrieved items, and Support Rank Score \(SRS\) which applies a logarithmic discount to the evidence rank\. Higher values are better for every metric\.

#### Baselines\.

On LoCoMo, we compare with six representative baselines\.LoCoMo\(Maharanaet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib1)\)places the entire dialogue history in the generation prompt\.MemoryBank\(Zhonget al\.[2024](https://arxiv.org/html/2608.05095#bib.bib2)\)stores textual memories and adjusts retention using a forgetting\-curve mechanism\.A\-MEM\(Xuet al\.[2026](https://arxiv.org/html/2608.05095#bib.bib3)\)constructs atomic notes with contextual descriptions, keywords, and tags, dynamically updates their attributes\.ReadAgent\(Leeet al\.[2024](https://arxiv.org/html/2608.05095#bib.bib5)\)compresses episodes into gist memories and revisits selected pages on demand\.MemGPT\(Packeret al\.[2023](https://arxiv.org/html/2608.05095#bib.bib4)\)manages state across context and archival memory tiers\.Mem0\(Chhikaraet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib6)\)extracts salient facts and applies fact\-level operations after retrieving related memories\. On MemConflict, we evaluate A\-MEM and Mem0 together with three additional methods\.LangMem\(The LangChain Team[2025](https://arxiv.org/html/2608.05095#bib.bib51)\)extracts, consolidates, and updates semantic memories\.Letta\(Letta AI[2026](https://arxiv.org/html/2608.05095#bib.bib52)\)maintains persistent agent state through managed memory tiers\.MemOS\(Liet al\.[2025](https://arxiv.org/html/2608.05095#bib.bib53)\)manages memory representation, storage, retrieval, and lifecycle\.

#### Implementation Details\.

We use GPT 5\.4 and GPT 4o to generate answers on LoCoMo while GPT 5\.0 mini is used on MemConflict\. GPT 5\.4 mini serves as the judge model\. The maximum output length is set as 256 tokens on LoCoMo and 4,096 tokens on MemConflict\. The default path depth ish=3h=3\. We setKg=12K\_\{g\}=12and the evidence budgetKp=24K\_\{p\}=24\.

Table 2:Performance comparison of different methods on the MemConflict benchmark\.

### 4\.2Main Results

To answer RQ1, we first report the results on LoCoMo in Table[1](https://arxiv.org/html/2608.05095#S3.T1)\. The results show that HiGram achieves the best average F1, BLEU, and LLM\-J under both GPT\-5\.4 and GPT\-4o\. This consistency across two LLM models suggests that the improvements are not tied to a particular LLM backbone\. Instead, they reflect the ability of HiGram to organize and select reliable evidence for answer generation\.

HiGram also provides a favorable balance between answer quality and inference cost\. It uses only 7\.2% of the tokens consumed by full context under GPT\-5\.4 and 15\.8% of ReadAgent under GPT\-4o, which achieves the second best results, respectively\. Meanwhile, though several compact memory systems such as MemoryBank, A\-MEM, and Mem0 require fewer tokens, their average answer quality is substantially lower\. HiGram reduces irrelevant historical context without discarding the evidence required for accurate generation\.

The results for different categories further reveal the advantages of our method\. HiGram achieves the strongest performance for Temporal questions under both answer models\. It also ranks the first on Adversarial questions under GPT\-5\.4 and remains close to the best baseline under GPT\-4o\. These results are consistent with the use of temporal validity scopes and localized evidence paths, which limit the influence of outdated and unrelated memories\. HiGram remains competitive on Single\-Hop and Multi\-Hop questions, although the relative gains vary across answer models\. Its results on Open Domain are less dominant, which reflects the limitation of memory retrieval when the required external knowledge is absent from the stored history\. Overall, the results demonstrate that selecting structured evidence is more effective than exposing the LLM to a large historical context\.

To answer RQ2, we further report the results of MemConflict in Table[2](https://arxiv.org/html/2608.05095#S4.T2)\. The results show that HiGram achieves the strongest overall performance and ranks first on both evidence selection metrics\. The simultaneous improvements indicate that HiGram not only produces more accurate answers, but also places valid supporting evidence earlier in the retrieval ranking\. This distinction is important for MemConflict, where successful reasoning requires the system to identify evidence that remains applicable to the current query\.

The results across conflict types reveal complementary strengths\. On Dynamic conflicts, HiGram does not achieve the highest AA, but obtains the best UOCS\. This pattern indicates that its main advantage lies in maintaining consistency across different update orders\. On Static conflicts, HiGram leads both AA and CRS by a clear margin\. This result is consistent with its rewrite design, which retains previous assertions and records their state transitions instead of overwriting memory directly\. Dependency revision further prevents evidence supported by invalid states from remaining in the active view\. HiGram also achieves the best Conditional AA, suggesting that explicit contextual scopes help distinguish facts with different applicability conditions\.

Overall, these results show that the advantage of HiGram comes from coupling evidence localization with coordinated memory revision\. Path level localization identifies evidence relevant to both the query and the update, while coordinated rewriting maintains the corresponding MemoryUnit states and dependencies within the localized region\. The following analyses further isolate the contributions of memory organization, evidence localization, and rewriting\.

### 4\.3Analysis

#### Ablations\.

To answer RQ3, we report the results of ablations of Memory Organization and Evidence Localization in Figure[2](https://arxiv.org/html/2608.05095#S4.F2)\. From the figure, MicroGraph organization and localized evidence construction play complementary roles in retrieval\. Removing MicroGraph organization increases token use by 68\.6% and reduces LLM\-J across all three question categories\. The substantial decline on Single\-Hop questions shows that coarse\-level indexing improves direct access to relevant evidence\. Multi\-Hop F1 remains nearly unchanged, while its LLM\-J decreases\. This suggests that a wider search space may preserve surface overlap but introduce evidence that is less reliable for reasoning\. Removing the localized support subgraph causes a broader decline across all three categories\. The Single\-Hop degradation shows that local structure also helps isolate the correct MemoryUnit for direct retrieval\. The losses on Multi\-Hop and Temporal questions further demonstrate the importance of preserving dependencies and temporal relations among retrieved units\. Since token use only slightly increases, the performance drop is attributed to the loss of structured evidence before path scoring rather than insufficient context\.

Table 3:Comparison of different memory update strategies on MemConflict\. Append\-only represents insertion\-based updates, Relation\-level performs isolated updates\.
#### Memory Update Variants\.

To answer RQ4, we report the results of comparing different memory update methods in Table[3](https://arxiv.org/html/2608.05095#S4.T3)\. Append Only yields balanced results on dynamic and static conflicts, but remains limited in both settings\. Relation\-level Update improves static accuracy, yet its substantial decline on dynamic conflicts lowers its overall mean below Append Only\. This contrast shows that improving one conflict type can weaken robustness across update settings\. HiGram avoids this trade\-off by achieving the strongest accuracy on both subsets and the highest mean, with a particularly clear advantage on static conflicts\. These consistent gains indicate that HiGram improves conflict correction without sacrificing adaptation to evolving information\.

![Refer to caption](https://arxiv.org/html/2608.05095v1/x3.png)Figure 3:Sensitivity analysis of key hyperparameters on LoCoMo\.KgK\_\{g\}denotes the number of retrieved MicroGraphs, andKpK\_\{p\}denotes the number of enumerate up evidence paths\.
#### Hyperparameter Sensitivity\.

Figure[3](https://arxiv.org/html/2608.05095#S4.F3)evaluates the sensitivity of HiGram to the number of retrieved MicroGraphsKgK\_\{g\}and candidate pathsKpK\_\{p\}\. The results show that HiGram maintains stable performance across different configurations\. IncreasingKgK\_\{g\}improves performance by providing more relevant memory regions, while the gains gradually saturate with larger retrieval scopes\. Similarly, varyingKpK\_\{p\}leads to limited performance changes, indicating that the path\-level scoring mechanism can effectively identify relevant evidence paths under different search budgets\. These results demonstrate that HiGram is robust to hyperparameter variations and does not require careful tuning\.

## 5Conclusion

We present HiGram , an evolving hierarchical graph memory framework for long\-term reasoning agents\. HiGram organizes memory into coarse\-to\-fine localized evidence regions based on MicroGraph and uses path\-level localization to identify evidence paths, together with a coordinated rewriting mechanism that jointly revises the internal states of MemoryUnits and their dependencies\. Experiments on LoCoMo and MemConflict show that HiGram improves answer quality and token efficiency\. Future work will investigate external knowledge integration and multimodal memories\.

## References

- J\. F\. Allen \(1983\)Maintaining knowledge about temporal intervals\.Communications of the ACM26\(11\),pp\. 832–843\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- P\. Anokhin, N\. Semenov, A\. Sorokin, D\. Evseev, A\. Kravchenko, M\. Burtsev, and E\. Burnaev \(2025\)AriGraph: learning knowledge graph world models with episodic memory for llm agents\.InProceedings of the Thirty\-Fourth International Joint Conference on Artificial Intelligence,pp\. 12–20\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p2.1)\.
- M\. Besta, N\. Blach, A\. Kubicek, R\. Gerstenberger, M\. Podstawski, L\. Gianinazzi, J\. Gajda, T\. Lehmann, H\. Niewiadomski, P\. Nyczyk,et al\.\(2024\)Graph of thoughts: solving elaborate problems with large language models\.InProceedings of the AAAI conference on artificial intelligence,pp\. 17682–17690\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1)\.
- B\. Cai, Y\. Xiang, L\. Gao, H\. Zhang, Y\. Li, and J\. Li \(2022\)Temporal knowledge graph completion: a survey\.arXiv preprint arXiv:2201\.08236\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- Q\. Chen, T\. Zhang, X\. He, D\. Li, C\. Wang, L\. Huang,et al\.\(2024\)Lifelong knowledge editing for llms with retrieval\-augmented continuous prompt learning\.InProceedings of the 2024 Conference on Empirical Methods in Natural Language Processing,pp\. 13565–13580\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- P\. Chhikara, D\. Khant, S\. Aryan, T\. Singh, and D\. Yadav \(2025\)Mem0: building production\-ready ai agents with scalable long\-term memory\.arXiv preprint arXiv:2504\.19413\.Cited by:[§1](https://arxiv.org/html/2608.05095#S1.p1.1),[§1](https://arxiv.org/html/2608.05095#S1.p2.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p2.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1),[§4\.1](https://arxiv.org/html/2608.05095#S4.SS1.SSS0.Px2.p1.1)\.
- D\. Edge, H\. Trinh, N\. Cheng, J\. Bradley, A\. Chao, A\. Mody, S\. Truitt, D\. Metropolitansky, R\. O\. Ness, and J\. Larson \(2024\)From local to global: a graph rag approach to query\-focused summarization\.arXiv preprint arXiv:2404\.16130\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p2.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1)\.
- Z\. Guo, L\. Xia, Y\. Yu, and C\. Huang \(2025\)Lightrag: simple and fast retrieval\-augmented generation\.Findings of the Association for Computational Linguistics: EMNLP 2025\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1)\.
- B\. J\. Gutiérrez, Y\. Shu, Y\. Gu, M\. Yasunaga, and Y\. Su \(2024\)Hipporag: neurobiologically inspired long\-term memory for large language models\.Advances in neural information processing systems37,pp\. 59532–59569\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p2.1)\.
- K\. Guu, K\. Lee, Z\. Tung, P\. Pasupat, and M\. Chang \(2020\)Retrieval augmented language model pre\-training\.InInternational conference on machine learning,pp\. 3929–3938\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1)\.
- J\. Kang, M\. Ji, Z\. Zhao, and T\. Bai \(2025\)Memory os of ai agent\.InProceedings of the 2025 Conference on Empirical Methods in Natural Language Processing,pp\. 25972–25981\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- V\. Karpukhin, B\. Oguz, S\. Min, P\. Lewis, L\. Wu, S\. Edunov, D\. Chen, and W\. Yih \(2020\)Dense passage retrieval for open\-domain question answering\.InProceedings of the 2020 conference on empirical methods in natural language processing,pp\. 6769–6781\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1)\.
- K\. Lee, X\. Chen, H\. Furuta, J\. Canny, and I\. Fischer \(2024\)A human\-inspired reading agent with gist memory of very long contexts\.InInternational Conference on Machine Learning,pp\. 26396–26415\.Cited by:[§1](https://arxiv.org/html/2608.05095#S1.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1),[§4\.1](https://arxiv.org/html/2608.05095#S4.SS1.SSS0.Px2.p1.1)\.
- Letta AI \(2026\)Letta: a platform for stateful agents with persistent memory\.Note:Software repositoryExternal Links:[Link](https://github.com/letta-ai/letta)Cited by:[§4\.1](https://arxiv.org/html/2608.05095#S4.SS1.SSS0.Px2.p1.1)\.
- S\. Li, Y\. He, H\. Guo, X\. Bu, G\. Bai, J\. Liu, J\. Liu, X\. Qu, Y\. Li, W\. Ouyang,et al\.\(2024\)Graphreader: building graph\-based agent to enhance long\-context abilities of large language models\.InFindings of the Association for Computational Linguistics: EMNLP 2024,pp\. 12758–12786\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1)\.
- Z\. Li, C\. Xi, C\. Li, D\. Chen, B\. Chen, S\. Song, S\. Niu, H\. Wang, J\. Yang, C\. Tang,et al\.\(2025\)Memos: a memory os for ai system\.arXiv preprint arXiv:2507\.03724\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1),[§4\.1](https://arxiv.org/html/2608.05095#S4.SS1.SSS0.Px2.p1.1)\.
- L\. Liu, X\. Yang, Y\. Shen, B\. Hu, Z\. Zhang, J\. Gu, and G\. Zhang \(2023\)Think\-in\-memory: recalling and post\-thinking enable llms with long\-term memory\.arXiv preprint arXiv:2311\.08719\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1)\.
- N\. F\. Liu, K\. Lin, J\. Hewitt, A\. Paranjape, M\. Bevilacqua, F\. Petroni, and P\. Liang \(2024\)Lost in the middle: how language models use long contexts\.Transactions of the association for computational linguistics12,pp\. 157–173\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1)\.
- J\. Lu, S\. An, M\. Lin, G\. Pergola, Y\. He, D\. Yin, X\. Sun, and Y\. Wu \(2023\)Memochat: tuning llms to use memos for consistent long\-range open\-domain conversation\.arXiv preprint arXiv:2308\.08239\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1)\.
- A\. Maharana, D\. Lee, S\. Tulyakov, M\. Bansal, F\. Barbieri, and Y\. Fang \(2024\)Evaluating very long\-term conversational memory of llm agents\.InProceedings of the 62nd Annual Meeting of the Association for Computational Linguistics,pp\. 13851–13870\.Cited by:[§1](https://arxiv.org/html/2608.05095#S1.p5.1),[§4\.1](https://arxiv.org/html/2608.05095#S4.SS1.SSS0.Px1.p2.1),[§4\.1](https://arxiv.org/html/2608.05095#S4.SS1.SSS0.Px2.p1.1)\.
- K\. Meng, D\. Bau, A\. J\. Andonian, and Y\. Belinkov \(2022\)Locating and editing factual associations in gpt\.InAdvances in neural information processing systems,Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- K\. Meng, A\. S\. Sharma, A\. J\. Andonian, Y\. Belinkov, and D\. Bau \(2023\)Mass\-editing memory in a transformer\.InThe eleventh international conference on learning representations,Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- E\. Mitchell, C\. Lin, A\. Bosselut, C\. D\. Manning, and C\. Finn \(2022\)Memory\-based model editing at scale\.InInternational Conference on Machine Learning,pp\. 15817–15831\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- C\. Packer, V\. Fang, S\. Patil, K\. Lin, S\. Wooders, and J\. Gonzalez \(2023\)MemGPT: towards llms as operating systems\.arXiv preprint arXiv:2310\.08560\.Cited by:[§1](https://arxiv.org/html/2608.05095#S1.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1),[§4\.1](https://arxiv.org/html/2608.05095#S4.SS1.SSS0.Px2.p1.1)\.
- J\. S\. Park, J\. O’Brien, C\. J\. Cai, M\. R\. Morris, P\. Liang, and M\. S\. Bernstein \(2023\)Generative agents: interactive simulacra of human behavior\.InProceedings of the 36th annual acm symposium on user interface software and technology,pp\. 1–22\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1)\.
- Q\. H\. Pham, H\. Ngo, L\. A\. Tuan, and D\. Q\. Nguyen \(2024\)Who’s who: large language models meet knowledge conflicts in practice\.InFindings of the Association for Computational Linguistics: EMNLP 2024,pp\. 10142–10151\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- L\. Qin, A\. Gupta, S\. Upadhyay, L\. He, Y\. Choi, and M\. Faruqui \(2021\)TIMEDIAL: temporal commonsense reasoning in dialog\.InProceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing \(Volume 1: Long Papers\),pp\. 7066–7076\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- P\. Rasmussen, P\. Paliychuk, T\. Beauvais, J\. Ryan, and D\. Chalef \(2025\)Zep: a temporal knowledge graph architecture for agent memory\.arXiv preprint arXiv:2501\.13956\.Cited by:[§1](https://arxiv.org/html/2608.05095#S1.p2.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p2.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- P\. Sarthi, S\. Abdullah, A\. Tuli, S\. Khanna, A\. Goldie, and C\. Manning \(2024\)Raptor: recursive abstractive processing for tree\-organized retrieval\.InInternational Conference on Learning Representations,Vol\.2024,pp\. 32628–32649\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1)\.
- N\. Shinn, F\. Cassano, A\. Gopinath, K\. Narasimhan, and S\. Yao \(2023\)Reflexion: language agents with verbal reinforcement learning\.Advances in neural information processing systems36,pp\. 8634–8652\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1)\.
- H\. Sun and S\. Zeng \(2025\)Hierarchical memory for high\-efficiency long\-term reasoning in llm agents\.InarXiv preprint arXiv:2507\.22925,Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1)\.
- Z\. Tao, J\. Zhao, P\. Liu, D\. Xi, Y\. Chen, W\. Xu, and Z\. Li \(2026\)MemConflict: evaluating long\-term memory systems under memory conflicts\.arXiv preprint arXiv:2605\.20926\.Cited by:[§1](https://arxiv.org/html/2608.05095#S1.p5.1),[§4\.1](https://arxiv.org/html/2608.05095#S4.SS1.SSS0.Px1.p4.1)\.
- The LangChain Team \(2025\)LangMem SDK for agent long\-term memory\.Note:https://www\.langchain\.com/blog/langmem\-sdk\-launchCited by:[§4\.1](https://arxiv.org/html/2608.05095#S4.SS1.SSS0.Px2.p1.1)\.
- H\. Trivedi, N\. Balasubramanian, T\. Khot, and A\. Sabharwal \(2023\)Interleaving retrieval with chain\-of\-thought reasoning for knowledge\-intensive multi\-step questions\.InProceedings of the 61st annual meeting of the association for computational linguistics,pp\. 10014–10037\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1)\.
- R\. Trivedi, H\. Dai, Y\. Wang, and L\. Song \(2017\)Know\-evolve: deep temporal reasoning for dynamic knowledge graphs\.Ininternational conference on machine learning,pp\. 3462–3471\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- W\. Wang, L\. Dong, H\. Cheng, X\. Liu, X\. Yan, J\. Gao, and F\. Wei \(2023a\)Augmenting language models with long\-term memory\.Advances in Neural Information Processing Systems36,pp\. 74530–74543\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- Y\. Wang, S\. Feng, H\. Wang, W\. Shi, V\. Balachandran, T\. He, and Y\. Tsvetkov \(2023b\)Resolving knowledge conflicts in large language models\.arXiv preprint arXiv:2310\.00935\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- Y\. Wang, Y\. Gao, X\. Chen, H\. Jiang, S\. Li, J\. Yang, Q\. Yin, Z\. Li, X\. Li, B\. Yin,et al\.\(2024\)MEMORYLLM: towards self\-updatable large language models\.InProceedings of the 41st International Conference on Machine Learning,pp\. 50453–50466\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- Z\. Wu, H\. Zhang, F\. Lin, W\. Xu, X\. Xu, Y\. Chen, H\. P\. Zou, S\. Chen, W\. Zhang, X\. Liu,et al\.\(2026\)Gam: hierarchical graph\-based agentic memory for llm agents\.InProceedings of the 64th Annual Meeting of the Association for Computational Linguistics,pp\. 34647–34664\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p2.1)\.
- R\. Xu, Z\. Qi, Z\. Guo, C\. Wang, H\. Wang, Y\. Zhang, and W\. Xu \(2024\)Knowledge conflicts for llms: a survey\.InProceedings of the 2024 Conference on Empirical Methods in Natural Language Processing,pp\. 8541–8565\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1)\.
- W\. Xu, Z\. Liang, K\. Mei, H\. Gao, J\. Tan, and Y\. Zhang \(2026\)A\-mem: agentic memory for llm agents\.Advances in Neural Information Processing Systems38,pp\. 17577–17604\.Cited by:[§1](https://arxiv.org/html/2608.05095#S1.p2.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p2.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1),[§4\.1](https://arxiv.org/html/2608.05095#S4.SS1.SSS0.Px2.p1.1)\.
- X\. Xu, Z\. Gou, W\. Wu, Z\. Niu, H\. Wu, H\. Wang, and S\. Wang \(2022\)Long time no see\! open\-domain conversation with long\-term persona memory\.InFindings of the Association for Computational Linguistics,pp\. 2639–2650\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1)\.
- S\. Yao, D\. Yu, J\. Zhao, I\. Shafran, T\. Griffiths, Y\. Cao, and K\. Narasimhan \(2023a\)Tree of thoughts: deliberate problem solving with large language models\.Advances in neural information processing systems36,pp\. 11809–11822\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1)\.
- S\. Yao, J\. Zhao, D\. Yu, N\. Du, I\. Shafran, K\. Narasimhan, and Y\. Cao \(2023b\)ReAct: synergizing reasoning and acting in language models\.InInternational Conference on Learning Representations,Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1)\.
- R\. Yuan, S\. Sun, Y\. Li, Z\. Wang, Z\. Cao, and W\. Li \(2025\)Personalized large language model assistant with evolving conditional memory\.InProceedings of the 31st International Conference on Computational Linguistics,pp\. 3764–3777\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1)\.
- G\. Zhang, M\. Fu, K\. Wang, F\. Wan, M\. Yu, and S\. Yan \(2025\)G\-memory: tracing hierarchical memory for multi\-agent systems\.Advances in Neural Information Processing Systems38,pp\. 12988–13018\.Cited by:[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p2.1)\.
- W\. Zhong, L\. Guo, Q\. Gao, H\. Ye, and Y\. Wang \(2024\)Memorybank: enhancing large language models with long\-term memory\.InProceedings of the AAAI conference on artificial intelligence,pp\. 19724–19731\.Cited by:[§1](https://arxiv.org/html/2608.05095#S1.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px1.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px2.p1.1),[§2](https://arxiv.org/html/2608.05095#S2.SS0.SSS0.Px3.p1.1),[§4\.1](https://arxiv.org/html/2608.05095#S4.SS1.SSS0.Px2.p1.1)\.

Similar Articles

HeLa-Mem: Hebbian Learning and Associative Memory for LLM Agents

arXiv cs.CL

HeLa-Mem is a bio-inspired memory architecture for LLM agents that models memory as a dynamic graph using Hebbian learning dynamics, featuring episodic and semantic memory stores to improve long-term coherence. Experiments on LoCoMo show superior performance across question categories while using fewer context tokens.