SupEuclid: Extremely Simple, High Quality OoD Detection with Supervised
  Contrastive Learning and Euclidean Distance
Jarrod Haas
Out-of-Distribution (OoD) detection has developed substantially in the past
few years, with available methods approaching, and in a few cases achieving,
perfect data separation on standard benchmarks. These results generally involve
large or complex models, pretraining, exposure to OoD examples or extra
hyperparameter tuning. Remarkably, it is possible to achieve results that can
exceed many of these state-of-the-art methods with a very simple method. We
demonstrate that ResNet18 trained with Supervised Contrastive Learning (SCL)
produces state-of-the-art results out-of-the-box on near and far OoD detection
benchmarks using only Euclidean distance as a scoring rule. This may obviate
the need in some cases for more sophisticated methods or larger models, and at
the very least provides a very strong, easy to use baseline for further
experimentation and analysis.