JustMem improves memory use for better long conversations

JustMem: Just-Enough Memory Access for Long-Term Conversations

Computation and Language

Summary

Handling long conversations can be tricky because important details might be spread out over many sessions and some memory-saving methods lose useful information. The authors propose JustMem, which stores conversation history in small pieces and chooses how it looks up information based on the question being asked. It can search narrowly, broadly, or recall exact details as needed. Tests show JustMem is more accurate and efficient than other memory systems for long conversations.

What this means in practice

  • For chatbot developers: Build chatbots that can remember and retrieve relevant conversation details over long-term interactions without overloading the model with excessive context.
  • For customer support platforms: Enhance support bots to access precise past conversation evidence across sessions improving answer accuracy while reducing computing costs.

Authors

Guanhua Chen, Yanting Wang, Wenjing Zhi, Lei Sha

Abstract

Efficient long-term conversational memory requires retrieving sufficient evidence without indiscriminately expanding the context presented to the language model. This is challenging because relevant evidence may be distributed across multiple sessions, while compression may discard details needed for answering. Different queries therefore require different forms of memory access. To capture these demands, we formulate memory access along two dimensions: discovery breadth, which controls how broadly evidence is searched, and reading fidelity, which controls whether evidence is read in compact form or recovered from the original conversation. Based on this formulation, we introduce JustMem, which stores conversation history as compact atomic memories and adapts memory access along these two dimensions to each query. Specifically, LOOKUP handles local evidence, COMPOSE broadens discovery for distributed evidence, and REPLAY increases reading fidelity for fidelity-sensitive evidence. On LoCoMo and LongMemEval-S, JustMem achieves the highest mean accuracy and retrieval recall among the compared memory systems while using substantially fewer generative-model tokens for memory construction and inference.