소규모 언어 모델 기반의 경량 LLM 에이전트 메모리
Lightweight LLM Agent Memory with Small Language Models
LLM 에이전트는 복잡한 작업을 수행하기 위해 도구를 활용할 수 있지만, 여전히 턴 간 일관성을 유지하고 장기적인 상호작용에서 재사용 가능한 정보를 축적하기 위해 메모리가 필요합니다. 그러나 검색 기반 외부 메모리 시스템은 낮은 온라인 오버헤드를 갖지만, 제한적인 쿼리 구성 및 후보 필터링으로 인해 정확성이 불안정합니다. 반면, 많은 시스템은 온라인 메모리 작업에 반복적인 대규모 모델 호출을 사용하여 정확도를 향상시키지만, 장기적인 상호작용 과정에서 지연 시간이 누적됩니다. 본 연구에서는 소규모 언어 모델(SLM)을 기반으로 에이전트 메모리의 성능을 향상시키는 경량 메모리 시스템인 LightMem을 제안합니다. LightMem은 메모리 검색, 쓰기 및 장기적인 통합을 모듈화하고, 온라인 처리와 오프라인 통합을 분리하여 제한된 컴퓨팅 환경에서도 효율적인 메모리 활용을 가능하게 합니다. LightMem은 즉각적인 대화 컨텍스트를 위한 단기 메모리(STM), 재사용 가능한 상호작용 요약을 위한 중기 메모리(MTM), 통합된 지식을 위한 장기 메모리(LTM)로 메모리를 구성하고, 사용자 식별자를 사용하여 다중 사용자 환경에서 독립적인 검색 및 점진적인 유지 관리를 지원합니다. LightMem은 고정된 검색 예산을 기반으로 작동하며, 벡터 기반의 초기 검색 후 의미적 일관성 재순위를 통해 메모리를 선택합니다. 오프라인에서는 재사용 가능한 상호작용 증거를 추출하여 장기 메모리에 점진적으로 통합합니다. 실험 결과, 다양한 모델 크기에서 성능 향상이 확인되었으며, LoCoMo 데이터셋에서 평균 F1 점수가 약 2.5만큼 향상되었고, 효과적인 성능과 낮은 평균 지연 시간(검색: 83ms, 전체: 581ms)을 보였습니다.
Although LLM agents can leverage tools for complex tasks, they still need memory to maintain cross-turn consistency and accumulate reusable information in long-horizon interactions. However, retrieval-based external memory systems incur low online overhead but suffer from unstable accuracy due to limited query construction and candidate filtering. In contrast, many systems use repeated large-model calls for online memory operations, improving accuracy but accumulating latency over long interactions. We propose LightMem, a lightweight memory system for better agent memory driven by Small Language Models (SLMs). LightMem modularizes memory retrieval, writing, and long-term consolidation, and separates online processing from offline consolidation to enable efficient memory invocation under bounded compute. We organize memory into short-term memory (STM) for immediate conversational context, mid-term memory (MTM) for reusable interaction summaries, and long-term memory (LTM) for consolidated knowledge, and uses user identifiers to support independent retrieval and incremental maintenance in multi-user settings. Online, LightMem operates under a fixed retrieval budget and selects memories via a two-stage procedure: vector-based coarse retrieval followed by semantic consistency re-ranking. Offline, it abstracts reusable interaction evidence and incrementally integrates it into LTM. Experiments show gains across model scales, with an average F1 improvement of about 2.5 on LoCoMo, more effective and low median latency (83 ms retrieval; 581 ms end-to-end).
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.