Manuscript Offprint

arXiv:2608.30177

Understanding Stage-Wise Utility-Risk Trade-offs in LLM Agent Memory

Chuanchao Zang, Zijian Cao, Xiangtao Meng, Jianing Wang, Wenyu Chen, Xinyu Gao, Li Wang, Zheng Li, Shanqing Guo

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Long-term memory is becoming a core capability of LLM agents, enabling personalization and long-horizon interaction. However, memory mechanisms that retain, transform, or expose more information can affect both benign utility and susceptibility to memory poisoning. Existing evaluations typically measure memory utility or attack risk in isolation under fixed configurations, providing limited insight into how stage-specific design choices reshape their tradeoff. We present MEMGAUGE, a controllable framework that separately varies writing admission, management policy, and retrieval exposure under matched clean and poisoned conditions. Across 11 LLMs and two long-term memory benchmarks, controlled evaluations reveal three distinct profiles: a threshold-like risk transition during writing, policy-dependent local decoupling during management, and coupled growth of utility and risk during retrieval. We further apply analogous stage-level measurements to four existing memory systems and observe diagnostic associations qualitatively consistent with these profiles. These results show that targeted poisoning risk varies across memory operations and motivate stage-aware evaluation and control of LLM-agent memory.

1 Introduction

Long-term memory enables LLM agents to support personalization, accumulate experience, and interact over long horizons by retaining information beyond the current context[11, 19]. Yet this persistence also creates security risks: once adversarially induced information enters memory, it can influence decisions across queries and sessions[1, 3, 4]. For example, Microsoft documented attempts to use hidden “remember” instructions to write promotional preferences into assistant memory, illustrating how a mechanism designed for personalization can also bias later recommendations [5]. Such utility–risk tensions may arise at different points in the memory lifecycle. We therefore organize memory operations into three functional stages: writing determines what information is stored, management transforms or reconciles

Figure

Figure 1: Overview of stage-wise utility-risk evaluation. Unlike point estimates, MEMGAUGE reveals stage-level patterns across memory systems.

stored information, and retrieval selects which memories are exposed as decision context [8, 9, 16]. Each stage can improve benign memory utility, but it also governs a distinct pathway through which poisoned information is admitted, resurfaced, or suppressed.

Existing evaluations report aggregate benign utility or poisoning risk for end-to-end memory systems, but rarely examine how these outcomes change with specific memory stages [1, 2, 4, 10, 12, 18]. Because each result combines the effects of writing, management, and retrieval, it identifies a system's operating point but not how its utility–risk response changes within a stage. Changes at different stages may move utility and risk differently: one may increase both, whereas another may reduce risk with little utility loss. Without this stage-level view, a design intended to improve memory performance may yield only marginal utility gains while sharply increasing risk, while efforts to balance the two may rely on unguided trial and error across stages. We therefore ask: How do controlled changes in writing admission, management policy, and retrieval exposure reshape memory utility and poisoning risk?

Directly evaluating existing memory systems cannot readily answer this question. These systems tightly couple writing, management, and retrieval within end-to-end pipelines, expose only a small number of user-configurable interfaces, and differ in which controls they provide [2, 8]. Conse-quently, their measurements correspond to sparse and non-aligned operating points: a control available in one system may be absent or defined differently in another, making stage-wise utility-risk responses difficult to compare systematically. To address this challenge, we introduce MEMGAUGE, which varies one stage at a time in a controlled environment to construct stage-wise utility-risk response profiles, and then applies analogous stage-level measurements to existing systems to examine whether their observed operating points are consistent with these profiles.

Concretely, MEMGAUGE defines three intervention axes corresponding to the memory lifecycle. At the writing stage, it divides each trace into atomic units, ranks them using the agent's own LLM, and varies the ranked prefix passed to the writer to produce nested admission levels. At the management stage, it applies alternative conflict-handling policies to the same pre-management memory state. At the retrieval stage, it varies a shared exposure rate for helpful and risk-bearing records while keeping the retrieval budget fixed. At each operating point, paired clean and poisoned conditions hold the agent model, task, prompts, memory budget, and remaining memory operations fixed.

Using MEMGAUGE, we conduct controlled evaluations of 11 LLMs across two long-term memory benchmarks. The resulting stage-wise utility-risk response profiles reveal three distinct patterns. (1) Writing stage exhibits a nonlinear transition: as admission coverage expands along each agent's model-specific ranking, clean utility rises and gradually saturates, while attack success remains low at restrictive levels before increasing sharply. (2) Management stage exhibits policy-dependent local decoupling: changing the management policy can substantially shift attack success while leaving clean utility nearly unchanged, although the direction and magnitude of this shift depend on the policy. (3) Retrieval stage exhibits a coupled response: increasing the exposure of helpful and risk-bearing memories improves clean utility while simultaneously increasing attack success. These patterns show that utility and risk respond differently to changes at different stages of the memory lifecycle.

We further examine whether these patterns appear in four existing memory systems (e.g., Mem0 [2]) using analogous stage-level measurements. For writing, we measure the fraction of trace units retained in memory; for management, we compare each system's native mechanism when enabled and disabled on the same pre-management state; and for retrieval, we measure decision-relevant exposure across top-K budgets. Because these systems couple multiple stages, we interpret their operating points as diagnostic correspondence rather than controlled stage effects. The measurements align with the controlled profiles: greater information retention is associated with higher risk without reliable utility gains, management shifts attack success more than clean utility, and larger retrieval budgets raise both clean utility and attack success. These stage-level measurements help interpret aggregate end-to-end results.

Our contributions are threefold:

• Stage-wise utility-risk perspective. We introduce a stage-wise utility-risk perspective spanning writing, management, and retrieval, complementing prior separate or aggregate system-level evaluations.

• Controllable evaluation framework. We develop MEMGAUGE, which varies writing admission, compares management policies, and controls shared retrieval exposure under paired clean and poisoned conditions to construct stage-wise utility-risk response profiles.

• Empirical pattern discovery. Across 11 LLMs and two benchmarks, we observe a nonlinear transition in writing, policy-dependent local decoupling in management, and a coupled response in retrieval. Measurements on four existing memory systems exhibit patterns consistent with these profiles and help interpret their end-to-end behavior.

References (20)