Introduction
In the current deep learning landscape, the standard practice for achieving state-of-the-art performance involves fine-tuning massive pre-trained models, such as Vision Transformers (ViT), on specific downstream tasks. Because performance is highly sensitive to hyperparameters—including learning rates and data augmentation strategies—practitioners typically train numerous variations of the same architecture.
"Model Soups," a technique introduced by Wortsman et al. (2022), offers a way to leverage these multiple fine-tuned models by averaging their weights into a single final model. This process improves accuracy and robustness without increasing inference-time costs. However, existing methods for constructing these soups face a significant trade-off: "Greedy Soups" are computationally efficient but often sub-optimal, while "Learned Soups"—which use gradient descent to find optimal mixing coefficients—are prohibitively memory-intensive. Standard Learned Soups require loading all constituent models into memory simultaneously, often demanding over 200GB of RAM for an ensemble of 72 ViT-B/32 models. This paper introduces MEHL-Soup, a strategy that slashes memory requirements by over 13× and speeds up construction by 9×, enabling the optimization of massive ensembles on a single consumer-grade GPU.
The MEHL-Soup Framework
The authors propose Memory Efficient Hyperplane Learned Soup (MEHL-Soup) to overcome the scalability barriers of traditional learned ensembles. Their approach is built upon three core technical innovations:
1. Hyperplane Optimization and Extrapolation
Traditional learned soups typically constrain mixing coefficients to a probability simplex (where coefficients are between 0 and 1 and sum to 1) using a softmax layer. MEHL-Soup relaxes this constraint to a hyperplane. This shift allows for extrapolation—assigning coefficients outside the [0, 1] range. The authors demonstrate that allowing the model to "overshoot" or "undershoot" specific weights helps the final ensemble generalize better than restricted convex combinations.
2. Efficient Gradient Calculation
A primary bottleneck in learned soups is the need to maintain a computational graph for every model in the ensemble. The authors provide a mathematical derivation showing that a full graph is only necessary for the combined model. The individual constituent models are only required for simple inner product operations, significantly reducing the overhead per iteration.
3. Block Coordinate Gradient Descent (BCGD)
To ensure the process fits within the memory limits of a single GPU, MEHL-Soup employs a mini-batch approach for the models themselves. Instead of loading the entire ensemble, BCGD randomly selects a small subset (a "block") of models, updates their specific coefficients, and iterates. This keeps the memory footprint constant regardless of the total number of models in the soup.
Additionally, the researchers introduced MEHL-Soup+, which applies this optimization logic layer-by-layer. This allows the soup to dynamically select the best weight contributions from different models at different depths of the network, further boosting performance.
Experimental Evaluation
The effectiveness of MEHL-Soup was evaluated across several benchmarks and architectures:
- ImageNet-1K: Utilizing 72 fine-tuned CLIP ViT-B/32 models.
- CIFAR-10 & CIFAR-100: Utilizing 32 fine-tuned CLIP ViT-L/14 models.
- Large-Scale Scalability: Testing on 8 fine-tuned CLIP ViT-L/14 models to verify performance on high-parameter architectures (343M parameters).
Key Results and Insights
Performance and Robustness
MEHL-Soup+ achieved a top-1 accuracy of 81.62% on ImageNet, outperforming both the best individual model (80.38%) and the standard Learned-Soup (81.39%). Notably, MEHL-Soup+ is significantly less sensitive to the quality of the "best" model in the pool. Even when the highest-performing individual models are removed from the ensemble, MEHL-Soup+ maintains high performance, whereas the accuracy of Greedy Soups typically plummets under such conditions.
Efficiency Breakthroughs
The combination of BCGD and efficient gradient derivation resulted in a "Single GPU" breakthrough. Peak memory usage was reduced from 253GB (which usually requires CPU-bound processing) to just 19GB (GPU-bound). This allows the entire optimization to take place on a single NVIDIA RTX 4090. Furthermore, the construction time was 9.5× faster than standard Learned-Soup and faster than Greedy Soup, which requires numerous sequential evaluation passes.
Scalability
While standard Learned-Soup methods frequently encounter Out-Of-Memory (OOM) errors when dealing with larger architectures like ViT-L/14, MEHL-Soup handled these models seamlessly, proving its utility for modern, large-scale AI development.
Limitations and Future Work
Despite the efficiency of the souping process, the initial requirement to fine-tune dozens of models remains a computational bottleneck. While the authors suggest that the efficiency of MEHL-Soup+ might allow for smaller initial pools of models, the "pre-souping" phase is still the most resource-intensive part of the pipeline. Future research aims to unify the fine-tuning and model-averaging steps into a single, seamless pipeline to further reduce the total cost of model development. Additionally, the method introduces new hyperparameters (such as model mini-batch size and inner iterations) that require careful tuning for optimal results.
Conclusion
MEHL-Soup represents a significant step forward in making advanced ensemble techniques accessible to researchers without massive compute clusters. By rethinking the optimization space and the mechanics of gradient calculation, the authors have transformed a memory-intensive research curiosity into a practical tool for building high-performance, scalable models on consumer hardware.
Summary updated