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

InfiniteICL:通过长短期记忆转换打破上下文窗口大小的限制

InfiniteICL: Breaking the Limit of Context Window Size via Long Short-term Memory Transformation

The Chinese University of Hong Kong(香港中文大学)

Bowen Cao, Deng Cai, Wai Lam

AI总结:

InfiniteICL 框架通过将临时上下文知识转化为永久参数更新,模拟人类长短期记忆,有效突破 LLM 上下文窗口限制,在大幅减少上下文长度的同时实现或超越全上下文提示的性能。

摘要:

上下文学习(ICL)对大型语言模型(LLMs)至关重要,但其有效性受限于有限的上下文窗口,特别是在超长上下文中。为了克服这一点,我们引入了 InfiniteICL,这是一个将 LLMs 中的上下文和参数与人类认知系统中的短期和长期记忆相平行对应的框架,重点是将临时上下文知识转化为永久参数更新。这种方法显著减少了内存使用,在不同输入长度下保持稳健的性能,并通过上下文知识提取、选择和巩固的原理在理论上实现了无限上下文整合。评估表明,我们的方法将上下文长度减少了 90%,同时在事实回忆、基础推理和技能获取任务中实现了全上下文提示 103% 的平均性能。在对复杂的真实世界上下文(长度高达 2M tokens)进行顺序多轮转换时,我们的方法在使用仅 0.4% 原始上下文的情况下超越了全上下文提示。这些发现突显了 InfiniteICL 通过打破传统上下文窗口大小的限制来增强 LLMs 可扩展性和效率的潜力。

英文摘要:

In-context learning (ICL) is critical for large language models (LLMs), but its effectiveness is constrained by finite context windows, particularly in ultra-long contexts. To overcome this, we introduce InfiniteICL, a framework that parallels context and parameters in LLMs with short- and long-term memory in human cognitive systems, focusing on transforming temporary context knowledge into permanent parameter updates. This approach significantly reduces memory usage, maintains robust performance across varying input lengths, and theoretically enables infinite context integration through the principles of context knowledge elicitation, selection, and consolidation. Evaluations demonstrate that our method reduces context length by 90% while achieving 103% average performance of full-context prompting across fact recall, grounded reasoning, and skill acquisition tasks. When conducting sequential multi-turn transformations on complex, real-world contexts (with length up to 2M tokens), our approach surpasses full-context prompting while using only 0.4% of the original contexts. These findings highlight InfiniteICL's potential to enhance the scalability and efficiency of LLMs by breaking the limitations of conventional context window sizes.

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

↑