Structure Is Not Enough: Leveraging Behavior for Neural Network Weight Reconstruction
Léo Meynent, Ivan Melev, Konstantin Schürholt, Göran Kauermann, Damian Borth
TL;DR
This work shows that purely structural reconstruction in weight-space autoencoders is insufficient to faithfully recover high-performing neural networks. By introducing a query-based behavioral loss that compares model outputs on selected inputs, and integrating it with a structural loss in a composite objective, the authors demonstrate strong synergistic gains across reconstructive and generative tasks. Gradient analysis reveals that the behavioral loss aligns weight perturbations with input-output sensitivities, offering functional guidance missing from purely structural signals. Empirically, combining structure and behavior on three model zoos yields reconstructions and generated weights that approach the performance of original models, suggesting practical potential for weight-space data generation and analysis with a data-efficient, self-supervised framework.
Abstract
The weights of neural networks (NNs) have recently gained prominence as a new data modality in machine learning, with applications ranging from accuracy and hyperparameter prediction to representation learning or weight generation. One approach to leverage NN weights involves training autoencoders (AEs), using contrastive and reconstruction losses. This allows such models to be applied to a wide variety of downstream tasks, and they demonstrate strong predictive performance and low reconstruction error. However, despite the low reconstruction error, these AEs reconstruct NN models with deteriorated performance compared to the original ones, limiting their usability with regard to model weight generation. In this paper, we identify a limitation of weight-space AEs, specifically highlighting that a structural loss, that uses the Euclidean distance between original and reconstructed weights, fails to capture some features critical for reconstructing high-performing models. We analyze the addition of a behavioral loss for training AEs in weight space, where we compare the output of the reconstructed model with that of the original one, given some common input. We show a strong synergy between structural and behavioral signals, leading to increased performance in all downstream tasks evaluated, in particular NN weights reconstruction and generation.
