Abstract
To support long-term interaction in complex environments, LLM agents require memory systems that manage historical experiences. Existing approaches either retain full interaction histories via passive context extension, leading to substantial redundancy, or rely on iterative reasoning to filter noise, incurring high token costs. To address this challenge, we introduce SimpleMem, an efficient memory framework based on semantic lossless compression. We propose a three-stage pipeline designed to maximize information density and token utilization: (1) Semantic Structured Compression, which distills unstructured interactions into compact, multi-view indexed memory units; (2) Online Semantic Synthesis, an intra-session process that instantly integrates related context into unified abstract representations to eliminate redundancy; and (3) Intent-Aware Retrieval Planning, which infers search intent to dynamically determine retrieval scope and construct precise context efficiently. Experiments on benchmark datasets show that our method consistently outperforms baseline approaches in accuracy, retrieval efficiency, and inference cost, achieving an average F1 improvement of 26.4% in LoCoMo while reducing inference-time token consumption by up to 30-fold, demonstrating a superior balance between performance and efficiency.
Introduction
For LLM agents to be useful over extended periods, they must maintain a reliable memory of past interactions. Current solutions generally fall into two categories, both of which face significant scalability issues. Full-Context Extension involves feeding the entire chat history into the model's context window. This often introduces low-entropy "noise" (e.g., phatic expressions like "hello" or "gotta run"), leading to the "Lost-in-the-Middle" effect and excessive computational costs. Alternatively, Iterative Filtering uses agentic frameworks to repeatedly query and summarize logs. While this improves relevance, it requires multiple expensive inference cycles, resulting in high latency and cost.
SimpleMem addresses these challenges by replacing passive data storage with an active, three-stage "semantic lossless compression" pipeline that maintains high-fidelity recall without the overhead of conversational noise.
The SimpleMem Framework
SimpleMem's architecture is designed to maximize information density through a structured processing pipeline.
- Semantic Structured Compression: SimpleMem applies a sliding window over the interaction history. It utilizes the LLM as an implicit gate: if a window contains only trivial chitchat, the model outputs an empty set, effectively filtering noise. For informative segments, it extracts atomic facts, resolves coreferences (e.g., mapping "he" to "Bob"), and normalizes relative time (e.g., "tomorrow") into absolute ISO timestamps.
- Online Semantic Synthesis: Memory consolidation occurs "on-the-fly" during the write phase. Rather than relying on asynchronous cleanup, SimpleMem immediately merges related information (e.g., "User likes coffee" and "User prefers oat milk") into unified, high-density abstractions.
- Intent-Aware Retrieval Planning: Upon receiving a query, an LLM planner analyzes its complexity to determine the necessary retrieval depth. It then simultaneously queries three orthogonal indexes: Semantic (dense embeddings), Lexical (BM25 keyword matching), and Symbolic (SQL for metadata/timestamps), merging these results into a precise context payload.
Experimental Evaluation
The framework was evaluated on two rigorous benchmarks: LoCoMo, which tests long-term conversational dependencies (200-400 turns), and LongMemEval-S, which requires precise localization across extreme context lengths.
Key Results
- Efficiency and Cost: SimpleMem achieves a ~30x reduction in token consumption compared to full-context approaches, using approximately 530 tokens per query versus 16,900. It also uses 40-50% fewer tokens than other optimized memory baselines like Mem0.
- Accuracy: On the LoCoMo benchmark, SimpleMem achieved an average F1 score of 43.24, significantly outperforming Mem0 (34.20) and the full-context baseline (18.70).
- Latency: The system provides a 4x speedup over Mem0 in end-to-end latency, as it processes data in a single pass and avoids complex graph-traversal during retrieval.
- Model Agnostic Performance: The framework remains effective even with smaller models. For instance, a Qwen2.5-3B model using SimpleMem outperformed the same model using Mem0 by nearly 5 F1 points.
Discussion and Future Work
A critical insight from this work is the importance of Temporal Normalization. Converting relative time phrases into absolute timestamps at the point of memory creation is vital; removing this step caused temporal reasoning performance to drop by 56.7%. Furthermore, the results suggest that dense, well-structured memories reduce the need for large retrieval sets; SimpleMem reaches 99% of its peak performance by retrieving just three memory entries.
While highly effective, SimpleMem's performance is tied to the backbone LLM's ability to follow instructions and synthesize facts accurately. Future research could extend this structured compression to multi-modal data streams and explore shared memory architectures for multi-agent systems.
Summary updated