Abstract
Training neural networks via iterative gradient descent is computationally expensive, particularly for rapid task adaptation. While direct weight generation using diffusion models offers a gradient-free alternative, existing methods often fail to generalize across tasks or leverage the rich optimization signals found in intermediate training steps. This paper introduces Mc-Di (Meta-learning weight generation via local consistency Diffusion), a framework that combines bi-level meta-learning with a novel "Local Consistency Diffusion" algorithm. By learning from intermediate optimization checkpoints, Mc-Di achieves state-of-the-art accuracy and up to 4x faster inference across few-shot learning, transfer learning, and Large Language Model (LLM) adaptation.
Introduction
Standard neural network training relies on iterative gradient updates, which can be a bottleneck in scenarios requiring frequent updates for new tasks, such as few-shot learning or LLM fine-tuning. Recent research into generative weight models aims to "predict" optimal weights directly. However, these models typically struggle with two issues: poor generalizability across diverse tasks and the neglect of intermediate weight trajectories. Existing models focus solely on the final global optima, ignoring the valuable step-by-step optimization policies embedded in the training "journey."
The Mc-Di Framework
Mc-Di addresses these challenges through a structured three-stage approach designed to capture and replicate efficient optimization trajectories:
- Weight Preparation Stage: Standard optimizers (e.g., Adam) are used to train networks on various tasks. Intermediate weights (local targets) are sampled at uniform intervals. This stage incorporates data augmentation and Sharpness-Aware Minimization (SAM) to bake robustness and convergence efficiency into the target weights offline.
- Meta-Training Stage: The diffusion model is wrapped in a bi-level meta-learning framework (REPTILE). This ensures the model learns shared representations across multiple tasks, significantly enhancing its ability to generalize to unseen data.
- Local Consistency Diffusion: This core novelty breaks the diffusion process into $k$ segments. Instead of a single jump from noise to global optima, the model is trained to hit specific intermediate weights at designated steps (e.g., $T/k$, $2T/k$). This guides the generation process step-by-step, maintaining mathematical consistency with the final target.
Key Insights: The Importance of the Trajectory
A central thesis of this work is that intermediate weights are not merely incomplete noise; they represent vital stepping stones. By forcing the diffusion model to hit multiple intermediate targets, the search space is effectively partitioned into smaller, more manageable chunks. This "divide and conquer" strategy allows the model to learn prerequisite objectives faster and more reliably.
As shown in the loss landscape analysis, incorporating local target weights guides the generation process along a more efficient path toward the global optimal weight, avoiding the erratic trajectories often seen in vanilla weight generation methods.
Experimental Results
Mc-Di was evaluated across diverse benchmarks, including ImageNet transfer learning, few-shot learning (Omniglot, Mini-ImageNet), and LLM adaptation (RoBERTa-base on GLUE):
- Efficiency: Mc-Di achieves a 1.8x to 1.9x reduction in inference latency compared to existing state-of-the-art weight generation methods like OCD and D2NWG.
- Accuracy: The model consistently outperforms baselines, showing an average +2.51% accuracy improvement in few-shot learning and +4.64% in domain generalization.
- LLM Adaptation: When generating LoRA matrices for RoBERTa-base, Mc-Di matches the accuracy of standard gradient-based fine-tuning while accelerating the process by 3.6x to 4.0x.
Conclusion and Future Work
Mc-Di demonstrates that learning the trajectory of optimization is as important as learning the destination. By combining meta-learning with local consistency diffusion, the framework provides a highly efficient, gradient-free path to task-specific weight generation. Future work will explore techniques like Flow Matching to model even more flexible, arbitrary weight trajectories, potentially further reducing the reliance on fixed starting points.
Summary updated