Method and apparatus for optimizing out-of-distribution (OOD) detection

By adapting KNN methods with adjusted ANN detectors and PCA for ensemble models, the method enhances OOD recognition, improving robustness and performance in handling diverse data sets.

DE102024200871A1Pending Publication Date: 2025-07-31ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE102024200871
Authority / Receiving Office
DE · DE
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-01-31
Publication Date
2025-07-31

AI Technical Summary

Technical Problem

Ensemble models using artificial neural networks face challenges in effectively recognizing out-of-distribution (OOD) data due to varying feature vector sizes and inefficiencies in combining them, leading to potential misclassifications and reduced robustness.

Method used

Adapt the K-nearest neighbor (KNN) method by providing adjusted ANN detectors for each network in the ensemble model, averaging OOD scores, and optionally applying Principal Component Analysis (PCA) to unify feature vectors, enhancing robustness and reducing overfitting.

Benefits of technology

The proposed method improves the ensemble model's performance and generalization by making it more robust to OOD data, reducing the risk of misclassifications and enhancing the ability to handle diverse data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present invention proposes a method and device for optimizing out-of-distribution (OOD) detection using a K-Nearest Neighbors (KNN) method in an ensemble model with multiple artificial neural networks. The optimization method comprises the steps of: - providing (S1) an adapted KNN detector for each of the multiple artificial neural networks; - calculating (S2) a feature vector based on test or inference data for each of the multiple artificial neural networks; - providing (S3) the respectively calculated feature vector to the respectively adapted KNN detector; - determining (S4) a respective OOD score by the respectively adapted KNN detector based on the respectively provided feature vector; and - averaging (S5) the determined OOD scores for optimized OOD detection using the KNN method.
Need to check novelty before this filing date? Find Prior Art

Claims

[1] Method for optimizing an out-of-distribution (OOD) detection using a K-Nearest Neighbors (KNN) method in an ensemble model with several artificial neural networks, the method for optimizing comprising the steps: - Providing (S1) a customized ANN detector for each of the plurality of artificial neural networks; - calculating (S2) a feature vector based on test or inference data for each of the plurality of artificial neural networks; - Providing (S3) the respectively calculated feature vector to the respectively adapted KNN detector; - Determining (S4) a respective OOD score by the respective adapted KNN detector based on the respective provided feature vector; and - Averaging (S5) of the determined OOD scores for optimized OOD detection using the KNN method. [2] The method of claim 1, wherein providing (S1) the adapted ANN detector for each of the plurality of artificial neural networks comprises: during a training phase of the ensemble model based on training data, - Extracting feature vectors of the training data from each of the plurality of artificial neural networks; and - Adapting an ANN detector for each of the multiple artificial neural networks based on the extracted feature vectors. [3] The method according to claim 1 or 2, wherein calculating (S2) the feature vector based on the test or inference data for each of the plurality of artificial neural networks comprises: - Normalizing the feature vector calculated for each of the multiple artificial neural networks. [4] Method according to one of the preceding claims, wherein the determined OOD scores are weighted before averaging (S5) on the basis of a performance of the respective artificial neural network and / or on the basis of a performance of the respective adapted ANN detector. [5] Method for optimizing an out-of-distribution (OOD) detection using a K-Nearest Neighbors (KNN) method in an ensemble model with several artificial neural networks, the method for optimizing comprising the steps: - Providing (S10) an adapted ANN detector of the ensemble model; - calculating (S11) a feature vector based on test or inference data for each of the plurality of artificial neural networks; - performing (S12) a PCA for each of the calculated feature vectors in order to obtain unidimensional feature vectors; - averaging (S13) the respective unidimensional calculated feature vectors to obtain an averaged feature vector; and - Calculating (S14) an OOD score based on the averaged feature vector by the adapted ANN detector. [6] The method of claim 5, wherein providing (S10) the adapted KNN detector of the ensemble model comprises: during a training phase of the ensemble model based on training data; - Extracting feature vectors of the training data from each of the plurality of artificial neural networks; - performing a PCA for each of the plurality of artificial neural networks based on the extracted feature vectors to obtain unidimensional feature vectors; - averaging the respective unidimensional feature vectors; and - Adapting a standard ANN detector of the ensemble model based on the averaged feature vector. [7] The method according to claim 5 or 6, wherein calculating (S11) the feature vector based on the test or inference data for each of the plurality of artificial neural networks comprises: - Normalizing the feature vector calculated for each of the multiple artificial neural networks. [8] Method according to one of claims 5 to 7, wherein the respective PCA is performed with a predefined number of components, wherein preferably the predefined number of components is selected on the basis of hyperparameters of the plurality of artificial neural networks, and wherein preferably the number of components is smaller than the smallest feature vector of each of the plurality of artificial neural networks. [9] Method according to one of the preceding claims, further comprising the steps of optimized OOD detection by means of the ANN method on the basis of the averaged OOD score, and identifying samples in training and / or inference data of an automated function and / or driving function of a motor vehicle and / or a drone and / or a robot, which in particular deviate significantly from a training and / or inference distribution in the context. [10] Method according to one of claims 1 to 8, further comprising the steps of optimized OOD detection by means of the ANN method based on the averaged OOD score, and detecting scenarios in training and / or inference data that lead to incorrect predictions by the ensemble model in order to avoid the occurrence of such scenarios. [11] Device (100) for optimizing an out-of-distribution (OOD) detection by means of a K-Nearest Neighbors (KNN) method in an ensemble model with several artificial neural networks, the device (100) for optimizing comprising an evaluation and computing device which is configured to carry out the following steps: - Providing a customized ANN detector for each of the multiple artificial neural networks; - Calculating a feature vector based on test or inference data for each of the plurality of artificial neural networks; - Providing, in particular, inputting the respectively calculated feature vector to the respectively adapted KNN detector; - Determining a respective OOD score by the respective adapted KNN detector based on the respective provided feature vector; and - Averaging the determined OOD scores for optimized OOD detection using the KNN method. [12] Device (100) for optimizing an out-of-distribution (OOD) detection by means of a K-Nearest Neighbors (KNN) method in an ensemble model with several artificial neural networks, the device (100) for optimizing comprising an evaluation and computing device which is configured to carry out the following steps: - Providing an adapted ANN detector of the ensemble model; - Calculating a feature vector based on test or inference data for each of the plurality of artificial neural networks; - performing a PCA for each of the calculated feature vectors to obtain unidimensional feature vectors; - averaging the respective unidimensional calculated feature vectors to obtain an averaged feature vector; and - Calculating an OOD score based on the averaged feature vector by the adapted ANN detector. [13] Control unit (1000) for an automated driving function of a motor vehicle, an automated function of a drone, a robot and / or for an automated optical inspection of components and / or samples, wherein the control unit is designed to carry out the method according to one of claims 1 to 10. [14] A computer program comprising program code for carrying out at least parts of a method according to any one of claims 1 to 10 when the computer program is executed on a computer. [15] Computer-readable data carrier with program code of a computer program for carrying out at least parts of a method according to one of claims 1 to 10 when the computer program is executed on a computer.