[Paper Review] ZooD: Exploiting Model Zoo for Out-of-Distribution Generalization
ZooD proposes a scalable paradigm for out-of-distribution (OoD) generalization by ranking and ensembling pre-trained models (PTMs) from a model zoo using a novel metric that evaluates inter-class discriminability and inter-domain stability via leave-one-domain-out cross-validation. It further improves performance by applying a variational EM algorithm for feature selection, achieving up to 9859× faster inference than brute-force fine-tuning and boosting accuracy on DomainNet to 50.6% from 46.5%.
Recent advances on large-scale pre-training have shown great potentials of leveraging a large set of Pre-Trained Models (PTMs) for improving Out-of-Distribution (OoD) generalization, for which the goal is to perform well on possible unseen domains after fine-tuning on multiple training domains. However, maximally exploiting a zoo of PTMs is challenging since fine-tuning all possible combinations of PTMs is computationally prohibitive while accurate selection of PTMs requires tackling the possible data distribution shift for OoD tasks. In this work, we propose ZooD, a paradigm for PTMs ranking and ensemble with feature selection. Our proposed metric ranks PTMs by quantifying inter-class discriminability and inter-domain stability of the features extracted by the PTMs in a leave-one-domain-out cross-validation manner. The top-K ranked models are then aggregated for the target OoD task. To avoid accumulating noise induced by model ensemble, we propose an efficient variational EM algorithm to select informative features. We evaluate our paradigm on a diverse model zoo consisting of 35 models for various OoD tasks and demonstrate: (i) model ranking is better correlated with fine-tuning ranking than previous methods and up to 9859x faster than brute-force fine-tuning; (ii) OoD generalization after model ensemble with feature selection outperforms the state-of-the-art methods and the accuracy on most challenging task DomainNet is improved from 46.5\% to 50.6\%. Furthermore, we provide the fine-tuning results of 35 PTMs on 7 OoD datasets, hoping to help the research of model zoo and OoD generalization. Code will be available at https://gitee.com/mindspore/models/tree/master/research/cv/zood.
Motivation & Objective
- To address the challenge of efficiently leveraging a large zoo of pre-trained models (PTMs) for out-of-distribution (OoD) generalization, where distribution shifts degrade model performance.
- To develop a scalable alternative to brute-force fine-tuning of all PTM combinations, which is computationally prohibitive.
- To improve OoD generalization by ranking PTMs based on their domain-invariant feature quality and selecting informative features to reduce noise accumulation in ensemble models.
- To provide a reproducible benchmark with fine-tuning results, feature embeddings, and ranking scores for 35 PTMs across 7 OoD datasets.
Proposed method
- Proposes a leave-one-domain-out cross-validation strategy to evaluate each PTM's inter-class discriminability and inter-domain stability, serving as a ranking metric for OoD generalization capability.
- Ranks PTMs based on the quantified stability and discriminability of features extracted across domains, identifying models that generalize well to unseen distributions.
- Employs a variational EM algorithm with latent masks over features to perform efficient feature selection, reducing noise from model ensemble.
- Uses a factorizable variational approximation to the true posterior and extends the method to large-scale datasets via stochastic approximation with local estimators.
- Introduces a Bayesian hierarchical prior model with inverse-Gamma hyperpriors to ensure selection consistency in feature selection.
- Applies the method to a diverse zoo of 35 PTMs across 7 OoD datasets, including Office-Home and DomainNet, for comprehensive evaluation.
Experimental results
Research questions
- RQ1Can a ranking metric based on inter-domain stability and inter-class discriminability better predict the fine-tuning performance of PTMs on OoD tasks than existing IID-based metrics?
- RQ2To what extent can model ensemble with feature selection from a PTM zoo improve OoD generalization compared to state-of-the-art methods?
- RQ3How much speedup can be achieved by ZooD compared to exhaustive fine-tuning of all PTM combinations?
- RQ4Does the proposed feature selection mechanism effectively reduce noise while preserving invariant features in ensemble models?
- RQ5Can the proposed framework be scaled to large-scale datasets while maintaining selection consistency and performance?
Key findings
- The proposed ranking metric is strongly correlated with actual fine-tuning performance, outperforming existing IID-based metrics in predicting OoD generalization capability.
- ZooD achieves a 9859× speedup over brute-force fine-tuning, reducing inference time from 2662.27 GPU hours to 0.27 GPU hours.
- On the challenging DomainNet benchmark, ZooD improves accuracy from 46.5% (baseline) to 50.6%, surpassing previous SOTA methods.
- On Office-Home, ZooD achieves 85.1% average accuracy, significantly outperforming the prior SOTA of 70.6%.
- The variational EM-based feature selection method achieves high selection consistency, with TPR above 90% even when n ≤ d, and FPR near 0% when n > d.
- The method maintains strong performance across diverse PTMs and OoD datasets, demonstrating robustness and scalability.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.