betaFeedback

WorksComputer Science

All-in-One Memory: Process-Rewarded Reinforcement Learning for Memory Agents

Abstract

Large language models increasingly rely on external memory to answer queries grounded in long-horizon histories such as multi-session dialogues and lengthy documents. However, existing memory methods often optimize retrieval and memory construction separately, without a shared reward space for evaluating search, writing, and stopping decisions. To address this, we propose All-in-One Memory (AiO-Mem), which organizes these operations as transitions over a shared evidence state and directly evaluates the semantic quality of each action in a unified reward space. AiO-Mem compiles heterogeneous histories into source-traceable multi-view events, providing a shared substrate for retrieval and memory writing. A unified memory policy actor then rolls out complete interaction trajectories over this shared evidence state. A separate trajectory-conditioned process reward model is trained through evidence-grounded supervised fine-tuning and trajectory-level DPO to assign process scores to the collected trajectories. These scores are aggregated into an action-balanced trajectory reward and used by Process-Aligned DAPO (PA-DAPO) to optimize the memory policy. Across long-context memory benchmarks, AiO-Mem consistently improves answer accuracy over both static memory systems and RL-trained memory agents.

Introduction

Large language models (LLMs) have achieved remarkable progress across diverse natural language processing benchmarks [21, 26]. Yet in long-context, multi-step reasoning scenarios, their static parametric knowledge and limited context windows remain critical bottlenecks [18]. External memory-augmented architectures have therefore become important extensions of LLMs, ranging from dense retrieval systems [17, 6] and knowledge-graph memories [3] to persistent memory agents [22, 1]. Such systems rely on tightly coupled memory retrieval and memory construction: retrieval supplies relevant evidence, while construction converts it into compact working memory. Coordinating these stages is challenging because the evolving memory state continually changes what evidence should be searched for, written, or discarded.

Recent studies have introduced reinforcement learning (RL) into memory systems to enable self-improving memory behavior. As illustrated in Figure 1, existing RL-driven memory systems are typically optimized along two separate routes: retrieval-oriented methods, such as Search-R1 [13], learn how to search for evidence, while construction-oriented methods, such as Mem-α [27], learn when to insert, update, or merge memory entries. However, these methods still optimize retrieval and construction in isolation, leaving the two stages governed by separate objectives and evaluated through partially disconnected feedback signals. This separation exposes two key limitations. First, there is no shared evidence-state space in which retrieved evidence, written memories, and stopping decisions can be jointly evaluated, making it difficult to coordinate whether the system should continue searching, write a memory, skip redundant information, or stop. Second, existing supervision is largely outcome-centered: it assigns rewards to the final answer but provides little process-level credit for the intermediate memory operations that produced it. As a result, trajectories with the same final-answer score may still differ substantially in evidence relevance, memory faithfulness, redundancy control, and stopping sufficiency; answer correctness alone cannot reliably evaluate the semantic quality of memory operations.

Comparison of existing RL-driven memory methods and AiO-Mem

Figure 1. Comparison of existing RL-driven memory methods and AiO-Mem.

To overcome these limitations, we propose All-in-One Memory (AiO-Mem), which unifies memory retrieval and construction as evidence-state transitions of a single memory-interaction agent, and uses a separate trajectory-conditioned reward model to evaluate the resulting trajectories. AiO-Mem first compiles heterogeneous histories into a traceable multi-view event bank, providing a shared source-grounded substrate for retrieval and memory writing. Built on this event bank, the memory policy actor operates over a shared evidence state and rolls out complete interaction trajectories through two sequential decision steps: decide, which determines whether to continue searching or stop, and extract, which determines whether retrieved candidates should be written into working memory or discarded. A unified process reward model is then trained through evidence-grounded SFT and trajectory-level DPO to assign process scores to each action in the collected trajectories, using rule-derived supervision and reasoning-model scores as complementary training signals. Finally, these process scores are aggregated into an action-balanced trajectory reward. Building on DAPO [35], we propose Process-Aligned DAPO (PA-DAPO) to optimize the memory policy actor. We summarize our primary contributions as follows:

  • We propose AiO-Mem, an all-in-one memory agent that unifies retrieval, writing, filtering, and termination within a single evidence-state transition loop. This formulation turns memory retrieval and construction from separately optimized modules into one jointly trainable policy over source-traceable evidence.

  • We introduce a trajectory-conditioned unified reward model that directly assesses the semantic quality of each memory action within a shared evidence state, scoring search, add, skip, and stop in a common reward space. Action-balanced aggregation then converts these scores into a trajectory reward for memory-policy optimization with our proposed PA-DAPO.

  • We conduct extensive experiments on long-context memory benchmarks, where AiO-Mem consistently improves both answer accuracy and reasoning faithfulness over static memory systems and RL-trained memory agents.

Related Work

Memory-Augmented Large Language Models. External memory equips LLMs with nonparametric knowledge beyond their context windows. Early retrieval-augmented models, such as RAG [17] and REALM [6] established dense retrieval as a standard way to ground generation in external evidence. Later systems enrich retrieval with structured or task-specific memory organization: GraphRAG [3], HippoRAG [5], KG-RAG [24], and Emotional RAG [9] incorporate entity graphs, graph traversal, knowledge-graph grounding, or affective similarity. A complementary line studies persistent memory across interactions. MemGPT [22] introduces virtual memory tiers; MemoryBank [37] and Memo [1] maintain user-centric summaries; MemoryOS [15] and LightMem [4] organize memories into tiered or compressed stores; A-Mem [29], Zep [23], Ev-erMemOS [7], LangMem [16], and GAM [30] explore atomic notes, MemCell structures, online consolidation, and iterative evidence gathering. These systems provide increasingly rich retrieval and construction mechanisms, but most coordinate memory operations through predefined workflows, hand-designed heuristics, or modular pipelines rather than a learned policy that jointly optimizes retrieval, writing, filtering, and termination.

Reinforcement Learning for Memory Policies. Recent work has applied RL to memory systems at different stages of the pipeline. Retrieval-oriented methods, including Search-R1 [13], R1-Searcher [25], and DeepRetrieval [12], learn search or retrieval strategies that improve downstream answers. Persistent-memory methods, such as Memory-R1 [31], Mem-α [27], and AtomMem [10], optimize memory insertion, update, merging, or atomic memory management. More recent studies, including FineMem [19], TRUSTMEM [32], and Mem-T [36], move toward process-level supervision for memory use. Despite this progress, most RL-based memory methods either rely primarily on final-answer correctness or provide process feedback within a restricted stage of the memory pipeline. As a result, they do not directly evaluate heterogeneous memory actions within a shared evidence state and a common reward space. AiO-Mem addresses this gap by learning a trajectory-conditioned reward model that assigns process-level semantic scores to different memory actions and uses them to optimize a unified memory policy.

Method

Problem Formulation and Method Overview

Problem Formulation. We study memory-augmented question answering (QA) over long-horizon histories. Let qq be a query and H=(h1,…,hN)\mathcal{H} = (h_1,\ldots,h_N) be its associated history of NN heterogeneous source units, such as dialogue sessions, document passages, or facts. Given (q,H)(q,\mathcal{H}), a memory policy constructs a compact working memory W\mathcal{W} from which a frozen downstream generator y^=G(q,W)\hat{y} = G(q,\mathcal{W}). The learning objective is to acquire an optimal sequence of memory operations that transforms a dispersed history into a reasoning-sufficient evidence state.

Method Overview. As shown in Figure 2, we propose AiO-Mem, a four-component framework that trains a memory policy actor πθ\pi_\theta to construct working memory through sequential evidence-state transitions. AiO-Mem integrates four components for memory construction, interaction modeling, process supervision, and policy optimization: (i) Traceable Multi-View Event Bank (§ 3.2), which compiles H\mathcal{H} into source-traceable event units and provides the retrieval substrate for memory interaction; (ii) Evidence-State Transition Modeling (§ 3.3), which formulates the interaction of πθ\pi_\theta as a finite-horizon MDP over a shared evidence-state space, with four action types organized into a decide step (search or stop) and, after each search, an extract step (add or skip); (iii) Unified Reward Modeling (§ 3.4), which trains a trajectory-conditioned reward model via evidence-grounded SFT and trajectory-level DPO to provide dense per-step process supervision; and (iv) Process-Aligned Policy Optimization (§ 3.5), which aggregates action-typed rewards into a balanced trajectory signal and optimizes πθ\pi_\theta through PA-DAPO.

Figure 2. Overview of our AiO-Mem method.

Traceable Multi-View Event Bank

The source units in H\mathcal{H} often have incompatible granularities: multi-session dialogues are organized as turns, documents may spread a coherent events across multiple paragraphs, and database records are already atomic. Direct fixed-size chunking can therefore break event boundaries and detach memory entries from their source contexts. To preserve event integrity and source traceability, we apply a structure-aware compiler C\mathcal{C} to transform the history into a traceable event bank B=C(H)={em}m=1M\mathcal{B} = \mathcal{C}(\mathcal{H}) = \{e_m\}_{m=1}^{M}. Each event is defined as em=({xmv}v∈V,ℓm)e_m = (\{x_m^v\}_{v\in\mathcal{V}}, \ell_m), where V={raw,sum,anc,phr}\mathcal{V} = \{\mathrm{raw}, \mathrm{sum}, \mathrm{anc}, \mathrm{phr}\} denotes four complementary retrieval views and ℓm=(n,istart,iend)\ell_m = (n, i_{\mathrm{start}}, i_{\mathrm{end}}) is a provenance locator that anchors the event to its source unit hnh_n. Specifically, The compiler first partitions H\mathcal{H} along topic-shift boundaries, then constructs four views for each event. The raw view xmrawx_m^{\mathrm{raw}} preserves lexical details, summary xmsumx_m^{\mathrm{sum}} captures macroscopic semantic coherence, query-anchor xmancx_m^{\mathrm{anc}} encodes hypothetical queries the event can answer, and event-phrase xmphrx_m^{\mathrm{phr}} provides a dense, low-noise semantic label.

Since no single representation captures lexical, semantic, and query-intent cues simultaneously, for each search query utu_t issued by the πθ\pi_\theta, we fuse view-specific rankings via equal-weight Reciprocal Rank Fusion [2]:

score⁡(em∣ut)=∑v∈V1κ+rank⁡v(em∣ut),\operatorname{score}(e_m \mid u_t) = \sum_{v\in\mathcal{V}} \frac{1}{\kappa+ \operatorname{rank}_v(e_m \mid u_t)},

where κ>0\kappa> 0 is a smoothing constant. Dense retrieval is used for xsumx^{\mathrm{sum}} and xphrx^{\mathrm{phr}}, BM25 for xancx^{\mathrm{anc}}, and a hybrid of both for xrawx^{\mathrm{raw}}. The retrieval operator returns the top-KretK_{\mathrm{ret}} events as candidate list R(ut)\mathcal{R}(u_t), with each retaining its locator ℓm\ell_m for source-verifiable memory writing and reward evaluation.

Evidence-State Transition Modeling

A single retrieval pass is often insufficient when the answer depends on evidence scattered across the history. We therefore formulate memory interaction as a finite-horizon Markov Decision Process (MDP) over evidence states. The memory policy actor πθ\pi_\theta sequentially selects memory operations and the process is specified by a state space S\mathcal{S}, an action space A\mathcal{A}, a deterministic transition function F\mathcal{F}, and a maximum horizon Tmax⁡T_{\max}.

At step t∈{1,…,T}t \in\{1,\ldots,T\}, the evidence state is zt=(q,Wt,Rt)∈Sz_t = (q,\mathcal{W}_t,\mathcal{R}_t) \in\mathcal{S}, where qq is the query, Wt\mathcal{W}_t is the current working memory, Rt\mathcal{R}_t is the latest candidate list, and mt∈{decide,extract}m_t \in\{\mathrm{decide},\mathrm{extract}\} indicates the current decision mode. The memory policy actor samples an action at∼πθ(⋅∣zt)a_t \sim\pi_\theta(\cdot\mid z_t) under a mode-specific action mask, and ct=type⁡(at)c_t = \operatorname{type}(a_t) denotes its action type. In the decide mode, the policy chooses either search(ut)(u_t), which issues a search query utu_t to the event bank and retrieves R(ut)\mathcal{R}(u_t), or stop, which terminates the episode. After a search, the process enters the extract mode, where the policy chooses either add(nt)(n_t), which appends a source-bound note ntn_t to the working memory, or skip, which discards the current candidates. This constrained structure prevents invalid operations, such as adding a note before retrieval or issuing a new search before deciding whether to use the current candidates. The four action types {search,add,skip,stop}\{\mathrm{search},\mathrm{add},\mathrm{skip},\mathrm{stop}\} induce the following deterministic transitions:

zt+1=F(zt,at;B)={(q,Wt,R(ut)),ct=search(q,Wt⊕[nt],Rt),ct=add(q,Wt,()),ct=skip(q,Wt,Rt),ct=stop(1)z_{t+1} = \mathcal{F}(z_t,a_t;\mathcal{B}) = \begin{cases} (q,\mathcal{W}_t,\mathcal{R}(u_t)), & c_t = \mathrm{search}\\ (q,\mathcal{W}_t \oplus[n_t],\mathcal{R}_t), & c_t = \mathrm{add}\\ (q,\mathcal{W}_t,()), & c_t = \mathrm{skip}\\ (q,\mathcal{W}_t,\mathcal{R}_t), & c_t = \mathrm{stop} \end{cases} \tag*{(1)}

The episode ends when the memory policy actor selects stop, or when the maximum horizon Tmax⁡T_{\max} is reached. The final working memory is passed to the frozen generator to produce y^=G(q,WT)\hat{y} = \mathcal{G}(q,\mathcal{W}_T). Each interaction trajectory is written as τ=(z1,a1,…,zT,aT,zT+1)\tau= (z_1,a_1,\ldots,z_T,a_T,z_{T+1}), and the collected trajectories form Dtraj\mathcal{D}_{\mathrm{traj}}, which is used for subsequent reward modeling and policy optimization.

Unified Reward Modeling

Final-answer correctness provides only terminal feedback and can not identify which memory operations make a trajectory useful. We therefore train a generative reward model Jϕ\mathcal{J}_{\phi} to assign dense per-step process rewards in complete memory trajectories. Unlike the memory policy actor, Jϕ\mathcal{J}_{\phi} evaluates the resulting actions and provides process supervision without affecting state transitions.

Stage 1: Evidence-grounded SFT. Let E⋆E^{\star} denote the gold evidence spans and Src⁡(⋅)\operatorname{Src}(\cdot) the provenance projection that maps an event or note to its referenced raw source spans. At step tt, the uncovered gold evidence is Etmiss=E⋆∖Src⁡(Wt)E^{\mathrm{miss}}_{t}=E^{\star}\setminus\operatorname{Src}(W_t). For a search action, the newly exposed gold evidence is Δtret=Etmiss∩Src⁡(R(ut))\Delta^{\mathrm{ret}}_{t}=E^{\mathrm{miss}}_{t}\cap\operatorname{Src}(R(u_t)), and for add action, the newly commits gold evidence is Δtwrite=Etmiss∩Src⁡(nt)\Delta^{\mathrm{write}}_{t}=E^{\mathrm{miss}}_{t}\cap\operatorname{Src}(n_t). We use action-specific deterministic rules over these evidence-grounded information to compute a step-level rule score rtruler^{\mathrm{rule}}_{t} for each action type c∈Ac\in\mathcal{A}. For each trajectory τ\tau produced by the memory policy actor, we serialize the trajectory as xτ=Serialize⁡(y⋆,E⋆,τ)x_{\tau}=\operatorname{Serialize}(y^{\star},E^{\star},\tau), and fine-tune Jϕ\mathcal{J}_{\phi} on the rule reward sequence vbrule={(ct,rtrule)}v^{\mathrm{rule}}_{b}=\{(c_t,r^{\mathrm{rule}}_t)\}:

LSFT(ϕ)=−1∑bLbRM∑b∑tlog⁡pϕ(vb,trule∣xb,vb,<trule)(2)\mathcal{L}_{\mathrm{SFT}}(\phi)=-\frac{1}{\sum_b L^{\mathrm{RM}}_b}\sum_b\sum_t\log p_{\phi}(v^{\mathrm{rule}}_{b,t}\mid x_b,v^{\mathrm{rule}}_{b,<t}) \tag*{(2)}

where LbRML^{\mathrm{RM}}_b the target token length, and pϕp_{\phi} the autoregressive output distribution of Jϕ\mathcal{J}_{\phi}.

Stage 2: Trajectory-level DPO alignment. Rule-derived scores provide action-level supervision based on evidence coverage and provenance, but do not directly assess the semantic quality of an action in its current evidence state. We therefore provide a reasoning-capable model with the full trajectory context xτx_{\tau} and have it independently score each step via chain-of-thought reasoning, producing vbCoTv^{\mathrm{CoT}}_b. We treat vb+=vbCoTv^{+}_b=v^{\mathrm{CoT}}_b as chosen and vb−=vbrulev^{-}_b=v^{\mathrm{rule}}_b as rejected, forming preference dataset Dpref={(xb,vb+,vb−)}\mathcal{D}_{\mathrm{pref}}=\{(x_b,v^{+}_b,v^{-}_b)\}, and minimize the DPO loss with frozen reference ϕref\phi_{\mathrm{ref}} and strength β>0\beta>0:

LDPO(ϕ)=−E[log⁡sigmoid⁡(βlog⁡pϕ(v+∣x)pϕref(v+∣x)−βlog⁡pϕ(v−∣x)pϕref(v−∣x))](3)\mathcal{L}_{\mathrm{DPO}}(\phi)=-\mathbb{E}\left[\log\operatorname{sigmoid}\left(\beta\log\frac{p_{\phi}(v^{+}\mid x)}{p_{\phi_{\mathrm{ref}}}(v^{+}\mid x)}-\beta\log\frac{p_{\phi}(v^{-}\mid x)}{p_{\phi_{\mathrm{ref}}}(v^{-}\mid x)}\right)\right] \tag*{(3)}

After training, Jϕ\mathcal{J}_{\phi} directly outputs {(ct,r^t)}t=1T\{(c_t,\hat{r}_t)\}_{t=1}^{T}, where r^t∈R\hat{r}_t\in\mathbb{R} assesses the semantic quality of action ctc_t in its current evidence state.

Process-Aligned Memory Policy Optimization

AiO-Mem unifies heterogeneous memory action types within a shared evidence-state transition process. We aggregate their step-level rewards into an action-balanced trajectory signal, averaging within action types before integrating across types. For each category c∈Ac\in\mathcal{A}, let Ic(τ)={t:ct=c}\mathcal{I}_c(\tau)=\{t:c_t=c\} be the steps where cc occurs, rˉc(τ)=∣Ic(τ)∣−1∑t∈Ic(τ)r^t\bar{r}_c(\tau)=|\mathcal{I}_c(\tau)|^{-1}\sum_{t\in\mathcal{I}_c(\tau)}\hat{r}_t the within-category mean, and gc(τ)=(r−τclo)/(rchi−rclo)g_c(\tau)=(r-\tau_c^{\mathrm{lo}})/(r_c^{\mathrm{hi}}-r_c^{\mathrm{lo}}) a normalization to [0,1][0,1] using the rubric bounds rclor_c^{\mathrm{lo}} and rchir_c^{\mathrm{hi}}. Denoting by A(τ)={c∈A:Ic(τ)≠∅}\mathcal{A}(\tau)=\{c\in\mathcal{A}:\mathcal{I}_c(\tau)\ne\varnothing\} the categories present in τ\tau, the unified trajectory reward is:

RAiO(τ)=1∣A(τ)∣∑c∈A(τ)gc(rˉc(τ))(4)R_{\mathrm{AiO}}(\tau)=\frac{1}{|\mathcal{A}(\tau)|}\sum_{c\in\mathcal{A}(\tau)}g_c(\bar{r}_c(\tau)) \tag*{(4)}

PA-DAPO. We optimize the memory policy actor πθ\pi_{\theta} with our proposed PA-DAPO. Building on DAPO (Yu et al. [35]), AiO-Mem extends the loss computation from the conventional (group, token) structure to a new (group, action, token) hierarchy over trajectories. Formally, let DRL\mathcal{D}_{\mathrm{RL}} denote the distribution of query–history pairs used for policy optimization. For (q,H)∼DRL(q,\mathcal{H})\sim\mathcal{D}_{\mathrm{RL}}, the old memory policy actor samples GG trajectories {τj}\{\tau_j\} with rewards Rj=RAiO(τj)R_j=R_{\mathrm{AiO}}(\tau_j). The group-relative advantage A^j=(Rj−μ)/σ\hat{A}_j=(R_j-\mu)/\sigma is computed from the within-group mean μ\mu and standard deviation σ\sigma. Let ρj,k,t\rho_{j,k,t} denote the policy-generated token of the kk-th action step in τj\tau_j, hj,k,th_{j,k,t} the preceding context, and Lj,kL_{j,k} the step’s token count. PA-DAPO maximizes:

JPA−DAPO(θ)=E[∑j∑k∑tΓj,k,t(θ)∑j∑kLj,k],σ>0(5)\mathcal{J}_{\mathrm{PA-DAPO}}(\theta)=\mathbb{E}\left[\frac{\sum_j\sum_k\sum_t\Gamma_{j,k,t}(\theta)}{\sum_j\sum_k L_{j,k}}\right],\qquad\sigma>0 \tag*{(5)}

where Γj,k,t(θ)=min⁡(ρj,k,tA^j,clip⁡(ρj,k,t,1−ϵlow,1+ϵhigh)A^j)\Gamma_{j,k,t}(\theta)=\min(\rho_{j,k,t}\hat{A}_j,\operatorname{clip}(\rho_{j,k,t},1-\epsilon_{\mathrm{low}},1+\epsilon_{\mathrm{high}})\hat{A}_j) is the clipped surrogate, ρj,k,t(θ)=πθ(oj,k,t∣hj,k,t)/πθold(oj,k,t∣hj,k,t)\rho_{j,k,t}(\theta)=\pi_{\theta}(o_{j,k,t}\mid h_{j,k,t})/\pi_{\theta_{\mathrm{old}}}(o_{j,k,t}\mid h_{j,k,t}) the token-level importance ratio, and ϵlow,ϵhigh\epsilon_{\mathrm{low}},\epsilon_{\mathrm{high}} the clipping bounds. The constraint σ>0\sigma> 0 retains only queries with reward variation, filtering fully converged samples. Operating on an action-balanced trajectory reward rather than binary answer correctness, PA-DAPO provides a graded training signal for end-to-end policy optimization.

Experiment

Experimental Setting

Datasets and Evaluation. We evaluate AiO-Mem on three complementary memory benchmarks, including LoCoMo [20], MemoryAgentBench [8], and PersonaMem [11]. LoCoMo evaluates long-range conversational memory across multi-session interactions. Following MEM-T [36], we adopt the same data configuration by splitting the LoCoMo dataset into training, validation, and test sets with a ratio of 1:1:8 to ensure a fair comparison. MemoryAgentBench evaluates memory agents under incremental multi-turn interactions across diverse tasks. Following Fine-Mem [19], we adopt the same evaluation scope and baselines to assess out-of-distribution generalization. PersonaMem further extends evaluation from factual memory to dynamic user profiling. More details are shown in Appendix § 13.§ 1.

Baselines. Twenty systems in three groups. ① Reference: Long-Context and RAG. ② Agent Memory Harness: MemGPT [22], MemoryBank [37], Mem0 [1], MemoryOS [15], LightMem [4], A-Mem [29], GAM [30], Zep [23], LangMem [16], EverMemOS [7], and Emotional RAG [9]. ③ RL-Trained Method: MEM1 [38], MemAgent [34], Mem-T [36], Atom-Mem [10], Mem-α\alpha [27], FineMem [19], and Trust-Mem [32]. Details are provided in Appendix § 13.§ 1.

Experimental Details. We instantiate AiO-Mem with Qwen3-8B as the reward model and Qwen3-4B as the memory policy actor. BGE-M31 and BM25 are used for multi-view event retrieval. For policy training, we set Kret=10K_{\mathrm{ret}} = 10, Tmax⁡=8T_{\max} = 8. For reward-model SFT, we train for 2 epochs with a batch size of 8 and a learning rate of 1×10−41 \times10^{-4}. Trajectory-level DPO is then performed for 1 epoch with a batch size of 8, a learning rate of 2×10−62 \times10^{-6}, and β=0.1\beta= 0.1. For PA-DAPO, we sample 8 trajectories per query and optimize the memory policy with a learning rate of 2×10−52 \times10^{-5}. More training setup and parameter configurations are listed in Appendix § 13.§ 2.

Main Results

LoCoMo. As shown in Table 1, AiO-Mem achieves the strongest overall performance and consistently outperforms competing methods across diverse question types. The gains span both evidence-intensive reasoning and direct memory queries, reflecting a coherent improvement pattern rather than isolated advantages on specific categories. In contrast, existing memory systems exhibit more uneven performance across different reasoning demands. These results suggest that jointly modeling heterogeneous memory actions under shared evidence states and unified process supervision enables more reliable memory interaction throughout the reasoning process.

MethodMulti-hop F1Multi-hop B1Temporal F1Temporal B1Open-domain F1Open-domain B1Single-hop F1Single-hop B1Overall F1Overall B1
Reference
Long-Context23.216.819.013.413.910.740.731.531.523.9
RAG23.517.143.137.420.214.949.544.941.636.5
Agent Memory Harness
MemGPT16.714.012.610.911.69.214.011.814.111.8
MemoryBank25.519.49.27.416.412.426.717.722.315.7
Mem035.427.446.839.526.621.047.340.743.736.8
MemoryOS35.227.341.032.722.117.948.442.642.836.3
LightMem30.825.844.740.718.914.443.838.840.035.3
A-Mem27.221.143.936.015.412.744.638.339.433.0
GAM32.228.726.322.518.514.532.225.530.224.8
Trained Method
MEM119.015.630.523.514.211.427.522.125.720.5
MemAgent27.922.737.931.920.316.535.929.633.828.0
Mem-T45.136.665.160.133.028.963.858.058.752.6
Ours
AiO-Mem47.138.866.059.433.730.567.061.561.055.0

Table 1. Main results on LoCoMo.

MemoryAgentBench. As shown in Figure 3, AiO-Mem achieves the strongest overall performance across MemoryAgentBench, with gains that form a consistent pattern across retrieval, test-time learning, and long-range understanding. It achieves an average score of 74.7 across the nine tasks, outperforming Fine-Mem, the strongest baseline, by 8.3 points. Compared with the best competing result on each task, AiO-Mem improves LME(S), TREC-F, and InfBench by 12.6, 19.0, and 4.5 points, respectively. Such gains across heterogeneous task formats demonstrate strong out-of-distribution generalization beyond the LoCoMo training setting. This further supports the design of AiO-Mem for generalizable memory interaction.

Figure 3. Main results on MemoryAgentBench.

PersonaMem. AiO-Mem achieves the best overall performance on PersonaMem, surpassing the strongest baseline by 3.9 points and demonstrating stronger long-term user profiling and personalization. More details are shown in Appendix C.1.

Ablation Study

To examine the contribution of each component in AiO-Mem, we conduct ablation experiments by removing individual modules, as shown in Table 2. Removing Event Compilation (w/o Event Comp.) or Multi-view Retrieval (w/o Multi-view Ret.) consistently degrades performance, showing that structured event organization and complementary retrieval cues provide a reliable evidence basis for memory interaction. Removing Working-Memory Construction (w/o WM Constr.) causes the most substantial degradation, highlighting its role in progressively transforming retrieved evidence into reasoning-sufficient working memory. For Unified Reward Modeling, removing Evidence-Grounded SFT (w/o Evid. SFT) weakens performance, demonstrating the importance of evidence-based supervision for establishing reliable process rewards. Further removing Trajectory-Level DPO (w/o Traj. DPO) also leads to consistent degradation, showing that trajectory-level alignment improves reward estimation beyond rule-based supervision. Overall, AiO-Mem achieves the best performance by jointly integrating these components within a unified memory-interaction framework.

MethodMulti-hop F1Multi-hop B1Temporal F1Temporal B1Open-domain F1Open-domain B1Single-hop F1Single-hop B1Overall F1Overall B1
Base Model39.330.965.058.425.921.961.356.155.8 (-5.2)49.8 (-5.2)
Memory Representation and Interaction Ablations
w/o Event Comp.43.234.666.961.027.222.664.358.758.6 (-2.4)52.5 (-2.5)
w/o Multi-view Ret.41.333.465.860.429.524.464.258.658.1 (-2.9)52.1 (-2.9)
w/o WM Constr.33.226.457.050.924.320.057.652.350.9 (-10.1)45.2 (-9.8)
Unified Reward Modeling Ablations
w/o Evid. SFT41.433.668.460.628.624.562.957.457.9 (-3.1)51.6 (-3.4)
w/o Traj. DPO43.435.266.559.534.229.964.058.458.8 (-2.2)52.6 (-2.4)
AiO-Mem47.138.866.059.433.730.567.061.561.055.0

Table 2. Ablation on LoCoMo. Row abbreviations: Event Comp. = Event Compilation, Multi-view Ret. = Multi-view Retrieval, WM Constr. = Working-Memory Construction, Evid. SFT = Evidence-Grounded SFT, and Traj. DPO = Trajectory-Level DPO. Red values denote drops over AiO-Mem.

Analysis of Complexity and Sensitivity

Complexity Analysis. Existing memory systems repeatedly summarize and rewrite accumulated memories, incurring a history-dependent cost of O(Nℓ+NM1R1)CLLMO(N\ell+ NM_1R_1)C_{\mathrm{LLM}}. In contrast, AiO-Mem decouples persistent storage from query-time working-memory construction. The event bank B\mathcal{B} is built in a single pass, while query-time reasoning is bounded by KretK_{\mathrm{ret}} and Tmax⁡T_{\max}, yielding O(Nℓ+Tmax⁡Kretℓe)CLLMO(N\ell+ T_{\max}K_{\mathrm{ret}}\ell_e)C_{\mathrm{LLM}}. By bounding the working context to a constant size, AiO-Mem transforms a history-dependent scaling cost into a local, horizon-bounded overhead that remains invariant to the stream length. Empirically, this decoupling mechanism reduces retrieval and construction token consumption by 79.9% and 73.8% respectively, bypassing the active memory maintenance bottleneck of traditional architectures. Detailed derivations are provided in Appendix § 16.

Sensitivity Analysis. We further examine the robustness of AiO-Mem to two key hyperparameters, the retrieval width KretK_{\mathrm{ret}} and maximum interaction horizon Tmax⁡T_{\max}. As shown in Figure 4, performance remains relatively stable across configurations, while increasing either parameter yields no consistent gains. A moderate retrieval width provides sufficient evidence coverage without introducing excessive irrelevant candidates, while an appropriate interaction horizon enables effective multi-step memory interaction without redundant actions. The configuration (Kret,Tmax⁡)=(10,8)(K_{\mathrm{ret}}, T_{\max}) = (10, 8) achieves the strongest overall performance, suggesting that AiO-Mem benefits from a balanced retrieval and interaction budget. Detailed F1 and B1 results are provided in Appendix D.1.

Figure 4. Parameter analysis on LoCoMo over top-KK (K∈{5,10,15}K \in\{5, 10, 15\}) and maximum interaction steps Tmax⁡∈{4,6,8,10}T_{\max} \in\{4, 6, 8, 10\}, reporting F1 across four question types (MH = Multi-hop, Tmp = Temporal, OD = Open-domain, SH = Single-hop) and overall. To facilitate comparison, all values are normalized for visualization on the chart.

Case Study

To further illustrate the advantage of AiO-Mem over Mem-T, Figure 5 presents two memory-interaction cases. In Example (a), Mem-T incorrectly binds “she is 5 years old” to Deborah rather than Luna during memory construction. Although relevant evidence is retrieved, the incorrect binding is retained in memory and leads to an incorrect assessment. In contrast, AiO-Mem retrieves source-grounded evidence and constructs a working-memory note that preserves the correct entity relation. In Example (b), Mem-T conflates the temporally distinct robotics and water-purifier projects, causing the assessment to overlook the query-time cutoff and select evidence from a later event. AiO-Mem instead retrieves dated evidence and preserves its temporal relation during working-memory construction, leading to the correct answer. These cases show that AiO-Mem improves memory interaction by jointly coordinating retrieval and construction under shared evidence states and process-level supervision, preventing errors from propagating into later reasoning.

Two cases between the MEM-T and our AiO-Mem method

Figure 5. Two cases between the MEM-T and our AiO-Mem method.

Additional Ablations in Appendix

We further examine AiO-Mem across the following key dimensions. (i) Multi-View Retrieval Complementarity and Sensitivity. The four retrieval views provide complementary evidence coverage, jointly covering 97.03% of question–evidence pairs while remaining robust to retrieval configurations and context cost (Appendix § 14.§ 3, Appendix § 14.§ 4). (ii) Unified Reward Alignment. The trained reward model shows stronger correlations with evidence Recall and Precision, better reflecting evidence-grounded trajectory quality (Appendix § 15.§ 1). (iii) Trajectory-level DPO Alignment Study. We visualize how trajectory-level DPO distinguishes trajectories with identical Evidence-ID metrics through finer-grained semantic judgments (Appendix § 15.§ 2). (iv) Training Dynamics. Overall, consistent gains across Search, Extract, and Answer-Decision rewards indicate stable PA-DAPO training and coordinated step-wise optimization (Appendix § 15.§ 3). (v) Process-Aligned Evidence Flow. PA-DAPO improves evidence retrieval, working-memory quality, and Answer F1 across the full pipeline (Appendix § 15.§ 4).

Conclusion

Existing memory systems often optimize retrieval and memory construction separately, making it difficult to coordinate heterogeneous memory operations under a shared objective. To address this, we introduce AiO-Mem, which unifies retrieval, writing, filtering, and termination as transitions over a shared evidence state, and learns a trajectory-conditioned reward model to provide process-level supervision for memory-policy optimization. Experiments across long-context memory benchmarks show that AiO-Mem consistently outperforms both static memory systems and RL-trained memory agents, with strong out-of-distribution generalization beyond conversational QA. These results highlight the promise of an All-in-One formulation for learning reliable and generalizable memory interaction in LLM agents.

AI USE STATEMENT

LLMs were used to generate data and to evaluate memory-interaction trajectories as judges, as described in the paper. The core method development in this paper does not involve LLM usage. We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI.

ETHICS STATEMENT

AiO-Mem organizes long interaction histories into retrievable events and constructs query-specific working memory. Although this can improve an agent’s ability to use historical evidence, such histories may contain sensitive information. Retaining source-linked events may increase the risk of inappropriate access to or disclosure of that information. Inaccurate or biased information in a history may also be retrieved and propagated into later answers. Our experiments use the existing LoCoMo, MemoryAgentBench, and PersonaMem benchmarks. Deployment with real user histories would require appropriate safeguards for user consent, data access, retention and deletion, as well as mechanisms for identifying and correcting inaccurate memories.

REPRODUCIBILITY STATEMENT

The method is described in § 3. Appendix § 13 provides the experimental details. Prompts and memory-agent tool calls are provided in Appendix § 17. To support reproducibility, we will release our code on GitHub.

REFERENCES

Appendix Overview and Organization

This appendix provides supplementary details to support and extend the main paper. The organization of the appendix is as follows:

  1. Additional Related Work (Section B): This section provides further discussion of memory-augmented large language models and reinforcement learning methods for memory policies, with particular emphasis on persistent memory management and process-level memory optimization.

  1. Experimental Setup and Supplementary Experiments (Sections C and D): These sections describe the datasets, baselines, and implementation details, and provide additional experiments on parameter sensitivity, PersonaMem, multi-view retrieval complementarity, and inference-time retrieval configurations.

  1. Reward, Optimization, and Efficiency Analysis (Sections E and F): These sections further analyze reward alignment, qualitative reward cases, PA-DAPO training dynamics, evidence flow through the memory pipeline, as well as the computational complexity and inference efficiency of AiO-Mem.

  1. Prompts and Tool Calls (Section G): This section provides the memory-agent tool definitions and prompt templates used for memory interaction and stepwise reward modeling, supporting reproducibility of the proposed framework.

Related Work

Additional Discussion on Memory-Augmented Large Language Models

Memory-augmented language models have evolved from external retrieval toward persistent and structured memory management. Early retrieval-augmented methods, including RAG [17] and REALM [6], introduce non-parametric knowledge through dense retrieval, while subsequent systems such as GraphRAG [3], HippoRAG [5], KG-RAG [24], and Emotional RAG [9] enrich retrieval with graph structures, multi-step exploration, or task-specific similarity signals. These methods primarily focus on improving how external evidence is accessed for a given query. Another line of work develops persistent memory across interactions. MemGPT [22], MemoryBank [37], and Mem0 [1] introduce explicit mechanisms for storing, updating, and maintaining long-term information, while MemoryOS [15] and LightMem [4] improve scalability through hierarchical storage and lightweight consolidation. More recent systems, including A-Mem [29], Zep [23], EverMemOS [7], LangMem [16], and GAM [30], further explore atomic memory units, temporal structures, background consolidation, and iterative evidence gathering. These methods substantially expand the capabilities of long-term memory systems in construction, organization, updating, and retrieval. However, the individual operations are still largely coordinated through predefined workflows, prompts, or heuristic rules, rather than being jointly optimized according to their contribution to downstream evidence acquisition.

Additional Discussion on Reinforcement Learning for Memory Policies

Reinforcement learning has increasingly been introduced to replace manually specified memory behaviors with learned policies. Early efforts mainly focus on retrieval, where Search-R1 [13], R1-Searcher [25], and DeepRetrieval [12] optimize multi-step search, tool invocation, or query generation through task- or retrieval-oriented rewards. Another line applies RL to recurrent memory states: MEM1 [38] and MemAgent [34] learn to continually compress or overwrite bounded memory representations over long contexts and propagate downstream rewards to preceding memory decisions. Persistent-memory methods such as Memory-R1 [31], Mem-α [27], and AtomMem [10] further extend the learned policy from memory construction and updating toward broader combinations of reading, editing, and answering. More recent work introduces finer-grained supervision to improve credit assignment across long memory-operation sequences. Fine-Mem [19] and TRUSTMEM [32] provide localized feedback for memory construction or updating through intermediate QA signals, downstream usage, or verifier-based evaluation, while keeping retrieval or reasoning largely fixed. Mem-T [36] further connects memory formation, evolution, and multi-step retrieval by evaluating retrieval trajectories and propagating later retrieval outcomes back to earlier construction decisions. These methods move toward process-aware memory optimization, but their process feedback typically targets specific memory stages or estimates the contribution of earlier actions from later outcomes. In contrast, AiO-Mem unifies memory interactions as transitions over a shared evidence state and uses a trajectory-conditioned reward model to directly assess the semantic quality of each memory action in a unified reward space, enabling coordinated optimization of retrieval and construction.

Experiment details

Datasets and baselines

Datasets The LoCoMo dataset [20] targets the evaluation of long-range conversational memory. It features extremely long dialogues, with each conversation spanning roughly 300 turns and around 9K tokens on average. The accompanying questions cover four categories—Single-hop, Multi-hop, Temporal, and Open-domain—capturing different aspects of memory and reasoning in LLMs. Following the evaluation setup of previous work, we report F1 and BLEU-1 (B1) scores for each category as well as the overall performance.

MemoryAgentBench [8] targets the evaluation of memory agents under incremental, multi-turn interactions. In our experiments, we evaluate three memory capabilities—Accurate Retrieval, Test-Time Learning, and Long-Range Understanding—using nine tasks from the benchmark. The selected tasks include SH-Doc QA (SH-Doc), MH-Doc QA (MH-Doc), Long-MemEval (LME(S)), TREC Coarse (TREC-C), NLU, TREC Fine (TREC-F), CLINC150 (CLINC), BANKING77 (Banking), and ∞\inftyBench-Sum (InfBench).

The PersonaMem benchmark [11] targets the evaluation of dynamic user profiling and personalized response generation over long-term user–LLM interactions. Unlike factual memory benchmarks that primarily focus on retrieving explicitly stated information from past interactions, PersonaMem emphasizes user-profile memory, requiring models to infer, maintain, and update users’ preferences and underlying traits over time. In our experiments, we evaluate five query types corresponding to five dimensions: Recall User-Shared Facts (Rec.), Generalize to New Scenarios (Gen.), Track Full Preference Evolution (Evol.), Revisit Reasons Behind Preference Updates (Reason), and Provide Preference-Aligned Recommendations (Reco.). Together, these query types assess whether a memory system can recover user-specific facts, generalize learned preferences to new situations, track evolving preferences, reason about the causes of preference changes, and provide recommendations aligned with the user’s current profile.

Baselines. We compare AiO-Mem against several representative baselines across three groups. 1 Reference: Long-Context and RAG. 2 Agent Memory Harness: MemGPT [22], MemoryBank [37], Mem0 [1], MemoryOS [15], LightMem [4], A-Mem [29], GAM [30], Zep [23], LangMem [16], EverMemOS [7], and Emotional RAG [9]. These approaches equip a frozen backbone model with explicit memory storage, retrieval, summarization, organization, or update mechanisms. 3 Trained Method: MEM1 [38], MemAgent [34], Mem-T [36], AtomMem [10], Mem-α\alpha [27], FineMem [19], and Trust-Mem [32]. Compared with agent memory harnesses, these baselines either learn memory-oriented agent behaviors or benefit from stronger post-trained reasoning capabilities. To ensure a fair comparison, we follow the same baseline configurations as prior work [36, 19].

Implementation Details

For traceable multi-view event bank and evidence-state transition modeling, we use Qwen3-8B as the structure-aware compiler CC, dense retrieval for the summary and event-phrase views, BM25 for the query-anchor view, and a combination of BM25 and dense retrieval for the raw-turn view. We use BGE-M32 as the embedding model. We set the maximum interaction horizon to Tmax⁡=8T_{\max}=8 and the observation text budget to 10,240 tokens for evidence extraction.

For unified reward modeling, we construct the training data from policy rollouts. We use Qwen3-8B as the reward model. We filter low-quality and near-duplicate samples using BGE-M3 similarity, then apply agglomerative clustering (Johnson, [14]; Ward, [28]) to improve diversity and retain at most 10 representative trajectories per question. This yields 1,248 evidence-grounded SFT examples covering 150 questions and 4,162 scoreable steps, with the selected trajectories spanning diverse behavioral regions as shown in Figure 6. We derive action-specific rule scores for retrieval, note construction, citation, and stopping, prioritizing recall of missing evidence over evidence precision. We then fine-tune the reward model with LoRA SFT for 2 epochs using a global batch size of 8, a learning rate of 1×10−41 \times10^{-4}, and LoRA rank, alpha, and dropout of 32, 64, and 0.05. For trajectory-level DPO alignment, we use DeepSeek-V4-Flash3 to review scoreable steps and retain cases differing from the rule-based score by one quality level, yielding 358 preference pairs from 296 trajectories and 102 questions. Human evaluation on 100 sampled steps shows strong agreement with DeepSeek-V4-Flash (ICC =0.87=0.87). Finally, the reward model is further optimized with DPO for one epoch using a batch size of 8, a learning rate of 2×10−62 \times10^{-6}, and β=0.1\beta=0.1.

Reward-model trajectories by behavioral region in t-SNE space

Figure 6. Reward-model trajectories by behavioral region in t-SNE space.

For process-aligned policy optimization, we use Qwen3-4B as the memory policy actor. We first aggregate step-level score with the action-balanced trajectory reward so that repeated search and add operations do not dominate less frequent but decisive actions such as stop. For reward normalization, we set rclo=1r_c^{lo}=1 and rchi=100r_c^{hi}=100 for every c∈Ac \in A. Following MEM-T (Yue et al., [36]), we adopt the same data configuration by splitting the LoCoMo dataset into training, validation, and test sets with a ratio of 1:1:8 to ensure a fair comparison. During training, we set the retrieval width to Kret=10K_{\mathrm{ret}}=10, the maximum interaction horizon to Tmax⁡=8T_{\max}=8, and the number of rollouts to 8. The policy is optimized with LoRA using a learning rate of 2×10−52 \times10^{-5}, with the LoRA rank and alpha set to 32 and 64, respectively. We use Qwen3-4B as the answer model (fine-tuned on our LoCoMo training split for LoCoMo) and enable thinking mode during inference. All experiments are conducted on a single node with 8 × NVIDIA A6000 GPUs (40 GB each), with a training batch size of 8. Detailed prompts are provided in Appendix G.

Supplementary Experiments

Sensitivity Analysis

Table 3 reports the detailed F1 and B1 results for all evaluated top-KK values and maximum interaction steps Tmax⁡T_{\max} on LoCoMo. Models trained with different KK and Tmax⁡T_{\max} settings consistently achieve strong performance, demonstrating the generalizability of our method across training budgets. Overall F1 is highest at K=10K=10, Tmax⁡=8T_{\max}=8, which we adopt as our configuration.

top-KKMax StepMulti-hop F1Multi-hop B1Temporal F1Temporal B1Open-domain F1Open-domain B1Single-hop F1Single-hop B1Overall F1Overall B1
K=5K = 5Tmax⁡=4T_{\max} = 444.635.766.259.630.325.662.757.358.051.8
Tmax⁡=6T_{\max} = 643.535.462.453.334.930.965.961.559.253.2
Tmax⁡=8T_{\max} = 844.036.663.955.734.430.365.460.959.253.5
Tmax⁡=10T_{\max} = 1043.035.161.953.133.529.365.861.158.852.8
K=10K = 10Tmax⁡=4T_{\max} = 443.635.663.454.633.730.265.960.959.353.3
Tmax⁡=6T_{\max} = 646.938.166.560.632.429.666.161.260.754.9
Tmax⁡=8T_{\max} = 847.138.866.059.433.730.567.061.561.055.0
Tmax⁡=10T_{\max} = 1043.535.366.159.233.028.965.960.159.853.4
K=15K = 15Tmax⁡=4T_{\max} = 443.535.461.252.032.629.266.561.959.153.0
Tmax⁡=6T_{\max} = 643.535.763.353.634.830.965.861.059.353.0
Tmax⁡=8T_{\max} = 845.536.765.760.631.228.266.560.960.354.4
Tmax⁡=10T_{\max} = 1045.136.165.058.830.626.965.860.559.653.6

Table 3. Parameter analysis on LoCoMo with different top-KK values and maximum interaction steps Tmax⁡T_{\max}.

Additional Results on PersonaMem

We further conduct experiments on PersonaMem (Jiang et al. [11]). It evaluates the ability of memory systems to maintain and use dynamic user profiles over long-term interactions. As shown in Table 4, AiO-Mem achieves the best overall performance with an overall score of 0.692. In contrast, existing memory systems show less balanced performance across different capabilities. A-MEM performs well on reasoning and recommendation but is weaker on generalization and preference evolution. Mem-T achieves competitive performance on recall and generalization but performs less effectively on preference-aligned recommendation. These results suggest that the unified memory interaction in AiO-Mem enables effective retrieval, organization, and use of user-profile information from long-term interaction histories.

MethodRec.Gen.Evol.ReasonReco.Overall
Claude 3.7-Sonnet25.029.045.057.043.040.0
Mem032.157.954.780.852.753.4
Zep35.342.134.550.536.439.1
LangMem31.38.853.281.840.046.4
A-MEM63.057.954.785.969.165.3
MemoryOS47.156.132.448.547.344.3
MemoryBank35.349.151.156.640.046.5
EverMemOS47.147.441.043.456.445.7
Emotional RAG52.961.444.658.643.651.6
Mem-T61.661.456.172.745.560.5
AiO-Mem71.968.462.682.854.669.2

Table 4. Main results on PersonaMem.

Multi-View Retrieval Complementarity Study

We further analyze the complementarity of the four retrieval views using queries generated during actual inference trajectories. After merging candidates across all views, 1,990 of 2,051 question-evidence pairs are detected by at least one view, yielding 97.03% candidate-pool coverage. As shown in Figure 7a and Figure 7b, although evidence detected by all four views forms the largest group, substantial evidence is distributed across other view combinations, demonstrating their complementary coverage. Figure 7c further shows that single-view hits vary across question categories; for example, raw turns and query anchors contribute relatively more to Single-hop questions. These results indicate that different views capture distinct evidence patterns and jointly improve coverage across diverse question types.

Figure 7. Complementary evidence coverage across retrieval views. Panel a summarizes the major view combinations, panel b expands the remaining combinations, and panel c shows the sources of evidence detected by exactly one view across question categories.

Reward versus RecallReward versus Precision

Figure 10. Sample-level Reward scores versus evidence metrics.

Multi-View Retrieval Sensitivity Study

The retrieval-budget analysis in Figure 9 characterizes the trade-off between evidence coverage and context cost, while Figure 8 examines sensitivity to retrieval configurations. As KretK_{\mathrm{ret}} increases from 5 to 30, evidence Recall improves steadily from 73.62% to 90.82%, while the average retrieved context grows substantially from 2,197 to 11,137 tokens. At Kret=20K_{\mathrm{ret}} = 20, the system already achieves 88.16% Recall with 7,743 tokens; increasing the budget to 30 brings only a further 2.66-point Recall gain at approximately 44% higher context cost, indicating diminishing returns from larger retrieval budgets. We therefore set Kret=20K_{\mathrm{ret}} = 20 as a practical balance between evidence coverage and context efficiency. Figure 8 further shows that moderate variations around the default retrieval modes and RRF parameters cause only limited changes in Recall, whereas larger deviations can lead to noticeable degradation. This suggests that the adopted retrieval configuration lies in a relatively stable and high-performing region rather than depending on a narrowly tuned parameter setting.

Sensitivity to retrieval modes and RRF parameters

Figure 8. Sensitivity to retrieval modes and RRF parameters. Rows and columns denote the summary and raw-turn retrieval modes, respectively, while each panel uses a different aggregation RRF parameter. Red and blue indicate higher and lower evidence Recall.

Trade-off between retrieval Recall and context cost

Figure 9. Trade-off between retrieval Recall and context cost.

Reward and Optimization Analysis

Unified Reward Model Alignment Study

We further evaluate whether the trained reward model aligns with evidence usage by measuring its correlation with trajectory-level Recall and Precision. As shown in Table 5, training increases the Pearson correlation with Recall from 0.877 to 0.958 and the Spearman correlation with Precision from 0.675 to 0.861, indicating stronger alignment with evidence-based trajectory quality. Figure 9a and Figure 9b further show that the base reward model assigns relatively concentrated scores across different evidence qualities, whereas the trained model exhibits clearer positive trends with both Recall and Precision. Notably, some trajectories still receive high rewards at different Precision levels, suggesting that the trained reward model captures broader trajectory quality beyond evidence Precision alone.

Reward modelRecallPrecision
PearsonSpearmanPearsonSpearman
Qwen3-8B0.8770.7830.6400.675
AiO Reward Model (Ours)0.9580.8000.6860.861

Table 5. Correlations between Reward scores and evidence metrics.

Trajectory-level DPO alignment Study

Evidence-grounded SFT provides action-level supervision based on evidence coverage and provenance, but such rule-based signals cannot fully assess the semantic quality of an action within its trajectory context. As introduced in § 3.4, trajectory-level DPO addresses this limitation by using full trajectory context to align the reward model with finer-grained semantic judgments. To visualize how trajectory-level DPO distinguishes trajectories beyond rule-based evidence matching, we compare four matched trajectory pairs for the same questions. Within each pair, the trajectories have identical Evidence-ID Recall and Precision but receive different scores after trajectory-level DPO alignment.

Specifically, in q114, both trajectories cite the correct evidence ID, but the lower-Reward trajectory mixes visual details from another event into the adoption meeting, whereas the higher-Reward trajectory remains focused on the target event. In q76, both obtain zero Evidence-ID Recall and Precision, yet the higher-Reward trajectory retains evidence supporting “three children,” while the lower-Reward one infers “two children” from insufficient observations. In q65, despite complete evidence coverage, the lower-Reward trajectory repeats the same fact and conflates Melanie’s stated preference with the inference about Vivaldi, whereas the higher-Reward trajectory separates the source fact from the inference. In q7, the lower-Reward trajectory mixes the target future camping plan with a past camping event, while the higher-Reward trajectory preserves the correct temporal focus. These cases show that trajectory-level DPO complements rule-based supervision by aligning the reward model with evidence attribution, relevance, factual organization, temporal consistency, and redundancy beyond Evidence-ID matching.

Matched Trajectories for q114

Question: What did Caroline see at the council meeting for adoption?

Gold answer: Many people wanting to create loving homes for children in need.

Gold evidence: D8:9

Both trajectories: Evidence-ID Recall = 1.00; Precision = 1.00.

Lower Trajectory-level Reward Model Score                                                                 Score: 0.67

Case annotation. The notes retain the relevant observation about prospective adoptive families, but also attach visual details from another event to the same meeting. Both statements cite the gold evidence ID, concealing the mismatch between the cited source and the additional claim.

  • Caroline described the adoption council meeting as inspiring and emotional, noting that many people wanted to create loving homes for children in need. (Evidence: D8:9)

  • Caroline saw a sign for a new arrival and an information and domestic building during the adoption council meeting. (Evidence: D8:9)

Higher Trajectory-level Reward Model Score                                                                 Score: 0.95

Case annotation. The notes consistently describe the adoption meeting and the people seeking to provide loving homes. Although the two entries overlap, both remain focused on what Caroline observed at the target event, without introducing the unrelated visual details.

  • Caroline attended an adoption council meeting and saw people seeking to create loving homes for children in need. (Evidence: D8:9)

  • Caroline described the adoption council meeting as inspiring and emotional, with attendees focused on creating loving homes for children in need. (Evidence: D8:9)

Matched Trajectories for q76

Question: How many children does Melanie have?

Gold answer: Three.

Gold evidence: D18:1, D18:7

Both trajectories: Evidence-ID Recall = 0.00; Precision = 0.00.

Lower Trajectory-level Reward Model Score                                                                 Score: 0.27

Case annotation. The notes use observations of two children in particular scenes to support a claim about Melanie’s total number of children. Seeing two children at a campfire or museum does not establish that she has only two, leaving the numerical conclusion insufficiently supported.

  • Melanie has two children based on the image of a man and two children in the campfire scene. (Evidence: D8:32)

  • Melanie took two children to the museum. (Evidence: D6:4)

Higher Trajectory-level Reward Model Score                                                                 Score: 0.53

Case annotation. The notes preserve an observation involving three children and additional family context. Neither entry matches the annotated gold evidence IDs, but the beach observation is more relevant to the reference answer. The displayed notes alone still do not conclusively establish the total number of Melanie’s children.

  • Melanie went to the beach with three children. (Evidence: D10:8)

  • Melanie’s children were at the Grand Canyon with her. (Evidence: D18:5)

Matched Trajectories for q65

Question: Would Melanie likely enjoy the song “The Four Seasons” by Vivaldi?

Gold answer: Yes; it is classical music.

Gold evidence: D15:28

Both trajectories: Evidence-ID Recall = 1.00; Precision = 1.00.

Lower Trajectory-level Reward Model Score        Score: 0.55

Case annotation. The notes repeat Melanie’s classical music preference and conflate it with an inferred preference for Vivaldi.

  • Melanie enjoys classical music including composers like Bach and Mozart. (Evidence: D15:28)

  • Melanie enjoys classical music including composers like Bach and Mozart. (Evidence: D15:28)

  • Melanie appreciates classical music genres. (Evidence: D15:28)

  • Melanie appreciates classical music genres including composers like Bach, Mozart, and implicitly Vivaldi. (Evidence: D15:28)

Higher Trajectory-level Reward Model Score        Score: 0.95

Case annotation. The notes distinguish Melanie’s stated preference, the genre connection, and the inference that she would likely enjoy Vivaldi.

  • Melanie enjoys classical music by Bach and Mozart, as well as modern music like Ed Sheeran’s “Perfect”. (Evidence: D15:28)

  • Vivaldi’s “The Four Seasons” is a classical composition, and Melanie appreciates classical music by Bach and Mozart. (Evidence: D15:28)

  • Melanie’s appreciation for classical music suggests she would likely enjoy Vivaldi’s “The Four Seasons”. (Evidence: D15:28)

Matched Trajectories for q7

Question: When is Melanie planning on going camping?

Gold answer: June 2023.

Gold evidence: D2:7

Both trajectories: Evidence-ID Recall = 1.00; Precision = 0.50.

Lower Trajectory-level Reward Model Score        Score: 0.54

Case annotation. The notes repeatedly alternate between a future camping plan and a separate camping trip that had already occurred. Although the relevant expression “next month” eventually appears, repetition and the interleaving of different events make the target plan less prominent.

  • Melanie plans a camping trip for summer break. (Evidence: D2:7)

  • Melanie went camping with kids a few weeks ago. (Evidence: D16:2)

  • Melanie plans a camping trip for summer break. (Evidence: D2:7)

  • Melanie went camping with kids a few weeks ago. (Evidence: D16:2)

  • Melanie plans a camping trip for next month during summer break. (Evidence: D2:7)

Higher Trajectory-level Reward Model Score        Score: 0.92

Case annotation. The notes foreground the upcoming trip and its time expression, “next month,” followed by broader summer-outing context. They avoid repeatedly mixing the plan with the completed camping event, making the information relevant to the temporal question more accessible.

  • Melanie mentioned planning a camping trip for next month during summer break. (Evidence: D2:7)

  • Melanie agreed to plan a family outing this summer, which includes camping activities. (Evidence: D12:18)

Training Dynamics

Figure 11 presents the Reward dynamics during PA-DAPO training. As shown in Figure 11a, the Overall Reward exhibits a clear upward trend as training progresses. Although the Reward varies across individual training steps, the smoothed curve increases overall, indicating a gradual improvement in the quality of the sampled trajectories.

Figure 11. Training dynamics.

Figure 11b–Figure 11d further decompose the Overall Reward by operation: Search corresponds to search, Extract includes add and skip, and Answer-Decision corresponds to stop.The Search Reward shows an overall increase, indicating improved evidence retrieval behavior. The Extract Reward also increases over training, reflecting improvements in evidence extraction and organization. The Answer-Decision Reward exhibits a similar upward trend, indicating that the model progressively learns when to stop retrieving and proceed to answer generation.

The overall improvement across all three stages indicates that the increase in Overall Reward is not driven by a single interaction stage. Instead, it reflects joint improvements in evidence retrieval, evidence extraction and organization, and the decision to stop retrieving and generate an answer.

Process-Aligned Evidence Flow Study

We first analyze how training affects evidence flow through the memory pipeline. Figure 12a, Figure 12b, and Figure 12c compare the trained and untrained systems at the Search, Final working memory, and Answer stages, respectively, with further breakdowns by question category.

Figure 12. Effects of policy training on evidence flow through the memory pipeline. The three panels report Search Recall, Final working memory Recall, and Answer F1, respectively.

After training, the system covers more gold evidence during Search and retains more evidence in the Final working memory, with improvements across all question categories. The final Answer F1 also increases accordingly. These results show that policy training improves the entire information processing pipeline, from evidence retrieval and organization to answer generation.

Computational Complexity

As shown in Table 6, we analyze a long-horizon history H=(h1,…,hN)\mathcal{H} = (h_{1}, \ldots, h_{N}) consisting of NN source units, each containing an average of ℓ\ell tokens, and evaluate the cost of answering a memory query qq. In other memory systems (OMS), the history is first segmented into source units, where each unit requires an LLM-based summarization and is further encoded into M1M_{1} persistent memory entries:

System(I) Segment & Retrieval(II) Construction(III) Inference
OMSO(N)⋅Cseg+O(Nℓ)⋅CLLM+O(NM1)⋅CembO(N) \cdot C_{\mathrm{seg}} + O(N\ell) \cdot C_{\mathrm{LLM}} + O(NM_{1}) \cdot C_{\mathrm{emb}}O(NM1)⋅Csim+O(NM1R1)⋅(CLLM+Cemb)O(NM_{1}) \cdot C_{\mathrm{sim}} + O(NM_{1}R_{1}) \cdot(C_{\mathrm{LLM}} + C_{\mathrm{emb}})O(Nℓ+NM1R1)⋅CLLM+O(NM1(1+R1))⋅Cemb+O(NM1)⋅CsimO(N\ell+ NM_{1}R_{1}) \cdot C_{\mathrm{LLM}} + O(NM_{1}(1 + R_{1})) \cdot C_{\mathrm{emb}} + O(NM_{1}) \cdot C_{\mathrm{sim}}
AiO-MemO(Tmax⁡M)⋅Csim+O(Nℓ)⋅CLLM+O(M+Tmax⁡)⋅CembO(T_{\max}M) \cdot C_{\mathrm{sim}} + O(N\ell) \cdot C_{\mathrm{LLM}} + O(M + T_{\max}) \cdot C_{\mathrm{emb}}O(Tmax⁡Kretℓe)⋅CLLMO(T_{\max}K_{\mathrm{ret}}\ell_{e}) \cdot C_{\mathrm{LLM}}O(Nℓ+Tmax⁡Kretℓe)⋅CLLM+O(M+Tmax⁡)⋅Cemb+O(Tmax⁡M)⋅CsimO(N\ell+ T_{\max}K_{\mathrm{ret}}\ell_{e}) \cdot C_{\mathrm{LLM}} + O(M + T_{\max}) \cdot C_{\mathrm{emb}} + O(T_{\max}M) \cdot C_{\mathrm{sim}}

Table 6. Complexity comparison between AiO-Mem and OMS.

COMSI=O(N)⋅Cseg+O(Nℓ)⋅CLLM+O(NM1)⋅Cemb.(6)\mathcal{C}_{\mathrm{OMS}}^{\mathrm{I}} = O(N) \cdot C_{\mathrm{seg}} + O(N\ell) \cdot C_{\mathrm{LLM}} + O(NM_{1}) \cdot C_{\mathrm{emb}}. \tag*{(6)}

During memory construction, the resulting NM1NM_{1} entries are compared with the existing memory. A fraction R1R_{1} of these entries triggers an LLM-based rewrite, followed by re-embedding for index update:

COMSII=O(NM1)⋅Csim+O(NM1R1)⋅(CLLM+Cemb).(7)\mathcal{C}_{\mathrm{OMS}}^{\mathrm{II}} = O(NM_{1}) \cdot C_{\mathrm{sim}} + O(NM_{1}R_{1}) \cdot(C_{\mathrm{LLM}} + C_{\mathrm{emb}}). \tag*{(7)}

This results in a total inference cost of:

COMSinfer=O(Nℓ+NM1R1)⋅CLLM+O(NM1(1+R1))⋅Cemb+O(NM1)⋅Csim.(8)\mathcal{C}_{\mathrm{OMS}}^{\mathrm{infer}} = O(N\ell+ NM_{1}R_{1}) \cdot C_{\mathrm{LLM}} + O(NM_{1}(1 + R_{1})) \cdot C_{\mathrm{emb}} + O(NM_{1}) \cdot C_{\mathrm{sim}}. \tag*{(8)}

Thus, both the LLM-based summarization and memory rewriting costs increase with the history size and the number of accumulated memory entries.

In AiO-Mem, the history is first compiled into the traceable event bank B=C(H)\mathcal{B} = \mathcal{C}(\mathcal{H}). The resulting MM events and their indices are reused across queries. Since each trajectory contains at most Tmax⁡T_{\max} interaction steps, the segmentation and retrieval cost is:

CAiOI=O(Nℓ)⋅CLLM+O(M+Tmax⁡)⋅Cemb+O(Tmax⁡M)⋅Csim.(9)\mathcal{C}_{\mathrm{AiO}}^{\mathrm{I}} = O(N\ell) \cdot C_{\mathrm{LLM}} + O(M + T_{\max}) \cdot C_{\mathrm{emb}} + O(T_{\max}M) \cdot C_{\mathrm{sim}}. \tag*{(9)}

On top of this, AiO-Mem keeps B\mathcal{B} unchanged and constructs only the query-specific working memory Wt\mathcal{W}_{t}. Each interaction step operates on at most KretK_{\mathrm{ret}} retrieved events with an average exposed length of ℓe\ell_{e} tokens. Therefore, the construction cost is:

CAiOII=O(Tmax⁡Kretℓe)⋅CLLM.(10)\mathcal{C}_{\mathrm{AiO}}^{\mathrm{II}} = O(T_{\max}K_{\mathrm{ret}}\ell_{e}) \cdot C_{\mathrm{LLM}}. \tag*{(10)}
SymbolDefinition
H=(h1,…,hN)\mathcal{H}=(h_1,\ldots,h_N)Long-horizon history consisting of NN heterogeneous source units.
NNNumber of source units in H\mathcal{H}.
ℓ\ellAverage number of tokens in each source unit hnh_n.
B=C(H)\mathcal{B}=\mathcal{C}(\mathcal{H})Traceable event bank constructed from H\mathcal{H} by the structure-aware compiler C\mathcal{C}.
MMNumber of traceable events in the event bank B\mathcal{B}.
M1M_1Number of persistent memory entries produced per source unit by OMS.
R1R_1Fraction of OMS memory entries that trigger memory rewriting and re-indexing.
KretK_{\mathrm{ret}}Number of candidate events returned by each SEARCH action.
ℓe\ell_eAverage number of tokens exposed by one retrieved event.
Tmax⁡T_{\max}Maximum interaction horizon, with T≤Tmax⁡T\leq T_{\max}.
CsegC_{\mathrm{seg}}Cost of one segmentation operation.
CLLMC_{\mathrm{LLM}}Cost of LLM computation.
CembC_{\mathrm{emb}}Cost of an embedding operation.
CsimC_{\mathrm{sim}}Cost of a sparse or dense similarity operation.

Table 7. Notation used in the complexity analysis.

Combining event-bank construction, multi-view retrieval, bounded working-memory construction, and final response generation, AiO-Mem requires

CAiOinfer=O(Nℓ+Tmax⁡Kretℓe)⋅CLLM+O(M+Tmax⁡)⋅Cemb+O(Tmax⁡M)⋅Csim.(11)C_{\mathrm{AiO}}^{\mathrm{infer}} = O(N\ell+T_{\max}K_{\mathrm{ret}}\ell_e)\cdot C_{\mathrm{LLM}} + O(M+T_{\max})\cdot C_{\mathrm{emb}}+O(T_{\max}M)\cdot C_{\mathrm{sim}}. \tag*{(11)}

Following prior efficiency-oriented works, we report FLOPs measured by [33] and token consumption, using Mem-T as the baseline. As shown in Figure 13, AiO-Mem exhibits substantially slower FLOPs growth with increasing context length. By decoupling large-scale persistent memory management from query-time working-memory construction, AiO-Mem avoids repeated memory rewriting and re-indexing and confines costly LLM computation to selected evidence. It further reduces retrieval and construction tokens by 79.9% and 73.8%, respectively.

Efficiency comparison between AiO-Mem and Baseline on LoCoMo

Figure 13. Efficiency comparison between AiO-Mem and Baseline on LoCoMo.

Prompts and Tool Calls

Memory Agent Tool Calls

The LoCoMo memory agent alternates between DECIDE and EXTRACT. DECIDE chooses between search and stop; after each search, EXTRACT chooses between add, which writes visible evidence into working memory, and skip. Table 8 lists the tools available at each stage.

StageTool call and function
DECIDEsearch_memory_units(query): Retrieves event-level memory units concerning information missing from the current notes.
DECIDEanswer_from_notes() (no arguments): Ends memory retrieval and proceeds to the answering stage using the existing working memory.
EXTRACTadd_note(event_id, datetime, content, evidence_turns): Saves a clue, its event time, and the original dialogue supporting it. An EXTRACT step may invoke add_note multiple times, with each invocation writing one note.
EXTRACTskip_extraction(reason): Skips extraction when the current search results contain no relevant evidence to write.

Table 8. Tool calls available to the memory agent.

LoCoMo Memory Agent Prompts

Table 9 presents condensed prompt templates for the two model-call stages. Each call includes only the tool definitions permitted at that stage; the model returns tool calls as JSON objects enclosed in <tool_call> tags.

StagePrompt template
DECIDEYou are a memory assistant. Given the current question and saved working memory, choose the next action: search memory, or stop retrieval and proceed to the answering stage. Rules: (1) Judge whether the question can be answered completely using only the working memory, including the relationships and all necessary parts requested by the question. If the evidence is sufficient, call answer_from_notes. (2) Otherwise, generate a query targeting one specific fact or clue that is still missing, and call search_memory_units. The query should identify the relevant person or object, relationship, and information needed. Avoid repeating previous searches that produced no useful notes. (3) At the final decision step, call answer_from_notes. Input: Question {question}, working memory {working_notes}, previous queries {previous_searches}, and step {step}/{max_steps}. Output: A brief explanation of the decision and one <tool_call>.
EXTRACTYou are a memory system analyst. Given the question, the latest search results, and the existing working memory, identify new evidence useful for answering the question and write it into the working memory. Search results are temporary; useful information not written into the notes will not be available to subsequent decisions. Rules: (1) Read the visible original dialogue in retrieved events. Highlighted turns are only hints; relevant evidence may also appear in other turns. (2) For each new useful clue, call add_note to write a concise, faithful note, preserving the exact event ID, recorded time, and original dialogue supporting its content. Each note should capture one natural clue and should be compared with existing notes to avoid duplication. (3) If the search results contain no relevant evidence, call skip_extraction. Input: Question {question}, search observation {search_observation}, and working memory {working_notes}. The search observation contains event identifiers, recorded times, retrieved fields, summaries, and visible original dialogue. Output: A brief assessment of the evidence and the required <tool_call>; distinct clues may be written as separate notes.

Table 9. Prompt templates for the LoCoMo memory agent.

Stepwise Reward Model Prompt

For SFT, the prompt below is the reward model input, with rule-derived scores as targets. For DPO, the same prompt is given to both the reward model and DeepSeek-V4-Flash; DeepSeek’s score sequence serves as chosen and the rule-derived sequence as rejected. Reference answers and annotated evidence are used only for reward scoring, not by the memory policy or answer model. Table 10 summarizes the prompt’s objectives, error categories, score ranges, and output format.

Prompt template
Task and input
You are a reward model evaluator of memory trajectories. Given a complete scoreable memory trajectory, evaluate each step according to whether the required evidence was found, whether useful evidence was written into working memory, and whether retrieval stopped when the evidence was sufficient. You may use trajectory context to understand the current action, but each score must evaluate only the current step; do not evaluate the quality of the final answer model’s response.
Input: {question}, {reference_answer}, {gold_evidence}, {trajectory_information}, and {scoreable_steps}.
Objectives by action type
decide_search: Does the query target information missing from the current notes and help locate evidence needed to answer the question? A reasonable query should not receive the lowest score solely because it failed to retrieve a match.
extract_add_note: Does the action faithfully write useful, previously unsaved evidence from the latest search into the notes, and do the cited turns support the note’s content?
extract_skip: Does the latest search truly contain nothing worth writing? Skipping clearly critical evidence is a severe problem.
decide_answer_from_notes: Are the existing notes sufficient to support an answer when retrieval stops?
Evidence assessment
When judging whether the notes are sufficient, consider both their content and the original dialogue they cite. Annotated evidence indicates information needed for the question, but it is not a mechanical hit-rate scoring formula: unannotated dialogue turns may also support the answer semantically, and matching annotated turns does not automatically warrant a high score.
Error severity
Category A, high severity: Failure of the current stage’s core objective.
Category B, high severity: Factual or attribution errors in a note, or citations that do not support key content.
Category C, medium severity: Problems in assessing the current state or respecting stage boundaries.
Category D, medium severity: An incomplete contribution or substantial noise in the action.
Category E, low severity: Wording or formatting issues.
Score ranges
90–100: The action fulfills the stage’s core objective very well, with at most minor Category E issues.
75–89: The action is clearly useful and largely fulfills the core objective; it has no Category A or B issues, though minor Category C, D, or E issues are allowed.
60–74: The action makes a partial contribution but falls short of the core objective; it has no Category A or B issues, though Category C or D issues are more pronounced.
40–59: The action has a severe problem but retains some useful contribution; it typically contains one Category A or B issue.
1–39: The action provides almost no useful contribution or takes a clearly wrong direction; severe problems cause the current step to largely fail.
Output requirements
Output a strict JSON object containing step_scores in input order. Each step must contain step_index, step_type, quality_level, and an integer score from 1 to 100. Do not omit or add steps, and do not output scoring explanations.
quality_level roughly corresponds to the score as follows: bad (1–30), weak (31–55), partial (56–70), good (71–85), and excellent (86–100).

Table 10. Prompt template and scoring rules for the stepwise reward model.

References

  1. [1]Prateek Chhikara, Dev Khant, Saket Aryan, Taranjeet Singh, and Deshraj Yadav. Mem0: Building production-ready ai agents with scalable long-term memory. arXiv preprint arXiv:2504.19413, 2025.arxiv.org/abs/2504.19413
  2. [2]Gordon V Cormack, Charles LA Clarke, and Stefan Buettcher. Reciprocal rank fusion outperforms condorcet and individual rank learning methods. In Proceedings of the 32nd international ACM SIGIR conference on Research and development in information retrieval, pp. 758–759, 2009.DOI
  3. [3]Darren Edge, Ha Trinh, Newman Cheng, Joshua Bradley, Alex Chao, Apurva Mody, Steven Truitt, Dasha Metropolitansky, Robert Osazuwa Ness, and Jonathan Larson. From local to global: A graph rag approach to query-focused summarization. arXiv preprint arXiv:2404.16130, 2024.arxiv.org/abs/2404.16130
  4. [4]Jizhan Fang, Xinle Deng, Haoming Xu, Ziyan Jiang, Yuqi Tang, Ziwen Xu, Shumin Deng, Yunzhi Yao, Mengru Wang, Shuofei Qiao, et al. Lightmem: Lightweight and efficient memory-augmented generation. In International Conference on Learning Representations, volume 2026, pp. 98706–98729, 2026.arxiv.org/abs/2510.18866
  5. [5]Bernal J Gutiérrez, Yiheng Shu, Yu Gu, Michihiro Yasunaga, and Yu Su. Hipporag: Neurobiologically inspired long-term memory for large language models. Advances in neural information processing systems, 37:59532–59569, 2024.arxiv.org/abs/2405.14831
  6. [6]Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Mingwei Chang. Retrieval augmented language model pre-training. In International conference on machine learning, pp. 3929–3938. PMLR, 2020.
  7. [7]Chuanrui Hu, Xingze Gao, Zuyi Zhou, Dannong Xu, Yi Bai, Xintong Li, Hui Zhang, Tong Li, Chong Zhang, Lidong Bing, et al. Evermemos: A self-organizing memory operating system for structured long-horizon reasoning. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 45836–45853, 2026a.
  8. [8]Yuanzhe Hu, Yu Wang, and Julian McAuley. Evaluating memory in llm agents via incremental multi-turn interactions. In International Conference on Learning Representations, volume 2026, pp. 156259–156291, 2026b.arxiv.org/abs/2507.05257
  9. [9]Le Huang, Hengzhi Lan, Zijun Sun, Chuan Shi, and Ting Bai. Emotional rag: Enhancing role-playing agents through emotional retrieval. In 2024 IEEE International Conference on Knowledge Graph (ICKG), pp. 120–127. IEEE, 2024.arxiv.org/abs/2410.23041
  10. [10]Yupeng Huo, Yaxi Lu, Zhong Zhang, Haotian Chen, and Yankai Lin. Atomm em : Learnable dynamic agentic memory with atomic memory operation, 2026. URL https://arxiv.org/abs/2601.08323.
  11. [11]Bowen Jiang, Zhuoqun Hao, Young-Min Cho, Bryan Li, Yuan Yuan, Sihao Chen, Lyle Ungar, Camillo J Taylor, and Dan Roth. Know me, respond to me: Benchmarking llms for dynamic user profiling and personalized responses at scale. arXiv preprint arXiv:2504.14225, 2025a.arxiv.org/abs/2504.14225
  12. [12]Pengcheng Jiang, Jiacheng Lin, Lang Cao, Runchu Tian, SeongKu Kang, Zifeng Wang, Jimeng Sun, and Jiawei Han. Deepretrieval: Hacking real search engines and retrievers with large language models via reinforcement learning. arXiv preprint arXiv:2503.00223, 2025b.arxiv.org/abs/2503.00223
  13. [13]Bowen Jin, Hansi Zeng, Zhenrui Yue, Jinsung Yoon, Sercan Arik, Dong Wang, Hamed Zamani, and Jiawei Han. Search-r1: Training llms to reason and leverage search engines with reinforcement learning. arXiv preprint arXiv:2503.09516, 2025.arxiv.org/abs/2503.09516
  14. [14]Stephen C Johnson. Hierarchical clustering schemes. Psychometrika, 32(3):241–254, 1967.pubmed.ncbi.nlm.nih.gov/5234703
  15. [15]Jiazheng Kang, Mingming Ji, Zhe Zhao, and Ting Bai. Memory os of ai agent. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pp. 25972–25981, 2025.arxiv.org/abs/2506.06326
  16. [16]LangChain. LangMem: Long-term memory for language agents. https://github.com/langchain-ai/langmem, 2025. Official software repository and documentation, accessed 2026-09-19.
  17. [17]Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in neural information processing systems, 33:9459–9474, 2020.arxiv.org/abs/2005.11401
  18. [18]Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. Lost in the middle: How language models use long contexts. Transactions of the Association for Computational Linguistics (TACL), 12:157–173, 2024.arxiv.org/abs/2307.03172
  19. [19]Weitao Ma, Xiaocheng Feng, Lei Huang, Xiachong Feng, Zhanyu Ma, Jun Xu, Jiuchong Gao, Jinghua Hao, Renqing He, and Bing Qin. Fine-mem: Fine-grained feedback alignment for long-horizon memory management. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 19666–19684, 2026.
  20. [20]Adyasha Maharana, Dong-Ho Lee, Sergey Tulyakov, Mohit Bansal, Francesco Barbieri, and Yuwei Fang. Evaluating very long-term conversational memory of llm agents. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 13851–13870, 2024.
  21. [21]OpenAI. GPT-4 technical report. arXiv preprint arXiv:2303.08774, 2023.arxiv.org/abs/2303.08774
  22. [22]Charles Packer, Sarah Wooders, Kevin Lin, Vivian Fang, Shishir G Patil, Ion Stoica, and Joseph E Gonzalez. Memgpt: Towards llms as operating systems. arXiv preprint arXiv:2310.08560, 2023.arxiv.org/abs/2310.08560
  23. [23]Preston Rasmussen, Pavlo Paliychuk, Travis Beauvais, Jack Ryan, and Daniel Chalef. Zep: a temporal knowledge graph architecture for agent memory. arXiv preprint arXiv:2501.13956, 2025.arxiv.org/abs/2501.13956
  24. [24]Diego Sanmartin. Kg-rag: Bridging the gap between knowledge and creativity. arXiv preprint arXiv:2405.12035, 2024.arxiv.org/abs/2405.12035
  25. [25]Huatong Song, Jinhao Jiang, Yingqian Min, Jie Chen, Zhipeng Chen, Wayne Xin Zhao, Lei Fang, and Ji-Rong Wen. R1-searcher: Incentivizing the search capability in llms via reinforcement learning. arXiv preprint arXiv:2503.05592, 2025.arxiv.org/abs/2503.05592
  26. [26]Hugo Tourvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. LLaMA: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023.
  27. [27]Yu Wang, Ryuichi Takanobu, Zhiqi Liang, Yuzhen Mao, Yuanzhe Hu, Julian McAuley, and Xiaojian Wu. Mem-{\alpha}: Learning memory construction via reinforcement learning. arXiv preprint arXiv:2509.25911, 2025.arxiv.org/abs/2509.25911
  28. [28]Joe H. Ward. Hierarchical grouping to optimize an objective function. Journal of the American Statistical Association, 58(301):236–244, 1963.DOI
  29. [29]Wujiang Xu, Zujie Liang, Kai Mei, Hang Gao, Juntao Tan, and Yongfeng Zhang. A-mem: Agentic memory for llm agents. Advances in Neural Information Processing Systems, 38:17577–17604, 2026.arxiv.org/abs/2502.12110
  30. [30]BY Yan, Chaofan Li, Hongjin Qian, Shuqi Lu, and Zheng Liu. General agentic memory via deep research. arXiv preprint arXiv:2511.18423, 2025.arxiv.org/abs/2511.18423
  31. [31]Sikuan Yan, Xiufeng Yang, Zuchao Huang, Ercong Nie, Zifeng Ding, Zonggen Li, Xiaowen Ma, Jinhe Bi, Kristian Kersting, Jeff Z Pan, et al. Memory-r1: Enhancing large language model agents to manage and utilize memories via reinforcement learning. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 12805–12825, 2026.
  32. [32]Tianyu Yang, Sudipta Paul, Vijay Srinivasan, Vivek Kulkarni, and Srinivas Chappidi. Trust-mem: Learning trustworthy memory consolidation for llm agents with long-term memory. arXiv preprint arXiv:2606.25161, 2026.arxiv.org/abs/2606.25161
  33. [33]Xiaoyu Ye. calflops: a flops and params calculate tool for neural networks in pytorch framework. https://github.com/MrYxJ/calculate-flops.pytorch, 2023.
  34. [34]Hongli Yu, Tinghong Chen, Jiangtao Feng, Jiangjie Chen, Weinan Dai, Qiying Yu, Ya-Qin Zhang, Wei-Ying Ma, Jingjing Liu, Mingxuan Wang, et al. Memagent: Reshaping long-context llm with multi-conv rl-based memory agent. In International Conference on Learning Representations, volume 2026, pp. 39458–39486, 2026a.arxiv.org/abs/2507.02259
  35. [35]Qiying Yu, Zheng Zhang, Ruofei Zhu, Yufeng Yuan, Xiaochen Zuo, Yu Yue, Weinan Dai, Tiantian Fan, Gaohong Liu, Lingjun Liu, et al. Dapo: An open-source llm reinforcement learning system at scale. Advances in Neural Information Processing Systems, 38:113222–113244, 2026b.arxiv.org/abs/2503.14476
  36. [36]Yanwei Yue, Boci Peng, Xuanbo Fan, Jiaxin Guo, Qiankun Li, and Yan Zhang. Mem-t: Densifying rewards for long-horizon memory agents. arXiv preprint arXiv:2601.23014, 2026.arxiv.org/abs/2601.23014
  37. [37]Wanjun Zhong, Lianghong Guo, Qiqi Gao, He Ye, and Yanlin Wang. Memorybank: Enhancing large language models with long-term memory. In Proceedings of the AAAI conference on artificial intelligence, volume 38, pp. 19724–19731, 2024.arxiv.org/abs/2305.10250
  38. [38]Zijian Zhou, Ao Qu, Zhaoxuan Wu, Sunghwan Kim, Alok Prakash, Daniela Rus, Bryan Kian Hsiang Low, and Paul Liang. Mem1: Learning to synergize memory and reasoning for efficient long-horizon agents. In International Conference on Learning Representations, volume 2026, pp. 58413–58438, 2026.arxiv.org/abs/2506.15841

Paper details

vlnc:W_qzu2updg
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

LLMs

View statement
Looking for related papers…
Contents