Towards Lifelong Dialogue Agents via Timeline-based Memory Management

Seo Hyun Kim, Kai Tzu-iunn Ong, Taeyoon Kwon, Nam‐Young Kim, Keummin Ka, SeongHyeon Bae, Yohan Jo, Seung-won Hwang, Dongha Lee

Abstract

To achieve lifelong human-agent interaction, dialogue agents need to constantly memorize perceived information and properly retrieve it for response generation (RG). While prior studies focus on getting rid of outdated memories to improve retrieval quality, we argue that such memories provide rich, important contextual cues for RG (e.g., changes in user behaviors) in long-term conversations. We present THEANINE, a framework for LLM-based lifelong dialogue agents. THEANINE discards memory removal and manages large-scale memories by linking them based on their temporal and cause-effect relation. Enabled by this linking structure, THEANINE augments RG with memory timelines - series of memories representing the evolution or causality of relevant past events. Along with THEANINE, we introduce TeaFarm, a counterfactual-driven evaluation scheme, addressing the limitation of G-Eval and human efforts when assessing agent performance in integrating past memories into RG.

Introduction: The Problem with Memory Deletion

For an AI to act as a lifelong companion, it must maintain a coherent history across multiple sessions. As interactions accumulate, the volume of data makes retrieval difficult. The conventional solution is memory updating: compressing or deleting "outdated" memories when new, conflicting information arrives.

However, this approach destroys the evolutionary context of a user's life. If a user moves from being afraid of water to taking swimming lessons, a standard agent might overwrite the fear. A truly intelligent agent should recognize this change, noting, "I remember you used to be afraid of anything related to water." Simply providing the entire dialogue history is also insufficient, as LLMs often suffer from recency bias and ignore older, relevant cues.

THEANINE: A Framework for Timeline-based Memory

The authors propose THEANINE, a framework that manages memory without ever deleting it. Instead of treating memories as isolated facts, THEANINE organizes them into a cause-and-effect graph to preserve the narrative of a user's life.

The three phases of the THEANINE framework: Memory Graph Construction, Timeline Retrieval and Refinement, and Timeline-augmented Response Generation.

The framework operates in three distinct phases:

  1. Memory Graph Construction: Memories are stored as nodes in a directed graph. New memories are linked to older ones using cause-and-effect commonsense relations (e.g., Cause, Reason, Want, HinderedBy).
  2. Timeline Retrieval and Refinement: Upon receiving a user input, the system retrieves relevant memories and traverses the graph to extract a connected timeline. An LLM then refines this raw graph data into a coherent narrative context.
  3. Timeline-augmented Response Generation: This refined timeline is used to generate a response that reflects the full history and evolution of the topic.

Evaluation via TeaFarm

To test these capabilities, the authors introduced TeaFarm, a counterfactual-driven evaluation scheme. Standard evaluators like G-Eval often fail to judge long-term memory recall accurately. TeaFarm addresses this by generating counterfactual questions—trick questions based on false premises (e.g., asking about a trip the user never took). An effective agent must use its memory to correct the premise rather than simply agreeing with the user. This evaluation is supported by the newly introduced TeaBag dataset, which contains 200 counterfactual Q&A pairs.

Key Insights and Results

The core advantage of THEANINE is its ability to leverage the "story" behind the facts. By preserving contradictory or "outdated" memories, the agent can comment on personal growth and change.

Comparison of response generation strategies. THEANINE (c) correctly identifies the user's past fear of water and current progress, whereas other methods (a, b) fail to reconcile the conflicting information.

Performance Highlights:

  • Superior Quality: THEANINE outperformed baselines (MemoChat, COMEDY) across metrics like BLEU-4, ROUGE-L, and BERTScore on datasets like Multi-Session Chat (MSC) and Conversation Chronicles (CC).
  • High Entailment: Human evaluations showed that 68% of THEANINE's responses successfully entailed past conversations, compared to just 24-44% for baselines.
  • Robustness: On the TeaFarm benchmark, THEANINE achieved the highest success rate (21%). While low in absolute terms, this highlights the difficulty of the task and how easily standard agents are "fooled" by leading questions.
  • Efficiency: THEANINE maintains a strong cost-vs-performance balance, making it viable for practical applications.

Conclusion

THEANINE demonstrates that "outdated" memories are not noise but valuable context. By shifting from memory deletion to timeline-based management, dialogue agents can achieve a more human-like understanding of long-term user evolution. Future work will focus on scaling this to hundreds of sessions and incorporating psychological "forgetting curves" to better mimic human memory.

Summary updated

Abstract

To achieve lifelong human-agent interaction, dialogue agents need to constantly memorize perceived information and properly retrieve it for response generation (RG). While prior studies focus on getting rid of outdated memories to improve retrieval quality, we argue that such memories provide rich, important contextual cues for RG (e.g., changes in user behaviors) in long-term conversations. We present THEANINE, a framework for LLM-based lifelong dialogue agents. THEANINE discards memory removal and manages large-scale memories by linking them based on their temporal and cause-effect relation. Enabled by this linking structure, THEANINE augments RG with memory timelines - series of memories representing the evolution or causality of relevant past events. Along with THEANINE, we introduce TeaFarm, a counterfactual-driven evaluation scheme, addressing the limitation of G-Eval and human efforts when assessing agent performance in integrating past memories into RG. A supplementary video for THEANINE and data for TeaFarm are at https://huggingface.co/spaces/ResearcherScholar/Theanine.
BibTeX
@inproceedings{kim2025towards,
  author = {Seo Hyun Kim and Kai Tzu-iunn Ong and Taeyoon Kwon and Nam‐Young Kim and Keummin Ka and SeongHyeon Bae and Yohan Jo and Seung-won Hwang and Dongha Lee},
  title = {{Towards Lifelong Dialogue Agents via Timeline-based Memory Management}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  doi = {10.18653/v1/2025.naacl-long.435},
}
Figure