In-context learning is fundamental to modern Large Language Models (LLMs); however, prevailing architectures impose a rigid and fixed contextual structure by assigning linear or constant positional indices. Drawing on Cognitive Load Theory (CLT), we argue that this uninformative structure increases extraneous cognitive load, consuming finite working memory capacity that should be allocated to deep reasoning and attention allocation. To address this, we propose RePo, a novel mechanism that reduces extraneous load via context re-positioning. Unlike standard approaches, RePo utilizes a differentiable module, $f_φ$, to assign token positions that capture contextual dependencies, rather than replying on pre-defined integer range. By continually pre-training on the OLMo-2 1B backbone, we demonstrate that RePo significantly enhances performance on tasks involving noisy contexts, structured data, and longer context length, while maintaining competitive performance on general short-context tasks. Detailed analysis reveals that RePo successfully allocate higher attention to distant but relevant information, assign positions in dense and non-linear space, and capture the intrinsic structure of the input context. Our code is available at https://github.com/SakanaAI/repo.


翻译:上下文学习是现代大语言模型(LLMs)的基础能力;然而,主流架构通过分配线性或恒定的位置索引,强制施加了僵化且固定的上下文结构。基于认知负荷理论(CLT),我们认为这种非信息性的结构会增加外在认知负荷,消耗本应用于深度推理和注意力分配的有限工作记忆容量。为解决此问题,我们提出了RePo,一种通过上下文重定位来降低外在负荷的新机制。与标准方法不同,RePo采用可微分模块 $f_φ$ 来分配能够捕捉上下文依赖关系的词元位置,而非依赖于预定义的整数范围。通过在OLMo-2 1B骨干网络上持续预训练,我们证明RePo在处理涉及噪声上下文、结构化数据和较长上下文长度的任务中性能显著提升,同时在通用短上下文任务上保持竞争力。详细分析表明,RePo成功地将更高注意力分配给遥远但相关的信息,在稠密非线性空间中分配位置,并捕捉输入上下文的内在结构。我们的代码公开于 https://github.com/SakanaAI/repo。

0
下载
关闭预览

相关内容

【KDD2024】HiGPT:异构图语言模型
专知会员服务
19+阅读 · 2024年7月9日
【NeurIPS2019】图变换网络:Graph Transformer Network
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员