arXiv(opens in a new tab)cs.AISep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.09115

MeClear: Cooperative Game-Theoretic Attribution and Risk-Aware Memory Clearance for Long-Horizon LLM Agents

Boyu Yang, Jiazheng Sun, Zilong Lu, Zhi Qiu, Xin Peng, Jun Zheng

Abstract

Long horizon Large Language Model (LLM) agents rely on external memory systems to preserve user preferences and task knowledge across extended interactions. Conventional retrieval mechanisms optimize semantic compatibility rather than downstream utility, frequently introducing outdated, misleading, or conflicting evidence into the active context. We present MeClear, a task conditioned memory clearance framework that identifies memories featuring negative downstream utility through cooperative attribution and selectively suppresses them from agent execution. MeClear combines Leave One Out screening with sampled cooperative Shapley attribution to distribute utility across interacting evidence, effectively resolving redundant conflict masking where single removal evaluations fail. Utilizing attribution rankings, MeClear executes a query scoped minimal clearance strategy over a nested filtration, verifying task recovery on the cleared context without permanently altering the persistent memory bank. Comprehensive experimental evaluations across ten long dialogue memory pools demonstrate that MeClear achieves a target recall of 85.9% and an overall task recovery rate of 82.3%, representing a 25.5 percentage point improvement over Leave One Out (LOO) baselines.

Code — https://github.com/FudanSELab/MeClear

Introduction

Long-horizon Large Language Model (LLM) agents increasingly depend on external memory to retain preferences, observations, and state across extended interactions (Wang et al. 2024a; Zhang et al. 2025). Early architectures demonstrated that persistent experience supports planning, reflection, and continual adaptation (Park et al. 2023). However, growing interaction histories accumulate stale, misleading, redundant, or incompatible records. Recent studies reveal that inaccurate experiences propagate errors across future tasks (Xiong et al. 2025), while semantically related memories often prove contextually inappropriate or functionally harmful (Zhang et al. 2026a; Ha et al. 2026). These findings expose a fundamental failure of relevance-centered retrieval: high semantic similarity does not ensure downstream task utility. Reliable memory deployment therefore demands task-conditioned, post-retrieval evaluation of how retrieved records causally influence agent execution.

As illustrated in Figure 1, jointly processed memories exhibit complex dependencies such as redundancy and joint harm, causing isolated record evaluations to fail. While recent frameworks refine credit assignment via evidence-anchored rewards (Ma et al. 2026) or single-record causal interventions (Srivastava 2026), single-record deletion collapses when redundant memories independently sustain task failure, yielding zero observable counterfactual change. Coalition-based attribution resolves this local masking by measuring marginal contributions across subset permutations (Ghorbani and Zou 2019; Jia et al. 2019a; Nematov et al. 2025). Because exact coalition enumeration is computationally prohibitive for multi-record context windows, practical clearance must efficiently approximate cooperative interaction effects while preserving sufficient contextual variation to uncover masked toxicity.

Directly modifying persistent memory introduces severe safety risks due to the inherently query-conditioned nature of memory utility across long-horizon deployment. A stored record that degrades performance on a query can provide indispensable contextual grounding for subsequent tasks, rendering permanent database overwrites prone to catastrophic cross-task performance regression (Wang et al. 2024b; Xu 2025). Retrieval-time defenses mitigate this danger by dynamically regulating active context visibility during inference rather than altering database records (Ha et al. 2026; Zhang et al. 2026a). Nevertheless, existing admission filters fail to isolate which interacting memories causally induce downstream task failures, nor do they verify whether suppressing records restores execution accuracy. Reliable memory maintenance consequently demands reversible, minimal context clearance accompanied by explicit, post-suppression behavioral recovery verification.

To address this problem, we present MeClear, a cooperative game-theoretic attribution and risk aware memory clearance framework for long horizon Large Language Model agents. MeClear formulates memory maintenance as a task conditioned decision process connecting counterfactual screening, cooperative Shapley attribution, and verified context clearance. The framework first isolates active contexts from retrieval stochasticity and applies Leave One Out (LOO) screening to filter strong positive evidence. It subsequently executes sampled cooperative attribution to quantify individual memory contributions across diverse coalitions,

∗^{*}These authors contributed equally.

References (27)