To Retrieve or to Memorize? Analyzing the Cost-Benefit Tradeoff of Weight-Time vs. Context-Time Memory in Multi-Session Agents
Abstract
Large Language Model (LLM) agents operating in multi-session environments must maintain a persistent memory of user preferences, shared histories, and cumulative knowledge. This persistent state is typically managed via two paradigms: context-time memory (such as Retrieval-Augmented Generation or RAG), which dynamically retrieves relevant history into the prompt, and weight-time memory, which dynamically updates model parameters (such as via Low-Rank Adaptation or LoRA). While RAG is simple and accurate for short-term recall, it incurs progressive latency and computational costs due to quadratic attention complexity and prompt bloat. Conversely, test-time weight updates offer constant-time inference costs at the expense of upfront training compute and the risk of catastrophic forgetting. In this paper, we present a systematic empirical comparison of these two memory paradigms over extended user-agent interactions spanning up to 50 conversational sessions. Our findings demonstrate the operational conditions and sensitivity boundaries governing the computational crossover point between memory paradigms, where weight-time update mechanisms become more computationally efficient and contextually robust than traditional RAG, paving the way for hybrid memory architectures in autonomous agents.