NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Neural Network Diffusion

Kai Wang, Zhaopan Xu, Yukun Zhou, Zelin Zang, Trevor Darrell, Zhuang Liu, Yang You · DOI

Abstract

Traditional neural network training relies on computationally expensive gradient-based optimization. This paper explores an alternative paradigm: treating neural network parameters as data to be modeled and synthesized. We present p-diff (parameter diffusion), a framework that utilizes latent diffusion models to generate high-performing neural network weights. By training on a distribution of successful model checkpoints, p-diff can sample novel parameter sets that achieve competitive or superior performance compared to traditionally trained models across various tasks, including image classification and object detection. Our findings suggest that the "weight space" of neural networks possesses a learnable structure that can be exploited for efficient model generation.

Introduction

Diffusion models have revolutionized generative AI, enabling the synthesis of high-fidelity images, video, and audio. However, the underlying principles of these models—learning to reverse a noise-injection process—have potential applications beyond sensory data. Researchers from NUS, UPenn, UC Berkeley, and Meta FAIR have proposed applying this generative power to the very core of AI: the neural network parameters themselves. Their approach, p-diff, treats the weights of a neural network as a signal to be modeled, effectively "imagining" new, high-performing architectures.

The Challenge of Parameter Optimization

The standard approach to obtaining effective neural network parameters involves iterative gradient-based optimization, such as Stochastic Gradient Descent (SGD). While highly successful, this process is resource-intensive and often starts from scratch for every new task or architecture variant. The central question addressed by this research is whether we can learn the underlying distribution of "good" parameters and sample from it directly. If successful, this would bridge the gap between generative modeling and neural architecture optimization, potentially leading to more efficient ways to deploy and refine AI models.

Methodology: The p-diff Pipeline

The p-diff framework adapts the architecture of Latent Diffusion Models (LDMs) to the domain of network weights through a two-stage process.

  1. Parameter Autoencoding: Neural network parameters are high-dimensional and lack the inherent spatial correlations found in images. To address this, the authors employ an autoencoder to compress a subset of parameters (e.g., Batch Normalization layers) into a low-dimensional latent space. Notably, they utilize 1D convolutions, recognizing that weight vectors do not share the grid-like topology of pixels.
  2. Latent Diffusion Training: A diffusion model is then trained within this compressed latent space. It learns to reverse a forward diffusion process that gradually adds Gaussian noise to the latent representations of "high-quality" parameters.
  3. Inference and Generation: To generate a new model, random noise is sampled and passed through the reverse diffusion process to produce a latent vector. This vector is then projected back into the high-dimensional parameter space by the autoencoder's decoder.
The p-diff pipeline: An autoencoder extracts latents from trained parameters, and a diffusion model learns to generate them.

Experimental Evaluation

The versatility of p-diff was tested across a wide array of benchmarks and architectures:

  • Tasks: Image classification (CIFAR-10/100, ImageNet-1K), object detection (COCO), and semantic segmentation (Pascal VOC).
  • Architectures: ResNet-18/50, ViT-Tiny/Base, and ConvNeXt-Tiny/Base.

The researchers curated "model zoos" consisting of approximately 300 trained checkpoints per task to serve as the training data for the diffusion process.

Key Insights: Weights as Structured Signals

A fundamental observation of this work is the mathematical symmetry between neural network training and the diffusion process. Both involve a transition between a random distribution (initialization or pure noise) and a highly structured, task-specific distribution. By treating optimized weights as signals that can be "denoised," the researchers demonstrate that the machinery of generative AI can be repurposed for parameter refinement.

Crucially, the study confirms that p-diff is not merely memorizing the training checkpoints. By analyzing the "Intersection over Union" (IoU) of incorrect predictions, the authors found that the generated models exhibit distinct error patterns compared to the original models, despite maintaining similar or better accuracy.

Results and Performance

The empirical results are compelling. In many instances, the generated parameters matched or outperformed the models in the training set:

  • ImageNet-1K: A p-diff generated ResNet-18 achieved 70.4% accuracy, surpassing the 69.5% accuracy of the original trained models.
  • Object Detection: On the COCO dataset, p-diff reached 37.0 AP, slightly exceeding the performance of the original Faster R-CNN (36.9 AP).
  • Novelty: The generated models occupy a unique space in the parameter distribution, achieving high performance while remaining distinct from any single training instance.
Accuracy vs. Similarity: p-diff models (orange) achieve high accuracy with low similarity to original models, proving they are novel and not just memorized.

Limitations and Future Directions

While p-diff represents a significant step forward, several challenges remain:

  • Scalability: Generating models with hundreds of millions of parameters is currently memory-intensive, as the autoencoder and diffusion model size scales with the target parameter count.
  • Data Requirements: The need for a "zoo" of pre-trained checkpoints introduces a significant upfront computational cost.
  • Architectural Optimization: Future work may involve developing generative architectures specifically tailored to the unique topology and functional dependencies of neural network weights, moving beyond standard 1D CNNs.

Conclusion

Neural Network Diffusion opens a new frontier in AI research, suggesting that the process of "training" a model can be reframed as a generative task. As these methods scale, we may see a shift toward more fluid and efficient ways of synthesizing specialized neural networks from a learned distribution of high-performing parameters.

Summary updated

BibTeX
@misc{wang2024neural,
  author = {Kai Wang and Zhaopan Xu and Yukun Zhou and Zelin Zang and Trevor Darrell and Zhuang Liu and Yang You},
  title = {{Neural Network Diffusion}},
  year = {2024},
  eprint = {2402.13144},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.13144},
}
Figure