arXiv:2610.21995cs.LGOct 2026

Manuscript Offprint

arXiv:2610.21995

Interfaces and Modules: A Scalable Representation for Weight-Space Learning across Architectures

Michał Kozyra, Michael Bronstein

ABSTRACT

Weight-space learning across architectures requires representations that respect parameter symmetries and scale to large networks. Existing equivariant tensor encoders require architecture-specific symmetry specifications, while neuron graphs make global attention costly. We introduce a typed graph organized around shared coordinate-permutation actions. Its nodes, called interfaces, represent coordinate spaces whose bound tensor axes must be permuted jointly; operation occurrences, called modules, form typed hyperedges. A compiler derives this graph from supported PyTorch models, with exact recovery of the permutation factors defined by its constraints. The Universal Weight Encoder (UWE) combines local equivariant updates to parameter features with global attention over invariant interface summaries. The small number of interfaces makes global attention practical, and a single encoder processes different supported architectures. UWE is competitive with architecture-specific state-of-the-art methods on established benchmarks. On a new zoo of 1,200 transformers spanning 100 architectures, it outperforms the evaluated baselines at ranking networks within unseen architectures, including architectures larger than those used for training, while using substantially less memory.

1 INTRODUCTION

Weight-space learning treats trained neural networks as data: predicting performance from parameters, editing implicit neural representations, and generating weights and adapters (Unterthiner et al., 2020; Navon et al., 2023; Zhou et al., 2023a; Karimi Mahabadi et al., 2021; Ruiz et al., 2024). Public model hubs motivate extending these methods across networks that differ in width, depth, operations and training history (Falk et al., 2025). Their representations must also account for parameter symmetries: hidden-unit permutations, and in suitable architectures continuous rescalings and changes of basis, can preserve the represented function (Hecht-Nielsen, 1990; Chen et al., 1993; Neyshabur et al., 2015; Putterman et al., 2024). Here we focus on coordinate permutations. We seek a representation that respects these symmetries, supports modern architectural components, transfers across architectures, and remains compact enough for global attention. It should also be derived from the network's implementation.

Existing representations meet only some of these requirements. Equivariant weight-space networks act directly on weight tensors, using an architecture-specific construction or a supplied permutation specification (Navon et al., 2023; Zhou et al., 2023a; 2024; Tran et al., 2025). Neural graph methods instead represent neurons as nodes and weights as edge features, allowing one encoder to process different architectures (Kofinas et al., 2024; Lim et al., 2024). However, extending these representations to combinations of residual connections, normalization, attention and low-rank adapters requires careful treatment of their parameter dependencies. The required symmetry specifications or graph encodings are typically supplied by hand, and their correctness is not automatic: the attention representation of Kofinas et al. (2024) admits relabellings that change the function and excludes valid ones (Section 2.5).

Figure

Figure 1: The compiler derives interfaces and parameter bindings from network code. UWE processes the resulting graph, and a supervised loss trains the encoder and readout.

The size of neural graphs creates a further constraint. Local message passing requires successive hops to connect distant operations, while fully connected attention is quadratic in the number of neuron nodes. Methods that tokenize windows of weights offer another route to scale, but do not enforce permutation equivariance (Schürholt et al., 2024; Falk et al., 2025). We therefore need objects that preserve the shared permutation actions of the network while being substantially fewer than its neurons. Appendix A reviews related work in more detail.

These requirements suggest separating operations from the coordinate spaces they act on. In an MLP, permuting a hidden layer requires the same relabelling of the preceding weight matrix's outputs and the following matrix's inputs. A residual addition can impose this agreement across several activation tensors. The shared coordinate space is therefore a natural object for the representation: it identifies which parameter axes must be relabelled together. We call such a space an interface. Each permutation-bearing interface carries one shared coordinate permutation, while distinct interfaces may be permuted independently. We represent the network as a typed graph whose nodes are interfaces and whose hyperedges are operation occurrences, called modules.

Our main contributions are this interface–module graph and the Universal Weight Encoder (UWE), an equivariant encoder that operates on it across architectures. Shared permutation bindings already appear in alignment specifications (Ainsworth et al., 2023) and in specifications used to construct equivariant layers (Zhou et al., 2024). We use these bindings to define the graph's nodes and the objects over which the encoder communicates. UWE alternates local equivariant updates to parameter features with global attention over invariant interface summaries (Section 3). The graphs are compact: a ResNet-18 has twelve permutation-bearing interfaces, and an 85M-parameter transformer has 301, compared with about 84,000 neuron nodes. Global attention over these interfaces is therefore affordable.

To automate graph construction, a compiler traces a supported PyTorch model and infers interfaces and parameter-axis bindings from operator constraints. Recovery is exact within its constraint language, and the recovered relabellings preserve the network's function (Section 4). Models assembled from supported operations, layouts and sharing patterns require no new architecture-specific specification. Figure 1 illustrates the pipeline.

Evaluating transfer across architectures requires benchmarks that vary both architecture and scale. Common weight-space benchmarks focus on small networks from a single architecture or a narrow family, leaving transfer to larger, unseen architectures poorly tested. We therefore introduce a transformer zoo with architecture-level splits and loss profiles across class groups and image corruptions. These profiles distinguish networks with similar aggregate performance but different patterns of error. UWE is competitive on standard weight-space benchmarks and outperforms the tested baselines on the new zoo, with stronger transfer to larger held-out architectures and lower memory use (Section 5). Separate scaling experiments establish computational feasibility on larger networks, including full training steps on ViT-L/16 and GPT-2 Medium on a single 80 GB GPU (Section 5.4).

References (100)

Couldn't load all references. Reload the page to try again.