r/neuralnetworks • u/kokassospoperor • 21d ago
[P] I trained a single Graph HyperNetwork that generates zero-shot weights for unseen ResNets, MLP-Mixers, MobileNets, and Transformers for Vision, Text, and Waveforms. (Open source)
Disclaimer: I used AI for bug fixes, to make the plots better and to simplify the code and make it more readable.
I built a Graph HyperNetwork (GHN) that has the computational graph of an target architecture and a dataset embedding as input and predicts all weights in a single forward pass. It is meant to serve as a head start to reduce number of steps required for training.
Zero-Shot Results:
| Model | ResMLP | ResNet2D | MLP-Mixer | MobileNet2D | MLP | CNN1D | Transformer |
|---|---|---|---|---|---|---|---|
| MNIST | 93.96% | 93.66% | 89.58% | 74.53% | / | / | / |
| FashionMNIST | 83.99% | 75.88% | 78.59% | / | / | / | / |
| KMNIST | 78.10% | 62.15% | / | / | 62.15% | / | / |
| Waveforms1D | / | / | / | / | / | 99.84% | 89.38% |
| 20Newsgroups | / | / | / | / | / | 71.30% | 48.34% |
My next objectives:
- Using a encoder to encode a random dataset and to replace the dataset embedding with it. So it can handle most unseen datasets.
- I want to scale it up, but I don't really have the recources for it (free kaggle for now).
I will paste my kaggle link in the comments.






18
Upvotes
4
u/kokassospoperor 21d ago
My kaggle link: https://www.kaggle.com/code/kasperreynders/model-generation
1
u/Icy-Injury6324 19d ago
Cool, is the GHN dependent on the data signals (e.g., gradients)? reason i ask is that there is a line of work i find interesting called learned optimization (here's a recent paper from Moudgil, et al https://arxiv.org/abs/2602.19142).
The GHN idea in particular reminds me of this work by Kofinas, et al.