Neural Mean Discrepancy for Efficient Out-of-Distribution Detection

被引:19
|
作者
Dong, Xin [1 ]
Guo, Junfeng [2 ]
Li, Ang [2 ,3 ]
Ting, Wei-Te [1 ]
Liu, Cong [2 ]
Kung, H. T. [1 ]
机构
[1] Harvard Univ, Cambridge, MA 02138 USA
[2] UT Dallas, Dallas, TX USA
[3] Google DeepMind, London, England
关键词
D O I
10.1109/CVPR52688.2022.01862
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Various approaches have been proposed for out-of-distribution (OOD) detection by augmenting models, input examples, training sets, and optimization objectives. Deviating from existing work, we have a simple hypothesis that standard off-the-shelf models may already contain sufficient information about the training set distribution which can be leveraged for reliable OOD detection. Our empirical study on validating this hypothesis, which measures the model activation's mean for OOD and in-distribution (ID) minibatches, surprisingly finds that activation means of OOD mini-batches consistently deviate more from those of the training data. In addition, training data's activation means can be computed offline efficiently or retrieved from batch normalization layers as a 'free lunch'. Based upon this observation, we propose a novel metric called Neural Mean Discrepancy (NMD), which compares neural means of the input examples and training data. Leveraging the simplicity of NMD, we propose an efficient OOD detector that computes neural means by a standard forward pass followed by a lightweight classifier. Extensive experiments show that NMD outperforms state-of-the-art OOD approaches across multiple datasets and model architectures in terms of both detection accuracy and computational cost.
引用
收藏
页码:19195 / 19205
页数:11
相关论文
共 50 条
  • [31] Semantically Coherent Out-of-Distribution Detection
    Yang, Jingkang
    Wang, Haoqi
    Feng, Litong
    Yan, Xiaopeng
    Zheng, Huabin
    Zhang, Wayne
    Liub, Ziwei
    2021 IEEE/CVF INTERNATIONAL CONFERENCE ON COMPUTER VISION (ICCV 2021), 2021, : 8281 - 8289
  • [32] Generalized Out-of-Distribution Detection: A Survey
    Yang, Jingkang
    Zhou, Kaiyang
    Li, Yixuan
    Liu, Ziwei
    INTERNATIONAL JOURNAL OF COMPUTER VISION, 2024, 132 (12) : 5635 - 5662
  • [33] Unsupervised evaluation for out-of-distribution detection
    Zhang, Yuhang
    Hu, Jiani
    Wen, Dongchao
    Deng, Weihong
    PATTERN RECOGNITION, 2025, 160
  • [34] In or Out? Fixing ImageNet Out-of-Distribution Detection Evaluation
    Bitterwolf, Julian
    Mueller, Maximilian
    Hein, Matthias
    INTERNATIONAL CONFERENCE ON MACHINE LEARNING, VOL 202, 2023, 202
  • [35] Gaussian-Based Runtime Detection of Out-of-distribution Inputs for Neural Networks
    Hashemi, Vahid
    Kretinsky, Jan
    Mohr, Stefanie
    Seferis, Emmanouil
    RUNTIME VERIFICATION (RV 2021), 2021, 12974 : 254 - 264
  • [36] Exploiting classifier inter-level features for efficient out-of-distribution detection
    Fayyad, Jamil
    Gupta, Kashish
    Mahdian, Navid
    Gruyer, Dominique
    Najjaran, Homayoun
    Image and Vision Computing, 2024, 142
  • [37] On the Use of Mahalanobis Distance for Out-of-distribution Detection with Neural Networks for Medical Imaging
    Anthony, Harry
    Kamnitsas, Konstantinos
    UNCERTAINTY FOR SAFE UTILIZATION OF MACHINE LEARNING IN MEDICAL IMAGING, UNSURE 2023, 2023, 14291 : 136 - 146
  • [38] Convolutional Neural Networks with Compression Complexity Pooling for Out-of-Distribution Image Detection
    Yu, Sehun
    Lee, Dongha
    Yu, Hwanjo
    PROCEEDINGS OF THE TWENTY-NINTH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, 2020, : 2435 - 2441
  • [39] GradOrth: A Simple yet Efficient Out-of-Distribution Detection with Orthogonal Projection of Gradients
    Behpour, Sima
    Thang Doan
    Li, Xin
    He, Wenbin
    Gou, Liang
    Ren, Liu
    ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 36 (NEURIPS 2023), 2023,
  • [40] Towards In-Distribution Compatible Out-of-Distribution Detection
    Wu, Boxi
    Jiang, Jie
    Ren, Haidong
    Du, Zifan
    Wang, Wenxiao
    Li, Zhifeng
    Cai, Deng
    He, Xiaofei
    Lin, Binbin
    Liu, Wei
    THIRTY-SEVENTH AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE, VOL 37 NO 9, 2023, : 10333 - 10341