HiLo: A Learning Framework for Generalized Category Discovery Robust to Domain Shifts (ICLR 2025)

April 11, 2025 ยท View on GitHub

HiLo: A Learning Framework for Generalized Category Discovery Robust to Domain Shifts
By Hongjun Wang, Sagar Vaze, and Kai Han.

teaser

Prerequisite ๐Ÿ› ๏ธ

First, you need to clone the HiLo repository from GitHub. Open your terminal and run the following command:

git clone https://github.com/Visual-AI/HiLo.git
cd HiLo

We recommend setting up a conda environment for the project:

conda create --name=hilo python=3.9
conda activate hilo
pip install -r requirements.txt

Running ๐Ÿƒ

Config

Set paths to datasets and desired log directories in config.py

Datasets

We use DomainNet and our created Semantic Shift Benchmark Corruption (SSB-C) datasets:

Checkpoints

Download the checkpints of HiLo for different datasets / combination (only used during evaluation).

Scripts

Eval the model

python -m methods.ours.evaluate \
    --dataset_name domainnet \
    --src_env 'real' \
    --aux_env 'painting' \
    --tgt_env 'sketch' \
    --checkpoint_path /path/to/checkpoint.pt \
    --task_type 'A_L+A_U+B->A_U+B+C'

To reproduce all main results in the paper, just change the name (dataset_name), (aux_env), (tgt_env) and its corresponding path (checkpoint_path) to the pretrained model you downloaded from the above link.

Train the model:

bash scripts/mi_pmtrans/domainnet.sh 0
bash scripts/mi_pmtrans/ssbc.sh 0

Just be aware to make necessary changes (e.g., PYTHON, SAVE_DIR, WEIGHTS_PATH, etc).

Results

DomainNet results:

Real+Painting

MethodsReal (All)Real (Old)Real (New)Painting (All)Painting (Old)Painting (New)
RankStats+34.162.019.729.749.79.6
UNO+44.272.229.730.145.117.2
ORCA31.949.823.528.738.57.1
GCD47.353.644.132.941.823.0
SimGCD61.377.852.934.535.633.5
HiLo (Ours)64.477.657.542.142.941.3

Real+Sketch

MethodsReal (All)Real (Old)Real (New)Sketch (All)Sketch (Old)Sketch (New)
RankStats+34.262.019.817.131.16.8
UNO+43.772.528.912.517.09.2
ORCA32.550.023.911.414.57.2
GCD48.053.845.316.622.411.1
SimGCD62.477.654.616.420.213.6
HiLo (Ours)63.377.955.919.422.417.1

Real+Quickdraw

MethodsReal (All)Real (Old)Real (New)Quickdraw (All)Quickdraw (Old)Quickdraw (New)
RankStats+34.162.519.54.14.43.9
UNO+31.160.016.16.35.86.8
ORCA19.239.115.33.43.53.2
GCD37.641.035.25.74.26.9
SimGCD47.464.537.46.65.87.5
HiLo (Ours)58.676.452.57.46.98.0

Real+Clipart

MethodsReal (All)Real (Old)Real (New)Clipart (All)Clipart (Old)Clipart (New)
RankStats+34.062.419.424.145.16.2
UNO+44.566.133.321.935.610.1
ORCA32.049.723.919.131.84.3
GCD47.753.844.322.434.416.0
SimGCD61.677.253.623.931.517.3
HiLo (Ours)63.877.656.627.734.621.7

Real+Infograph

MethodsReal (All)Real (Old)Real (New)Infograph (All)Infograph (Old)Infograph (New)
RankStats+34.262.419.612.521.96.3
UNO+42.869.429.010.915.28.0
ORCA29.147.720.18.613.77.1
GCD41.946.139.010.917.18.8
SimGCD52.767.044.811.615.49.1
HiLo (Ours)64.278.157.013.716.411.9

SSB-C results:

CUB-C

MethodsOriginal (All)Original (Old)Original (New)Corrupted (All)Corrupted (Old)Corrupted (New)
RankStats+19.322.015.413.623.94.5
UNO+25.940.121.321.533.48.6
ORCA18.222.814.521.523.118.9
GCD26.627.525.725.128.722.0
SimGCD31.933.929.028.831.625.0
UniOT27.529.326.827.333.222.5
HiLo (Ours)56.854.060.352.053.650.5

Scars-C

MethodsOriginal (All)Original (Old)Original (New)Corrupted (All)Corrupted (Old)Corrupted (New)
RankStats+14.820.87.811.522.61.0
UNO+22.041.87.016.929.84.5
ORCA19.128.711.215.022.48.3
GCD22.135.220.521.629.210.5
SimGCD26.739.625.622.130.514.1
UniOT24.337.522.322.931.413.7
HiLo (Ours)39.544.837.035.642.928.4

FGVC-C

MethodsOriginal (All)Original (Old)Original (New)Corrupted (All)Corrupted (Old)Corrupted (New)
RankStats+14.416.414.58.315.65.0
UNO+22.033.415.816.525.28.8
ORCA17.619.316.113.917.310.1
GCD25.228.723.021.023.117.3
SimGCD26.128.925.122.323.221.4
UniOT27.329.822.521.623.519.6
HiLo (Ours)44.250.647.431.229.033.4

Citing this work

If you find this repo useful for your research, please consider citing our paper:

@inproceedings{wang2025hilo,
  title={HiLo: A Learning Framework for Generalized Category Discovery Robust to Domain Shifts},
  author={Wang, Hongjun and Vaze, Sagar and Han, Kai},
  booktitle={ICLR},
  year={2025}
}