How Memory Management Impacts LLM Agents: An Empirical Study of Experience-Following Behavior

Zidi Xiong, Yuping Lin, Wenya Xie, Pengfei He, Jiliang Tang, Himabindu Lakkaraju, Zhen Xiang

arXiv:2505.16067 · 2026-07-27 공개 · arXiv · PDF

llm-agents error-propagation memory-management task-evaluation experience-replay experience-following long-term-performance memory-addition

Abstract

Memory is a critical component in large language model (LLM)-based agents, enabling them to store and retrieve past executions to improve task performance over time. In this paper, we conduct an empirical study on how memory management choices impact the LLM agents'behavior, especially their long-term performance. Specifically, we focus on two fundamental memory management operations that are widely used by many agent frameworks-memory addition and deletion-to systematically study their impact on the agent behavior. Through our quantitative analysis, we find that LLM agents display an experience-following property: high similarity between a task input and the input in a retrieved memory record often results in highly similar agent outputs. Our analysis further reveals two significant challenges associated with this property: error propagation, where inaccuracies in past experiences compound and degrade future performance, and misaligned experience replay, where some seemingly correct executions can provide limited or even misleading value as experiences. Through controlled experiments, we demonstrate the importance of regulating experience quality within the memory bank and show that future task evaluations can serve as free quality labels for stored memory. Our findings offer insights into the behavioral dynamics of LLM agent memory systems and provide practical guidance for designing memory components that support robust, long-term agent performance.

한국어 요약

한 줄 요약

LLM 에이전트의 메모리 관리가 장기 성능에 미치는 영향을 실증적으로 분석하고, 선택적 추가 및 결합 삭제 정책이 성능을 평균 10% 개선함을 밝힘.

핵심 기여도

핵심 아이디어

LLM 에이전트는 과거 경험을 저장하고 검색하여 장기적으로 성능을 향상시키기 위해 메모리를 사용한다. 그러나 메모리 관리 방식, 특히 추가(addition)와 삭제(deletion) 정책이 에이전트 행동에 큰 영향을 미친다는 점이 이 연구의 핵심 통찰이다. 연구팀은 경험 추종 현상, 즉 입력 유사도가 높은 경우 출력 유사도도 높아지는 경향을 발견했으며, 이는 과거 경험의 오류가 누적되어 미래 성능을 저하시키는 오류 전파 문제와, 비효율적인 경험 재생 문제를 유발할 수 있음을 밝혔다. 이를 해결하기 위해 선택적 추가 정책과 결합 삭제 정책을 제안하며, 이는 GPT-4o-mini 모델을 기반으로 평가되었다.

기술적 접근법

주요 결과

의의 및 한계

이 연구는 LLM 에이전트의 메모리 관리가 장기 성능에 미치는 영향을 체계적으로 분석한 최초의 실증 연구로, 경험 추종 현상과 관련된 오류 전파 및 비정렬 경험 재생 문제를 명확히 밝혔다. 제안된 선택적 추가와 결합 삭제 정책은 다양한 에이전트와 작업 환경에서 일반적으로 적용 가능한 메모리 관리 프레임워크를 제시한다. 그러나 본 연구는 특정 에이전트와 데이터셋에 국한되었으며, 더 다양한 메모리 구조와 평가 지표를 고려한 연구가 필요하다. 또한, 평가기는 GPT-4o-mini에 의존하므로 다른 모델에서의 일반화 가능성도 추가 연구 주제이다.

실용적 활용

이 연구는 자율 LLM 에이전트가 복잡한 작업 환경에서 안정적으로 작동하도록 메모리 관리를 최적화하는 데 기여할 수 있다. 특히, 의료, 자율 주행, 네트워크 보안 등에서 에이전트가 오류를 최소화하고 효율적으로 경험을 활용할 수 있도록 지원할 수 있다. 연구팀은 코드를 공개하여 다른 연구자들이 메모리 관리 정책을 개선하고 실험을 확장할 수 있도록 했다.