Human-inspired Episodic Memory for Infinite Context LLMs

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Fountas, Zafeirios, Benfeghoul, Martin A, Oomerjee, Adnan, Christopoulou, Fenia, Lampouras, Gerasimos, Bou-Ammar, Haitham, Wang, Jun
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917003720130560
author Fountas, Zafeirios
Benfeghoul, Martin A
Oomerjee, Adnan
Christopoulou, Fenia
Lampouras, Gerasimos
Bou-Ammar, Haitham
Wang, Jun
author_facet Fountas, Zafeirios
Benfeghoul, Martin A
Oomerjee, Adnan
Christopoulou, Fenia
Lampouras, Gerasimos
Bou-Ammar, Haitham
Wang, Jun
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2407_09450
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Human-inspired Episodic Memory for Infinite Context LLMs
Fountas, Zafeirios
Benfeghoul, Martin A
Oomerjee, Adnan
Christopoulou, Fenia
Lampouras, Gerasimos
Bou-Ammar, Haitham
Wang, Jun
Artificial Intelligence
Computation and Language
Machine Learning
Neurons and Cognition
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.
title Human-inspired Episodic Memory for Infinite Context LLMs
topic Artificial Intelligence
Computation and Language
Machine Learning
Neurons and Cognition
url https://arxiv.org/abs/2407.09450