Abstract
This paper addresses the challenge of ranking numerous pre-trained deep neural networks (checkpoints) for transfer learning to downstream tasks. As the availability of checkpoints from various sources (supervised, self-supervised, generative) grows, selecting the optimal starting point becomes computationally prohibitive. We establish the Neural Checkpoint Ranking Benchmark (NeuCRaB) and propose $\mathcal{N}$LEEP, a generic, low-cost ranking measure. $\mathcal{N}$LEEP leverages Gaussian Mixture Models (GMMs) to estimate transferability without requiring specific model architectures or pre-training labels. Our results demonstrate that $\mathcal{N}$LEEP significantly outperforms existing metrics in ranking accuracy while remaining orders of magnitude faster than fine-tuning.
The Challenge of Model Selection
In modern deep learning, the standard practice is to use "checkpoints"—models pre-trained on massive datasets like ImageNet—and fine-tune them for specific downstream tasks. However, we now face a "paradox of choice." Checkpoints are generated via diverse methods: supervised learning, self-supervised tasks (e.g., rotation prediction), and even generative models (GANs).
Because a model that excels at one task might fail at another, and "trial-and-error" fine-tuning is too expensive, we need a way to rank these checkpoints efficiently. The goal is to identify the top candidates before committing to heavy computation.
The NeuCRaB Benchmark
To study this problem systematically, we established NeuCRaB, which categorizes checkpoints into three distinct groups:
- Group I (Mixed Supervision): 16 ResNet-50s trained via supervised, self-supervised, semi-supervised, and generative methods.
- Group II (Training Stages): Checkpoints captured at different epochs during a single training run.
- Group III (Heterogeneous Architectures): Diverse families including Inception, MobileNet, and ResNet variants.
Evaluation is performed across four downstream tasks: Caltech101 (objects), Flowers102 (fine-grained), Sun397 (scenes), and Patch Camelyon (medical imaging).
$\mathcal{N}$LEEP: A Universal Ranking Metric
We propose $\mathcal{N}$LEEP (Gaussian LEEP), a novel metric that builds on the Log Expected Empirical Prediction (LEEP) but removes its dependence on specific classification heads.
The $\mathcal{N}$LEEP Process:
- Feature Extraction: Pass the target task data through the checkpoint to obtain feature representations.
- Dimension Reduction: Apply PCA to retain essential information while reducing noise.
- GMM Fitting: Fit a Gaussian Mixture Model (GMM) to these features. This treats clusters in the feature space as "latent" source classes, making the metric architecture-agnostic.
- Probabilistic Ranking: Calculate the probability of a target label given these GMM clusters, providing a well-calibrated score of feature separability.
Key Insights and Results
Our experiments yielded several critical findings:
- Linear Separability is the Best Predictor: The strongest indicator of fine-tuning success is how linearly separable the checkpoint's features are for the target task.
- Superior Accuracy and Efficiency: $\mathcal{N}$LEEP consistently achieved the highest Recall@1 and Recall@3 across all checkpoint groups. For Group I, $\mathcal{N}$LEEP required only 12.85 GFLOPS, compared to 4.28 million GFLOPS for just 5 epochs of fine-tuning.
- Universal Applicability: Unlike the original LEEP, $\mathcal{N}$LEEP works seamlessly on generative and self-supervised models, which often provide the best features for specialized downstream tasks like medical imaging.
- Early Performance is Unreliable: We found that ranking models based on the first few epochs of fine-tuning is surprisingly deceptive, as early-stage accuracies correlate poorly with final converged performance.
Conclusion
$\mathcal{N}$LEEP provides a robust, efficient, and architecture-agnostic way to navigate the vast landscape of pre-trained models. While ranking heterogeneous architectures (Group III) remains a challenge, our work establishes a foundation for automated model selection in transfer learning. Future research will explore extending these ranking principles to non-classification tasks like object detection and segmentation.
Summary updated