Permutation-Equivariant Flow Matching for Alignment-Free Neural Weight Generation

Arkadi Piven, Yam Eitan, Guy Bar-Shalom, Fabrizio Frasca, Daniel Cremers, Thomas Dagès, Ron Kimmel, Haggai MaronarXiv 2026

TL;DR

This paper introduces a novel approach for generating neural network weights directly from a learned distribution without requiring costly pre-processing or "alignment" of training models. By combining Flow Matching with Permutation-Equivariant Graph Meta Networks, the authors successfully sample high-performing, diverse networks that generalize across different architectures and domain shifts.

What Problem Does This Paper Address?

Generating neural network weights is a "meta-learning" challenge: instead of training a model on data, we want to sample a fully-trained model from a distribution. However, neural networks possess a frustrating property called permutation symmetry.

Imagine a hidden layer with two neurons. If you swap their positions and reorder their incoming and outgoing weights accordingly, the network's mathematical function remains identical, but its raw weight vector changes completely. For a standard generative model (like a VAE or Diffusion model), these two functionally identical networks look like two different, distant data points.

To solve this, previous methods either forced all training networks to start from the same initialization (leading to "memorization" of a single training trajectory) or used expensive algorithms to "align" neurons across different models. This paper aims to learn from diverse, independently trained networks without any such alignment.

Figure 1: Hidden-unit permutations pre- serve the network function. Colors track each hidden unit and its incident weights.

Methods

The authors propose a framework that is mathematically "indifferent" to neuron ordering. Their approach rests on two pillars:

  1. Flow Matching (FM): Instead of standard diffusion, they use Flow Matching to learn a "velocity field" that transforms a simple Gaussian distribution into the complex distribution of trained weights.
  2. Permutation-Equivariant Graph Meta Networks (GMN): They represent the neural network as a graph where nodes are neurons and edges are weights. The velocity field is parameterized by a GMN. Crucially, this architecture is equivariant: if you permute the input weights, the predicted velocities are permuted in the exact same way.

By building this symmetry directly into the model's architecture (its "inductive bias"), the model naturally understands that different permutations represent the same underlying functional solution.

Figure 2: Method overview. A shared velocity field vθ(G, wt, t, c), trained on unaligned networks, generates weights conditioned on architecture G and task c. States wt and yt belong to different architectures. A hidden-unit permutation Pg permutes the trajectory and its velocities, producing functionally equivalent networks (upper pair).

Datasets

The researchers evaluated their method on several large-scale collections of independently trained networks:

  • MNIST: 10,000 MLPs.
  • CIFAR-10: 50,000 CNNs.
  • OpenML Tabular: 100,000 MLPs spanning 20 different datasets and 16 different architectures.
  • Folktables (ACSIncome): A domain-shift task using census data from California and Puerto Rico to test how the model handles varying data distributions.

Key Insights and Ideas

  • Alignment is Unnecessary: The authors prove that if the target weight distribution is permutation-invariant, the optimal velocity field must be equivariant. This means an equivariant model can learn directly from "messy," unaligned repositories like Hugging Face.
  • Beyond Memorization: A major critique of weight generators is that they often just "memorize" training checkpoints. The authors introduce Joint Wasserstein Similarity (JWS), a metric that jointly evaluates accuracy, functional similarity, and weight similarity to prove their model generates novel yet valid solutions.
  • Zero-Shot Architecture Transfer: Because the model treats networks as graphs, it isn't tied to a fixed number of parameters. A model trained on one set of hidden widths can generate weights for a network that is 1.5x wider or 0.5x narrower without any retraining.
  • Domain Interpolation: By conditioning the flow on a domain parameter (e.g., $c=0$ for California, $c=1$ for Puerto Rico), the model can sample "intermediate" networks ($c=0.5$) that perform well across both domains, effectively acting as a single-model alternative to logit ensembling.

Key Results

  • State-of-the-Art Generation: On MNIST and CIFAR-10, the GMN achieved JWS scores of 0.91 and 0.92 respectively, significantly outperforming baselines like P-diff and DWF, which struggled to match the joint statistics of the training data.
  • Robust Performance: In the heterogeneous architecture task (OpenML), the generated networks achieved a mean test accuracy of 82.17%, very close to the 83.15% achieved by networks trained from scratch.
  • Width Generalization: The model successfully performed zero-shot width transfer, achieving 82.35% accuracy on "wide" versions of architectures it had never seen during training.
Figure 6: Performance across 20 different tabular tasks, including zero-shot width transfer results.

Limitations and Future Work

  • Scalability: While the graph representation is elegant, representing every weight as an edge in a graph becomes computationally expensive for massive models like Transformers or LLMs. The authors suggest optimized sparse operations as a path forward.
  • Conditioning Granularity: Currently, the model uses task identifiers. Future work could involve conditioning on dataset representations (e.g., using Set Transformers) to allow the model to generate weights for entirely new, unseen tasks.
  • Complexity of Symmetries: While this paper focuses on permutation symmetry, neural networks have other symmetries (like scaling symmetries in ReLU networks) that could be incorporated into future equivariant architectures.

Summary updated

BibTeX
@misc{piven2026permutation,
  author = {Arkadi Piven and Yam Eitan and Guy Bar-Shalom and Fabrizio Frasca and Daniel Cremers and Thomas Dagès and Ron Kimmel and Haggai Maron},
  title = {{Permutation-Equivariant Flow Matching for Alignment-Free Neural Weight Generation}},
  year = {2026},
  eprint = {2609.32833},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.32833},
}
Figure