Abstract
Generative weight modeling has emerged as a promising alternative to iterative gradient-based optimization, aiming to predict high-performing neural network weights in a single forward pass. However, existing methods often struggle with over-coupling to task losses and "drifting" during long-horizon generation. We introduce Lo-Hp (Learning an efficient Optimizer via Hybrid-Policy sub-trajectory balance), a framework that treats weight generation as a policy learning problem. By decoupling weight preparation from policy learning and employing a sub-trajectory balance objective, Lo-Hp effectively mimics the local dynamics of established optimizers. Experimental results demonstrate that Lo-Hp achieves up to 3x faster inference and significantly higher accuracy than state-of-the-art generative approaches across diverse benchmarks, including transfer learning and LLM adaptation.
Introduction
The standard paradigm for training neural networks relies on iterative gradient descent, which is inherently slow and computationally demanding. Recent research into generative weight modeling attempts to bypass this by using a meta-network to generate optimal weights directly. Despite their potential, these models face two primary challenges: over-coupling and the long-horizon issue. Over-coupling occurs when weight generation is tied strictly to the final task loss, limiting the model's ability to learn complex optimization behaviors. The long-horizon issue refers to the cumulative error or "drift" that occurs when a model attempts to reach a distant "destination" (optimal weights) without respecting the local "journey" (the optimization path).
Methodology
Lo-Hp addresses these challenges through a two-stage decoupled framework.
1. Weight Preparation (Offline)
The framework first collects trajectories of weights from successful training runs using standard optimizers like SGD and Adam. To ensure these trajectories lead to robust, generalizable solutions, Sharpness-Aware Minimization (SAM) is employed to favor "flat" minima, which are theoretically linked to better convergence bounds and improved robustness.
2. Policy Learning (Online)
A generative U-Net is trained to mimic these collected trajectories. The core innovation is the Hybrid-Policy Sub-Trajectory Balance objective. Instead of optimizing for the entire path at once, Lo-Hp optimizes over small segments (sub-trajectories). A segmentation factor ($k$) allows the model to skip steps, effectively accelerating the optimization process by a factor of $k$. This approach ensures the model adheres to local optimization logic while maintaining the flexibility to learn from multiple optimizer types simultaneously.
Key Results
Lo-Hp demonstrates superior performance across a wide range of tasks:
- Superior Accuracy: In transfer learning on CIFAR-10, Lo-Hp achieved 64.25% accuracy, significantly outperforming the previous state-of-the-art decoupled method (D2NWG).
- Efficiency Gains: Lo-Hp provides substantial speedups, reducing inference latency by 3.0x compared to D2NWG and accelerating LLM LoRA fine-tuning by approximately 5.8x relative to traditional gradient-based methods.
- Generalization: In multi-domain generalization tests on DomainNet, Lo-Hp showed a 4.64% average improvement over baselines, indicating strong generalization capabilities to unseen data distributions.
Discussion and Future Work
While Lo-Hp offers significant speedups during inference, the pre-training phase remains computationally expensive due to the need for extensive offline trajectory collection. Additionally, current evaluations focus on specific architectures like ResNet12 and RoBERTa-base. Future work will focus on scaling this framework to larger foundation models and exploring more diverse generative architectures to further enhance the efficiency and accuracy of learned optimizers.
Summary updated