One persistent challenge in LLM research is the development of attention mechanisms that are able to generalise from training on shorter contexts to inference on longer contexts. We propose two conditions that we expect all effective long context attention mechanisms to have: scale-invariant total attention, and scale-invariant attention sparsity. Under a Gaussian assumption, we show that a simple position-dependent transformation of the attention logits is sufficient for these conditions to hold. Experimentally we find that the resulting scale-invariant attention scheme gives considerable benefits in terms of validation loss when zero-shot generalising from training on short contexts to validation on longer contexts, and is effective at long-context retrieval.


翻译:大型语言模型研究中一个持续存在的挑战是开发能够从短上下文训练泛化至长上下文推理的注意力机制。我们提出了两个条件,预期所有有效的长上下文注意力机制都应具备:尺度不变的总注意力与尺度不变的注意力稀疏性。在高斯分布假设下,我们证明通过对注意力对数进行简单的位置相关变换即可满足这些条件。实验结果表明,该尺度不变注意力方案在从短上下文训练零样本泛化至长上下文验证时,能在验证损失方面带来显著优势,并有效实现长上下文检索。

0
下载
关闭预览

相关内容

【ICML2024】基于正则化的持续学习的统计理论
专知会员服务
21+阅读 · 2024年6月11日
专知会员服务
23+阅读 · 2021年10月6日
专知会员服务
38+阅读 · 2021年6月3日
专知会员服务
31+阅读 · 2020年12月14日
专知会员服务
29+阅读 · 2020年10月2日
【ICML2021】因果匹配领域泛化
专知
12+阅读 · 2021年8月12日
【NeurIPS2019】图变换网络:Graph Transformer Network
图注意力网络
科技创新与创业
35+阅读 · 2017年11月22日
国家自然科学基金
1+阅读 · 2016年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Arxiv
0+阅读 · 11月27日
VIP会员
相关VIP内容
【ICML2024】基于正则化的持续学习的统计理论
专知会员服务
21+阅读 · 2024年6月11日
专知会员服务
23+阅读 · 2021年10月6日
专知会员服务
38+阅读 · 2021年6月3日
专知会员服务
31+阅读 · 2020年12月14日
专知会员服务
29+阅读 · 2020年10月2日
相关资讯
【ICML2021】因果匹配领域泛化
专知
12+阅读 · 2021年8月12日
【NeurIPS2019】图变换网络:Graph Transformer Network
图注意力网络
科技创新与创业
35+阅读 · 2017年11月22日
相关基金
国家自然科学基金
1+阅读 · 2016年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员