Out-of-distribution (OOD) detection is a critical task for safe deployment of learning systems in the open world setting. In this work, we investigate the use of feature density estimation via normalizing flows for OOD detection and present a fully unsupervised approach which requires no exposure to OOD data, avoiding researcher bias in OOD sample selection. This is a post-hoc method which can be applied to any pretrained model, and involves training a lightweight auxiliary normalizing flow model to perform the out-of-distribution detection via density thresholding. Experiments on OOD detection in image classification show strong results for far-OOD data detection with only a single epoch of flow training, including 98.2% AUROC for ImageNet-1k vs. Textures, which exceeds the state of the art by 7.8%. We additionally explore the connection between the feature space distribution of the pretrained model and the performance of our method. Finally, we provide insights into training pitfalls that have plagued normalizing flows for use in OOD detection.
翻译:分布外检测是开放世界环境下学习系统安全部署的关键任务。本文研究通过归一化流进行特征密度估计以用于分布外检测,并提出一种完全无监督的方法。该方法无需接触分布外数据,避免了研究者对分布外样本选择的偏见。这是一种后处理方法,可应用于任何预训练模型,通过训练轻量级辅助归一化流模型,利用密度阈值进行分布外检测。在图像分类的分布外检测实验中,仅需单轮流模型训练即可在远域分布外数据检测中取得显著效果,包括在ImageNet-1k与Textures数据集对比中达到98.2%的AUROC,比当前最优方法高出7.8%。我们还探讨了预训练模型特征空间分布与本方法性能之间的关联,最后揭示了困扰归一化流用于分布外检测的训练陷阱。