about
Human-Like Episodic Memory for Infinite Context LLMs (arxiv.org)
3 points by geuds on Aug 22, 2024 | hide | past | pdf | discuss on HN

In plain words: It splits long text into memory-like event chunks whenever the content shifts, then pulls back the most relevant chunks plus their neighbors when answering, with no retraining. This beat the best retrieval systems and even full-context models, working across 10 million tokens.

Abstract · Human-inspired Episodic Memory for Infinite Context LLMs

Large language models (LLMs) have shown remarkable capabilities, but still struggle with processing extensive contexts, limiting their ability to maintain coherence and accuracy over long sequences. In contrast, the human brain excels at organising and retrieving episodic experiences across vast temporal scales, spanning a lifetime. In this work, we introduce EM-LLM, a novel approach that integrates key aspects of human episodic memory and event cognition into LLMs with no fine-tuning, enabling them to handle practically infinite context lengths while maintaining computational efficiency. EM-LLM organises sequences of tokens into coherent episodic events using a combination of Bayesian surprise and graph-theoretic boundary refinement in an online fashion. When needed, these events are retrieved through a two-stage memory process, combining similarity-based and temporally contiguous retrieval for efficient, human-inspired access to relevant information. Experiments on the LongBench and $\infty$-Bench benchmarks demonstrate EM-LLM's superior performance, consistently outperforming the state-of-the-art retrieval model InfLLM across various baseline LLMs. In addition, EM-LLM outperforms its popular counterpart, RAG, in a wide range of tasks, while requiring similar resources. Notably, EM-LLM's performance even surpasses full-context models in most tasks, while successfully performing retrieval across 10 million tokens -- a scale computationally infeasible for such models. Finally, our analysis reveals strong correlations between EM-LLM's event segmentation and human-perceived events, suggesting parallels between this artificial system and its biological counterpart, thereby offering a novel computational framework for exploring human memory mechanisms.

Zafeirios Fountas, Martin A Benfeghoul, Adnan Oomerjee, Fenia Christopoulou, Gerasimos Lampouras, Haitham Bou-Ammar, Jun Wang
arXiv:2407.09450 · cs.AI, cs.CL, cs.LG, q-bio.NC · submitted Jul 12, 2024 · updated Oct 10, 2025
abstract · pdf · html

add comment on HN
Also discussed: May 2025 (27 points, 0 comments) · Aug 2024 (2 points, 0 comments)