Neural network optimization / Weight-space learning
Can AI help us train
better neural networks?
From a new dataset to useful model weights.
Generate a starting model. Then fine-tune.
Suppose you have labeled images for a new defect-detection task and have chosen a CNN architecture. You could adapt a pretrained checkpoint or train from scratch with SGD or Adam. The goal is to generate useful starting weights from your dataset, then fine-tune them. That would let a new task benefit from patterns learned across existing networks.
Two approaches work directly in weight space, the space of network parameters. SANE (2024) learns representations of trained networks and decodes sampled embeddings into new weights. Weight-Space Programming (2026) explores general-purpose LLMs reading, editing, and writing network weights through reasoning.
Our method. SANE-MoE adds expert routing to the SANE autoencoder. Evaluated on mixed collections of small CNNs trained on CIFAR-10 and STL-10, it improves both weight reconstruction and generated-model accuracy over the dense baseline.
Read further
The report, its foundations, and two complementary directions.
Our method · 2025 Sciarretta & OmararWeight Space Learning with Mixture of Experts (MoE) ↗Adds expert routing to SANE; improves reconstruction and generation in mixed CNN zoos. Foundation · ICML 2024 Schürholt, Mahoney & BorthTowards Scalable and Versatile Weight Space Learning ↗Introduces SANE: tokenizes network weights for scalable encoding, analysis, and model sampling. Our backbone. Model-zoo data · NeurIPS 2022 Schürholt et al.Model Zoos: A Dataset of Diverse Populations of Neural Network Models ↗Provides standardized checkpoint collections and benchmarks for learning from populations of networks. Dataset conditioning · ICML 2026 Asefaw et al.WeightCLIP: Aligning Datasets and Models for Weight Space Learning ↗Aligns dataset and weight embeddings for dataset-guided model retrieval, generation, and refinement. Related perspective · 2026 Takehi et al.Sparks of Weight-Space Programming ↗Explores general-purpose LLMs reading and editing weights directly. A complementary approach to AI-assisted model optimization.A learned head start
Sample candidate weights, evaluate them, then fine-tune with SGD or Adam on your target task.
New model checkpoints
Decode samples from the learned embedding distribution into complete network weights.
Read a network’s weights
Use embeddings as features to predict model properties, such as accuracy or generalization gap.
The idea in one picture
Trained models become the training data.
A model zoo is a collection of trained checkpoints. SANE learns to encode and reconstruct their weights, processing windows of weight tokens instead of a whole network at once.
01 Collect experience
Networks → sequences
Standardize and align weights; split them into tokens with layer and position information.
02 Learn a representation
Encode → reconstruct
Train an autoencoder on token windows. Each token gets an embedding; a model has a sequence of them.
03 Put it to work
→ calibrate → evaluate → fine-tune
→ estimate model characteristics
Generate or analyze
Reuse the decoder to produce networks, or the encoder to study existing ones.
Where the optimizer fits. Training SANE still uses gradient optimization. To generate a network, fit a sampling distribution to checkpoint embeddings, decode new weights, calibrate batch-normalization statistics, and evaluate the candidates. Selected weights can then be fine-tuned with SGD or Adam.
Our contribution / SANE-MoE
Routing weight tokens to experts.
Weights from different layers and datasets need not follow the same patterns. We replace feed-forward sublayers in selected SANE Transformer blocks with a router and multiple expert networks. The router can use token content, position, and layer information to choose which experts process each weight token.
Sparse expert routing
The router selects experts for each token. Their outputs are combined using normalized routing weights.
sum
We compare top-k, position-aware, and hierarchical routing. Sparse top-k routing increases total capacity while activating only a subset of experts for each token; computation depends on the active expert count and routing overhead.
What we measured
Better generated checkpoints in a mixed zoo.
Trained on a mixture of small CNN zoos from CIFAR-10 and STL-10, every evaluated MoE routing variant improves mean generated-model accuracy over dense SANE.
Exact values from the report
| Method | CIFAR-10 | STL-10 |
|---|---|---|
| SANE baseline | 38.74 ± 4.16 | 28.90 ± 5.43 |
| MoE · top-k | 43.88 ± 3.01 | 32.13 ± 4.38 |
| MoE · position-aware | 43.07 ± 3.20 | 30.44 ± 5.31 |
| MoE · hierarchical | 42.41 ± 2.19 | 32.88 ± 4.01 |
| Original CNNs (reference) | 45.81 | 34.93 |
Conclusion / Toward scalable weight-space learning
What improves, and what comes next.
Expert routing improves the SANE backbone in this mixed-CNN setting: reconstructed weights are more faithful to the originals, and generated models are more accurate. The next question is whether these gains hold for larger networks and broader model zoos.
Dataset + compatible architecturedataset-aligned weight spacegenerated NN weightstask-specific fine-tuning
WeightCLIP (2026) aligns dataset information with weight embeddings. Combining that conditioning with an expert-based backbone could support scalable generation of weights for a new dataset and compatible architecture. Our report does not test this combination or measure fine-tuning speed; both require further experiments.