Introduction
The rapid advancement of Vision Transformers (ViTs) has led to a proliferation of high-performance pre-trained models. However, a significant "size mismatch" persists between these massive models and the diverse constraints of deployment environments. While a 12-layer ViT-Base might excel in a data center, mobile or edge devices often require smaller variants with fewer layers or reduced embedding dimensions. Traditionally, researchers have faced a binary choice: train smaller models from scratch at immense computational cost, or use manual "Weight Selection" methods that often disrupt the intricate structural patterns learned during pre-training.
This paper introduces WAVE (Weight Templates for Adaptive Initialization), a framework that treats model initialization as an adaptive multi-task learning problem. By distilling knowledge into compact, size-agnostic "weight templates," WAVE enables the initialization of models of arbitrary depth and width, achieving state-of-the-art performance with up to 15x computational savings compared to training from scratch.
The WAVE Framework
WAVE builds upon the concept of "learngenes"—compact neural fragments that encapsulate essential knowledge. The framework consists of three core components:
- Weight Templates ($T$): Instead of storing massive weight matrices, WAVE distills knowledge from a large "ancestry" model into shared, size-agnostic templates. These templates capture the fundamental structural patterns of the weights.
- Weight Scalers ($S$): To adapt templates to specific target dimensions, WAVE employs lightweight "scalers." These are tiny, learnable matrices that act as adapters for different model sizes.
- Kronecker Product Reconstruction: The final weight matrix ($W$) is reconstructed using the Kronecker product: $W = \sum T \otimes S$. This mathematical operation allows a small template to expand and fill a weight matrix of any required dimension, preserving structural integrity across scales.
By framing initialization as a multi-task problem, the templates serve as a "universal backbone," while the scalers function as task-specific adapters for each unique model configuration.
Experimental Evaluation
The authors evaluated WAVE across a comprehensive suite of benchmarks. The initial "once-for-all" distillation of templates was performed on ImageNet-1K. Subsequently, the transfer capabilities were tested on diverse downstream tasks, including Oxford Flowers, CUB-200-2011, Stanford Cars, CIFAR-10/100, Food-101, and iNaturalist-2019. A key contribution of this work is the introduction of a new benchmark for "learngenes," systematically evaluating 15 different model configurations across varying depths and widths.
Key Results and Insights
WAVE demonstrates significant advantages over existing methods such as LiGO, Weight Selection, and TLEG.
Efficiency and Performance
One of the most striking results is the computational efficiency. As shown in the performance analysis, WAVE achieves a 15x reduction in total training costs when initializing a set of variable-sized models compared to traditional pre-training from scratch. Furthermore, a WAVE-initialized model trained for just 10 epochs can outperform a randomly initialized counterpart trained for 150 epochs.
Width and Depth Expansion
While previous "learngene" approaches were often limited to depth expansion (adding layers), WAVE is the first to successfully handle width expansion (changing embedding dimensions) effectively. This flexibility is crucial for adapting models to hardware with specific memory bandwidth or vector processing constraints.
Structural Integrity
Visual analysis using Class Activation Mapping (CAM) reveals that WAVE-initialized models retain the highly structured attention patterns of their large ancestry models. Even before extensive fine-tuning, these models naturally focus on local object features, whereas randomly initialized models exhibit noisy, scattered attention. This "head start" is particularly beneficial on small datasets like Oxford Flowers, where WAVE-initialized models achieve near-perfect accuracy while scratch-trained models often struggle with overfitting.
Conclusion and Future Work
WAVE represents a paradigm shift in model initialization, moving from static weight copying to adaptive template-based reconstruction. By drastically reducing the cost of deploying high-performance ViTs to diverse hardware, it paves the way for more accessible and efficient AI. Future research directions include extending the WAVE framework to Convolutional Neural Networks (CNNs) and Large Language Models (LLMs), as well as exploring its potential for real-time model compression during deployment.
Summary updated