IEEE Access (Jan 2024)
Out-of-Distribution Detection Based on Multiple Metrics Fusion of Network Hidden Features
Abstract
Traditional pattern recognition models achieve excellent classification performance. However, when out-of-distribution (OOD) samples, which are outside the training distribution of in-distribution (ID) data, are input into the model, the model often assigns excessively high confidence. Simply using the probability information of the output classification from the network for OOD detection does not yield satisfactory results. The paper starts with the hidden feature information from the intermediate layers of neural networks to design discriminative metrics, including the modulus ratio of input and output from the convolutional layers and the feature distribution differences of the Batch Normalization (BN) layers within the network. Combined with the OOD detection model based on predefined evenly-distribution class centroids (PEDCC)-Loss, we propose a fusion metric selection strategy. This strategy selects appropriate feature metrics for multi-feature fusion to achieve optimal detection capability for both ID and OOD samples simultaneously. Our method requires only training the classification network model, without any input pre-processing or specific OOD data pre-tuning. Extensive experiments on several benchmark datasets show that our approach achieves state-of-the-art performance in simultaneously recognizing ID and OOD samples while ensuring that the recognition rate of ID samples does not decrease. The code for the paper can be found at https://github.com/Hewell0/HiddenOOD.
Keywords