Towards Autoregressive Neural Network Parameter Generation
Organizations: KAIST AI · Department of Engineering, University of Oxford
Abstract
Large Language Models (LLMs) have recently established a new paradigm in machine learning, demonstrating exceptional zero-shot generalization and complex reasoning capabilities. Concurrently, neural network parameter generation has emerged as a promising avenue for rapid task adaptation and model synthesis. Existing weight generation techniques, however, struggle to jointly learn the distribution of diverse models, to encode heterogeneous architectures within a single generator, and to generalize out of distribution. We therefore ask whether pretrained parameters can be encoded into a discrete domain so that the zero-shot generalization LLMs exhibit in text generation can be transferred to weight generation. Following this view, we propose an LLM-inspired approach, Instruction-Guided Parameter Generation (IGPG), that formulates network parameter generation as an autoregressive modeling problem. We first quantize pretrained weights with a VQ-VAE, then train a prefix-conditioned autoregressive generator over the resulting tokens. At inference, the generated weight tokens are mapped back to parameter space by the VQ-VAE decoder. We evaluate the framework across in-distribution generation, cross-dataset transfer, and cross-architecture settings. The proposed method achieves competitive performance in in-distribution generation and provides useful parameter initializations for held-out datasets and architectural configurations, improving downstream performance over random initialization after adaptation. These results suggest that discrete autoregressive modeling provides a promising framework for learning and transferring structure across collections of pretrained neural network parameters.
Figures & tables
| Ep. | Method | MNIST | SVHN | CIFAR-10 | STL |
|---|---|---|---|---|---|
| 0 | tr. fr. scratch | 10 | 10 | 10 | 10 |
| S KDE30 | 68.6 6.7 | 54.5 5.9 | n/a | n/a | |
| SANE KDE30 | 84.8 0.8 | 70.7 1.4 | 56.3 0.5 | 39.2 0.8 | |
| SANE SUB | 86.7 0.8 | 72.3 1.6 | 57.9 0.2 | 43.5 1.0 | |
| D2NWG | 80.52 0.82 | 66.6 0.7 | 58.80 0.1 | 44.50 0.1 | |
| IGPG | 83.20 0.01 | 67.10 0.4 | 58.3 0.1 | 44.41 0.1 |
| Arch. | Status | Random init | CIFAR-100 pretrained | IGPG |
|---|---|---|---|---|
| ResNet-32 | Seen | |||
| ResNet-44 | Seen | |||
| ResNet-20 | Held out | |||
| ResNet-56 | Held out | |||
| ResNet-110 | Held out |
| Model | Init | Top-1 final | Top-1 best | Top-5 final | Loss final | Loss min |
|---|---|---|---|---|---|---|
| ViT-S/16 (21.3M) | Random | |||||
| IGPG | ||||||
| ViT-B/16 (85.2M) | Random | |||||
| IGPG |
| Model family | CIFAR-10 | CIFAR-100 | ||||
|---|---|---|---|---|---|---|
| IGPG | Pretrained | Params (M) | IGPG | Pretrained | Params (M) | |
| MobileNetV2 | ||||||
| RepVGG | ||||||
| ResNet | ||||||
| ShuffleNetV2 | ||||||
| VGG-BN | ||||||
| Model | Method | # Trainable Parameters | OxfordPets | StanfordCars | CIFAR10 | DTD | EuroSAT | FGVC | Average |
|---|---|---|---|---|---|---|---|---|---|
| ViT-Base | LP | - | 90.28 0.43 | 25.76 0.28 | 96.41 0.02 | 69.77 0.67 | 88.72 0.13 | 17.44 0.43 | 64.73 |
| FF | 85.8M | 93.14 0.40 | 79.78 1.15 | 98.92 0.05 | 77.68 1.21 | 99.05 0.09 | 54.84 1.23 | 83.90 | |
| LoRA | 581K | 93.19 0.36 | 45.38 0.41 | 98.78 0.05 | 74.95 0.40 | 98.44 0.15 | 25.16 0.16 | 72.65 | |
| FourierFT ( Gao et al., 2024 ) | 72K | 93.21 0.26 | 46.11 0.24 | 98.58 0.07 | 75.09 0.37 | 98.29 0.04 | 27.51 0.64 | 73.13 | |
| IGPG | 72K | 92.84 0.30 | 57.67 0.52 | 98.45 0.95 | 88.74 0.08 | 98.70 0.23 | 36.63 0.11 | 78.83 |
| Task | Original (checkpoint) | DnD (adapter) | IGPG (adapter) |
|---|---|---|---|
| ARC-e | |||
| OBQA | |||
| PIQA | |||
| HellaSwag | |||
| WinoGrande | |||
| BoolQ |
| Prefix-conditioned completion | |||||
|---|---|---|---|---|---|
| Arch. | Original | VQ-VAE rec. | 25% | 50% | 75% |
| CIFAR | |||||
| STL | |||||
| MNIST | |||||
| SVHN | |||||
| CIFAR-L | |||||
| Dataset | Architecture | Parameters | Pretrained (%) | VQVAE Reconstruction (%) | IGPG(%) |
|---|---|---|---|---|---|
| CIFAR-10 | ViT-Small | 2697610 | 93.67 | 93.67 | 93.70 |
| CIFAR-100 | ViT-Small | 2714980 | 72.29 | 72.28 | 72.30 |
| CINIC-10 | ViT-Small | 2697610 | 83.23 | 83.23 | 83.24 |
| SVHN | ViT-Small | 2697610 | 97.74 | 97.74 | 97.76 |
| Tiny-ImageNet | ViT-Small | 2771144 | 53.44 | 53.44 | 53.45 |
| ImageNet | MobileNetV3-Small | 2542856 | 67.67 | 67.66 | 67.65 |
| pretrained | chunk-free | chunk-based | ||||||
|---|---|---|---|---|---|---|---|---|
| models | #Params | top-1 | top-5 | top-1 | top-5 | top-1 | top5 | Datasets |
| ResNet-56 | 860026 | 94.37 | 99.83 | 94.40 0.01 | 99.82 0.00 | 94.19 0.01 | 99.87 0.00 | C-10 |
| ResNet-56 | 865876 | 72.63 | 91.94 | 72.45 0.01 | 91.96 0.01 | 72.41 0.2 | 91.80 0.03 | C-100 |
| MobileNetv2_x0_5 | 834324 | 70.88 | 91.72 | 71.14 0.01 | 92.48 0.04 | 70.93 0.00 | 92.55 0.02 | C-100 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Index | Name | Type | Parameters |
|---|---|---|---|
| 0 | encoder | Encoder | 197 M |
| 1 | decoder | Decoder | 198 M |
| 2 | loss | VQLoss | 0 |
| 3 | quantize | GumbelQuantize | 132 K |
| 4 | quant_conv | Conv2d | 4.2 K |
| 5 | post_quant_conv | Conv2d | 4.2 K |
| Setting (Section) | Model zoo | Regime | Conditioning | Evaluation |
|---|---|---|---|---|
| Tiny Model Zoo ( 4.1 ) | CNNs on MNIST, SVHN, CIFAR-10, STL-10 | In-distribution | Dataset | 5 samples; 0/1/5/25 fine-tuning epochs |
| Unseen datasets ( 4.2 ) | MobileNetV3 OFA subnet, 30 Meta-Album datasets | Unseen dataset | Dataset | 1 fine-tuning epoch; mean std |
| ResNet family ( 4.3.1 ) | 125 ResNet variants, CIFAR-10 | Held-out configuration | Architecture | No fine-tuning; 3 seeds |
| ViT family ( 4.3.2 ) | 160 ViTs ( 9M params), CIFAR-10 | Held-out configuration | Architecture, layer, chunk | Initialization, 100 training epochs; 3 seeds |
| Heterogeneous architectures ( 4.4 ) | 19 architectures, CIFAR-10/100 | In-distribution | Architecture, dataset | Accuracy of generated weights |
| Vision LoRA ( 4.5 ) | ViT-Base LoRA, top-5 adapters per dataset | In-distribution | Dataset | 5 adapters (top- ); mean |
| Domain | Original Dataset Name | Number of Classes |
|---|---|---|
| Large Animals | Birds | 315 |
| Dogs | 120 | |
| Animals with Attributes | 50 | |
| Small Animals | Plankton | 102 |
| Insects 2 | 102 | |
| Insects | 117 |
| Model | Init | Seed | Top-1 final | Top-1 best | Top-5 final | Top-5 best | Loss final | Loss min |
|---|---|---|---|---|---|---|---|---|
| ViT-S/16 | Random | 0 | 67.84 | 67.97 (96) | 95.96 | 97.18 (31) | 1.814 | 1.004 (28) |
| Random | 1 | 67.77 | 68.00 (90) | 96.10 | 97.11 (30) | 1.822 | 0.997 (30) | |
| Random | 2 | 67.09 | 67.37 (80) | 95.97 | 96.94 (22) | 1.862 | 1.021 (27) | |
| IGPG | 0 | 71.33 | 71.72 (84) | 96.78 | 97.82 (42) | 1.323 | 0.892 (44) | |
| IGPG | 1 | 71.32 | 71.76 (64) | 96.87 | 97.85 (41) | 1.303 | 0.886 (44) | |
| IGPG | 2 | 71.73 | 71.96 (94) | 96.93 | 97.97 (43) | 1.308 | 0.867 (50) |
| Architecture | Params | Chunks | Time (s) | Throughput (chunks/s) |
|---|---|---|---|---|
| In-distribution ViT | 8.98M | 2,220 | 19.6 | 113.4 |
| Held-out ViT | 4.90M | 1,235 | 10.2 | 121.2 |
| Architecture | Configuration |
|---|---|
| vgg11_bn | architecture: A, layers: [64, ’M’, 128, ’M’, 256, 256, ’M’, 512, 512, ’M’, 512, 512, ’M’], batch_norm: true |
| mobilenetv2_x0_5 | width_multiplier: 0.5, final_layer_channels: 640 |
| repvgg_a0 | width_multiplier: [0.75, 0.75, 0.75, 2.5] |
| shufflenetv2_x0_5 | stages_repeats: [4, 8, 4], stages_out_channels: [24, 48, 96, 192, 1024] |
| resnet20 | layers: [3, 3, 3] |
| Model | CIFAR-10 | CIFAR-100 | ||||
|---|---|---|---|---|---|---|
| IGPG | Pretrained | Params (M) | IGPG | Pretrained | Params (M) | |
| MobileNetV2 ( 0.5) | 93.16 | 93.12 | 0.70 | 71.05 | 71.14 | 0.82 |
| MobileNetV2 ( 0.75) | 94.16 | 94.08 | 1.37 | 74.15 | 74.06 | 1.48 |
| MobileNetV2 ( 1.0) | 93.98 | 94.05 | 2.24 | 74.41 | 74.30 | 2.35 |
| MobileNetV2 ( 1.4) | 94.26 | 94.22 | 4.33 | 75.97 | 76.29 | 4.50 |
| Average (MobileNetV2) | ||||||
| Method | Task | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| Original (checkpoint) | ARC-e | 76.64 | 76.81 | 76.35 | 76.81 | 77.02 |
| OBQA | 70.20 | 70.40 | 70.40 | 70.00 | 70.40 | |
| PIQA | 48.53 | 48.80 | 48.69 | 48.10 | 48.59 | |
| HellaSwag | 53.95 | 54.08 | 54.11 | 54.32 | 54.25 | |
| WinoGrande | 50.43 | 50.43 | 50.43 | 50.43 | 48.86 | |
| BoolQ | 62.94 | 62.91 | 62.72 | 62.69 | 62.63 |
Autoregressive Modeling
Autoregressive modeling predicts sequences step by step from prior context, spanning language, time series, images, audio, and scientific simulations.
See all 93 papers