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 条
  • [1] Unsupervised Out-of-Distribution Detection by Maximum Classifier Discrepancy
    Yu, Qing
    Aizawa, Kiyoharu
    2019 IEEE/CVF INTERNATIONAL CONFERENCE ON COMPUTER VISION (ICCV 2019), 2019, : 9517 - 9525
  • [2] Exploiting Discrepancy in Feature Statistic for Out-of-Distribution Detection
    Guan, Xiaoyuan
    Chen, Jiankang
    Bu, Shenshen
    Zhou, Yuren
    Zheng, Wei-Shi
    Wang, Ruixuan
    THIRTY-EIGHTH AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE, VOL 38 NO 18, 2024, : 19858 - 19866
  • [3] Out-of-distribution Detection Learning with Unreliable Out-of-distribution Sources
    Zheng, Haotian
    Wang, Qizhou
    Fang, Zhen
    Xia, Xiaobo
    Liu, Feng
    Liu, Tongliang
    Han, Bo
    ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 36 (NEURIPS 2023), 2023,
  • [4] Runtime Monitoring for Out-of-Distribution Detection in Object Detection Neural Networks
    Hashemi, Vahid
    Kretinsky, Jan
    Rieder, Sabine
    Schmidt, Jessica
    FORMAL METHODS, FM 2023, 2023, 14000 : 622 - 634
  • [5] Layer Adaptive Deep Neural Networks for Out-of-Distribution Detection
    Wang, Haoliang
    Zhao, Chen
    Zhao, Xujiang
    Chen, Feng
    ADVANCES IN KNOWLEDGE DISCOVERY AND DATA MINING, PAKDD 2022, PT II, 2022, 13281 : 526 - 538
  • [6] Performance analysis of out-of-distribution detection on trained neural networks
    Henriksson, Jens
    Berger, Christian
    Borg, Markus
    Tornberg, Lars
    Sathyamoorthy, Sankar Raman
    Englund, Cristofer
    INFORMATION AND SOFTWARE TECHNOLOGY, 2021, 130
  • [7] On the Learnability of Out-of-distribution Detection
    Fang, Zhen
    Li, Yixuan
    Liu, Feng
    Han, Bo
    Lu, Jie
    Journal of Machine Learning Research, 2024, 25
  • [8] NeuralFP: Out-of-distribution Detection using Fingerprints of Neural Networks
    Lee, Wei-Han
    Millman, Steve
    Desai, Nirmit
    Srivatsa, Mudhakar
    Liu, Changchang
    2020 25TH INTERNATIONAL CONFERENCE ON PATTERN RECOGNITION (ICPR), 2021, : 9561 - 9568
  • [9] Fixing Robust Out-of-distribution Detection for Deep Neural Networks
    Zhou, Zhiyang
    Liu, Jie
    Dou, Wensheng
    Li, Shuo
    Kang, Liangyi
    Qu, Muzi
    Ye, Dan
    2023 IEEE 34TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING, ISSRE, 2023, : 533 - 544
  • [10] An Efficient Data Augmentation Network for Out-of-Distribution Image Detection
    Lin, Cheng-Hung
    Lin, Cheng-Shian
    Chou, Po-Yung
    Hsu, Chen-Chien
    IEEE ACCESS, 2021, 9 : 35313 - 35323