A method for identifying out-of-distribution samples based on robust outlier sampling

By constructing the decision boundary of samples within the distribution through the robust outlier sampling method, the recognition difficulty of deep learning models when facing out-of-distribution samples is solved, and accurate detection of unknown objects is achieved, especially in the fields of autonomous driving and medical image detection, which improves the generalization ability of the model.

CN119478548BActive Publication Date: 2025-09-19NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411744380.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-30
Publication Date
2025-09-19
Estimated Expiration
2044-11-30

AI Technical Summary

Technical Problem

Existing deep learning models have poor generalization capabilities when faced with out-of-distribution samples in the open world, especially in object-level out-of-distribution detection, making it difficult to accurately identify unknown objects.

Method used

A method based on robust outlier sampling is adopted to quantify sample features through hybrid metrics, construct the decision boundary of samples within the distribution, and use adversarial samples to generate a set of negative samples to ensure the separability of samples within and outside the distribution, thus forming a compact decision boundary.

Benefits of technology

It improves the model's recognition accuracy for out-of-distribution samples and enhances its ability to detect unknown objects. It is suitable for autonomous driving, medical image detection, and critical safety behavior analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478548B_ABST
    Figure CN119478548B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for identifying out-of-distribution samples based on robust outlier sampling. The method comprises: obtaining an in-distribution sample dataset, training the in-distribution sample dataset based on a target convolutional neural network, and obtaining a trained target convolutional neural network; quantifying each sample in the in-distribution sample dataset using a mixed metric index to obtain a mixed metric index for each sample; constructing a distribution area for each class of samples based on the mixed metric index of each sample in each class of samples in the in-distribution sample dataset; and sorting the mixed metric index of each sample in the distribution area of ​​each class of samples to obtain a plurality of samples with the largest sorting for each class of samples. The present invention solves the technical problem in the prior art of target detection that, when out-of-distribution samples are present, the convolutional neural network used for target detection cannot accurately identify out-of-distribution samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an out-of-distribution sample recognition method based on robust outlier sampling. Background Art

[0002] With the advancement of deep learning technology, object detection has provided solutions for a variety of industries. However, deep neural networks trained on samples from closed domains often exhibit poor generalization capabilities when exposed to out-of-distribution samples in the open world. Out-of-distribution samples are samples whose label set has no intersection with the training categories and therefore should not be given predictions of existing categories. To improve the generalization ability of the model, the problem of out-of-distribution detection, which determines whether the input is in-distribution or out-of-distribution, has received increasing attention from the research community. Existing solutions mainly focus on image-level out-of-distribution detection, the goal of which is to determine whether the input is an in-distribution or out-of-distribution sample. However, object-level out-of-distribution detection can better understand the scene by finding unknown objects in a given image. It can more accurately distinguish abnormal areas and instances within the scene, thereby providing a more fine-grained approach to scene understanding and providing solutions for autonomous driving, medical image detection, critical safety behaviors, and other methods.

[0003] Generally speaking, existing out-of-distribution detection solutions can be divided into three categories, including classification-based, density-based, and distance-based solutions. Previous methods are based on an assumption that they will cluster ID data together to form high-density areas, while OOD data will appear in low-density areas. For example, the VOS method assumes that the distribution of object features follows a Gaussian-like distribution, while POEM uses Thompson sampling to accurately depict the decision boundary. However, due to the diversity of data samples, these assumptions may not hold in the real world. In addition, most existing solutions rely on additional out-of-distribution datasets to regularize the model boundaries. But the auxiliary datasets cannot cover all unknown data distributions well, resulting in biased model decision boundaries. Moreover, they mainly focus on out-of-distribution detection at the image level, and rarely study the detection of out-of-distribution objects. Summary of the Invention

[0004] An embodiment of the present invention provides an out-of-distribution sample identification method based on robust outlier sampling, which at least solves the technical problem in the prior art that when out-of-distribution samples exist, the convolutional neural network performing target detection cannot accurately identify out-of-distribution samples.

[0005] According to one aspect of an embodiment of the present invention, a method for identifying out-of-distribution samples based on robust outlier sampling is provided. The method may include: obtaining an in-distribution sample dataset, training the in-distribution sample dataset based on a target convolutional neural network to obtain a trained target convolutional neural network; quantifying each sample in the in-distribution sample dataset using a mixed metric to obtain a mixed metric for each sample; constructing a distribution region for each class of samples based on the mixed metric for each sample in each class of samples in the in-distribution sample dataset; ranking the mixed metric for each sample in the distribution region for each class of samples to obtain multiple samples with the largest ranking for each class of samples; perturbing the features of each of the multiple samples with the largest ranking for each class of samples to obtain multiple new samples for each class of samples; and recognizing the new samples based on the trained target convolutional neural network to obtain a recognition result.

[0006] Optionally, after quantifying each sample in the sample data set within the distribution with a target coordinate, a mixed metric index of each sample is obtained, including: obtaining the energy metric and distance metric of each sample; marking the energy metric and distance metric of each sample in a target coordinate system to obtain a coordinate point; introducing a projection line in the target coordinate system to calculate the distance from the coordinate origin to the projection point, wherein the distance from the projection point of each sample to the coordinate origin is defined as the mixed metric index of each sample.

[0007] Optionally, the energy measurement expression of each sample is:

[0008]

[0009] in, represents the energy measure of each sample, Represents each sample, represents the bounding box of each sample, represents the parameters of the trained target convolutional neural network, represents the target convolutional neural network, is the category corresponding to each sample.

[0010] Optionally, the distance metric of each sample is expressed as:

[0011]

[0012] in, is the distance metric for each sample, and The corresponding category mean of the jth category, Represents The corresponding nearest neighbor category mean of non-j category, express and with The corresponding category mean of the jth category, express and with The corresponding nearest neighbor category mean of non-j category, is a non-zero parameter.

[0013] Optionally, the expression of the hybrid metric of each sample is:

[0014]

[0015] in, is the mixed metric for each sample, is the contribution weight of balancing energy metric and distance metric, Represents the slope of the projection line.

[0016] Optionally, the expression for obtaining multiple new samples of each class of samples by perturbing the features of each of the multiple samples with the largest ranking of each class of samples is:

[0017]

[0018] in, For each new sample corresponding to each class of samples, For each sample’s characteristics, For disturbance, represents uniform distribution, represents a uniform distribution range.

[0019] Optionally, the expression of the loss function of the trained target convolutional neural network in the process of identifying new samples based on the trained target convolutional neural network to obtain the recognition result is:

[0020]

[0021] in, is the loss of bounding box regression, is the cross entropy loss, Uncertain loss.

[0022] Optionally, the expression of the uncertain loss is:

[0023]

[0024] in, is the number of sample data sets within the distribution, is the number of new samples corresponding to the sample data set within the distribution, is the target convolutional neural network after training, is the expectation of the sample data set within the distribution, is the expectation of the new sample corresponding to the sample data set within the distribution, is the mixed metric for each sample in the distribution sample dataset, The mixing metric for each new sample corresponding to the in-distribution sample dataset.

[0025] Beneficial effects of the present invention:

[0026] (1) In response to the situation where previous methods are overly dependent on auxiliary datasets and there is a label domain offset between the auxiliary dataset and the target domain, the new boundary sample metric provided by this invention takes into account the uncertainty of the sample, the inter-class and intra-class distance indicators, and can find difficult samples located near the object decision boundary, that is, data at the distribution boundary;

[0027] (2) The negative sample set constructed by the adversarial sample idea in this invention effectively ensures the separability between the in-distribution sample dataset and the out-of-distribution samples, and can form a globally compact decision boundary. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0029] Figure 1 is a flow chart of a method for identifying out-of-distribution samples based on robust outlier sampling according to an embodiment of the present invention;

[0030] Figure 2 3 is a schematic diagram of an out-of-distribution sample identification method based on robust outlier sampling according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or inherent to these processes, methods, products or devices.

[0033] Example 1

[0034] According to an embodiment of the present invention, a method for identifying out-of-distribution samples based on robust outlier sampling is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system comprising at least one set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0035] Figure 1 is a flow chart of a method for identifying out-of-distribution samples based on robust outlier sampling according to an embodiment of the present invention. Figure 1 As shown, the method may include the following steps:

[0036] Step S101: Obtain a sample data set within the distribution, train the sample data set within the distribution based on a target convolutional neural network, and obtain a trained target convolutional neural network.

[0037] In the technical solution provided in the above step S101 of the present invention, Figure 2 is a schematic diagram of an out-of-distribution sample identification method based on robust outlier sampling according to an embodiment of the present invention, such as Figure 2 As shown, a sample data set within the distribution is obtained. For example, the sample data set within the distribution is a traffic data set. The traffic data set is 100,000 traffic images. Each traffic image contains multiple vehicles and traffic participants. Target detection is performed on the targets in the sample data set within the distribution according to the target convolutional neural network to obtain a trained target convolutional neural network and several samples. The several samples can be vehicles and traffic participants of multiple categories. This is only an example and is not specifically limited.

[0038] Step S102: quantify each sample in the in-distribution sample data set using a mixed metric to obtain a mixed metric for each sample.

[0039] In the technical solution provided in step S102 of the present invention, if Figure 2 As shown, each sample in the sample data set within the distribution is marked in the target coordinate system, that is, the x-axis in the target coordinate system is used as the energy metric corresponding to each sample, and the y-axis in the target coordinate system is used as the distance metric corresponding to each sample. The energy metric and distance metric of each sample are marked in the target coordinate system to obtain the coordinate point, and a projection line is introduced in the target coordinate to calculate the distance from the coordinate origin to the projection point, where the distance from the projection point of each sample to the coordinate origin is defined as the mixed metric index of each sample, and the projection point is the point in the perpendicular direction from the coordinate point to the projection line.

[0040] Step S103 : constructing a distribution area of ​​each type of samples based on the mixed metric of each sample in each type of samples in the in-distribution sample data set.

[0041] In the technical solution provided in step S103 of the present invention, if Figure 2 As shown, the distribution area of ​​each class of samples is constructed based on the mixed metric indicators of each sample in each class of samples in the in-distribution sample dataset.

[0042] Step S104 , sorting the mixed metric index of each sample in the distribution area of ​​each type of sample, and obtaining a plurality of samples with the largest sorting for each type of sample.

[0043] In the technical solution provided in step S104 of the present invention, if Figure 2 As shown, the mixed metric index of each sample in the distribution area of ​​each type of sample is sorted from large to small, and multiple samples with the largest sorting of each type of sample are obtained.

[0044] Step S105 , perturb the features of each of the multiple samples with the largest ranking in each category of samples to obtain multiple new samples in each category of samples.

[0045] In the technical solution provided in the above step S105 of the present invention, after adding disturbance to the features of each of the multiple samples with the largest ranking of each class of samples, multiple new samples corresponding to each class of samples are obtained, wherein the new samples are out-of-distribution samples.

[0046] Step S106: Recognize the new sample based on the trained target convolutional neural network to obtain a recognition result.

[0047] In the technical solution provided in the above step S106 of the present invention, the new sample is identified according to the trained target convolutional neural network to obtain the recognition result of the new sample.

[0048] For example, the categories of samples corresponding to the sample data set within the distribution are first type of vehicles and second type of vehicles, respectively. Therefore, the target convolutional neural network only detects first type of vehicles and second type of vehicles. When there is a third type of vehicle, it cannot be detected. Therefore, based on the first type of vehicles and the second type of vehicles, a compact decision boundary can be formed according to the above algorithm to ensure that the target convolutional neural network can detect the third type of vehicles.

[0049] The above method of this embodiment is further introduced below.

[0050] As an optional implementation method, step S102, the method of quantifying each sample in the sample data set within the distribution using a hybrid metric to obtain a hybrid metric for each sample, includes: obtaining an energy metric and a distance metric for each sample; marking the energy metric and the distance metric for each sample in a target coordinate system to obtain a coordinate point; introducing a projection line in the target coordinate system to calculate the distance from the coordinate origin to the projection point, wherein the distance from the projection point of each sample to the coordinate origin is defined as the hybrid metric for each sample.

[0051] In this embodiment, if Figure 2 As shown, the energy metric and distance metric of each sample are obtained, and the energy metric and distance metric of each sample are marked in an xoy target coordinate system to obtain the coordinate point, that is, the position of the energy metric and distance metric of each sample in the xoy target coordinate system. A projection line is introduced in the target coordinate to calculate the distance from the coordinate origin to the projection point. The projection point is the projection point of the coordinate point to the projection line. The distance from the projection point of each sample to the coordinate origin is defined as the mixed metric indicator of each sample.

[0052] As an optional embodiment, the energy metric of each sample is expressed as follows:

[0053]

[0054] in, represents the energy measure of each sample, Represents each sample, represents the bounding box of each sample, represents the parameters of the trained target convolutional neural network, represents the target convolutional neural network, is the category corresponding to each sample.

[0055] As an optional embodiment, the distance metric of each sample is expressed as follows:

[0056]

[0057] in, is the distance metric for each sample, and The corresponding category mean of the jth category, Represents The corresponding nearest neighbor category mean of non-j category, express and with The corresponding category mean of the jth category, express and with The corresponding nearest neighbor category mean of non-j category, is a non-zero parameter.

[0058] As an optional embodiment, the expression of the hybrid metric of each sample is:

[0059]

[0060] in, is the mixed metric for each sample, is the contribution weight of balancing energy metric and distance metric, Represents the slope of the projection line.

[0061] As an optional embodiment, the expression for obtaining multiple new samples of each class of samples by perturbing the features of each of the multiple samples with the largest ranking of each class of samples is:

[0062]

[0063] in, For each new sample corresponding to each class of samples, For each sample’s characteristics, For disturbance, represents uniform distribution, represents a uniform distribution range.

[0064] As an optional embodiment, the expression of the loss function of the trained target convolutional neural network in the process of identifying new samples based on the trained target convolutional neural network to obtain the recognition result is:

[0065]

[0066] in, is the loss of bounding box regression, is the cross entropy loss, Uncertain loss.

[0067] As an optional embodiment, the expression of the uncertain loss is:

[0068]

[0069] in, is the number of sample data sets within the distribution, is the number of new samples corresponding to the sample data set within the distribution, is the target convolutional neural network after training, is the expectation of the sample data set within the distribution, is the expectation of the new sample corresponding to the sample data set within the distribution, is the mixed metric for each sample in the distribution sample dataset, The mixing metric for each new sample corresponding to the in-distribution sample dataset.

[0070] In this embodiment, the trained target convolutional neural network is a nonlinear multilayer perceptron. The expression for determining the parameters of the neural network when the loss function of the trained target convolutional neural network is minimized in the process of recognizing new samples is:

[0071]

[0072] in, The label used to represent each sample, including the in-distribution sample dataset and new samples.

[0073] In an embodiment of the present invention, a sample data set within the distribution is obtained, and the sample data set within the distribution is trained based on a target convolutional neural network to obtain a trained target convolutional neural network; each sample in the sample data set within the distribution is quantified using a mixed metric to obtain a mixed metric for each sample; based on the mixed metric of each sample in each category of samples in the sample data set within the distribution, a distribution area for each category of samples is constructed; the mixed metric of each sample in the distribution area for each category of samples is sorted to obtain multiple samples with the largest ranking for each category of samples; the features of each sample in the multiple samples with the largest ranking for each category of samples are perturbed to obtain multiple new samples for each category of samples; the new samples are identified based on the trained target convolutional neural network to obtain an identification result, thereby solving the technical problem in the prior art that when there are out-of-distribution samples, the convolutional neural network for target detection cannot accurately identify the out-of-distribution samples, and achieving the technical effect that the convolutional neural network for target detection that processes the sample data set within the distribution is able to accurately identify the new samples by processing the sample data set within the distribution of target detection.

[0074] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0075] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0076] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0077] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected to achieve the purpose of the present embodiment according to actual needs.

[0078] In addition, the functional units in various embodiments of the present invention may be integrated into a first processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0079] The above are only preferred embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for identifying out-of-distribution samples based on robust outlier sampling, characterized in that: include: Obtaining an in-distribution sample data set, training the in-distribution sample data set based on a target convolutional neural network, and obtaining a trained target convolutional neural network; The sample dataset is a traffic dataset, which is a traffic image. Each sample in the in-distribution sample dataset is quantified using a mixed metric to obtain a mixed metric for each sample, including: Get the energy metric and distance metric for each sample; Mark the energy metric and distance metric of each sample in a target coordinate system to obtain the coordinate point; A projection line is introduced into the target coordinate system to calculate the distance from the coordinate origin to the projection point, where the distance from the projection point of each sample to the coordinate origin is defined as the hybrid metric of each sample; The energy measurement expression of each sample is: in, represents the energy measure of each sample, Represents each sample, represents the bounding box of each sample, represents the parameters of the trained target convolutional neural network, represents the target convolutional neural network, is the category corresponding to each sample; The distance metric expression of each sample is: in, is the distance metric for each sample, and The corresponding category mean of the jth category, Represents The corresponding nearest neighbor category mean of non-j category, express and with The corresponding category mean of the jth category, express and with The corresponding nearest neighbor category mean of non-j category, is a non-zero parameter; The expression of the mixed metric for each sample is: in, is the mixed metric for each sample, is the contribution weight of balancing energy metric and distance metric, represents the slope of the projection line; Based on the mixed metric of each sample in each class of samples in the in-distribution sample dataset, the distribution area of ​​each class of samples is constructed; Sort the mixed metric indicators of each sample in the distribution area of ​​each type of sample, and obtain multiple samples with the largest ranking of each type of sample; Perturb the features of each of the multiple samples with the largest ranking of each class of samples to obtain multiple new samples of each class of samples; The new samples are identified based on the trained target convolutional neural network to obtain the recognition results.

2. The method according to claim 1, characterized in that The expression for obtaining multiple new samples of each class by perturbing the features of each of the multiple samples with the largest ranking of each class is: in, For each new sample corresponding to each class of samples, For each sample’s characteristics, For disturbance, represents uniform distribution, represents a uniform distribution range.

3. The method according to claim 1, characterized in that The expression of the loss function of the trained target convolutional neural network in the process of identifying new samples based on the trained target convolutional neural network and obtaining the recognition result is: in, is the loss of bounding box regression, is the cross entropy loss, Uncertain loss.

4. The method according to claim 3, characterized in that The expression of the uncertainty loss is: in, is the number of samples in the distribution, is the number of new samples corresponding to the sample data set within the distribution, is the target convolutional neural network after training, is the expectation of the sample data set within the distribution, is the expectation of the new sample corresponding to the sample data set within the distribution, is the mixed metric for each sample in the in-distribution sample dataset, The mixing metric for each new sample corresponding to the in-distribution sample dataset.

5. A computer system, characterized in that include: One or more processors, and a computer-readable storage medium for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method of claim 1.

6. A computer-readable storage medium, characterized in that Computer-executable instructions are stored, and when the instructions are executed, they are used to implement the method of claim 1.

Citation Information

Patent Citations

  • Infrared image small sample target identification method

    CN117115599A

  • Multi-scale object detection with a trained neural network

    US20210166129A1