{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/beyond-the-permutation-symmetry-of","title":"Beyond the Permutation Symmetry of Transformers: The Role of Rotation for Model Fusion","arxiv_id":"2502.00264","date":"2025-02-01","proceeding":null,"authors":["Binchi Zhang","Zaiyi Zheng","Zhengzhang Chen","Jundong Li"],"abstract":"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.","url_abs":"https://arxiv.org/abs/2502.00264v1","url_pdf":"https://arxiv.org/pdf/2502.00264v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"beyond-the-permutation-symmetry-of","repo_url":"https://github.com/zhengzaiyi/rotationsymmetry","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2502.00264","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2502.00264"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhengzaiyi/rotationsymmetry","reach":null}],"summary":{"ran_draft_wrong":5,"unverified":3},"by_repo_kind":{"official":{"samples":8,"ran":5,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":8,"samples":[{"code_sha256_prefix":"19cba9fb643acdf6","entry":"Chunk_SVD_QK","repo":"zhengzaiyi/rotationsymmetry","repo_kind":"official","path":"vit-fusion/otfusion/pi_vit_fusion.py","file_url":"https://github.com/zhengzaiyi/rotationsymmetry/blob/HEAD/vit-fusion/otfusion/pi_vit_fusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"19cba9fb643acdf6"}},{"code_sha256_prefix":"151343872022d2ae","entry":"Chunk_SVD_VO","repo":"zhengzaiyi/rotationsymmetry","repo_kind":"official","path":"vit-fusion/otfusion/pi_vit_fusion.py","file_url":"https://github.com/zhengzaiyi/rotationsymmetry/blob/HEAD/vit-fusion/otfusion/pi_vit_fusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"151343872022d2ae"}},{"code_sha256_prefix":"3f62fcbeb9dc9f53","entry":"Permute_IO","repo":"zhengzaiyi/rotationsymmetry","repo_kind":"official","path":"vit-fusion/otfusion/pi_vit_fusion.py","file_url":"https://github.com/zhengzaiyi/rotationsymmetry/blob/HEAD/vit-fusion/otfusion/pi_vit_fusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3f62fcbeb9dc9f53"}},{"code_sha256_prefix":"6a0bbc5ecdd2262c","entry":"get_QKVO","repo":"zhengzaiyi/rotationsymmetry","repo_kind":"official","path":"vit-fusion/otfusion/pi_vit_fusion.py","file_url":"https://github.com/zhengzaiyi/rotationsymmetry/blob/HEAD/vit-fusion/otfusion/pi_vit_fusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6a0bbc5ecdd2262c"}},{"code_sha256_prefix":"698fdee683275269","entry":"get_submodule","repo":"zhengzaiyi/rotationsymmetry","repo_kind":"official","path":"vit-fusion/otfusion/pi_vit_fusion.py","file_url":"https://github.com/zhengzaiyi/rotationsymmetry/blob/HEAD/vit-fusion/otfusion/pi_vit_fusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"698fdee683275269"}},{"code_sha256_prefix":"673a35b1dd5fa321","entry":"get_IO","repo":"zhengzaiyi/rotationsymmetry","repo_kind":"official","path":"vit-fusion/otfusion/pi_vit_fusion.py","file_url":"https://github.com/zhengzaiyi/rotationsymmetry/blob/HEAD/vit-fusion/otfusion/pi_vit_fusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"673a35b1dd5fa321"}},{"code_sha256_prefix":"05593365593762e2","entry":"pi_fusion","repo":"zhengzaiyi/rotationsymmetry","repo_kind":"official","path":"vit-fusion/otfusion/pi_vit_fusion.py","file_url":"https://github.com/zhengzaiyi/rotationsymmetry/blob/HEAD/vit-fusion/otfusion/pi_vit_fusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"05593365593762e2"}},{"code_sha256_prefix":"894778cbc6268ff9","entry":"pi_match","repo":"zhengzaiyi/rotationsymmetry","repo_kind":"official","path":"vit-fusion/otfusion/pi_vit_fusion.py","file_url":"https://github.com/zhengzaiyi/rotationsymmetry/blob/HEAD/vit-fusion/otfusion/pi_vit_fusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"894778cbc6268ff9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}