[Paper Review] Hyper-Representations: Self-Supervised Representation Learning on Neural Network Weights for Model Characteristic Prediction
This paper proposes Hyper-Representations, a self-supervised representation learning framework that learns meaningful, task-agnostic representations directly from the weights of neural network populations. By applying domain-specific data augmentations—such as structure-preserving permutations, erasing, and noise—alongside a modified transformer architecture, the method achieves state-of-the-art performance in predicting model characteristics like hyperparameters, test accuracy, and generalization gap, with strong zero-shot transferability to out-of-distribution settings.
Datasets to NeurIPS 2021 accepted paper "Self-Supervised Representation Learning on Neural Network Weights for Model Characteristic Prediction". Datasets are pytorch files containing a dictionary with training, validation and test sets. Train, validation and test sets are custom dataset classes which inherit from the standard torch dataset class. Corresponding code an be found at https://github.com/HSG-AIML/NeurIPS_2021-Weight_Space_Learning. Datasets 41, 42, 43 and 44 are our dataset format wrapped around the zoos from Unterthiner et al, 2020 (https://github.com/google-research/google-research/tree/master/dnn_predict_accuracy)<br> <br> Abstract:<br> Self-Supervised Learning (SSL) has been shown to learn useful and information-preserving representations. Neural Networks (NNs) are widely applied, yet their weight space is still not fully understood. Therefore, we propose to use SSL to learn neural representations of the weights of populations of NNs. To that end, we introduce domain specific data augmentations and an adapted attention architecture. Our empirical evaluation demonstrates that self-supervised representation learning in this domain is able to recover diverse NN model characteristics. Further, we show that the proposed learned representations outperform prior work for predicting hyper-parameters, test accuracy, and generalization gap as well as transfer to out-of-distribution settings.
Motivation & Objective
- To learn task-agnostic, information-preserving representations from the weight space of neural network populations.
- To address the lack of understanding in how different regions of weight space relate to model characteristics such as accuracy and generalization.
- To improve upon prior supervised methods that rely on hand-crafted features by learning representations end-to-end via self-supervised learning.
- To enable zero-shot transfer to out-of-distribution model zoos for characteristic prediction.
- To validate that self-supervised learning on weights reveals latent, meaningful structures in neural network weight spaces.
Proposed method
- Proposes a novel self-supervised learning framework applied directly to the weights of trained neural networks, forming a 'model zoo' of weight vectors.
- Introduces three domain-specific data augmentations: structure-preserving permutations of weights, erasing, and noise injection, to preserve inductive biases in weight space.
- Adapts a transformer architecture to process and encode weight representations, enabling attention-based feature learning.
- Employs contrastive and reconstruction-based pretraining objectives to learn hyper-representations from augmented views of weight vectors.
- Uses linear probing on downstream tasks (e.g., predicting hyperparameters, accuracy, generalization gap) to evaluate the utility of learned representations.
- Employs a combination of reconstruction and contrastive learning objectives to improve representation quality and generalization.
Experimental results
Research questions
- RQ1Can self-supervised representation learning on neural network weights recover meaningful, latent model characteristics such as hyperparameters and test accuracy?
- RQ2How do domain-specific data augmentations—especially structure-preserving permutations—impact the quality of learned weight representations?
- RQ3Can the proposed hyper-representations generalize to out-of-distribution model zoos for characteristic prediction?
- RQ4How does the proposed method compare to prior state-of-the-art approaches in predicting model characteristics from weights?
- RQ5What role does weight space diversity (e.g., from varying random seeds) play in the recoverability of model characteristics?
Key findings
- The proposed method achieves state-of-the-art performance in predicting test accuracy, with an R² score of 89.4 on the MNIST-HYP zoo using the E c+ D method, outperforming both W and s(W) baselines.
- For generalization gap prediction, the method achieves an R² score of 32.9 on the MNIST-HYP zoo, significantly outperforming the baseline W method (15.3) and s(W) (24.8).
- On the MNIST-SEED zoo, the method achieves an R² of 87.2 for test accuracy prediction, demonstrating strong performance even in out-of-distribution settings.
- The method shows superior Kendall’s τ scores across all tasks and datasets, indicating better rank-ordering performance for model characteristic prediction.
- The ablation study confirms that random seed variation in model zoos enhances the recoverability of model characteristics, highlighting the importance of diversity in training configurations.
- The model demonstrates robust zero-shot transfer performance, with higher R² and Kendall’s τ scores than baselines on out-of-distribution evaluations across MNIST-HYP, FASHION-HYP, SVHN-HYP, and CIFAR10-HYP.
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.