[Paper Review] A Generative Model for Sampling High-Performance and Diverse Weights for Neural Networks
This paper proposes a hypernetwork-based generative model that samples high-performance, diverse neural network weights by learning a manifold in weight space, balancing accuracy and diversity through a tunable loss function. The method enables efficient ancestral sampling for large ensembles, improving generalization beyond trivial symmetries, and supports model distillation to retain ensemble accuracy in a single classifier.
Recent work on mode connectivity in the loss landscape of deep neural networks has demonstrated that the locus of (sub-)optimal weight vectors lies on continuous paths. In this work, we train a neural network that serves as a hypernetwork, mapping a latent vector into high-performance (low-loss) weight vectors, generalizing recent findings of mode connectivity to higher dimensional manifolds. We formulate the training objective as a compromise between accuracy and diversity, where the diversity takes into account trivial symmetry transformations of the target network. We demonstrate how to reduce the number of parameters in the hypernetwork by parameter sharing. Once learned, the hypernetwork allows for a computationally efficient, ancestral sampling of neural network weights, which we recruit to form large ensembles. The improvement in classification accuracy obtained by this ensembling indicates that the generated manifold extends in dimensions other than directions implied by trivial symmetries. For computational efficiency, we distill an ensemble into a single classifier while retaining generalization.
Motivation & Objective
- To develop a data-free, differentiable method for generating diverse and high-performing neural network weights without requiring a probabilistic interpretation of the target network.
- To extend mode connectivity findings by learning a higher-dimensional, non-trivial manifold of low-loss weight vectors in deep neural network weight space.
- To improve computational efficiency by reducing hypernetwork parameters via parameter sharing and enabling ancestral sampling for large-scale ensembling.
- To demonstrate that generated weights generalize beyond trivial symmetry transformations, indicating meaningful diversity in generalization capacity.
- To distill large ensembles into a single, efficient classifier while preserving ensemble-level accuracy.
Proposed method
- Train a hypernetwork as a generator mapping a latent vector to full weight vectors of a target neural network, using a loss function that balances accuracy and diversity.
- Define diversity as the distance between weight vectors after removing trivial symmetry transformations (e.g., weight permutation, sign flips), ensuring meaningful structural differences.
- Introduce a tunable hyperparameter to balance accuracy and diversity, generalizing Variational Inference as a special case.
- Apply parameter sharing in the hypernetwork architecture to reduce its size relative to the target network, improving scalability.
- Use ancestral sampling from the trained hypernetwork to generate 100+ diverse classifiers for ensemble learning.
- Apply Polyak-Ruppert averaging to distill the ensemble into a single classifier, preserving generalization performance.
Experimental results
Research questions
- RQ1Can a hypernetwork learn a high-dimensional, non-trivial manifold of low-loss weight vectors in deep neural network weight space?
- RQ2How can diversity in generated weights be meaningfully measured while accounting for trivial symmetry transformations?
- RQ3Does ancestral sampling from a hypernetwork produce ensembles that generalize better than standard SGD-based ensembles?
- RQ4Can the performance of a distilled single classifier match that of a large ensemble generated via ancestral sampling?
- RQ5How does the inclusion of a diversity regularization term affect the trade-off between mean accuracy and ensemble accuracy?
Key findings
- For LeNet on CIFAR-10, the hypernetwork-generated ensemble achieved 0.85% higher test accuracy than a single SGD-trained model, demonstrating improved generalization.
- Including the entropy-based diversity term increased ensemble accuracy while slightly reducing mean accuracy, confirming the model's ability to generate diverse, high-performing weights.
- On ResNet-32, the hypernetwork-generated ensemble achieved 90.02% test accuracy, though it did not reach state-of-the-art performance, suggesting room for further tuning.
- Distillation via ancestral sampling reduced ensemble accuracy from 90.02% to 89.46% on ResNet-32, showing that a single classifier can retain most of the ensemble's generalization power.
- The success rate of adversarial attacks was reduced when using hypernetwork-generated ensembles, indicating improved robustness compared to single models.
- The hypernetwork successfully generated all weights of deep networks with statistical dependencies across layers, confirming the existence of a complex, non-trivial weight manifold.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.