arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.00264cs.LGcs.CV
收藏

超越 Transformer 的置换对称性:旋转在模型融合中的作用

Beyond the Permutation Symmetry of Transformers: The Role of Rotation for Model Fusion

University of Virginia(弗吉尼亚大学)

Binchi Zhang, Zaiyi Zheng, Zhengzhang Chen, Jundong Li

AI总结:

本文提出用于 Transformer 的旋转对称性,通过在连续域旋转自注意力层参数矩阵扩大等价集,并据此提出理论上最优的即插即用参数匹配算法,显著提升了自然语言与视觉任务中的模型融合效果。

摘要:

深度神经网络(DNN)参数空间中的对称性已被证明对各种深度学习应用有益。一个著名的例子是多层感知机(MLP)中的置换对称性,即对某一层权重矩阵的行进行置换,并对相邻层应用逆置换,可得到一个功能等价的模型。虽然置换对称性完全刻画了 MLP 的等价集,但其离散性质限制了它在 Transformer 中的效用。在本文中,我们引入了旋转对称性,这是一种用于 Transformer 的参数空间对称性新形式,它通过旋转自注意力层中的参数矩阵来推广置换对称性。与置换对称性不同,旋转对称性在连续域中运作,从而显著扩大了 Transformer 的等价集。基于这一特性,我们提出了一种理论上最优的参数匹配算法,作为即插即用模块来增强模型融合。我们使用预训练 Transformer 在各种自然语言和视觉任务上评估了我们的方法。实验结果表明,我们基于旋转对称性的匹配算法显著改善了模型融合,突显了参数空间对称性促进模型融合的潜力。我们的代码可在 https://github.com/zhengzaiyi/RotationSymmetry 获取。

英文摘要:

Symmetry in the parameter space of deep neural networks (DNNs) has proven beneficial for various deep learning applications. A well-known example is the permutation symmetry in Multi-Layer Perceptrons (MLPs), where permuting the rows of weight matrices in one layer and applying the inverse permutation to adjacent layers yields a functionally equivalent model. While permutation symmetry fully characterizes the equivalence set for MLPs, its discrete nature limits its utility for transformers. In this paper, we introduce rotation symmetry, a novel form of parameter space symmetry for transformers that generalizes permutation symmetry by rotating parameter matrices in self-attention layers. Unlike permutation symmetry, rotation symmetry operates in a continuous domain, thereby significantly expanding the equivalence set for transformers. Based on this property, we propose a theoretically optimal parameter matching algorithm as a plug-and-play module to enhance model fusion. We evaluate our approach using pre-trained transformers across diverse natural language and vision tasks. Experimental results demonstrate that our rotation symmetry-based matching algorithm substantially improves model fusion, highlighting the potential of parameter space symmetry to facilitate model fusion. Our code is available on https://github.com/zhengzaiyi/RotationSymmetry.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑