[Paper Review] Model Spider: Learning to Rank Pre-Trained Models Efficiently
Model Spider proposes a token-based, efficient method to rank pre-trained models (PTMs) in a model zoo by encoding both PTMs and downstream tasks into semantic vectors, enabling fast transferability estimation without full fine-tuning. It achieves state-of-the-art performance in PTM selection with up to 1000x speedup over baseline methods while maintaining high ranking accuracy across diverse benchmarks.
Figuring out which Pre-Trained Model (PTM) from a model zoo fits the target task is essential to take advantage of plentiful model resources. With the availability of numerous heterogeneous PTMs from diverse fields, efficiently selecting the most suitable PTM is challenging due to the time-consuming costs of carrying out forward or backward passes over all PTMs. In this paper, we propose Model Spider, which tokenizes both PTMs and tasks by summarizing their characteristics into vectors to enable efficient PTM selection. By leveraging the approximated performance of PTMs on a separate set of training tasks, Model Spider learns to construct tokens and measure the fitness score between a model-task pair via their tokens. The ability to rank relevant PTMs higher than others generalizes to new tasks. With the top-ranked PTM candidates, we further learn to enrich task tokens with their PTM-specific semantics to re-rank the PTMs for better selection. Model Spider balances efficiency and selection ability, making PTM selection like a spider preying on a web. Model Spider demonstrates promising performance in various configurations of model zoos.
Motivation & Objective
- To address the challenge of efficiently selecting the most transferable pre-trained model (PTM) from a large, heterogeneous model zoo.
- To reduce the computational cost of PTM selection, which is prohibitive when evaluating all models via full fine-tuning.
- To learn a general-purpose tokenization and ranking mechanism that generalizes to unseen downstream tasks.
- To enable flexible trade-offs between efficiency and accuracy by incorporating PTM-specific features when computational budget allows.
- To improve selection performance by refining initial rankings using task-specific features from top PTMs.
Proposed method
- Model Spider encodes both PTMs and tasks into learnable vector tokens using a general encoder, capturing their semantic and functional characteristics.
- It employs a Transformer-based module to compute similarity scores between task tokens and PTM tokens, estimating transferability without forward passes.
- The method is trained in a supervised manner using rank aggregation on historical task-PTM performance data to align top-ranked PTM tokens with the corresponding task token.
- For improved accuracy, it re-ranks top PTMs by incorporating PTM-specific features extracted via forward passes on a subset of candidate models.
- The framework supports a flexible budget trade-off: using only general tokens for maximum speed, or adding PTM-specific features for higher accuracy.
- The entire pipeline is end-to-end differentiable, allowing joint optimization of tokenization and ranking components.
Experimental results
Research questions
- RQ1Can we accurately predict the transferability of pre-trained models to a new downstream task without performing full fine-tuning?
- RQ2How can we efficiently rank a large zoo of heterogeneous pre-trained models using minimal computational overhead?
- RQ3Can a learned tokenization scheme generalize to unseen tasks, maintaining high ranking accuracy across diverse domains?
- RQ4To what extent can PTM-specific features improve selection accuracy, and how does this trade-off with inference efficiency?
- RQ5Does the proposed method outperform existing forward-pass-based transferability proxies in both speed and ranking performance?
Key findings
- Model Spider achieves a weighted Kendall’s tau correlation of 0.977 on ImageNet-1K, significantly outperforming all baselines in ranking accuracy.
- The method reduces average wall-clock time for PTM ranking from over 600k seconds (fine-tuning) to just 52.36 seconds (without PTM-specific features), a 10,000x speedup.
- With 42 PTM-specific features, Model Spider’s inference time increases to 2,402.77 seconds, still 250x faster than full fine-tuning.
- The model maintains high performance across all 18 datasets tested, including CIFAR-10, CUB-200, and ImageNet-1K, demonstrating strong generalization.
- The ablation study confirms that both general tokenization and PTM-specific feature enrichment contribute significantly to ranking performance.
- Model Spider’s memory footprint is only 608 MB (without features), making it practical for deployment in resource-constrained environments.
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.