Home

Awesome

Not All Models Are Equal: Predicting Model Transferability in a Self-challenging Fisher Space

This is the PyTorch implementation of the paper Not All Models Are Equal: Predicting Model Transferability in a Self-challenging Fisher Space

Self-challenging Fisher Discriminative Analysis (SFDA)

We design a novel model selection method, termed Self-challenging Fisher Discriminative Analysis (SFDA), which is efficient, effective, and robust when measuring the transferability of pre-trained models. Compared with the state-of-the-art method NLEEP, SFDA demonstrates an average of 59.1% gain while bringing 22.5x speedup in wall-clock time.

<div align=center><img src="SFDA.jpg" width="1080" height="200"></div>

Comparisons of weighted Kendall's tau on 11 downstream classification datasets when selecting 11 pretrained supervised models.

MethodAircraftCaltech101CarsCIFAR10CIFAR100DTDFlowersFoodPetsSUN397VOC2007
LEEP-0.2340.6050.3670.8240.6770.486-0.2430.4910.3890.7010.446
LogME0.5060.4350.5760.8520.6920.6470.1110.3850.4110.5110.478
NLEEP0.4950.6610.2650.8060.8230.7770.2150.6240.5990.8070.654
PARC-0.1820.3740.5620.8450.6920.642-0.0820.7320.1380.6980.723
SFDA0.6150.7370.4870.9490.8660.5970.5420.8150.7340.7030.763

Getting Started

Requirements

conda install pytorch==1.7.1 torchvision==0.8.2 cudatoolkit=10.1 -c pytorch
pip install timm==0.4.9

Data Preparation

Pipeline of Model selection using transferability

python finetune_group1.py -m resnet50 -d cifar10
python forward_feature_group1.py -m resnet50 -d cifar10
python evaluate_metric_group1_cpu.py -me sfda -d cifar10
python tw_group1_cpu.py -me sfda -d cifar10