Foundation Model Insights and a Multi-Model Approach for Superior Fine-Grained One-shot Subset Selection
Zhijing Wan, Zhixiang Wang, Zheng Wang, Xin Xu, Shin'ichi Satoh.ICML 2025 Oral (Top 1%)
This repository contains the official PyTorch implementation of RAM-APL, along with several competitive baselines such as MIN, kCenterGreedy, and Moderate-DS. It supports both traditional pre-trained models (e.g., the target model trained on the target dataset) and foundation models as feature extractors (e.g., CLIP, DINOv2, SigLIP, EVA-CLIP).
Make sure to install dependencies:
pip install -r requirements.txt
By default, foundation model weights (e.g., DINOv2, CLIP, SIGLIP, EVA-CLIP) are loaded offline from local directories.
It is recommended that you manually store the pre-trained weights under:
./deepcore/methods/pretrain/
To enable online loading (via HuggingFace or TorchHub), please refer to the file:
./deepcore/methods/earlytrain.py
Set your AutoModel / torch.hub.load methods accordingly, or configure your internet-enabled environment to fetch weights dynamically.
We provide sample commands for evaluating different subset selection methods under varying settings.
CUDA_VISIBLE_DEVICES=0 nohup python -u main.py \
--fraction 0.5 \
--dataset Pet_NOISY --noise_type symmetric --noise_rate 0.2 \
--data_path /path/to/data \
--num_exp 3 --workers 4 --optimizer SGD -se 10 \
--selection MIN --model ResNet18 --lr 0.1 \
-sp ./results/MIN_pet_sym0.2_10epoch_0.5 \
--batch 128 >> ./results/MIN_pet_sym0.2_10epoch_0.5.txt 2>&1
CUDA_VISIBLE_DEVICES=0 nohup python -u main.py \
--fraction 0.5 \
--dataset_pretrain TinyImageNet --dataset Pet_NOISY \
--noise_type symmetric --noise_rate 0.2 \
--data_path /path/to/data \
--num_exp 3 --workers 4 --optimizer SGD -se 10 \
--selection MIN --model ResNet18 --lr 0.1 \
-sp ./results/MIN_pet_sym0.2_TIN_10epoch_0.5 \
--batch 128 >> ./results/MIN_pet_sym0.2_TIN_10epoch_0.5.txt 2>&1
CUDA_VISIBLE_DEVICES=0 nohup python -u main.py \
--specific_model DINOV2 \
--fraction 0.5 \
--dataset Pet_NOISY --noise_type symmetric --noise_rate 0.2 \
--data_path /path/to/data \
--num_exp 3 --workers 4 --optimizer SGD -se 0 \
--selection MIN --model ResNet18 --lr 0.1 \
-sp ./results/MIN_pet_sym0.2_DINOv2_0.5 \
--batch 128 >> ./results/MIN_pet_sym0.2_DINOv2_0.5.txt 2>&1
CUDA_VISIBLE_DEVICES=0 nohup python -u main.py \
--fraction 0.5 \
--dataset Pet \
--data_path /path/to/data \
--num_exp 5 --workers 4 --optimizer SGD -se 0 \
--selection RAM_APL --model ResNet18 --lr 0.1 \
-sp ./results/DINOv2Clip_mcr_a0.2k1_0.5 \
--batch 128 >> ./results/DINOv2Clip_mcr_a0.2k1_0.5.txt 2>&1
.
βββ main.py # Main entry point
βββ utils.py/ # Training and testing functions
βββ deepcore/
β βββ methods/ # All subset selection methods
β β βββ min.py
β β βββ ram_apl.py
β β βββ kcentergreedy.py
β β βββ moderate_ds.py
β β βββ pretrain/ # Downloaded foundation model weights (offline mode)
β βββ nets/ # Model definitions and wrappers
β βββ datasets/ # Dataset loaders
βββ results/ # Saved logs and outputs
βββ requirements.txt # Dependencies
--data_path.deepcore/methods/pretrain/.deepcore/methods/earlytrain.py.If you find our work is helpful for your research, please consider to cite:
@InProceedings{pmlr-v267-wan25f,
title = {Foundation Model Insights and a Multi-Model Approach for Superior Fine-Grained One-shot Subset Selection},
author = {Wan, Zhijing and Wang, Zhixiang and Wang, Zheng and Xu, Xin and Satoh, Shin'Ichi},
booktitle = {Proceedings of the 42nd International Conference on Machine Learning},
pages = {62084--62101},
year = {2025},
editor = {Singh, Aarti and Fazel, Maryam and Hsu, Daniel and Lacoste-Julien, Simon and Berkenkamp, Felix and Maharaj, Tegan and Wagstaff, Kiri and Zhu, Jerry},
volume = {267},
series = {Proceedings of Machine Learning Research},
month = {13--19 Jul},
publisher = {PMLR},
}
The implementation is based on DeepCore code. Thanks for their brilliant work!
12 commits
Python
100.0%
Foundation Model Insights and a Multi-Model Approach for Superior Fine-Grained One-shot Subset Selection
Zhijing Wan, Zhixiang Wang, Zheng Wang, Xin Xu, Shin'ichi Satoh.ICML 2025 Oral (Top 1%)
This repository contains the official PyTorch implementation of RAM-APL, along with several competitive baselines such as MIN, kCenterGreedy, and Moderate-DS. It supports both traditional pre-trained models (e.g., the target model trained on the target dataset) and foundation models as feature extractors (e.g., CLIP, DINOv2, SigLIP, EVA-CLIP).
Make sure to install dependencies:
pip install -r requirements.txt
By default, foundation model weights (e.g., DINOv2, CLIP, SIGLIP, EVA-CLIP) are loaded offline from local directories.
It is recommended that you manually store the pre-trained weights under:
./deepcore/methods/pretrain/
To enable online loading (via HuggingFace or TorchHub), please refer to the file:
./deepcore/methods/earlytrain.py
Set your AutoModel / torch.hub.load methods accordingly, or configure your internet-enabled environment to fetch weights dynamically.
We provide sample commands for evaluating different subset selection methods under varying settings.
CUDA_VISIBLE_DEVICES=0 nohup python -u main.py \
--fraction 0.5 \
--dataset Pet_NOISY --noise_type symmetric --noise_rate 0.2 \
--data_path /path/to/data \
--num_exp 3 --workers 4 --optimizer SGD -se 10 \
--selection MIN --model ResNet18 --lr 0.1 \
-sp ./results/MIN_pet_sym0.2_10epoch_0.5 \
--batch 128 >> ./results/MIN_pet_sym0.2_10epoch_0.5.txt 2>&1
CUDA_VISIBLE_DEVICES=0 nohup python -u main.py \
--fraction 0.5 \
--dataset_pretrain TinyImageNet --dataset Pet_NOISY \
--noise_type symmetric --noise_rate 0.2 \
--data_path /path/to/data \
--num_exp 3 --workers 4 --optimizer SGD -se 10 \
--selection MIN --model ResNet18 --lr 0.1 \
-sp ./results/MIN_pet_sym0.2_TIN_10epoch_0.5 \
--batch 128 >> ./results/MIN_pet_sym0.2_TIN_10epoch_0.5.txt 2>&1
CUDA_VISIBLE_DEVICES=0 nohup python -u main.py \
--specific_model DINOV2 \
--fraction 0.5 \
--dataset Pet_NOISY --noise_type symmetric --noise_rate 0.2 \
--data_path /path/to/data \
--num_exp 3 --workers 4 --optimizer SGD -se 0 \
--selection MIN --model ResNet18 --lr 0.1 \
-sp ./results/MIN_pet_sym0.2_DINOv2_0.5 \
--batch 128 >> ./results/MIN_pet_sym0.2_DINOv2_0.5.txt 2>&1
CUDA_VISIBLE_DEVICES=0 nohup python -u main.py \
--fraction 0.5 \
--dataset Pet \
--data_path /path/to/data \
--num_exp 5 --workers 4 --optimizer SGD -se 0 \
--selection RAM_APL --model ResNet18 --lr 0.1 \
-sp ./results/DINOv2Clip_mcr_a0.2k1_0.5 \
--batch 128 >> ./results/DINOv2Clip_mcr_a0.2k1_0.5.txt 2>&1
.
βββ main.py # Main entry point
βββ utils.py/ # Training and testing functions
βββ deepcore/
β βββ methods/ # All subset selection methods
β β βββ min.py
β β βββ ram_apl.py
β β βββ kcentergreedy.py
β β βββ moderate_ds.py
β β βββ pretrain/ # Downloaded foundation model weights (offline mode)
β βββ nets/ # Model definitions and wrappers
β βββ datasets/ # Dataset loaders
βββ results/ # Saved logs and outputs
βββ requirements.txt # Dependencies
--data_path.deepcore/methods/pretrain/.deepcore/methods/earlytrain.py.If you find our work is helpful for your research, please consider to cite:
@InProceedings{pmlr-v267-wan25f,
title = {Foundation Model Insights and a Multi-Model Approach for Superior Fine-Grained One-shot Subset Selection},
author = {Wan, Zhijing and Wang, Zhixiang and Wang, Zheng and Xu, Xin and Satoh, Shin'Ichi},
booktitle = {Proceedings of the 42nd International Conference on Machine Learning},
pages = {62084--62101},
year = {2025},
editor = {Singh, Aarti and Fazel, Maryam and Hsu, Daniel and Lacoste-Julien, Simon and Berkenkamp, Felix and Maharaj, Tegan and Wagstaff, Kiri and Zhu, Jerry},
volume = {267},
series = {Proceedings of Machine Learning Research},
month = {13--19 Jul},
publisher = {PMLR},
}
The implementation is based on DeepCore code. Thanks for their brilliant work!
12 commits
Python
100.0%