MemFly: On-the-Fly Memory Optimization via Information Bottleneck
Zhenyuan Zhang, Xianzhang Jia, Zhiqin Yang, Zhenbo Song, Wei Xue, Sirui Han, Yike Guo
TL;DR
MemFly reframes agent memory as an online information bottleneck problem to compress history while preserving task-relevant evidence, tackling the trade-off between memory fidelity and compactness. It introduces a Note-Keyword-Topic memory hierarchy and a gradient-free, LLM-guided approach to online memory consolidation via merge, link, and append operations. Retrieval is performed through a tri-pathway hybrid mechanism (macro-semantic topics, micro-symbolic keywords, and topological expansion) with iterative evidence refinement to handle complex, multi-hop queries. Empirical results on LoCoMo show MemFly outperforming state-of-the-art baselines across diverse backbone models in memory coherence, response fidelity, and reasoning accuracy, demonstrating the approach’s robustness and scalability.
Abstract
Long-term memory enables large language model agents to tackle complex tasks through historical interactions. However, existing frameworks encounter a fundamental dilemma between compressing redundant information efficiently and maintaining precise retrieval for downstream tasks. To bridge this gap, we propose MemFly, a framework grounded in information bottleneck principles that facilitates on-the-fly memory evolution for LLMs. Our approach minimizes compression entropy while maximizing relevance entropy via a gradient-free optimizer, constructing a stratified memory structure for efficient storage. To fully leverage MemFly, we develop a hybrid retrieval mechanism that seamlessly integrates semantic, symbolic, and topological pathways, incorporating iterative refinement to handle complex multi-hop queries. Comprehensive experiments demonstrate that MemFly substantially outperforms state-of-the-art baselines in memory coherence, response fidelity, and accuracy.
