ExpGuard: Guarding Long-Horizon LLM Agents against Corrupted Experience
Yuzhou Chen, Licheng Pan, Zhixuan Chu, Yunsheng Lu, Yichen Sun, Han Zheng, Yan Wang, Bingyu Zhu, Haiwen Hong, Longtao Huang, Kui Ren
Abstract
Long-horizon large language model (LLM) agents distill past trajectories into reusable experiences. Misleading or adversarial guidance in source trajectories can corrupt these experiences, allowing harmful instructions to persist across tasks and influence future agent actions. Assessing the risks of potentially corrupted experiences poses three challenges: (1) modeling provenance and execution dependencies before experience reuse, (2) learning task-conditioned risk from trajectory outcomes, and (3) repairing risky experiences at online inference. To address these challenges, we present ExpGuard, a framework for retrieval-triggered experience risk assessment and online repair. Specifically, to tackle challenge (1), ExpGuard integrates experience semantics with provenance and execution dependencies in a task-conditioned heterogeneous graph to predict attack and task-failure risks before experience reuse. To enable task-conditioned risk supervision and tackle challenge (2), we conduct matched counterfactual replays of each original experience and its minimally neutralized counterpart from the same task and environment checkpoint, deriving separate risk labels from differences in attack success and legitimate task completion. To tackle challenge (3) at inference time, ExpGuard repairs candidate experiences flagged as high-risk by the graph-based predictor at retrieval and re-predicts their risks before they enter the agent's active experience context. Extensive experiments demonstrate the effectiveness of ExpGuard in identifying risky experiences and defending agents against experience corruption.
Create a lesson
Related papers
E2SIM: Long-Horizon Simulation of Everyday Human Behavior with Evolving States
Shared title terminologycs.AIZiwei Gong, Xiangyang Yin, Thai Quoc On et al.
Self-Improving Long-Horizon Reasoning by Learning Summaries from Local Continuations
Shared title terminologycs.AIHaoqun Cao, Tengyang Xie
SpatialCraft: Evolving Procedural Intelligence from Experience and Skills for Spatial Reasoning Agents
Shared title terminologycs.AIXiwei Liu, Yulong Li, Xuhui Li et al.
ChiProgramBench: Can LLM Agents Rebuild Efficient Circuits from Pin-Level Experiments?
Shared title terminologycs.AITianrun Gou, Qingyao Yang, Wendong Xu et al.
RubikSQL-HB: Agentic Text-to-SQL with Knowledge in the Loop
Shared title terminologycs.AIHaorui Jia, Zihan Qu, Yundi Dong et al.
EviCraft: Can Minecraft Agents Find What They Cannot See?
Shared title terminologycs.AIWenyou Yi, Lantian Zhang, Guanlin Chen et al.