READ: Aggregating Reconstruction Error into Out-of-Distribution Detection

Authors

  • Wenyu Jiang Nanjing University
  • Yuxin Ge Nanjing University
  • Hao Cheng Nanjing University
  • Mingcai Chen Nanjing university
  • Shuai Feng Nanjing University
  • Chongjun Wang Nanjing University

DOI:

https://doi.org/10.1609/aaai.v37i12.26741

Keywords:

General

Abstract

Detecting out-of-distribution (OOD) samples is crucial to the safe deployment of a classifier in the real world. However, deep neural networks are known to be overconfident for abnormal data. Existing works directly design score function by mining the inconsistency from classifier for in-distribution (ID) and OOD. In this paper, we further complement this inconsistency with reconstruction error, based on the assumption that an autoencoder trained on ID data cannot reconstruct OOD as well as ID. We propose a novel method, READ (Reconstruction Error Aggregated Detector), to unify inconsistencies from classifier and autoencoder. Specifically, the reconstruction error of raw pixels is transformed to latent space of classifier. We show that the transformed reconstruction error bridges the semantic gap and inherits detection performance from the original. Moreover, we propose an adjustment strategy to alleviate the overconfidence problem of autoencoder according to a fine-grained characterization of OOD data. Under two scenarios of pre-training and retraining, we respectively present two variants of our method, namely READ-MD (Mahalanobis Distance) only based on pre-trained classifier and READ-ED (Euclidean Distance) which retrains the classifier. Our methods do not require access to test time OOD data for fine-tuning hyperparameters. Finally, we demonstrate the effectiveness of the proposed methods through extensive comparisons with state-of-the-art OOD detection algorithms. On a CIFAR-10 pre-trained WideResNet, our method reduces the average FPR@95TPR by up to 9.8% compared with previous state-of-the-art.

Downloads

Published

2023-06-26

How to Cite

Jiang, W., Ge, Y., Cheng, H., Chen, M., Feng, S., & Wang, C. (2023). READ: Aggregating Reconstruction Error into Out-of-Distribution Detection. Proceedings of the AAAI Conference on Artificial Intelligence, 37(12), 14910-14918. https://doi.org/10.1609/aaai.v37i12.26741

Issue

Section

AAAI Special Track on Safe and Robust AI