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

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Zhang, Binchi, Zheng, Zaiyi, Chen, Zhengzhang, Li, Jundong
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866908383192285184
author Zhang, Binchi
Zheng, Zaiyi
Chen, Zhengzhang
Li, Jundong
author_facet Zhang, Binchi
Zheng, Zaiyi
Chen, Zhengzhang
Li, Jundong
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2502_00264
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Beyond the Permutation Symmetry of Transformers: The Role of Rotation for Model Fusion
Zhang, Binchi
Zheng, Zaiyi
Chen, Zhengzhang
Li, Jundong
Machine Learning
Computer Vision and Pattern Recognition
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.
title Beyond the Permutation Symmetry of Transformers: The Role of Rotation for Model Fusion
topic Machine Learning
Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2502.00264