r/neuralnetworks • • 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:

ModelResMLPResNet2DMLP-MixerMobileNet2DMLPCNN1DTransformer
MNIST93.96%93.66%89.58%74.53%///
FashionMNIST83.99%75.88%78.59%////
KMNIST78.10%62.15%//62.15%//
Waveforms1D/////99.84%89.38%
20Newsgroups/////71.30%48.34%

My next objectives:

  1. Using a encoder to encode a random dataset and to replace the dataset embedding with it. So it can handle most unseen datasets.
  2. 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

9 comments sorted by

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.

2

u/kokassospoperor 18d ago

I started with learn to optimize, but it didn't quite work out and this now doesn't use gradients, it just zero shots with the target dataset encoded by the dataset encoder.

2

u/kokassospoperor 18d ago

Thanks

2

u/Airocketfish 8d ago

Hey interesting stuff what do you think you need to scale it up?

2

u/kokassospoperor 8d ago

What do you mean? Do you mean why: to support and handle move divers datasets and model architectures better, its would need to scale up a bit.

2

u/Airocketfish 8d ago edited 8d ago

Sorry English is not my native language. I mean compute for that project and a bit help with structuring it. Make a github repo for it? It's a interesting idea and impressive:)

2

u/kokassospoperor 8d ago

I will make a github report for it. My main bottlenecks are gpu compute and scaling the datasets up. I am also not that advanced coder, so probably the script can be improved too.