无限背景下的类人情节记忆大型语言模型
Human-like Episodic Memory for Infinite Context LLMs
July 12, 2024
作者: Zafeirios Fountas, Martin A Benfeghoul, Adnan Oomerjee, Fenia Christopoulou, Gerasimos Lampouras, Haitham Bou-Ammar, Jun Wang
cs.AI
摘要
大型语言模型(LLMs)展示了显著的能力,但仍然在处理广泛上下文方面存在困难,限制了它们在长序列上保持连贯性和准确性的能力。相比之下,人类大脑擅长组织和检索跨越终生的广阔时间尺度的情节性经历。在这项工作中,我们引入了EM-LLM,一种新颖的方法,将人类情节性记忆和事件认知的关键方面整合到LLMs中,使它们能够有效处理几乎无限的上下文长度,同时保持计算效率。EM-LLM使用贝叶斯惊奇和图论边界细化的组合以在线方式将标记序列组织成连贯的情节事件。在需要时,通过两阶段记忆过程检索这些事件,结合基于相似性和时间连续性的检索,实现对相关信息的高效且类似人类的访问。对LongBench数据集的实验表明,EM-LLM表现出卓越的性能,在各种任务中相对于最先进的InfLLM模型有4.3%的整体相对改进,包括在PassageRetrieval任务上有33%的改进。此外,我们的分析揭示了EM-LLM的事件分割与人类感知事件之间的强相关性,表明这一人工系统与其生物对应物之间存在联系。这项工作不仅推进了LLM在处理扩展上下文方面的能力,还为探索人类记忆机制提供了计算框架,为人工智能和认知科学的跨学科研究开辟了新途径。
English
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,
enabling them to effectively 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 on-line fashion. When needed, these
events are retrieved through a two-stage memory process, combining
similarity-based and temporally contiguous retrieval for efficient and
human-like access to relevant information. Experiments on the LongBench dataset
demonstrate EM-LLM's superior performance, outperforming the state-of-the-art
InfLLM model with an overall relative improvement of 4.3% across various tasks,
including a 33% improvement on the PassageRetrieval task. Furthermore, our
analysis reveals strong correlations between EM-LLM's event segmentation and
human-perceived events, suggesting a bridge between this artificial system and
its biological counterpart. This work not only advances LLM capabilities in
processing extended contexts but also provides a computational framework for
exploring human memory mechanisms, opening new avenues for interdisciplinary
research in AI and cognitive science.Summary
AI-Generated Summary