跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 计算与语言

arXiv:2503.08067 (cs)
[提交于 2025年3月11日 (v1),最后修订于 2025年9月20日 (此版本, v3)]

标题:Context-aware Biases for Length Extrapolation

作者:Ali Veisi, Hamidreza Amirzadeh, Amir Mansourian
查看论文《Context-aware Biases for Length Extrapolation》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Transformers often struggle to generalize to longer sequences than those seen during training, a limitation known as length extrapolation. Most existing Relative Positional Encoding (RPE) methods attempt to address this by introducing either fixed linear biases or globally learned biases, which lack the capacity to adapt to different input contexts. In this work, we propose an additive RPE, Context-Aware Biases for Length Extrapolation (CABLE), a method that learns token-specific, context-aware biases for each attention head in transformers. By dynamically adjusting positional biases based on the input sequence, CABLE overcomes the rigidity of fixed RPEs. When evaluated on sequences longer than originally trained with, GPT-2 Medium (334M parameters) with CABLE achieves lower perplexity than counterparts using other widely adopted positional encoding methods. Additionally, by applying CABLE to the BERT base model we improved performance in long-context retrieval tasks. Our method significantly enhances the extrapolation performance of existing RPE methods tested on the FineWeb-Edu-10B and WikiText-103 datasets. Our code is available at: https://github.com/AlgonetLabs/Cable.
评论: Accepted at EMNLP 2025 Main Conference
主题: 计算与语言 (cs.CL)
引用方式: arXiv:2503.08067 [cs.CL]
  (或者 arXiv:2503.08067v3 [cs.CL] 对于此版本)
  https://doi.org/10.48550/arXiv.2503.08067

提交历史

来自:Hamidreza Amirzadeh
[v1] 2025年3月11日 星期二 05:54:58 UTC
[v2] 2025年5月31日 星期六 06:24:36 UTC
[v3] 2025年9月20日 星期六 19:02:42 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs
< 上一篇   |   下一篇 >
最新 | 近期 | 2025-09
切换浏览方式为:
cs.CL

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站