FragRel:利用大语言模型外部记忆中的片段级关系
FragRel: Exploiting Fragment-level Relations in the External Memory of Large Language Models
AI总结:
本研究提出FragRel方法,通过定义和利用外部记忆中的片段级关系,引入关系感知评估标准并构建片段连接的分层记忆LLM,解决了长文本处理中片段孤立的问题,提升了长故事理解、代码库级代码生成和长期聊天的能力。
摘要:
为了使用大语言模型(LLMs)处理无限长度的上下文,近期研究探索了分层管理长文本的方法。仅从外部记忆中提取几个文本片段并传入临时工作记忆,即LLM的上下文窗口。然而,现有方法孤立地处理文本片段,未考虑它们的结构联系,因此在处理具有密集相互关系的文本(如连贯的故事和代码库)时能力受限。本研究试图通过利用外部记忆中的片段级关系来解决这一问题。首先,我们定义了片段级关系,并针对不同文本类型提出了几种实例化方法。接着,我们在以往独立片段评估的基础上,引入了关系感知的片段评估标准。最后,我们提出了片段连接的分层记忆LLM。我们验证了在长篇故事理解、代码库级代码生成和长期聊天中引入这些关系的益处。
英文摘要:
To process contexts with unlimited length using Large Language Models (LLMs), recent studies explore hierarchically managing the long text. Only several text fragments are taken from the external memory and passed into the temporary working memory, i.e., LLM's context window. However, existing approaches isolatedly handle the text fragments without considering their structural connections, thereby suffering limited capability on texts with intensive inter-relations, e.g., coherent stories and code repositories. This work attempts to resolve this by exploiting the fragment-level relations in external memory. First, we formulate the fragment-level relations and present several instantiations for different text types. Next, we introduce a relation-aware fragment assessment criteria upon previous independent fragment assessment. Finally, we present the fragment-connected Hierarchical Memory based LLM. We validate the benefits of involving these relations on long story understanding, repository-level code generation, and long-term chatting.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。