Neural network parameter spaces are inherently non-injective, as distinct parameter configurations can realize identical functions through functional equivalence. While this symmetry is well understood in classical fully connected and convolutional models, it becomes substantially more intricate in modern attention-based architectures. Existing analyses of multihead attention have largely focused on the vanilla formulation, overlooking positional encodings that fundamentally reshape architectural symmetries. In this work, we provide a formal study of functional equivalence in Transformers with positional encodings. Focusing on the two most widely used variants--sinusoidal and rotary positional encodings (RoPE)--we show that sinusoidal encodings preserve the equivalence structure of vanilla attention, whereas rotary encodings significantly reduce the symmetry group, thereby enhancing expressivity. This offers a principled explanation for the growing prominence of RoPE in practice. We further examine how positional encodings affect linear mode connectivity, and through an alignment algorithm, empirically demonstrate that the presence and variability of connectivity across Transformer settings crucially depend on the positional encoding.


翻译:神经网络参数空间本质上不是单射的,因为不同的参数配置可以通过函数等价性实现相同的函数。虽然这种对称性在经典的全连接和卷积模型中已得到充分理解,但在现代基于注意力的架构中,它变得愈加复杂。现有的多头注意力分析主要聚焦于标准公式,忽略了从根本上重塑架构对称性的位置编码。在这项工作中,我们对方位编码的Transformer中的函数等价性进行了形式化研究。聚焦于两种最广泛使用的变体——正弦位置编码和旋转位置编码(RoPE),我们表明正弦编码保留了标准注意力的等价结构,而旋转编码显著减小了对称群,从而增强了表达能力。这为RoPE在实践中日益增长的应用提供了原理性解释。我们进一步研究了位置编码如何影响线性模式连通性,并通过对齐算法,实验证明Transformer设置中连通性的存在性和可变性关键取决于位置编码。

0
下载
关闭预览

相关内容

LinkedIn最新《注意力模型》综述论文大全,20页pdf
专知会员服务
138+阅读 · 2020年12月20日
【ICLR 2019】双曲注意力网络,Hyperbolic  Attention Network
专知会员服务
84+阅读 · 2020年6月21日
注意力机制介绍,Attention Mechanism
专知会员服务
172+阅读 · 2019年10月13日
Attention!注意力机制模型最新综述
中国人工智能学会
18+阅读 · 2019年4月8日
从Seq2seq到Attention模型到Self Attention(一)
量化投资与机器学习
76+阅读 · 2018年10月8日
深度学习中的注意力机制
人工智能头条
16+阅读 · 2017年11月2日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 6月9日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
6+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关VIP内容
LinkedIn最新《注意力模型》综述论文大全,20页pdf
专知会员服务
138+阅读 · 2020年12月20日
【ICLR 2019】双曲注意力网络,Hyperbolic  Attention Network
专知会员服务
84+阅读 · 2020年6月21日
注意力机制介绍,Attention Mechanism
专知会员服务
172+阅读 · 2019年10月13日
相关基金
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员