SELFOOD: Self-Supervised Out-Of-Distribution Detection via Learning to Rank

Dheeraj Mekala, Adithya Samavedhi, Chengyu Dong, Jingbo Shang


Abstract
Deep neural classifiers trained with cross-entropy loss (CE loss) often suffer from poor calibration, necessitating the task of out-of-distribution (OOD) detection. Traditional supervised OOD detection methods require expensive manual annotation of in-distribution and OOD samples. To address the annotation bottleneck, we introduce SELFOOD, a self-supervised OOD detection method that requires only in-distribution samples as supervision. We cast OOD detection as an inter-document intra-label (IDIL) ranking problem and train the classifier with our pairwise ranking loss, referred to as IDIL loss. Specifically, given a set of in-distribution documents and their labels, for each label, we train the classifier to rank the softmax scores of documents belonging to that label to be higher than the scores of documents that belong to other labels. Unlike CE loss, our IDIL loss function reaches zero when the desired confidence ranking is achieved and gradients are backpropagated to decrease probabilities associated with incorrect labels rather than continuously increasing the probability of the correct label. Extensive experiments with several classifiers on multiple classification datasets demonstrate the effectiveness of our method in both coarse- and fine-grained settings.
Anthology ID:
2023.findings-emnlp.719
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2023
Month:
December
Year:
2023
Address:
Singapore
Editors:
Houda Bouamor, Juan Pino, Kalika Bali
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
10721–10734
Language:
URL:
https://aclanthology.org/2023.findings-emnlp.719
DOI:
10.18653/v1/2023.findings-emnlp.719
Bibkey:
Cite (ACL):
Dheeraj Mekala, Adithya Samavedhi, Chengyu Dong, and Jingbo Shang. 2023. SELFOOD: Self-Supervised Out-Of-Distribution Detection via Learning to Rank. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 10721–10734, Singapore. Association for Computational Linguistics.
Cite (Informal):
SELFOOD: Self-Supervised Out-Of-Distribution Detection via Learning to Rank (Mekala et al., Findings 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.findings-emnlp.719.pdf
Video:
 https://aclanthology.org/2023.findings-emnlp.719.mp4