Equivariant Neural Functional Networks for Transformers
Hoang V. Tran, Thieu Vo, An Nguyen The, Tho Tran Huu, Minh-Khoi Nguyen-Nhat, Thanh Tran, Duy-Tung Pham, Tan Minh Nguyen
Abstract
This paper systematically explores neural functional networks (NFN) for transformer architectures. NFN are specialized neural networks that treat the weights, gradients, or sparsity patterns of a deep neural network (DNN) as input data and have proven valuable for tasks like learnable optimizers, implicit data representations, and weight editing. While NFN have been extensively developed for MLP and CNN, no prior work has addressed their design for transformers, despite their importance in modern deep learning. This paper aims to address this gap by systematically studying NFN for transformers. We first determine the maximal symmetric group of the weights in a multi-head attention module and a necessary and sufficient condition under which two sets of hyperparameters of the module define the same function. We then define the weight space of transformer architectures and its associated group action, leading to design principles for NFN in transformers. Based on these, we introduce Transformer-NFN, an NFN equivariant under this group action. Additionally, we release a dataset of over 125,000 Transformers model checkpoints trained on two datasets with two tasks, providing a benchmark for evaluating Transformer-NFN and encouraging further research on transformer training and performance. The code is publicly available at https://github.com/MathematicalAI-NUS/Transformer-NFN.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
20 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Distance-Based Tree-Sliced Wasserstein Distance cites Monomial Matrix Group Equivariant Neural Functional Networks
- Monomial Matrix Group Equivariant Neural Functional Networks cites Fast Model Editing at Scale
- Elliptical Attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Elliptical Attention cites Decision Transformer: Reinforcement Learning via Sequence Modeling
- Elliptical Attention cites Learning Transferable Visual Models From Natural Language Supervision
- Elliptical Attention cites Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis
- Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis cites Elliptical Attention
- Robust Speech Recognition via Large-Scale Weak Supervision cites Learning Transferable Visual Models From Natural Language Supervision
- Decision Transformer: Reinforcement Learning via Sequence Modeling cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- On Linear Mode Connectivity of Mixture-of-Experts Architectures cites Distance-Based Tree-Sliced Wasserstein Distance
- On Linear Mode Connectivity of Mixture-of-Experts Architectures cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Learning Transferable Visual Models From Natural Language Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis cites Decision Transformer: Reinforcement Learning via Sequence Modeling
- Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis cites Learning Transferable Visual Models From Natural Language Supervision
Cited by top-tier papers20
- Monomial Matrix Group Equivariant Neural Functional NetworksHoang V. Tran, Thieu N. Vo, Tho Huu, An Nguyen The et al.NeurIPS 2024 · 19 citations
- Elliptical AttentionStefan K. Nielsen, Laziz U. Abdullaev, Rachel S. Y. Teo, Tan NguyenNeurIPS 2024 · 12 citations
- Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component AnalysisRachel S. Y. Teo, Tan M. NguyenNeurIPS 2024 · 11 citations
- On Linear Mode Connectivity of Mixture-of-Experts ArchitecturesViet-Hoang Tran, Van-Hoan Trinh, Khanh Vinh Bui, Tan M. NguyenNeurIPS 2025 · 9 citations
- Distance-Based Tree-Sliced Wasserstein DistanceHoang V. Tran, Minh-Khoi Nguyen-Nhat, Huyen Trang Pham, Thanh T. Chu et al.ICLR 2025 · 8 citations
Builds on34
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Robust Speech Recognition via Large-Scale Weak SupervisionAlec Radford, Jong Wook Kim, Tao Xu, Greg Brockman et al.ICML 2023 · 6,966 citations
- Decision Transformer: Reinforcement Learning via Sequence ModelingLili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee et al.NeurIPS 2021 · 2,557 citations
- Fast Model Editing at ScaleEric Mitchell, Charles Lin, Antoine Bosselut, Chelsea Finn et al.ICLR 2022 · 527 citations
Related papers
- Permutation Equivariant Neural FunctionalsAllan Zhou, Kaien Yang, Kaylee Burns, Adriano Cardace et al.NeurIPS 2023 · 84 citations
- Equivariant Polynomial Functional NetworksThieu Vo, Hoang V. Tran, Tho Tran Huu, An Nguyen The et al.ICML 2025
- Neural Functional TransformersAllan Zhou, Kaien Yang, Yiding Jiang, Kaylee Burns et al.NeurIPS 2023 · 53 citations
- Quasi-Equivariant MetanetworksViet-Hoang Tran, An Nguyen The, Benoît Guérand, Thieu Vo et al.ICLR 2026 · 1 citation
- Universal Neural FunctionalsAllan Zhou, Chelsea Finn, James HarrisonNeurIPS 2024 · 27 citations
