Q-mem: Query-Informed Online Memory for LLM Agents
Abstract
Compact recurrent memory provides LLM agents with a bounded-state mechanism for maintaining information across long-running interactions. However, as interaction histories grow, new evidence can render existing memory associations stale, creating a fundamental tension between revising outdated information and preserving useful memory. To address these challenges, we introduce Q-mem, a query-informed online memory module for frozen decoder language models. Q-mem decouples what to correct from where to update. Specifically, a gated component of the memory query orthogonal to the incoming key refines the selection of old content to revise, while the key remains the sole update address for both correction and insertion. Independent correction and write gates, together with bounded retention, separately control revision, insertion, and persistence. A request-local temporary state further allows the full user query to condition memory access without committing the request to persistent history. Across three backbones, Q-mem achieves the strongest aggregate performance among the compared methods. These results show that query-informed online revision can improve bounded recurrent memory without updating the backbone.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.