TL;DR
What if you could generate a fully trained neural network in less than a millisecond instead of training one from scratch? Existing weight generators can already spit out accurate models, but they suffer from a quiet flaw: they largely regurgitate clones of their training checkpoints that all fail on the exact same test examples. DriftWeight solves this "functional mode collapse" by introducing a carefully anchored repulsive force in compressed weight space, generating genuinely distinct, high-performing neural networks in a single forward pass—more than 240× faster than leading multi-step baselines.
What Problem Does This Paper Address?
Training neural networks is expensive. Weight generation flips the script: you train a population of source models once, train a generative model on their parameters, and then sample fresh, ready-to-use neural networks on demand. This is great for building ensembles, transfer learning, or refreshing deployed parameters.
Recently, diffusion and flow-matching models have gotten surprisingly good at generating high-accuracy weights, and techniques like MeanFlow promise to shrink generation down to a single forward pass. However, accuracy hides a deceptive failure mode the authors call functional mode collapse. Neural network weight spaces are vast, sparse, and riddled with permutation symmetries, causing generators to play it safe: they map diverse random noise right back onto memorized training checkpoints (or trivial interpolations between them). You think you sampled 100 fresh classifiers, but they make nearly identical mistakes—roughly equivalent to just adding tiny Gaussian noise to an existing model. Worse, if you naively add a diversity-promoting "repulsive" loss to a fast one-step generator, the generated weights fall right off the thin manifold of valid networks, tanking accuracy to random guessing.
Methods
DriftWeight builds upon MeanFlow (a standard framework that learns average velocity fields to map noise to data in a single step) and introduces three weight-specific innovations to safely push generated models away from memorized clusters:
- Checkpoint-Augmented PCA Space: Measuring Euclidean distance directly in raw weight space is noisy and expensive. Prior methods compress weights via PCA on $N$ final checkpoints, which mathematically caps the subspace rank at $N-1$ dimensions (e.g., 99 dimensions for 100 models). DriftWeight instead fits PCA on both final and intermediate checkpoints along the SGD optimization trajectories, expanding the coordinate system rank up to $NK_{\text{PCA}} - 1$ without training any extra source models.
- Structured Repulsive Drift: Adapted from image generation, a temperature-scaled "drifting" field pulls generated codes toward valid training weights (positives) while repelling them from structured negatives. These negatives combine the current batch (preventing within-batch collapse), same-seed history (preventing sliding backward into under-trained states), and other-seed history (discouraging collapse onto other known runs).
- Boundary Consistency Anchor: Because the repulsive drift loss only backpropagates through the exact $(t=1, r=0)$ boundary evaluation used for one-step sampling, its off-manifold push easily corrupts single-step predictions. DriftWeight adds a one-step consistency loss—regressing the 1-step output onto a stop-gradient 2-step teacher that traverses well-behaved interior times—acting as a gravitational anchor to the valid weight manifold.
Datasets
No new datasets are introduced; the authors follow established weight-generation protocols across standard image classification benchmarks:
- Generation quality & diversity: MNIST (3-layer MLP), Fashion-MNIST (3-layer MLP), CIFAR-10 (ResNet-18 and ResNet-20), and CIFAR-100 (ViT-Base, ~86M parameters).
- Transfer learning (warm-start fine-tuning): STL-10 and SVHN, initialized from generated CIFAR-10 ResNet-18 weights.
Key Insights and Ideas
- The "Invisible" Boundary Collapse: Why does naive repulsion break one-step generation? In an ablation on MNIST, adding the repulsive drift loss without the consistency anchor caused 1-step accuracy to plummet from 95.68% to 10.48% (pure chance). Astonishingly, evaluating that exact same generator using 100 integration steps yielded 95.88% accuracy! Because drift gradients hit only the $u_\theta(z_1, 1, 0)$ boundary corner while the base flow loss spreads supervision across all interior times $(t, r)$, repulsion ruins the boundary predictor while leaving the interior vector field completely intact.
- Measuring Collapse via Error Sets (MaxIoU): Instead of just checking weight distances, the authors measure MaxIoU—the maximum Intersection-over-Union of wrong test predictions between a generated model and the training population. Independent models trained from scratch hit ~0.47 on MNIST, whereas prior flow generators sit around ~0.82 (indistinguishable from adding tiny Gaussian noise to a checkpoint).
Key Results
- Competitive Accuracy in 1 Step: In a single forward pass, DriftWeight matches or beats 100-step DeepWeightFlow baselines without fine-tuning: 96.30% vs. 96.17% on MNIST, 89.87% vs. 89.10% on Fashion-MNIST, and 93.64% vs. 93.55% on CIFAR-10 (ResNet-18).
- Breaking Mode Collapse: On MNIST, DriftWeight drops error-set overlap (MaxIoU) from DeepWeightFlow's 0.82 down to 0.66, breaking out of the noise-perturbation regime toward genuinely independent classifiers.
- Massive Speedup & Scale: Generator/solver latency on an H100 drops to ~0.29 ms per model—roughly 243–244× faster than 100-step RK4 DeepWeightFlow (~71.5 ms). It also scales to an 86M-parameter ViT-Base on CIFAR-100, staying within 1.7 percentage points of the training population's mean accuracy.
- Strong Transfer: When fine-tuned for 5 epochs on STL-10 and SVHN, generated ResNet-18 weights match real CIFAR-10 checkpoints (86.06% vs. 85.47% on STL-10) and crush random initialization (50.80%).
Limitations and Future Work
- Storage Overhead: Saving intermediate checkpoints scales linearly with seed count, trajectory snapshots, and parameter count (e.g., 100 seeds × 50 ResNet-18 checkpoints eats ~224 GB). Compressing trajectories via low-rank deltas is an obvious next step before tackling billion-parameter models.
- Diversity vs. Ensembling: Lower MaxIoU proves generated models aren't merely cloning training checkpoints, not that they are diverse from one another or guaranteed to boost ensemble accuracy.
- Proxy Geometry: PCA is label-free and scalable, not functionally optimal. Future work could learn function-aligned projections (matching weight distances to KL divergence of predictions), combine repulsion with permutation canonicalization (like Git Re-Basin), and expand beyond unconditional image classifiers.
Summary updated