Transformers require positional encodings to represent sequence order, yet most prior work focuses on designing new positional encodings rather than examining how positional information is fused with token embeddings. In this paper, we study whether the fusion mechanism itself affects performance, particularly in long-sequence settings. We conduct a controlled empirical study comparing three canonical fusion strategies--element-wise addition, concatenation with projection, and scalar gated fusion--under identical Transformer architectures, data splits, and random seeds. Experiments on three text classification datasets spanning short (AG News), medium (IMDB), and long (ArXiv) sequences show that fusion choice has negligible impact on short texts but produces consistent gains on long documents. To verify that these gains are structural rather than stochastic, we perform paired-seed analysis and cross-dataset comparison across sequence-length regimes. Additional experiments on the ArXiv dataset indicate that the benefit of learnable fusion generalizes across multiple positional encoding families. Finally, we explore a lightweight convolutional gating mechanism that introduces local inductive bias at the fusion level, evaluated on long documents only. Our results indicate that positional-encoding fusion is a non-trivial design choice for long-sequence Transformers and should be treated as an explicit modeling decision rather than a fixed default.


翻译:Transformer需要位置编码来表示序列顺序,然而大多数先前工作专注于设计新的位置编码,而非研究位置信息如何与词元嵌入融合。本文探讨融合机制本身是否影响性能,特别是在长序列场景下。我们在相同的Transformer架构、数据划分和随机种子条件下,对三种经典融合策略——逐元素加法、带投影的拼接和标量门控融合——进行了对照实证研究。在涵盖短序列(AG News)、中序列(IMDB)和长序列(ArXiv)的三个文本分类数据集上的实验表明,融合选择对短文本影响可忽略,但在长文档上能产生一致的性能提升。为验证这些提升源于结构而非随机因素,我们进行了配对种子分析和跨序列长度区间的跨数据集比较。在ArXiv数据集上的补充实验表明,可学习融合的益处可推广至多种位置编码族。最后,我们探索了一种轻量级卷积门控机制,该机制在融合层面引入局部归纳偏置,并仅在长文档上进行评估。我们的结果表明,位置编码融合是长序列Transformer中不可忽视的设计选择,应被视为显式建模决策而非固定默认选项。

0
下载
关闭预览

相关内容

【CMU博士论文】长度可外推的Transformer,149页pdf
专知会员服务
27+阅读 · 2024年6月30日
Transformer的无限之路:位置编码视角下的长度外推综述
专知会员服务
44+阅读 · 2024年1月17日
Graph Transformer近期进展
专知会员服务
65+阅读 · 2023年1月5日
【ICML2022】Transformer是元强化学习器
专知会员服务
56+阅读 · 2022年6月15日
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
专知会员服务
30+阅读 · 2021年7月30日
【ICML2021】具有线性复杂度的Transformer的相对位置编码
专知会员服务
25+阅读 · 2021年5月20日
Transformer文本分类代码
专知会员服务
118+阅读 · 2020年2月3日
【Tutorial】计算机视觉中的Transformer,98页ppt
专知
21+阅读 · 2021年10月25日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
从头开始了解Transformer
AI科技评论
25+阅读 · 2019年8月28日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
多图带你读懂 Transformers 的工作原理
AI研习社
10+阅读 · 2019年3月18日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
16+阅读 · 2013年12月31日
Arxiv
0+阅读 · 1月20日
Arxiv
0+阅读 · 2025年12月31日
VIP会员
相关VIP内容
【CMU博士论文】长度可外推的Transformer,149页pdf
专知会员服务
27+阅读 · 2024年6月30日
Transformer的无限之路:位置编码视角下的长度外推综述
专知会员服务
44+阅读 · 2024年1月17日
Graph Transformer近期进展
专知会员服务
65+阅读 · 2023年1月5日
【ICML2022】Transformer是元强化学习器
专知会员服务
56+阅读 · 2022年6月15日
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
专知会员服务
30+阅读 · 2021年7月30日
【ICML2021】具有线性复杂度的Transformer的相对位置编码
专知会员服务
25+阅读 · 2021年5月20日
Transformer文本分类代码
专知会员服务
118+阅读 · 2020年2月3日
相关资讯
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
16+阅读 · 2013年12月31日
Top
微信扫码咨询专知VIP会员