Model Soups is a weight-space ensembling technique that averages the parameters of multiple independently fine-tuned models sharing a common pre-trained initialization. Unlike traditional inference-time ensembles that require running several models, a model soup produces a single set of averaged weights, delivering the robustness benefits of ensembling with zero additional inference cost or latency.
Glossary
Model Soups

What is Model Soups?
Model Soups is a technique that averages the weights of multiple fine-tuned models, each with different hyperparameters, to improve accuracy and robustness without additional inference cost.
The process involves fine-tuning a base model with varied hyperparameters—such as learning rate, data augmentation, or random seed—and then averaging the resulting weights linearly or using a greedy selection algorithm. This steers the final model toward a flatter loss minimum, improving out-of-distribution generalization. In medical imaging, model soups enhance diagnostic accuracy across heterogeneous scanner domains without sacrificing the real-time performance required in clinical workflows.
Key Characteristics of Model Soups
Model Soups represent a paradigm shift in model ensembling, achieving the robustness of traditional output-space ensembles without incurring any additional inference cost. By averaging the weights of multiple fine-tuned models, this technique discovers flatter minima in the loss landscape.
Uniform Soup Averaging
The simplest instantiation of a model soup involves taking the element-wise arithmetic mean of the weights of multiple fine-tuned models. Each model is typically initialized from the same pre-trained checkpoint but fine-tuned with distinct hyperparameter configurations (e.g., varying learning rates, data augmentations, or random seeds).
- Mechanism: For N models, the final weight is
θ_soup = (1/N) * Σ θ_i. - Key Insight: This works because fine-tuned models often reside in a single low-error basin in the loss landscape; averaging their weights finds a central point that is more robust than any individual solution.
- Result: The uniform soup often outperforms the best individual model on out-of-distribution test sets without any increase in inference latency.
Greedy Soup Selection
A more sophisticated approach where models are sequentially added to the soup only if their inclusion improves validation accuracy. This prunes models that have diverged into incompatible loss basins.
- Algorithm: Sort candidate models by validation accuracy. Starting with the best model, iteratively add the next model to the running average; keep the addition only if validation performance increases.
- Benefit: Prevents negative interference from outlier models that fine-tuned into distinct, incompatible minima.
- Use Case: Essential when fine-tuning across a wide hyperparameter sweep where some runs may collapse or overfit severely.
Interpolation in Weight Space
Model soups exploit the property of linear mode connectivity—the empirical finding that minima reached by fine-tuning from a shared pre-trained initialization are often connected by a path of low loss in weight space.
- Linear Interpolation: Moving along the line segment
θ_α = (1-α)θ_1 + αθ_2between two fine-tuned weights maintains high accuracy for allα ∈ [0,1]. - Barrier-Free Basins: Unlike training from scratch, fine-tuning constrains solutions to a shared basin, making weight averaging viable.
- Implication: The soup's averaged weight is not an arbitrary midpoint but a legitimate, high-performing solution in its own right.
Robustness to Distribution Shift
The primary advantage of model soups over single models is enhanced out-of-distribution (OOD) generalization. By averaging weights, the soup smooths out the sharp, brittle minima that individual models may converge to.
- Sharp vs. Flat Minima: Individual fine-tuned models can settle into sharp minima that fit the training distribution perfectly but fail catastrophically under covariate shift. Averaging steers the solution toward flatter minima.
- Empirical Gains: On benchmarks like ImageNet and its distribution-shift variants (ImageNet-V2, ImageNet-R, ImageNet-Sketch), model soups consistently improve accuracy by 0.5-1.5% absolute over the best single model.
- Medical Imaging Relevance: This property is critical for diagnostic models deployed across different hospital scanners, where domain shift is the primary failure mode.
Zero-Cost Ensemble at Inference
Unlike traditional output-space ensembles that require running multiple forward passes and averaging logits, a model soup produces a single set of weights. This collapses the ensemble cost to that of a single model.
- Traditional Ensemble Cost: Running K models requires K times the FLOPs and memory.
- Soup Cost: A single forward pass with the averaged weights. The computational cost is paid entirely upfront during the averaging step.
- Deployment Advantage: This makes model soups ideal for edge deployment and real-time diagnostic systems where latency budgets are strict and batching multiple models is infeasible.
Application to Medical Fine-Tuning
In medical imaging, where annotated datasets are small and domain shift between scanners is severe, model soups provide a practical method to stabilize fine-tuning runs.
- Hyperparameter Sensitivity: Fine-tuning on small medical datasets is notoriously brittle to learning rate and augmentation choices. A soup over a hyperparameter sweep mitigates this fragility.
- Cross-Scanner Generalization: Averaging models fine-tuned with different Hounsfield Unit normalization windows or intensity augmentations creates a model robust to scanner variability.
- Synergy with LoRA: Combining model soups with Low-Rank Adaptation allows averaging only the lightweight adapter weights, making the technique computationally trivial while preserving the base model's integrity.
Model Soups vs. Traditional Ensembles vs. Weight Averaging
A comparison of techniques for combining multiple trained models to improve generalization, robustness, and inference efficiency.
| Feature | Model Soups | Traditional Ensembles | Weight Averaging |
|---|---|---|---|
Core Mechanism | Averages weights of models fine-tuned with different hyperparameters | Combines predictions from multiple independently trained models via voting or averaging | Averages weights from multiple checkpoints along a single training trajectory |
Inference Cost | Identical to a single model | Multiplies linearly with the number of constituent models | Identical to a single model |
Memory Footprint | Single model in memory | All constituent models must be loaded simultaneously | Single model in memory |
Latency Impact | None | Increases proportionally to ensemble size | None |
Model Diversity Source | Varying hyperparameters (learning rate, data augmentation, random seed) | Different architectures, initialization, or data subsets | Different points along the same optimization path |
Requires Retraining | |||
Typical Accuracy Gain | 0.5-1.5% over best single model | 1-3% over best single model | 0.2-0.8% over final checkpoint |
Robustness to Distribution Shift | High; flatter loss minima improve out-of-distribution performance | Very high; diverse predictions capture uncertainty | Moderate; smooths optimization path but limited diversity |
Primary Use Case | Efficiently boosting accuracy of fine-tuned models without deployment overhead | Maximizing accuracy in competitions or offline batch processing | Stabilizing training and reducing variance in final model selection |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Frequently Asked Questions
Clear, technical answers to the most common questions about averaging model weights to improve diagnostic accuracy and robustness without increasing inference costs.
A Model Soup is a technique that creates a single, superior model by averaging the weights of multiple fine-tuned neural networks, each trained with different hyperparameter configurations, rather than selecting the single best-performing checkpoint. The process works by independently fine-tuning several copies of the same pre-trained model—varying elements like learning rate, data augmentation, or random seed—and then linearly interpolating their learned weight values in the parameter space. Because these models often converge to different local minima within a flat region of the loss landscape, their averaged weights land in a more central, generalizable position. This results in improved accuracy and robustness without any additional inference cost, as the final model has the exact same architecture and parameter count as a single model. The technique was popularized by Wortsman et al. (2022) and has proven particularly effective in data-scarce domains like medical imaging, where ensemble methods would multiply compute requirements.
Related Terms
Model Soups sit at the intersection of weight-space ensembling and fine-tuning. These related concepts define the broader landscape of adapting pre-trained models to medical imaging tasks.
Weight Averaging
The foundational mechanism behind Model Soups. Instead of selecting a single best checkpoint, weight averaging interpolates between multiple points along the fine-tuning trajectory to find a flatter loss minimum. This is distinct from traditional output-space ensembling—it produces a single model with no inference overhead. In medical imaging, averaging weights from epochs 45, 50, and 55 of a segmentation model often yields better Dice scores than any individual checkpoint.
Domain Adaptation
Addresses the domain shift problem that Model Soups help mitigate. When source and target distributions differ—such as training on natural images but deploying on CT scans—domain adaptation techniques align feature spaces. Model Soups complement this by:
- Averaging models fine-tuned with different adaptation strengths
- Smoothing out adaptation artifacts from aggressive domain alignment
- Improving robustness to residual domain gaps across scanner vendors Combined with CycleGAN adaptation or domain-adversarial training, Soups produce more reliable cross-domain performance.
Self-Supervised Pre-Training
The upstream process that creates the initial weights later refined into Model Soups. Self-supervised pre-training learns representations from unlabeled medical images using pretext tasks:
- Contrastive learning: Pulls augmented views of the same image together
- Masked Image Modeling (MIM): Reconstructs hidden patches, popular with Vision Transformers Models pre-trained via anatomical pre-training on organ segmentation tasks provide stronger initialization for Soup construction than generic ImageNet weights, as the learned features are clinically relevant.
Catastrophic Forgetting
The failure mode that Model Soups help prevent. During fine-tuning, a network can abruptly overwrite previously learned general features, losing the representational power that made pre-training valuable. Model Soups counteract this by:
- Averaging early checkpoints (strong general features) with later ones (task-specific adaptation)
- Creating a compromise between stability and plasticity
- Reducing sensitivity to the exact epoch where forgetting begins In medical imaging, this is critical—a model must retain anatomical understanding while learning pathology-specific patterns.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us