Manuscript Offprint

arXiv:2610.01649

CrossGMN: Graph Metanetworks for Cross-Architecture Weight-Space Transformations

Adir Dayan, Yam Eitan, Haggai Maron

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Weight-space networks operate directly on parameters of other neural networks, enabling tasks such as predicting model properties, editing trained models, and generating weights. Equivariance has emerged as a key design principle for these networks, owing to weight-space symmetries such as neuron permutations. However, existing equivariant weight-space architectures have primarily been studied for transformations that preserve the network architecture. In contrast, many practical transformations, including model compression and upscaling, map a trained source network into a target network with a different architecture. In this setting, the source and target permutation symmetries act on different parameter spaces, making equivariance less straightforward to formulate. Our key idea for addressing this mismatch is to reformulate cross-architecture operators with two inputs: a trained source network and an initialization of the target network. This lets us define equivariant cross-architecture operators that refine the initialization of the target network using information from the source network, while being invariant to source-network permutations and equivariant to target-network permutations. Based on this formulation, we introduce CrossGMN, a graph metanetwork that jointly processes both networks through symmetry-preserving cross-network message passing. We prove CrossGMN is universal for continuous cross-architecture operators on compact sets under a general-position assumption. We further evaluate CrossGMN for model compression, where it predicts the parameters of a smaller network to accelerate subsequent knowledge distillation. Across 2-D and 3-D INRs and image classification with MLPs, CNNs, and Vision Transformers, CrossGMN speeds up distillation by up to 8.89×8.89\times, transfers across datasets without retraining ( 3.78×3.78\times), and a single model can accelerate compression from heterogeneous source architectures into a common target architecture.

1 Introduction

Weight-space learning studies neural architectures that operate directly on the parameters of other neural networks, enabling tasks such as predicting model properties, editing trained models, and generating weights (Unterthiner et al., 2020; Eilertsen et al., 2020; Schürholt et al., 2021; 2022a; 2024). A central property of weight spaces is their permutation symmetries, resulting in many different model parameterizations that represent the same function. This has motivated the development of permutation-equivariant weight-space architectures (Navon et al., 2023; Zhou et al., 2023a;b; 2024; Lim et al., 2024; Kofinas et al., 2024; Tran et al., 2024; 2025; Vo et al., 2025), which represent the current state of the art for learning over weights in many tasks.

Many practical transformations of neural network weights do not preserve the network architecture. Model compression maps a trained network into a smaller one for deployment under memory, latency, or compute constraints, through structured pruning (Li et al., 2017) or knowledge distillation (Hinton et al., 2015; Gou et al., 2021). Cross-architecture knowledge transfer moves the behavior of a trained network into a structurally different one (Ahn et al., 2019; Liu et al., 2024; Czyzewski, 2021). Model upscaling initializes a wider or deeper network from a trained smaller one, allowing training to continue from the transferred parameters rather than from scratch (Chen et al., 2016; Wei et al., 2016; Chen et al., 2022; Wang et al., 2023; Pham et al., 2024). All of these map the weights of one architecture into the parameter space of another, and most of them are realized today by a separate optimization process run from scratch for every source network. Learning such a transformation instead would replace this per-network optimization with a single feedforward pass: one weight-space model is trained once, and every new source network is then transformed in a fraction of a second. Existing equivariant weight-space architectures, however, have exclusively addressed mappings whose input and output lie in the same weight space. The cross-architecture setting is fundamentally different: the source and target networks carry distinct symmetry groups acting on distinct parameter spaces, so it is not even clear what equivariance should mean. Designing equivariant cross-architecture weight-space models is thus a central yet overlooked challenge in weight-space learning.

Our key observation is that cross-architecture transformations typically come with a natural second input. Whether the target is smaller or larger than the source, the procedure always begins from an initialized target network, which is then optimized against the trained source network, as in knowledge distillation and its variants (Hinton et al., 2015; Gou et al., 2021; Nasser et al., 2024). The transformation is therefore a function of two arguments: the trained source network and an initialization of the target. Importantly, taking both as input resolves the difficulty above. The initialization specifies the target architecture and carries the target symmetry group, so the operator has a well-defined action on each of its arguments: it should be invariant to symmetries of the source network and equivariant to symmetries of the target. This leads us to study equivariant cross-architecture operators F:Vsrc×Vtgt→VtgtF : \mathcal{V}_{\mathrm{src}} \times \mathcal{V}_{\mathrm{tgt}} \to \mathcal{V}_{\mathrm{tgt}}.

With the right class of operators in place, the remaining question is how to parameterize it. We introduce CrossGMN, a graph metanetwork for learning such operators. CrossGMN represents each of the two networks as a parameter graph, joins them with cross edges, and performs message passing over the resulting joint graph. Information can thus flow between the source and the target while the two permutation symmetries are respected independently. We prove that CrossGMN is a universal approximator of continuous equivariant cross-architecture operators on compact sets under a general-position assumption, and extend this result to finite collections of source architectures mapping into a common target weight space.

We evaluate CrossGMN for model compression through knowledge distillation. Given a trained teacher (source network) and an initialization for a smaller student (target network), CrossGMN predicts refined student parameters intended to reduce the number of distillation steps needed to match the teacher. We evaluate width, depth, and combined compressions across 2-D and 3-D INRs (Sitzmann et al., 2020) and MNIST (LeCun et al., 1998)/CIFAR-10 (Krizhevsky, 2009) classifiers, on architectures including MLPs, CNNs, and Vision Transformers (Dosovitskiy et al., 2021). Across these settings, CrossGMN accelerates subsequent distillation for initializing compressed students, achieving speedups of up to 8.89×8.89\times on MNIST INRs and 6.85×6.85\times on ModelNet (Wu et al., 2015) INRs. CrossGMN also generalizes out of distribution: a model trained on MNIST INRs transfers to FashionMNIST (Xiao et al., 2017), achieving up to 3.78×3.78\times speedup without retraining. Moreover, a single CrossGMN can compress heterogeneous CIFAR-10 MLP teacher architectures into a common smaller student architecture and generalize to unseen teacher architectures.

In summary, our contributions are: (1) formulating cross-architecture weight-space learning as learning equivariant operators on a source network and a target initialization, which makes the problem's symmetry structure well-defined; (2) introducing CrossGMN, a graph metanetwork for learning equivariant transformations between different neural-network weight spaces; (3) establishing its universality for continuous cross-architecture operators, including settings with multiple source architectures; and (4) demonstrating its effectiveness for model compression, where it accelerates knowledge distillation across diverse architectures and out-of-distribution settings.

References (58)