Transferability Estimation using Bhattacharyya Class Separability

Michal Pándy, Andrea Agostinelli, Jasper R. R. Uijlings, Vittorio Ferrari, Thomas Mensink

Abstract

Fine-tuning numerous pre-trained models to identify the optimal candidate for a novel task is computationally prohibitive. This paper introduces the Gaussian Bhattacharyya Coefficient (GBC), a lightweight metric designed to predict a model's transferability by quantifying the separability of target classes within its feature space. GBC demonstrates superior performance compared to existing state-of-the-art metrics in architecture selection and provides robust results in complex domains such as semantic segmentation.

Introduction

In contemporary computer vision, the standard practice involves leveraging models pre-trained on large-scale datasets (e.g., ImageNet) and transferring their learned representations to specific target tasks. However, selecting the most suitable pre-trained architecture remains a significant challenge. The conventional approach—fine-tuning every candidate model to compare final accuracies—is resource-intensive and environmentally costly. While proxy metrics like LEEP or LogME exist, they often falter when source and target tasks diverge significantly or when applied to non-classification tasks.

Methodology: Gaussian Bhattacharyya Coefficient (GBC)

The proposed GBC method is built on the intuition that a source model is effective for a target task if it naturally clusters target classes into distinct, non-overlapping groups in its feature space.

Conceptual workflow of GBC for transferability estimation.

The GBC calculation involves three primary stages:

  1. Feature Embedding: Target images are passed through a fixed source model to extract feature vectors.
  2. Gaussian Modeling: Each target class is modeled as a multivariate Gaussian distribution within the feature space.
  3. Overlap Quantification: The Bhattacharyya Coefficient (BC) is employed to calculate pairwise overlaps between these class distributions. The BC offers a closed-form solution for Gaussians, enabling near-instantaneous computation.

The final GBC score is the negative sum of these pairwise overlaps; a higher score indicates better class separation and, consequently, higher predicted transferability. To ensure robustness across varying architectures and small datasets, the authors utilize PCA for dimensionality reduction and regularized covariance matrices.

Experimental Setup

GBC was evaluated across a diverse set of benchmarks:

  • Image Classification: Eight target datasets, including CIFAR-10/100, Oxford IIIT Pets, CUB-2011, and SUN-397.
  • Semantic Segmentation: Seventeen datasets (272 source-target pairs) spanning autonomous driving (Cityscapes, KITTI), aerial imagery (iSAID), and indoor scenes (ADE20K).

Key Results

GBC consistently outperformed baseline metrics in architecture selection. As shown in the table below, GBC achieved the highest average weighted Kendall tau ($\tau_w$), indicating a stronger correlation between the metric and actual fine-tuned performance.

Comparison of transferability metrics using weighted Kendall tau across multiple datasets.
  • Architecture Selection: GBC achieved an average $\tau_w$ of 0.47, significantly surpassing LEEP (0.39) and LogME (0.15).
  • Semantic Segmentation: GBC proved highly reliable for pixel-level tasks, reaching a Top-1 selection accuracy of 65%.
  • Efficiency: The method is computationally efficient, processing datasets like CIFAR-100 in under 8 seconds on a standard CPU after feature extraction.

Discussion and Insights

A key advantage of GBC is its independence from the source model's original label space. Unlike LEEP, which relies on source labels, GBC operates directly on internal features, making it versatile for cross-domain transfer. Furthermore, its "low-data" robustness allows for accurate estimation even with limited samples per class.

Despite its strengths, GBC is currently limited to classification-based tasks and relies on the assumption that class distributions are approximately Gaussian. Future research may explore extending GBC to regression tasks or unsupervised learning scenarios.

Conclusion

The Gaussian Bhattacharyya Coefficient provides a mathematically grounded, efficient, and accurate proxy for model transferability. By focusing on class separability in the feature space, it offers a scalable solution for the critical problem of model selection in deep learning.

Summary updated

BibTeX
@inproceedings{pandy2021transferability,
  author = {Michal Pándy and Andrea Agostinelli and Jasper R. R. Uijlings and Vittorio Ferrari and Thomas Mensink},
  title = {{Transferability Estimation using Bhattacharyya Class Separability}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr52688.2022.00896},
}
Figure