Abstract
Learning to generate neural network parameters conditioned on task descriptions and architecture specifications is pivotal for advancing model adaptability and transfer learning. Existing methods, especially those based on diffusion models, suffer from limited scalability to large architectures, rigidity in handling varying network depths, and disjointed parameter generation that undermines inter-layer coherence. In this work, we propose IGPG (Instruction Guided Parameter Generation), an autoregressive framework that unifies parameter synthesis across diverse tasks and architectures. IGPG leverages a VQ-VAE and an autoregressive model to generate neural network parameters, conditioned on task instructions, dataset, and architecture details. By autoregressively generating neural network weights' tokens, IGPG ensures inter-layer coherence and enables efficient adaptation across models and datasets. Operating at the token level, IGPG effectively captures complex parameter distributions aggregated from a broad spectrum of pretrained models. Extensive experiments on multiple vision datasets demonstrate that IGPG consolidates diverse pretrained models into a single, flexible generative framework. The synthesized parameters achieve competitive or superior performance relative to state-of-the-art methods, especially in terms of scalability and efficiency when applied to large architectures. These results underscore IGPG's potential as a powerful tool for pretrained weight retrieval, model selection, and rapid task-specific fine-tuning.
Introduction
In the current deep learning landscape, adapting a model to a new task typically requires manual architecture selection followed by computationally intensive fine-tuning. While "Model Zoos" provide repositories of pretrained weights, there remains a lack of unified methods to navigate these resources or synthesize new weights that integrate insights from multiple models.
Existing weight-generation techniques, such as those utilizing diffusion models, often struggle with scalability to larger architectures and frequently fail to maintain "inter-layer coherence"—the mathematical compatibility between successive layers. The IGPG framework addresses these challenges by treating neural network parameters as a sequence of discrete tokens, allowing for a flexible and scalable system that can generate high-quality initial weights for diverse architectures and datasets using simple natural language or visual prompts.
Methodology: The IGPG Framework
The IGPG framework operates through a two-stage process designed to treat neural network parameters like a language.
1. Neural Network Encoding (VQ-VAE)
The system first vectorizes neural network parameters and employs a Gumbel Vector Quantized Variational Autoencoder (VQ-VAE) to compress continuous weights into a sequence of discrete "codebook" tokens. To accommodate large-scale models, a fixed-size chunking strategy is used, breaking massive weight vectors into manageable segments.
2. Autoregressive Generation (Transformer)
A Transformer-based prior is trained to predict the next token in the weight sequence. This generation is conditioned on two primary inputs:
- Task Representations: Dataset embeddings generated via a CLIP image encoder.
- Architecture Specifications: Textual descriptions of the model (e.g., "ResNet with 3 blocks") processed through LLaMA-3-Instruct.
By generating tokens autoregressively, the model naturally learns the dependencies between different layers, ensuring that each layer's weights are conditioned on the preceding ones.
Experimental Evaluation
IGPG was evaluated across several diverse benchmarks to test its generalization and transfer learning capabilities:
- Tiny Model Zoo: CNNs trained on MNIST, SVHN, CIFAR-10, and STL-10.
- Meta-Album: 30 diverse datasets spanning domains such as microscopy, remote sensing, and manufacturing.
- ResNet Variants: 125 randomly sampled ResNet-56 variants to evaluate cross-architecture generalization.
- LoRA Modules: Parameters for Vision Transformers (ViT-Base) across six computer vision benchmarks, including Oxford Pets and Stanford Cars.
Results and Discussion
The experimental results highlight IGPG's ability to "hallucinate" functional weights that closely match the performance of traditionally trained models.
Near-Perfect Correlation
On the CIFAR-10 and CIFAR-100 datasets, the generated weights demonstrated a Pearson correlation of 0.9999 and 0.9991, respectively, with original pretrained weights. This indicates that the generated weights are nearly indistinguishable in performance from those trained through thousands of iterations.
Zero-Shot and Efficiency Gains
On unseen ResNet architectures, IGPG achieved up to 64% accuracy on ResNet-20 immediately upon generation, significantly outperforming random initialization. Furthermore, the framework proved more efficient than state-of-the-art diffusion-based methods (like D2NWG) as architecture size increased. In LoRA generation tasks, IGPG provided up to a 10% improvement over standard baseline pretrained models.
Conclusion
IGPG represents a significant step toward automated model adaptation. By treating weights as a language and leveraging autoregressive Transformers, it achieves superior inter-layer coherence and scalability. While current bottlenecks include the need for larger, more diverse model zoos and the context window limits of Transformers, future work will explore more sophisticated chat-based models and expansion to even larger architectures like LLMs. IGPG stands as a promising tool for rapid task-specific fine-tuning and efficient model selection.
Summary updated