NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ZooD: Exploiting Model Zoo for Out-of-Distribution Generalization

Qishi Dong, Muhammad Awais, Fengwei Zhou, Chuanlong Xie, Tianyang Hu, Yongxin Yang, Sung-Ho Bae, Zhenguo Li

TL;DR

ZooD is a new framework that efficiently navigates a "zoo" of pre-trained models (PTMs) to solve Out-of-Distribution (OoD) generalization tasks. By using a novel ranking metric and a denoising feature selection algorithm, it achieves state-of-the-art accuracy while being up to 10,000x faster than brute-force fine-tuning.

What Problem Does This Paper Address?

Most machine learning models assume that training and test data come from the same distribution (IID). In reality, data shifts—such as lighting changes, different backgrounds, or new sensors—cause performance to plummet. This is known as the Out-of-Distribution (OoD) generalization problem.

While we have access to a massive "zoo" of Pre-Trained Models (PTMs) like ResNets, ViTs, and CLIP, two major hurdles remain in leveraging them for OoD tasks:

  1. Selection is expensive: Fine-tuning every model in a zoo to see which works best on a specific task can take thousands of GPU hours.
  2. Ensembling is noisy: Simply combining multiple models often introduces "noise"—features that are stable across domains but irrelevant to the actual classification task—which can actively hurt performance.

Methods

The authors propose a two-stage paradigm called ZooD (Exploiting Model Zoo for OoD Generalization).

1. Model Ranking

Instead of full fine-tuning, ZooD ranks models using a metric that evaluates two key properties in a leave-one-domain-out cross-validation setup:

  • Inter-class Discriminability (D): How well can the model's features distinguish between different classes?
  • Inter-domain Stability (S): How consistent are these features across different training domains?

This allows the system to identify models that extract "domain-invariant" features without ever seeing the final test domain.

An overview of the ZooD framework, showing the PTM Ranking and Feature Selection components.

2. Model Ensemble with Feature Selection

After picking the top-K models, ZooD aggregates their features. To prevent noise accumulation, the authors employ a Variational EM algorithm for Bayesian feature selection. This identifies and retains only the most informative features while discarding the rest. To make this scalable for large datasets, they implemented a stochastic version of the algorithm.

Datasets

The researchers evaluated ZooD using a model zoo of 35 diverse PTMs across 7 OoD datasets:

  • Standard Benchmarks: PACS, VLCS, Office-Home, and TerraIncognita.
  • Large-scale/Complex: DomainNet (the most challenging), NICO-Animals, and NICO-Vehicles.

They also released a comprehensive testbed containing the fine-tuning results and ranking scores for all 35 models on these datasets to help future researchers avoid massive compute costs.

Key Insights and Ideas

  • Stability is Key for OoD: A model that is highly accurate on one training domain but changes its internal representations drastically on another is likely to fail on an unseen domain. ZooD explicitly searches for this stability.
  • The "Zoo" Advantage: No single model is best for every task. By ensembling the top-K models, ZooD captures diverse knowledge that a single architecture might miss.
  • Denoising is Mandatory: Simply stacking features from multiple models increases memory usage and often decreases accuracy. The "Feature Selection" step is what makes the ensemble actually outperform the best single model.
  • Fine-tuning Ranking vs. Metric Ranking: The authors demonstrate that their metric correlates much more strongly with actual fine-tuned performance than existing IID metrics like LogME or H-Score.
Comparison of ZooD ranking scores against other methods across different datasets. ZooD shows a much higher correlation (τ) with ground-truth accuracy.

Key Results

  • State-of-the-Art Accuracy: On the difficult DomainNet dataset, ZooD improved accuracy from the previous best of 46.5% (SWAD) to 50.6%. On Office-Home, it reached 85.1% (vs. 70.6% SOTA).
  • Massive Speedup: Brute-force fine-tuning the entire zoo on the PACS dataset takes over 2,662 GPU hours. ZooD's ranking takes just 0.27 hours—a staggering 9859x speedup.
  • Overall Efficiency: Evaluating the entire 35-model zoo across all 7 datasets took only 13 GPU hours total, compared to an estimated 35,140 hours (roughly 4 GPU years) for traditional methods.

Limitations and Future Work

  • Classifier-Only Focus: For the ensemble, the authors primarily fine-tune the top linear classifier rather than the entire backbone of all models simultaneously, due to memory constraints.
  • Backbone Fine-tuning: On the TerraIncognita dataset, ZooD's "Single" model version performed worse than some SOTA methods because those methods fine-tune the entire network, which is necessary when images are heavily obscured by backgrounds.
  • Future Directions: Integrating ZooD with other OoD algorithms (like SWAD or ERM) after the model selection phase could potentially push accuracy even higher.

Summary updated

BibTeX
@inproceedings{dong2022zood,
  author = {Qishi Dong and Muhammad Awais and Fengwei Zhou and Chuanlong Xie and Tianyang Hu and Yongxin Yang and Sung-Ho Bae and Zhenguo Li},
  title = {{ZooD: Exploiting Model Zoo for Out-of-Distribution Generalization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=xhQ843mPaRA},
}
Figure