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

LogME: Practical Assessment of Pre-trained Models for Transfer Learning

Kaichao You, Yong Liu, Mingsheng Long, Jianmin Wang

TL;DR

Selecting the best pre-trained model for a new task is crucial but time-consuming. This paper introduces LogME, a fast and accurate method to assess pre-trained models without fine-tuning. LogME significantly outperforms existing methods and works across various model types, tasks, and data modalities, making it a practical tool for researchers and engineers.

What Problem Does This Paper Address?

In the era of deep learning, pre-trained models (like those trained on ImageNet for vision or large text corpora for NLP) are widely used to accelerate learning on new tasks. However, with a vast "model zoo" of available pre-trained models, choosing the right one for a specific downstream task is a significant challenge. The performance of a pre-trained model is not universal; it's "task adaptive." The standard approach to find the best model involves fine-tuning each candidate model on the target task, which is computationally expensive and time-consuming, especially when dealing with many models and datasets. Existing methods for assessing transferability are limited, often only working for classification tasks with supervised pre-trained models, and lack generality. This paper aims to fill this gap by proposing a practical, fast, and general method for pre-trained model selection.

Methods

The core of the proposed method, LogME (Logarithm of Maximum Evidence), is a probabilistic approach to assess the compatibility between features extracted by a pre-trained model and the labels of a target task. Instead of directly optimizing a model (which can lead to overfitting), LogME estimates the "maximum evidence" – a measure of how well the pre-trained features support the observed labels. This is achieved by treating the pre-trained model as a fixed feature extractor and then using a Bayesian approach to model the relationship between these features and the target labels.

A key innovation is the development of an efficient algorithm to compute this evidence. While the theoretical formulation involves complex calculations, the authors devise an optimized method that avoids computationally expensive matrix inversions and multiplications, significantly reducing the time and memory footprint. This makes LogME practical for real-world applications. LogME is designed to be agnostic to the pre-training method (supervised, unsupervised, contrastive) and the downstream task type (classification, regression).

Datasets

The paper evaluates LogME on a wide range of datasets:

  • Classification Tasks: Aircraft, Birdsnap, Caltech, Cars, CIFAR10, CIFAR100, DTD, Pets, SUN.
  • Regression Task: dSprites.
  • Natural Language Processing Tasks: Seven GLUE benchmark tasks (MNLI, QQP, QNLI, SST-2, COLA, MRPC, RTE).

The authors use standard train/validation/test splits where available, and otherwise employ a 60/20/20 split for training, validation, and testing, respectively.

Key Insights and Ideas

  • The "Model Zoo" Problem is Real: The sheer number of available pre-trained models makes manual selection a daunting task, highlighting the need for automated assessment.
  • Task Adaptivity is Key: A model that performs well on one task might not perform well on another. This underscores the importance of task adaptive model selection.
  • LogME's Generality is a Game-Changer: Unlike prior methods limited to specific scenarios, LogME works across diverse pre-trained models (supervised, unsupervised, contrastive) and downstream tasks (classification, regression), and even different modalities (vision, language).
  • Speed vs. Accuracy Trade-off is Solved: LogME offers a compelling balance. It's significantly faster than brute-force fine-tuning while achieving high correlation with actual transfer performance, making it a practical choice.
  • Bayesian Evidence is Robust: Using evidence (marginalized likelihood) instead of just maximum likelihood helps mitigate overfitting, leading to more reliable assessments.

Key Results

  • High Correlation with Transfer Performance: LogME consistently shows strong positive correlation (measured by weighted Kendall's $\tau_w$) with actual fine-tuned performance across various tasks and datasets. For example, in classification tasks, $\tau_w$ values are often above 0.7 or 0.8, indicating an 85-90% probability of correctly ranking models.
  • Significant Speedup: LogME achieves dramatic speedups compared to brute-force fine-tuning. In computer vision, it's over 3000x faster, and in NLP, it's around 86x faster, while requiring significantly less memory (e.g., 120x less in vision).
  • Outperforms Prior Methods: LogME consistently shows better correlation than existing methods like LEEP and NCE, especially in settings where prior methods fail (e.g., with unsupervised pre-trained models or tasks with different class distributions).
  • Effective for Unsupervised Models: LogME successfully assesses contrastive pre-trained models, which previous methods could not handle.
  • Robustness to Hyperparameters: LogME itself does not require hyperparameter tuning, unlike methods that involve training a head for the downstream task, which can be sensitive and time-consuming.

Limitations and Future Work

  • Static Representations: The paper acknowledges that LogME assesses pre-trained models based on their static representations (features extracted before fine-tuning). It would be interesting to consider dynamic representations, which account for how these representations change during fine-tuning. This is left as future work.
  • Dataset Convergence: The paper notes that SimCLR on the dSprites dataset did not converge after several trials, and thus results for this specific combination were not reported.

Summary updated

BibTeX
@inproceedings{you2021logme,
  author = {Kaichao You and Yong Liu and Mingsheng Long and Jianmin Wang},
  title = {{LogME: Practical Assessment of Pre-trained Models for Transfer Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=kHQPP_wY5j},
}
Figure