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

The Impact of Model Zoo Size and Composition on Weight Space Learning

Damian Falk, Konstantin Schürholt, Damian Borth · DOI

Abstract

Weight space learning treats neural network weights as a distinct data modality, but previous methods were limited to homogeneous "model zoos" trained on the exact same dataset. This paper introduces a masked per-token loss normalization technique that allows weight-space models to train on heterogeneous model zoos. By training on diverse populations of models, the approach significantly improves zero-shot knowledge transfer and generalization to unseen, out-of-distribution tasks.

Introduction

The dominant paradigm in deep learning relies on pre-training and fine-tuning. Recently, "weight space learning" has emerged as a way to distill knowledge from entire populations of pre-trained models (model zoos) by training autoencoders or transformers directly on their weights. However, existing methods like SANE (Sequential Autoencoder for Neural Embeddings) require homogeneous model zoos, where all models share the same architecture and training dataset. This limitation stems from the fact that weight distributions vary drastically between different layers and datasets, causing standard normalization techniques to fail when architectures or data distributions do not perfectly match.

Methodology: Masked Per-Token Loss Normalization

To address the challenges of heterogeneous model zoos, the authors introduce Masked Per-Token Loss Normalization. Unlike previous works that normalized weights per-layer globally as a preprocessing step, this method standardizes the loss contributions per-token at runtime.

The technique standardizes target and prediction tokens using the mean and standard deviation of the token's signal. Crucially, a binary mask is applied to ignore zero-padding, which is used to harmonize token sizes across different architectures. This prevents padding from skewing the distribution towards zero, allowing the model to handle varying weight distributions without training instability.

Figure 4: Masked per-token normalization effectively captures weight distributions across different layer types (Convolutional, Batch-Norm, Fully-Connected) and leads to superior model performance compared to standard normalization techniques.

Experimental Results

The authors evaluated their method using populations of small CNNs and ResNet-18s trained on various datasets including MNIST, SVHN, CIFAR10, and CIFAR100.

The Limits of Model Souping

A common heuristic for aggregating models is weight averaging (model souping). However, as shown in Figure 3, simple weight averaging—even when using alignment techniques like git re-basin—leads to significant performance degradation as the number of averaged models increases or task complexity grows. This underscores the necessity of learned representations in weight space rather than simple heuristics.

Figure 3: Test accuracy of averaged models decreases as more models are included, highlighting the limitations of simple weight averaging compared to learned weight-space representations.

Diversity and Generalization

A key insight of the study is that diversity in the training zoo is more important than sheer volume. Training on a "multi-zoo" dataset (e.g., a mix of CIFAR10 and CIFAR100 models) yields much better downstream generalization than training on a single zoo of the same total size.

Specifically, Multi-zoo SANE achieved an average zero-shot accuracy of 49.5% across downstream tasks, significantly outperforming single-zoo baselines (23.3% for CIFAR10-only and 16.4% for CIFAR100-only). The gains were even more pronounced on far-out-of-distribution (FOOD) tasks; for instance, zero-shot accuracy on EuroSAT jumped from ~29.3% to 72.1% when using the multi-zoo approach.

Conclusion

By introducing masked per-token loss normalization, this work enables weight-space learning on heterogeneous model zoos. The results demonstrate that training on diverse model populations allows for superior zero-shot transfer and robust out-of-distribution generalization. Future work may explore combining these structural weight initializations with data-driven methods like HyperNetworks to further enhance task-specific performance.

Summary updated

BibTeX
@inproceedings{falk2025impact,
  author = {Damian Falk and Konstantin Schürholt and Damian Borth},
  title = {{The Impact of Model Zoo Size and Composition on Weight Space Learning}},
  booktitle = {WSL @ ICLR},
  year = {2025},
  url = {https://openreview.net/forum?id=fp6EPW47hJ},
}
Figure