Efficient Training with Denoised Neural Weights

Yifan Gong, Zheng Zhan, Yanyu Li, Yerlan Idelbayev, Andrey Zharkov, Kfir Aberman, Sergey Tulyakov, Yanzhi Wang, Jian Ren

Abstract

Training deep neural networks is computationally intensive, often hindered by generic weight initialization heuristics. This paper introduces a novel framework that treats neural weights as data to be generated via a diffusion process. By predicting optimized starting weights (LoRA parameters) for specific tasks using a 1D UNet-based weight generator, the researchers achieve a 15x training speedup in image-to-image translation tasks while simultaneously improving final output quality.

Introduction

The efficiency of training deep neural networks (DNNs) is significantly influenced by weight initialization. Standard methods like He or Xavier initialization are task-agnostic, requiring extensive training or fine-tuning to adapt to specific concepts, such as artistic style transfer. This research explores whether a model can learn the "manifold" of successful weights and generate near-optimal starting points for new tasks based on text prompts.

Methodology: Neural Diffusion

The proposed framework conceptualizes neural weights as a distribution that can be modeled using diffusion techniques, analogous to how Stable Diffusion models pixel distributions.

Conceptual overview of Image Diffusion vs. Neural Diffusion and the Weight Initialization process.

Weight Generator and LoRA

To manage the computational complexity of predicting millions of parameters, the authors utilize Low-Rank Adaptation (LoRA). Instead of generating the full weight matrix, the model predicts a smaller set of LoRA weights, reducing the parameter count from 7.06M to 0.22M. The weight generator itself is a 1D UNet architecture.

Weight Blocking and Positional Awareness

Neural networks are heterogeneous; weights in early layers serve different functions than those in later layers. To address this, weights are divided into equal-sized blocks. The generator uses sinusoidal positional encodings (Block Index) to maintain awareness of each block's structural role within the network.

Detailed architecture of the 1D weight generator, incorporating ResBlocks, Transformers, and various embeddings.

Inference and Fine-Tuning

During inference, the model performs single-step denoising, producing initial weights in approximately 1.19 seconds on an NVIDIA H100 GPU. This "warm start" is followed by a brief fine-tuning phase (20 epochs), significantly reducing the total time required to reach peak performance.

Experimental Setup and Results

The weight generator was trained on a massive dataset of "ground-truth" weights derived from thousands of GAN models trained on over 84,000 prompts (art styles, characters, and facial modifications). Evaluation was conducted on the FFHQ dataset.

Performance Metrics

The "Neural Diffusion" approach demonstrated substantial improvements in both speed and quality:

  • Speed: Total time to obtain a high-quality model was reduced to 43.3 seconds, a 15x acceleration over the Pix2pix baseline (659.8 seconds).
  • Quality: The method achieved a Clean FID of 89.93, outperforming both Pix2pix (99.20) and E2GAN (93.86).

Discussion and Conclusion

The core insight of this work is that well-trained weights for related tasks reside on a learnable manifold. By providing a task-specific initialization, the optimizer's search space is drastically reduced.

While highly effective for GANs and image translation, the approach currently faces a data generation bottleneck, as it requires training thousands of models to create the initial weight dataset. Future work will explore scaling this technique to larger architectures like Large Language Models (LLMs).

Summary updated

BibTeX
@inproceedings{gong2024efficient,
  author = {Yifan Gong and Zheng Zhan and Yanyu Li and Yerlan Idelbayev and Andrey Zharkov and Kfir Aberman and Sergey Tulyakov and Yanzhi Wang and Jian Ren},
  title = {{Efficient Training with Denoised Neural Weights}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73010-8\_2},
}
Figure