Deep sequence models typically degrade in accuracy when test sequences significantly exceed their training lengths, yet many critical tasks--such as algorithmic reasoning, multi-step arithmetic, and compositional generalization--require robust length extrapolation. We introduce PRISM, a Probabilistic Relative-position Implicit Superposition Model, a novel positional encoding mechanism that enables Transformers to extrapolate accurately up to 10x beyond their training length. PRISM learns continuous relative positions through a differentiable histogram-filter update, preserving position uncertainty via a probabilistic superposition rather than conventional deterministic embeddings. Empirically, PRISM achieves state-of-the-art length extrapolation, successfully generalizing to previously intractable sequence lengths across algorithmic benchmarks--including arithmetic (addition, multiplication), SCAN compositionality tasks, and complex copy variants derived from DeepMind's recent datasets. Our analysis demonstrates that PRISM's stochastic positional encoding maintains sharp and interpretable internal states, providing a theoretical basis for reliable length generalization. These results advance the goal of neural sequence models that remain algorithmically robust at lengths far exceeding their training horizon.


翻译:深度序列模型在测试序列长度显著超过其训练长度时,其准确性通常会下降,然而许多关键任务——如算法推理、多步算术和组合泛化——都需要鲁棒的长度外推能力。我们提出了PRISM(概率相对位置隐式叠加模型),这是一种新颖的位置编码机制,使Transformer能够在其训练长度的10倍范围内实现精确外推。PRISM通过可微分直方图滤波器更新学习连续相对位置,通过概率叠加而非传统的确定性嵌入来保持位置不确定性。实验表明,PRISM在长度外推方面达到了最先进的性能,成功泛化到算法基准测试中先前难以处理的序列长度——包括算术(加法、乘法)、SCAN组合性任务,以及源自DeepMind近期数据集的复杂复制变体。我们的分析表明,PRISM的随机位置编码保持了清晰且可解释的内部状态,为可靠的长度泛化提供了理论基础。这些结果推进了神经序列模型在远超其训练范围的长度上仍保持算法鲁棒性的目标。

0
下载
关闭预览

相关内容

数学上,序列是被排成一列的对象(或事件);这样每个元素不是在其他元素之前,就是在其他元素之后。这里,元素之间的顺序非常重要。
【AAAI2021】“可瘦身”的生成式对抗网络
专知会员服务
13+阅读 · 2020年12月12日
NAACL 2019 | 一种考虑缓和KL消失的简单VAE训练方法
PaperWeekly
20+阅读 · 2019年4月24日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员