arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.16754cs.CLcs.AI

HEMA:一种受海马体启发的长上下文AI对话扩展记忆架构

HEMA : A Hippocampus-Inspired Extended Memory Architecture for Long-Context AI Conversations

Kwangseob Ahn

AI总结:

HEMA提出一种受海马体启发的双记忆架构,结合紧凑摘要与向量存储,使6B参数模型在超300轮对话中保持连贯,事实回忆率从41%提升至87%,显著优于传统方法。

摘要:

大型语言模型(LLMs)在跨越数百轮对话的扩展会话中难以保持连贯性,尽管在其上下文窗口内表现良好。本文介绍了HEMA(受海马体启发的扩展记忆架构),一种受人类认知过程启发的双记忆系统。HEMA结合了紧凑记忆——一个持续更新的单句摘要,用于保持全局叙事连贯性,以及向量记忆——一个通过余弦相似度查询的块嵌入情节存储。当与一个60亿参数的Transformer集成时,HEMA能在超过300轮的对话中保持连贯,同时将提示长度控制在3500个标记以下。实验结果显示显著改进:事实回忆准确率从41%提升至87%,人类评分的连贯性在5分制上从2.7提升至4.3。在10K索引块的情况下,向量记忆实现了P@5 >= 0.80和R@50 >= 0.74,与仅摘要方法相比,精确率-召回率曲线下面积翻倍。消融研究揭示了两个关键见解:通过年龄加权剪枝实现的语义遗忘将检索延迟降低了34%,且召回损失极小;两级摘要层次结构防止了超过1000轮的超长对话中的级联错误。HEMA证明了将逐字回忆与语义连续性相结合,为能够进行长达一个月对话且无需模型重新训练的隐私感知对话AI提供了一种实用解决方案。

英文摘要:

Large language models (LLMs) struggle with maintaining coherence in extended conversations spanning hundreds of turns, despite performing well within their context windows. This paper introduces HEMA (Hippocampus-Inspired Extended Memory Architecture), a dual-memory system inspired by human cognitive processes. HEMA combines Compact Memory - a continuously updated one-sentence summary preserving global narrative coherence, and Vector Memory - an episodic store of chunk embeddings queried via cosine similarity. When integrated with a 6B-parameter transformer, HEMA maintains coherent dialogues beyond 300 turns while keeping prompt length under 3,500 tokens. Experimental results show substantial improvements: factual recall accuracy increases from 41% to 87%, and human-rated coherence improves from 2.7 to 4.3 on a 5-point scale. With 10K indexed chunks, Vector Memory achieves P@5 >= 0.80 and R@50 >= 0.74, doubling the area under the precision-recall curve compared to summarization-only approaches. Ablation studies reveal two key insights: semantic forgetting through age-weighted pruning reduces retrieval latency by 34% with minimal recall loss, and a two-level summary hierarchy prevents cascade errors in ultra-long conversations exceeding 1,000 turns. HEMA demonstrates that combining verbatim recall with semantic continuity provides a practical solution for privacy-aware conversational AI capable of month-long dialogues without model retraining.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑