This repository contains the code for the paper "Revisiting Reweighted Risk for Calibration: AURC, Focal, and Inverse Focal Loss" [arxiv].
To run the code, you will need the following dependencies (excluding common packages like scipy, numpy, and torch):
- Python ≥ 3.8
- Tiny-ImageNet [link]
To download and preprocess the dataset, use the following commands:
cd data
python tiny_imagenet_utils.py- CIFAR-10/100
To train the model with select AU loss, you can copy the file loss/select_au.py into your repository.
To train the model with select AU loss, use the following commands:
python src/train.py --arch vit_small --dataset tiny-imagenet --loss_type select_au --seed 40 --workers 1If you found this work or code useful, please cite:
@misc{zhou2025revisitingreweightedriskcalibration,
title={Revisiting Reweighted Risk for Calibration: AURC, Focal,
and Inverse Focal Loss},
author={Han Zhou and Sebastian G. Gruber and Teodora Popordanoska
and Matthew B. Blaschko},
year={2025},
eprint={2505.23463},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2505.23463},
}
This project is licensed under the MIT License.