CRAFT: Class Ranking Aware Fine-Tuning for Enhanced Out-of-Distribution Detection

Naveen Karunanayake, Suranga Seneviratne, Sanjay Chawla; Proceedings of the Winter Conference on Applications of Computer Vision (WACV), 2025, pp. 4119-4128

Abstract


Out-of-distribution (OOD) detection remains a key challenge preventing the rollout of key AI technologies like autonomous vehicles into the mainstream as classifiers trained on in-distribution (ID) data are unable to gracefully handle OOD data. While OOD detection remains an active area of research, current post-hoc methods often suffer from limited separability between ID and OOD, and outlier exposure-based methods lack generalisation to unseen outlier types. We present CRAFT, a fine-tuning approach for arming pre-trained classifiers against OOD inputs without requiring access to outliers. The key insight that underpins our approach is that during pre-training, classifiers implicitly learn a ranking across the ID classes that is not respected by OOD data. Therefore, a form of fine-tuning without outliers of a pre-trained classifier can sharpen the rank order of the classes, making them sensitive to the presence of OOD data. Furthermore, the fine-tuned model does not impact the ability of the classifier to correctly classify ID inputs to their respective classes. Experiments on CIFAR-10, CIFAR-100, and ImageNet-200 demonstrate that CRAFT outperforms 33 existing methods, particularly in the more challenging near-OOD detection, as well as in overall OOD detection consistency and ID classification accuracy.

Related Material


[pdf] [supp]
[bibtex]
@InProceedings{Karunanayake_2025_WACV, author = {Karunanayake, Naveen and Seneviratne, Suranga and Chawla, Sanjay}, title = {CRAFT: Class Ranking Aware Fine-Tuning for Enhanced Out-of-Distribution Detection}, booktitle = {Proceedings of the Winter Conference on Applications of Computer Vision (WACV)}, month = {February}, year = {2025}, pages = {4119-4128} }