Selective Classification Gates to Handle Out-of-Distribution OoD in CNN
Abstract
Detecting out-of-distribution (OoD) data is a critical process in artificial intelligence models that specialize in critical systems that require accurate results, such as medical systems, air navigation systems, and financial transaction systems. Therefore, researchers in the field of neural network programming place great importance on OoD handling. OoD detection approaches aim to identify inputs that deviate from a model’s training distribution, preventing the overconfident and false predictions that neural networks suffer from. In this paper using Post-hoc scoring approaches which as selective classification gates to handle OoD in a classification convolutional neural networks CNN model. That model is supposed to implemented in a vending machine, it’s trained on a label dataset of the Iraqi currency, that model suffers from OoD because of the convergent probabilities of the mathematical model of the neural network. With this approach, test four types; four methods were chosen to prevent out-of-distribution for the CNN model, which are: Confidence, Entropy, Cosine similarity, and Mahalanobis distance. Mathematical calculations were performed for each method with the tested data for the model and found threshold value to make as gate to pass currency classes and reject non-currency classes. Then the results of these gates comparing and analysis, it was concluded that the most accurate method of handling OoD is the Mahalanobis distance, which handled the OoD in model on real data from 85.29% to achieve a high prediction accuracy of this model.