TL;DR
LogME (Logarithm of Maximum Evidence) is a fast, training-free method for selecting the best pre-trained model for a specific target task. By calculating the Bayesian "maximum evidence" of features extracted by a model, it can predict fine-tuning performance with high accuracy while offering up to a 3000x speedup over brute-force experimentation.
What Problem Does This Paper Address?
In modern deep learning, the standard workflow is "pre-train then fine-tune." However, the "model zoo" has become crowded with hundreds of architectures (ResNets, Vision Transformers, BERT variants) trained on different datasets and with different objectives (supervised vs. self-supervised).
When a practitioner has a specific target task, they face a "task-adaptive" selection problem: which pre-trained model will yield the best results? Brute-force fine-tuning every candidate is computationally prohibitive. Existing shortcuts, like LEEP or NCE, are often inaccurate or limited—for instance, they cannot handle regression tasks or unsupervised models like MoCo and SimCLR.
Methods
The authors propose LogME, which treats the pre-trained model as a fixed feature extractor and assesses the "compatibility" between those features and the target labels.
The core innovation lies in using Bayesian Evidence (also known as marginalized likelihood) rather than simple maximum likelihood. While maximum likelihood is prone to overfitting—especially when the target dataset is small—Bayesian evidence integrates over all possible weights of a linear head placed on top of the features. This naturally balances the model's fit with its complexity.
To make this mathematically "humongous" computation practical, the authors developed an optimized algorithm using Singular Value Decomposition (SVD). This trick allows them to avoid expensive matrix inversions during the iterative evidence maximization process, reducing the computational overhead to a fraction of the time it takes to even extract the features themselves.
Datasets
The authors validated LogME across a massive range of scenarios:
- Vision Classification: 10 ImageNet models evaluated on 9 datasets, including Aircraft, Birdsnap, CIFAR10/100, and Oxford Pets.
- Vision Regression: Evaluated on the dSprites dataset to predict latent factors like scale and position.
- Unsupervised Models: Tested on contrastive models like MoCo v1/v2 and SimCLR.
- Language Modeling: 8 popular NLP models (BERT, RoBERTa, ELECTRA, etc.) evaluated on 7 tasks from the GLUE benchmark.
Key Insights and Ideas
- Evidence is a Better Proxy than Likelihood: Toy experiments show that as you add noise to features (decreasing their quality), LogME drops consistently, whereas simple likelihood-based methods often fail to capture this degradation accurately.
- Agnostic to Pre-training: Because LogME only looks at the extracted features and the target labels, it does not care how the model was pre-trained. This makes it the first practical method to work for supervised, self-supervised, and language models alike.
- Task-Adaptive Selection is Crucial: The paper demonstrates that the "best" model changes depending on the task. A model that wins on CIFAR10 might lose on a specialized dataset like Aircraft, making a fast assessment tool like LogME essential for practitioners.
Key Results
- Massive Speedup: In computer vision tasks, LogME is 3000x faster than brute-force fine-tuning. In NLP, the speedup is roughly 86x (limited primarily by the time it takes to run the forward pass for feature extraction).
- High Correlation: LogME shows a much higher correlation (measured by weighted Kendall’s $\tau$) with actual fine-tuning results than previous methods. It effectively ranks models exactly as they would perform after training, as demonstrated across various architectures.
- Low Footprint: It requires only about 1% of the memory compared to fine-tuning, making it runnable on modest hardware.
Limitations and Future Work
The authors acknowledge that LogME assesses static representations—the features as they exist before fine-tuning. It does not explicitly account for "dynamic" changes where a model's features might drastically reorganize during the training process.
Future work could involve extending LogME to account for these dynamic shifts or exploring how it might be used to search for optimal hyperparameters (like learning rates) without full training runs.
Summary updated