Outlier data identification method, device, equipment and medium

CN116090585BActive Publication Date: 2026-09-15JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310120113.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-13
Publication Date
2026-09-15
Estimated Expiration
2043-02-13

AI Technical Summary

Technical Problem

[0004]本公开提供一种分布外数据的识别方法、装置、设备及介质,用以解决现有技术中模型预测精准度低的缺陷,实现提高模型的预测精准度

Benefits of technology

[0062] The method, apparatus, device, and medium for identifying out-of-distribution data disclosed herein acquire data to be identified, input the data to be identified into a data recognition model, and extract the target data content corresponding to the data to be identified. Based on the target data content, an identification result indicating that the data to be identified is out-of-distribution data is obtained and output. The data recognition model is trained using samples of the data to be identified and preset labels carried by the samples. Therefore, the data recognition model of this disclosure can accurately identify out-of-distribution data through the extracted data content. Furthermore, the samples of the data to be identified in this disclosure are obtained by decoupling and augmenting the original data samples. This demonstrates that this disclosure fully leverages the characteristics of the original data samples, performing data decoupling and augmentation operations to obtain sufficient training samples. These samples are then used for model training, effectively improving the generalization ability of the data recognition model and enhancing its accuracy in identifying out-of-distribution data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116090585B_ABST
    Figure CN116090585B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device, equipment and medium for identifying out-of-distribution data. The method comprises: obtaining to-be-identified data; inputting the to-be-identified data into a data identification model to extract target data content corresponding to the to-be-identified data; obtaining and outputting an identification result for indicating that the to-be-identified data is out-of-distribution data based on the target data content; wherein the data identification model is trained by to-be-identified data samples and preset labels carried by the to-be-identified data samples; and wherein the to-be-identified data samples are obtained by data decoupling and data augmentation on original data samples. The present disclosure aims to solve the problem of low prediction accuracy of the model in the prior art and improve the prediction accuracy of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, device and medium for identifying distributed data. Background Technology

[0002] In the field of machine learning, the data used to train a model is usually defined as in-distribution (ID) data, while data whose distribution does not match that of in-distribution data is usually defined as out-of-distribution (OOD) data.

[0003] In existing technologies, to improve model robustness, both in-distribution and out-of-distribution data samples are used simultaneously for training. However, this approach fails to fully utilize the characteristics of out-of-distribution data, resulting in lower prediction accuracy for the final trained model. Consequently, inaccurate predictions occur during the application phase. Summary of the Invention

[0004] This disclosure provides a method, apparatus, device, and medium for identifying out-of-distribution data, in order to address the shortcomings of low model prediction accuracy in the prior art and improve the prediction accuracy of the model.

[0005] This disclosure provides a method for identifying out-of-distribution data, including:

[0006] Obtain the data to be identified;

[0007] The data to be identified is input into the data recognition model to extract the target data content corresponding to the data to be identified; based on the target data content, the recognition result indicating that the data to be identified is out-of-distribution data is obtained and output.

[0008] The data recognition model is trained using a data sample to be recognized and a preset label carried by the data sample.

[0009] The data sample to be identified is obtained by decoupling and augmenting the original data sample.

[0010] According to the method for identifying out-of-distribution data provided in this disclosure, the data sample to be identified includes: a first out-of-distribution data sample and a second out-of-distribution data sample;

[0011] Wherein, the first out-of-distribution data sample is: sample data with the same data content but different data style compared with the in-distribution data sample; the second out-of-distribution data sample is: sample data with different data content compared with the in-distribution data sample.

[0012] After inputting the data to be identified into the data recognition model, the method further includes:

[0013] Extract the target data style corresponding to the data to be identified;

[0014] After extracting the target data content corresponding to the data to be identified, the method further includes:

[0015] Determine the first category prediction result and the first domain prediction result corresponding to the target data content;

[0016] Determine the second category prediction result and the second domain prediction result corresponding to the target data style;

[0017] Based on the prediction results of the first category, the prediction results of the first domain, the prediction results of the second category, and the prediction results of the second domain, the correlation between the target data content and the target data style is removed.

[0018] According to the out-of-distribution data identification method provided in this disclosure, the step of obtaining and outputting an identification result indicating that the data to be identified is out-of-distribution data based on the target data content includes:

[0019] Determine the predicted classification result corresponding to the target data content;

[0020] Compare the predicted classification results with the preset classification results;

[0021] If it is determined that the predicted classification result does not belong to the preset classification result, an identification result is output to indicate that the data to be identified is out-of-distribution data.

[0022] According to the out-of-distribution data identification method provided in this disclosure, the training process of the data identification model includes:

[0023] Input the data sample to be identified into the data recognition model, extract the sample data content corresponding to the data sample to be identified, and output the predicted classification label corresponding to the sample data content;

[0024] The consistency between the predicted classification label and the preset label is compared to obtain the first comparison result;

[0025] Based on the first comparison result, the model parameters of the data recognition model are adjusted until the number of iterations reaches a preset value, at which point the training of the data recognition model is determined to be complete.

[0026] According to the method for identifying out-of-distribution data provided in this disclosure, the step of extracting the sample data content corresponding to the data sample to be identified includes:

[0027] Extract the first sample data content corresponding to the first out-of-distribution data sample;

[0028] Before adjusting the model parameters of the data recognition model based on the first comparison result, the method further includes:

[0029] Extract the sample data pattern corresponding to the first out-of-distribution data sample;

[0030] Reconstruct the sample data style and the first sample data content to obtain a third out-of-distribution data sample;

[0031] By comparing the consistency between the first out-of-distribution data sample and the third out-of-distribution data sample, a second comparison result is obtained;

[0032] After adjusting the model parameters of the data recognition model based on the first comparison result, the method further includes:

[0033] Based on the second comparison result, the model parameters of the data recognition model are adjusted.

[0034] According to the out-of-distribution data identification method provided in this disclosure, after extracting the sample data pattern corresponding to the first out-of-distribution data sample, the method further includes:

[0035] Determine the first category prediction result sample and the first domain prediction result sample corresponding to the content of the first sample data;

[0036] Determine the second category prediction result sample and the second domain prediction result sample corresponding to the sample data pattern;

[0037] Based on the first category prediction result sample, the first domain prediction result sample, the second category prediction result sample, and the second domain prediction result sample, the correlation between the first sample data content and the sample data style is removed.

[0038] According to the method for identifying out-of-distribution data provided in this disclosure, before acquiring the data to be identified, the method further includes:

[0039] Obtain the original data sample, which is data with the same content as the data sample in the distribution but different in data style;

[0040] Extract the data content and data style to be processed corresponding to the original data sample;

[0041] Data augmentation operations are performed on the data content and the data style to be processed, respectively, to obtain the first out-of-distribution data sample and the second out-of-distribution data sample.

[0042] According to the out-of-distribution data identification method provided in this disclosure, after extracting the data content and data style to be processed corresponding to the original data sample, the method further includes:

[0043] Determine the first category result and the first domain result corresponding to the data content to be processed;

[0044] Determine the second category result and the second domain result corresponding to the data style to be processed;

[0045] Based on the results of the first category, the results of the first domain, the results of the second category, and the results of the second domain, the correlation between the data content to be processed and the data style to be processed is removed.

[0046] According to the out-of-distribution data identification method provided in this disclosure, the step of performing data augmentation operations on the data content and the data style to be processed respectively to obtain the first out-of-distribution data sample and the second out-of-distribution data sample includes:

[0047] A positive data augmentation operation is performed on the data pattern to be processed, and the first out-of-distribution data sample is obtained while ensuring that the content of the data to be processed remains unchanged.

[0048] A negative data augmentation operation is performed on the data to be processed to obtain the second out-of-distribution data sample.

[0049] According to the out-of-distribution data identification method provided in this disclosure, the step of performing a positive data augmentation operation on the data pattern to be processed, and obtaining the first out-of-distribution data sample while ensuring that the content of the data to be processed remains unchanged, includes:

[0050] Based on the original data sample and the model parameters of the data recognition model, perturbation data is obtained;

[0051] If the content of the data to be processed remains unchanged, the first out-of-distribution data sample is obtained based on the perturbation data and the new data pattern.

[0052] According to the out-of-distribution data identification method provided in this disclosure, the step of performing negative data augmentation on the data to be processed to obtain the second out-of-distribution data sample includes:

[0053] Based on the original data sample and the model parameters of the data recognition model, perturbation data is obtained;

[0054] If the pattern of the data to be processed remains unchanged, the content of the data to be processed is modified based on the perturbation data to obtain the second out-of-distribution data sample.

[0055] This disclosure also provides a device for identifying out-of-distribution data, including:

[0056] The acquisition module is used to acquire the data to be identified.

[0057] The identification module is used to input the data to be identified into the data identification model, extract the target data content corresponding to the data to be identified, and obtain and output the identification result indicating that the data to be identified is out-of-distribution data based on the target data content.

[0058] The data recognition model is trained using a data sample to be recognized and a preset label carried by the data sample.

[0059] The data sample to be identified is obtained by decoupling and augmenting the original data sample.

[0060] This disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for identifying out-of-distribution data as described above.

[0061] This disclosure also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for identifying out-of-distribution data as described above.

[0062] The method, apparatus, device, and medium for identifying out-of-distribution data disclosed herein acquire data to be identified, input the data to be identified into a data recognition model, and extract the target data content corresponding to the data to be identified. Based on the target data content, an identification result indicating that the data to be identified is out-of-distribution data is obtained and output. The data recognition model is trained using samples of the data to be identified and preset labels carried by the samples. Therefore, the data recognition model of this disclosure can accurately identify out-of-distribution data through the extracted data content. Furthermore, the samples of the data to be identified in this disclosure are obtained by decoupling and augmenting the original data samples. This demonstrates that this disclosure fully leverages the characteristics of the original data samples, performing data decoupling and augmentation operations to obtain sufficient training samples. These samples are then used for model training, effectively improving the generalization ability of the data recognition model and enhancing its accuracy in identifying out-of-distribution data. Attached Figure Description

[0063] To more clearly illustrate the technical solutions in this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0064] Figure 1 This is one of the flowcharts illustrating the method for identifying out-of-distribution data provided in this disclosure;

[0065] Figure 2 This is one of the flowcharts illustrating the data generation process provided in this disclosure;

[0066] Figure 3 This is the second flowchart of the data generation process provided in this public disclosure;

[0067] Figure 4 This is the second flowchart illustrating the method for identifying out-of-distribution data provided in this disclosure;

[0068] Figure 5 This is a schematic diagram of the structure of the off-distribution data identification device provided in this disclosure;

[0069] Figure 6 This is a schematic diagram of the structure of the electronic device provided in this disclosure. Detailed Implementation

[0070] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the embodiments of this disclosure.

[0071] The following is combined with Figures 1-4 This disclosure describes a method for identifying out-of-distribution data according to embodiments of the present disclosure.

[0072] To clearly explain the method for identifying out-of-distribution data disclosed herein, the relevant information regarding out-of-distribution data is described below:

[0073] In recent years, learning from out-of-distribution data has been a challenging task in machine learning. Deep models (data recognition models) often fail significantly and exhibit low prediction accuracy if they are not properly handled with unknown data sampled from unknown distributions. This problem is prevalent when deep models encounter domain bias and new categories of data. This issue has attracted attention in numerous fields, including out-of-distribution detection learning, open-set semi-supervised learning, and open-set computing.

[0074] To address these issues, many fields utilize prediction confidence as a detection criterion, which is the maximum probability value predicted by the network. However, due to the overconfidence of deep models, neural networks often output large prediction confidence for unknown data, thus limiting the performance of deep models in detecting out-of-distribution data.

[0075] To address the aforementioned shortcomings, the field of out-of-distribution data detection learning utilizes classification scoring models (OpenMax) with an additional classification rating model (logit) to encompass all out-of-distribution data, thus avoiding the overconfidence characteristic of neural networks in deep models. Further improvements are made based on this, employing a binary classifier (One-vs-All) to introduce a negative class for each category, thereby distinguishing out-of-distribution data that differs from all known classes. Furthermore, in addition to predicting confidence, detection performance benefits from generated counterfactual examples, which are close to in-distribution data but still resemble out-of-distribution data. By identifying such counterfactual examples as unknown harmful samples, the overconfidence defect can be mitigated to achieve accurate detection. OpenMax is a model that uses extreme value theory to correct classification scores.

[0076] Similarly, to address the aforementioned shortcomings, in the field of open-set semi-supervised learning, to correctly filter out potential out-of-distribution data, the detection performance can be improved by ensembling the prediction confidence of detected out-of-distribution data. Furthermore, the influence of out-of-distribution data can be weakened by reducing weights through meta-learning. Moreover, by treating in-distribution and out-of-distribution data as two distinct domains, separation can be achieved during training, ensuring that semi-supervised learning is unaffected by out-of-distribution data. Inspired by consistency regularization constraints, consistent and continuous prediction of out-of-distribution data can significantly improve learning performance.

[0077] To address the aforementioned shortcomings, open-set domain adaptation attempts to transfer knowledge from source domain data to in-distribution data in the target domain, while simultaneously detecting out-of-distribution data encountered during the transfer process. Specifically, this is achieved by utilizing Support Vector Machines (SVMs) to identify out-of-distribution data. Furthermore, transferability during training can be used for evaluation, thereby separating the target domain data into in-distribution and out-of-distribution data, effectively handling open-set domain adaptation. Inspired by out-of-distribution data detection learning, out-of-distribution data can also be detected using OpenMax and One-vs-All methods. Moreover, benefiting from the development of unsupervised learning, self-supervised learning methods can be used to help extract discriminative features, thus better separating in-distribution and out-of-distribution data.

[0078] In summary, existing technologies identify out-of-distribution data through various methods, but they lack in-depth analysis of the reasons why out-of-distribution data can have harmful effects. In fact, out-of-distribution data can be divided into two types: benign out-of-distribution data and malicious out-of-distribution data. Benign out-of-distribution data can improve the learning performance of the target distribution through techniques such as continuous training or domain adaptation; however, if not properly utilized, it may mislead the learning of deep models and affect their performance. To improve the generalization ability of deep models, positive data augmentation techniques are used to process out-of-distribution data.

[0079] For example, performance in open machine semi-supervised learning has been greatly improved thanks to benign out-of-distribution data with positive augmentation. Conversely, unknown malicious out-of-distribution data can corrupt classification results, but they are deceptive and difficult to detect.

[0080] To train a robust model for malicious out-of-distribution data, some methods propose negative data augmentation techniques to generate counterfactual malicious out-of-distribution data that resembles the in-distribution data. By separating these more challenging counterfactual data from the existing in-distribution data, the learning performance for out-of-distribution data identification can be improved. However, when faced with both malicious and benign out-of-distribution data simultaneously, deciding which data to separate and which to utilize will significantly impact the final learning outcome.

[0081] Therefore, there are problems such as overly aggressively using too much malicious out-of-distribution data and overly conservatively rejecting too much benign out-of-distribution data, resulting in low prediction accuracy of the final deep model.

[0082] Based on the above description, this disclosure provides a method for identifying off-distribution data. This method can be applied to smart terminals, such as mobile phones, computers, and tablets, as well as servers. The following description uses the application of this method to a server as an example; however, it should be noted that this is merely illustrative and not intended to limit the scope of protection of this disclosure. Other descriptions in the embodiments of this disclosure are also illustrative and not intended to limit the scope of protection of this disclosure, and will not be described in detail thereafter. The specific implementation of this method is as follows: Figure 1 As shown:

[0083] Step 101: Obtain the data to be identified;

[0084] Step 102: Input the data to be identified into the data recognition model and extract the target data content corresponding to the data to be identified; based on the target data content, obtain and output the recognition result used to indicate that the data to be identified is out-of-distribution data.

[0085] The data recognition model is trained using the data sample to be recognized and the preset labels carried by the data sample.

[0086] The data samples to be identified are obtained by decoupling and augmenting the original data samples.

[0087] The data samples to be identified include: the first out-of-distribution data sample and the second out-of-distribution data sample.

[0088] The first out-of-distribution data sample is a sample data whose data content is the same as the in-distribution data sample but whose data style is different. The second out-of-distribution data sample is a sample data whose data content is different from the in-distribution data sample.

[0089] Specifically, this disclosure can be applied to multiple fields. For example, in the field of intelligent driving, the data to be identified is image data collected during vehicle operation. By identifying this data, obstacles encountered during vehicle operation can be determined to ensure safe driving. Another example is in the e-commerce field, where the data to be identified is user-related data. By identifying this data, user interest categories can be determined, and products of interest can be recommended to the user. This user-related data includes basic user information and user behavior information, among others.

[0090] Specifically, in order to obtain the data recognition model disclosed herein, the following describes two stages: the sample generation stage and the model training stage.

[0091] The specific implementation of the sample generation stage is as follows:

[0092] In one specific embodiment, in order to obtain effective benign and malignant out-of-distribution data, the following steps are taken: obtaining original data samples; extracting the data content and data style to be processed corresponding to the original data samples; performing data augmentation operations on the data content and data style to be processed respectively to obtain a first out-of-distribution data sample and a second out-of-distribution data sample, wherein the original data sample is data with the same data content as the in-distribution data sample, but with a different data style.

[0093] Among them, the first out-of-distribution data sample is benign out-of-distribution data, and the second out-of-distribution data sample is malignant out-of-distribution data.

[0094] Specifically, the original data sample includes confounding factors that affect the content and style of the data to be processed, leading to a spurious relationship between the two.

[0095] Confounding factors are factors that, in the process of causal inference, involve two unrelated variables that do not have a direct causal relationship, but may have an additional third variable that directly affects these two unrelated variables, resulting in a spurious relationship between them. This third variable is called a confounding factor, and the spurious relationship is called a correlation.

[0096] Specifically, this disclosure pre-creates a structural causal model. This structural causal model better describes the causal relationships between the variables under study, and the mutual influence between variables is understood by constructing a causal graph. Generally, the variable from which the arrow originates is called the influencing variable, while the variable to which the arrow points is called the structural variable; see [link to relevant documentation] for details. Figure 2 .

[0097] Specifically, this disclosure reveals the data generation process through a structural causal model. Due to the influence of confounding factors, the domain and category corresponding to the original data sample affect the data content and the data pattern. Ultimately, based on the affected data content and the affected data pattern, either in-distribution data or benign out-of-distribution data are obtained.

[0098] Among them, Figure 2 In this context, G represents confounding factors, D represents domain, Y represents category, S represents data pattern, C represents data content, and X represents data within the distribution.

[0099] Specifically, this disclosure generates first and second out-of-distribution data samples from the perspective of causal inference based on a structural causal model, so as to make reasonable use of the first and second out-of-distribution data samples and improve the learning performance of the deep model.

[0100] In one specific embodiment, in order to obtain the first out-of-distribution data sample and the second out-of-distribution data sample, it is necessary to ensure the complete independence of the data content and the data style to be processed, that is, to break the correlation between the two. Specifically, this is achieved by determining the first category result and the first domain result corresponding to the data content to be processed; determining the second category result and the second domain result corresponding to the data style to be processed; and removing the correlation between the data content and the data style to be processed based on the first category result, the first domain result, the second category result, and the second domain result, thereby achieving decoupling between the two.

[0101] Specifically, this disclosure, based on variational inference, decouples the content and style of the data to be processed, as shown below:

[0102] First, assume that the data generation process can be captured by certain probability distributions. According to... Figure 2 The structural causal model identifies the variables of interest, and the joint distribution P(X, Y, D, C, S) is expressed by formula (1):

[0103] P(X,Y,D,C,S)=P(C)P(S)P(Y,D|C)P(Y,D|S)P(X|C,S) (1)

[0105] Where D represents the domain, Y represents the category, S represents the data style, C represents the data content, and X represents the data within the distribution.

[0106] Due to the aforementioned spurious correlations, both data content C and data style S directly influence category Y and domain D, i.e., Y←C→D, Y←S→D, leading to inaccurate predictions during model application. Therefore, the ideal state is...

[0107] Furthermore, assume that Y and D are conditionally independent, that is... Therefore, the probability distribution corresponding to the data content can be derived as P(Y, D|C) and the probability distribution corresponding to the data pattern can be derived as P(Y, D|S), as shown in formulas (2) and (3):

[0108] P(Y, D|C)=P(Y|C)P(D|C) (2)

[0109] P(Y, D|S)=P(D|S)P(Y|S) (3)

[0110] Based on the above formulas (2) and (3), it can be seen that the erroneous posterior probabilities P(D|C) and P(Y|S) lead to unwanted correlations C→D and S→Y. Therefore, in order to break this erroneous correlation, the joint distribution P(X,Y,D,C,S) in formula (1) is modified by adding the denominator P(D|C)P(Y|S) to obtain a new joint distribution P′(X,Y,D,C,S), as detailed in formula (4):

[0111]

[0112] At this point, P(X, Y, D, C, S) is defined as the original joint distribution, and P′(X, Y, D, C, S) is defined as the joint distribution.

[0113] Thus, the category and domain predictions P(Y|C) and P(D|S) can be correctly modeled based on the data content C and data style S corresponding to the joint distribution.

[0114] Finally, maximize the log-likelihood of the joint distribution p(x, y, d) for each data point (x, y, d):

[0115] logp(x, y, d) = log∫ c ∫ s p′(x,y,d,c,s)d cds (5)

[0116] In this context, lowercase letters represent the values ​​of the corresponding variables: x represents the value corresponding to X, y represents the value corresponding to Y, d represents the value corresponding to D, c represents the value corresponding to C, and s represents the value corresponding to S.

[0117] Since the distribution integrals of the potential data content C and data pattern S are difficult to obtain, the variational inference framework is used to obtain the lower bound of evidence ELBO(x, y, d) for the log-likelihood in formula (4), which can be found in formula (6) for details:

[0118]

[0119] in, This represents the weighting coefficient.

[0120] Specifically, data content and data style are decoupled by maximizing the log-likelihood.

[0121] The loss function can be obtained from the modified joint distribution decomposition in formula (3), as detailed in formula (7):

[0122]

[0123] in, This represents the Kullback-Leibler divergence (KL divergence) between the data content C and its prior distribution. Let p(C) represent the KL divergence between the data pattern and its prior distributions, where the prior distributions p(C) and p(S) follow a standard multivariate Gaussian distribution.

[0124] in, This represents the decoupling between the log-likelihood of the classification result prediction and the data content. This represents the decoupling of the predicted log-likelihood of the classification result and the data pattern, where decoupling can be achieved by maximizing the log-likelihood. and To achieve this.

[0125] Where, log p ψ (x|c,s) represents the reconstruction of data content and data style.

[0126] In addition, by maximizing ELBO, an accurate class predictor can be trained that can output stable and invariant class predictions under different styles.

[0127] Specifically, based on x, y, d, c, and s, the corresponding log-likelihood results are determined, and the lower bound of evidence is determined based on the log-likelihood results, thus decoupling the data content and data style. Furthermore, a loss function is obtained, which is subsequently applied in the model training phase.

[0128] In one specific embodiment, after completing the decoupling operation between the data content to be processed and the data style to be processed, a first out-of-distribution data sample and a second out-of-distribution data sample are obtained, as specifically implemented below:

[0129] A positive data augmentation operation is performed on the data pattern to be processed, and the content of the data to be processed remains unchanged, to obtain a first out-of-distribution data sample; a negative data augmentation operation is performed on the content of the data to be processed to obtain a second out-of-distribution data sample.

[0130] Specifically, after decoupling the data content and data style, two relative data augmentation operations are used to utilize out-of-distribution samples, namely positive data augmentation and negative data augmentation, to generate benign out-of-distribution data and malignant out-of-distribution data respectively, so as to further enhance the generalization ability of the deep model and improve its robustness to anomalous samples.

[0131] Specifically, to achieve the above objectives, positive data augmentation only intervenes in the data style while keeping the data content information unchanged; while negative data augmentation attempts to influence the data content while keeping the data style unchanged, thereby generating malicious out-of-distribution data.

[0132] Specifically, based on the generation process of in-distribution data, this disclosure pre-establishes a data generation model to generate in-distribution data, benign out-of-distribution data, and malignant out-of-distribution data from the perspective of causal inference. That is, the data style and content to be processed are input into the data generation model to obtain in-distribution data, a first out-of-distribution data sample, and a second out-of-distribution data sample output by the data generation model. The internal processing logic of the data generation model is described below through several specific embodiments.

[0133] In one specific embodiment, perturbation data is obtained based on the original data sample and the model parameters of the data recognition model; while ensuring that the content of the data to be processed remains unchanged, a first out-of-distribution data sample is obtained based on the perturbation data and the new data pattern.

[0134] In one specific embodiment, perturbation data is obtained based on the original data sample and the model parameters of the data recognition model; while ensuring that the style of the data to be processed remains unchanged, the content of the data to be processed is modified based on the perturbation data to obtain a second out-of-distribution data sample.

[0135] Specifically, adversarial data augmentation is used to intervene in the extracted data content and data style to obtain out-of-data with a benign distribution. and out-of-distribution data For details, please refer to Figure 3 Among them, in Figure 3 middle This represents a new data pattern obtained by performing a positive data augmentation operation on the data pattern. This refers to the new data content obtained by performing negative data augmentation on the existing data. Figure 3 The generation of benign and malignant out-of-distribution data is distinguished by thick solid and thick dashed lines, which are not used to represent any other physical meaning.

[0136] Specifically, by adding learnable perturbation data e to each instance x, we can obtain malicious out-of-distribution data that alters both the data content and the data pattern. and benignly distributed out-of-data

[0137] For each data point (x, y, d), the intervention objective function can be minimized. To obtain the disturbance data e, please refer to formula (8):

[0138]

[0139] Where, ∈ represents using l p - The perturbation magnitude of the norm constraint, where θ c ,φ c ,θs ,φ s These represent the model parameters.

[0140] Since the goals of positive data augmentation and negative data augmentation are completely relative, this section aims to generate... and The intervention goals differ.

[0141] Adversarial example generation amplifies positive data; the intervention objective function is shown in formula (9):

[0142]

[0143] Among them, the first item The second term represents the distance metric between the data content extracted from the original data sample and its perturbed sample. This represents the cross-entropy loss.

[0144] Specifically, by minimizing The perturbation data e does not significantly affect the data content, and this disclosure introduces a new data style different from its original neighborhood d. Therefore, a style-invariant model that can resist neighborhood shifts can be trained using augmented benign data with the novel style.

[0145] In addition, it can be modified To inject a new data style with the domain label d′, see formula (10) for details:

[0146]

[0147] Unlike Equation (9), Equation (10) aims to minimize the cross-entropy loss so that the data perturbation instances can contain data patterns from the target domain d′. Therefore, augmented out-of-distribution data can successfully bridge the gap between the source and target domains and further improve test performance in the target distribution.

[0148] Adversarial example generation amplifies negative data; the intervention objective function is shown in formula (11):

[0149]

[0150] Specifically, by minimizing Data perturbation does not significantly alter the data pattern, but it makes the data content different from the original content with category label y. Subsequently, by identifying this augmented, malicious out-of-distribution data as unknown anomalous samples, the trained model becomes robust to anomalous samples with deceptive pattern features, thereby improving out-of-distribution sample detection performance.

[0151] Specifically, to complete the adversarial data augmentation process, multi-step projective gradient descent is performed. Formally, the optimal augmented data... and It can be obtained through the following iterative method, as detailed in formula (12):

[0152]

[0153] Where t represents the number of iterations. This indicates the out-of-distribution data obtained in this iteration. This indicates the out-of-distribution data obtained in this iteration. This represents the out-of-distribution data obtained in the next iteration. e represents the malicious out-of-distribution data obtained in the next iteration. t This represents the perturbation data corresponding to this iteration.

[0154] In practice, the final iteration number t can be set to 15. Furthermore, the optimal augmented data will be incorporated into the model training process.

[0155] This disclosure aims to enhance the effectiveness of data augmentation by separately intervening in style and content to perform positive data augmentation and negative data enhancement. Specifically, it modifies data with changed style features. Data that should be identified as out-of-normal distribution, and whose content characteristics have changed. This should be identified as malicious out-of-distribution data. In this way, without introducing any bias, benign out-of-distribution data can be easily used to improve the model's generalization ability, and malicious out-of-distribution data can be directly identified as harmful data to assist in the detection of unknown anomalies.

[0156] Specifically, based on the aforementioned data decoupling and data augmentation, a well-distributed out-of-range data can be obtained from one sample (x, y, d) in each original data sample. and a malicious out-of-distribution data Append them separately to the benign dataset and malicious datasets In order to utilize well-distributed out-of-range data. Assign it an initial class label y (preset classification result) and perform supervised training. This is to separate out-of-distribution data. They are identified as unknown data that are different from their original class label y using a one-to-many classifier.

[0157] In the process of decoupling data content and data style and data augmentation described above, the data content refers to the data content to be processed, and the data style refers to the data style to be processed.

[0158] This disclosure, based on a causal classification model, can derive a lower bound on the evidence of a joint distribution. By maximizing this lower bound, the correlation between data content and data pattern is removed, thus decoupling the two. Furthermore, it augments both data pattern and content with positive and negative data to obtain out-of-distribution data (both benign and malignant), maximizing their utilization within the deep model. This provides effective training data samples (i.e., data samples to be identified) for the deep model to effectively identify anomalous data.

[0159] Once training data samples are obtained, the data recognition model is trained, entering the model training phase. The specific implementation of the model training phase is shown below:

[0160] In one specific embodiment, the data sample to be identified is input into the data recognition model, the sample data content corresponding to the data sample to be identified is extracted, and the predicted classification label corresponding to the sample data content is output; the consistency between the predicted classification label and the preset label is compared to obtain the first comparison result; based on the first comparison result, the model parameters of the data recognition model are adjusted until the number of iterations reaches the preset value, at which point the training of the data recognition model is determined to be complete.

[0161] Specifically, traverse the benign dataset The study utilizes benign out-of-distribution data in a supervised training approach to maximize its use, while simultaneously traversing malicious datasets. The data is out of the distribution of malignant data and is identified as anomalous samples.

[0162] Of course, the entire training process also requires the participation of in-distribution data, using in-distribution data and benign out-of-distribution data to train the model's prediction accuracy.

[0163] In one specific embodiment, after optimizing the model parameters using the predicted classification labels of the data recognition model, it is necessary to further optimize the model parameters using the reconstruction results to improve the prediction accuracy and data decoupling accuracy of the data recognition model. The specific implementation is as follows:

[0164] Extract the first sample data content corresponding to the first out-of-distribution data sample; extract the sample data pattern corresponding to the first out-of-distribution data sample; reconstruct the sample data pattern and the first sample data content to obtain the third out-of-distribution data sample; compare the consistency between the first out-of-distribution data sample and the third out-of-distribution data sample to obtain the second comparison result; based on the second comparison result, adjust the model parameters of the data recognition model.

[0165] In one specific embodiment, during the training phase, the data recognition model needs to decouple the content and style of the first sample data and remove their correlations to ensure the accuracy of the prediction and classification results. The specific implementation of this correlation removal is as follows:

[0166] Determine the first category prediction result sample and the first domain prediction result sample corresponding to the content of the first sample data; determine the second category prediction result sample and the second domain prediction result sample corresponding to the sample data style; based on the first category prediction result sample, the first domain prediction result sample, the second category prediction result sample and the second domain prediction result sample, remove the correlation between the content of the first sample data and the sample data style.

[0167] The specific implementation process for removing correlations can be found in the sample generation stage.

[0168] The following is through Figure 4 Let's take a loop during the training of a data recognition model as an example for a specific explanation:

[0169] Specifically, benign distribution data with pre-defined labels and malign distribution data without pre-defined labels are used as data samples to be identified (or malign distribution data with pre-defined abnormal labels) to train the data identification model.

[0170] Let's take the current input data sample to be identified as (x, y, d) as an example (each instance x has a category label y and a domain label d):

[0171] With model parameters θ c The corresponding encoder g c To estimate the posterior distribution This then generates the first sample data content C, and the model parameters θ. s The corresponding encoder is used to estimate the posterior distribution. Enter the generated sample data style S.

[0172] Then, the generated first sample data content C is input into the model parameters φ. c The corresponding fully connected classifier f c In the middle, we get f c Output content prediction category tags And input the generated sample data style S into the model parameters φ s The corresponding fully connected classifier f s In the process, the predicted category label of the style is obtained from the output f. Among them, the predicted category label is obtained by combining the content prediction category label and the style prediction category label.

[0173] Finally, to enhance the recognizability of the first sample data content C and sample data pattern S, the decoder h corresponding to the model parameter ψ is used to reconstruct the input first sample data content C and sample data pattern S. ψ (X,C,S) yields instance X, which may be either a benign or malignant off-distribution, depending on the augmentation operation.

[0174] In summary, the implementation principles are summarized as follows:

[0175] Benign out-of-distribution data is decomposed into two latent factors: 1) data content C, representing the content of interest in the image, and 2) data style S, which includes other influencing factors such as image brightness, orientation, and color. Data content C is determined by its true category Y, while style S is caused by environmental conditions, represented by the domain D. Intuitively, malicious out-of-distribution data cannot be included in network training because it contains unknown content information, and therefore its true category differs from any known category; benign out-of-distribution data can be appropriately utilized because it is merely novel in style, but still contains content information of interest. Therefore, based on the data content and data style extracted from the image, benign and malicious out-of-distribution data can be successfully distinguished.

[0176] This disclosure trains a data recognition model using the generated data samples to be identified. During training, it utilizes the maximization of the lower bound of evidence to decompose the correlation between the content and pattern of the first sample data, thereby eliminating spurious correlations caused by unobserved confounding factors and preventing the bias introduced by these confounding factors from impairing learning performance. Furthermore, based on the decomposed content and pattern of the first sample data, it generates malicious out-of-distribution data and benign out-of-distribution data to improve the recognition effect and generalization performance of the data recognition model.

[0177] After the data recognition model is trained, it is used to identify out-of-distribution data, thus entering the model application phase. The specific implementation of the model application phase is shown below:

[0178] In one specific embodiment, the data to be identified is input into a data recognition model to extract the target data content and target data style corresponding to the data to be identified; the first category prediction result and the first domain prediction result corresponding to the target data content are determined; the second category prediction result and the second domain prediction result corresponding to the target data style are determined; and the correlation between the target data content and the target data style is removed based on the first category prediction result, the first domain prediction result, the second category prediction result and the second domain prediction result.

[0179] The specific implementation process for removing correlations can be found in the sample generation stage.

[0180] In one specific embodiment, the target data content corresponding to the data to be identified is extracted; the predicted classification result corresponding to the target data content is determined; the predicted classification result is compared with the preset classification result; if it is determined that the predicted classification result does not belong to the preset classification result, the identification result used to indicate that the data to be identified is out-of-distribution data is output; if it is determined that the predicted classification result belongs to the preset classification result, the predicted classification result is output.

[0181] Specifically, the predicted classification results can be obtained based on the prediction results of the first category and the prediction results of the first domain.

[0182] The out-of-distribution data identification method disclosed herein involves acquiring data to be identified, inputting the data to be identified into a data identification model, extracting the target data content corresponding to the data to be identified, and based on the target data content, obtaining and outputting an identification result indicating that the data to be identified is out-of-distribution data. The data identification model is trained using samples of the data to be identified and preset labels carried by these samples. Therefore, the data identification model of this disclosure can accurately identify out-of-distribution data through the extracted data content. Furthermore, the data samples to be identified in this disclosure are obtained by performing data decoupling and data augmentation on the original data samples. This demonstrates that this disclosure fully leverages the characteristics of the original data samples, performing data decoupling and data augmentation operations to obtain sufficient training samples. These training samples are then used to train the model, effectively improving the generalization ability of the data identification model and enhancing its accuracy in identifying out-of-distribution data.

[0183] The following describes the off-distribution data identification device provided in the embodiments of this disclosure. The off-distribution data identification device described below can be referred to in correspondence with the off-distribution data identification method described above. Repeated descriptions will not be repeated. Figure 5 As shown, the device includes:

[0184] The acquisition module 501 is used to acquire the data to be identified;

[0185] The identification module 502 is used to input the data to be identified into the data identification model, extract the target data content corresponding to the data to be identified, and obtain and output the identification result indicating that the data to be identified is out-of-distribution data based on the target data content.

[0186] The data recognition model is trained using the data sample to be recognized and the preset labels carried by the data sample.

[0187] The data samples to be identified are obtained by decoupling and augmenting the original data samples.

[0188] In one specific embodiment, the data sample to be identified includes: a first out-of-distribution data sample and a second out-of-distribution data sample;

[0189] The first out-of-distribution data sample is a sample data whose data content is consistent with the data sample within the distribution but whose data style is inconsistent. The second out-of-distribution data sample is a sample data whose data content is inconsistent with the data sample within the distribution. The identification module 502 is also used to extract the target data style corresponding to the data to be identified; determine the first category prediction result and the first domain prediction result corresponding to the target data content; determine the second category prediction result and the second domain prediction result corresponding to the target data style; and remove the correlation between the target data content and the target data style based on the first category prediction result, the first domain prediction result, the second category prediction result and the second domain prediction result.

[0190] In one specific embodiment, the identification module 502 is specifically used to determine the predicted classification result corresponding to the target data content; compare the predicted classification result with the preset classification result; and, if it is determined that the predicted classification result does not belong to the preset classification result, output an identification result to indicate that the data to be identified is out-of-distribution data.

[0191] In one specific embodiment, the device further includes a training module for executing the training process of the data recognition model. The training process of the data recognition model includes: inputting the data sample to be recognized into the data recognition model, extracting the sample data content corresponding to the data sample to be recognized, and outputting the predicted classification label corresponding to the sample data content; comparing the consistency between the predicted classification label and the preset label to obtain a first comparison result; and adjusting the model parameters of the data recognition model based on the first comparison result until the number of iterations reaches a preset value, at which point the training of the data recognition model is determined to be complete.

[0192] In one specific embodiment, the training module is specifically used to extract the first sample data content corresponding to the first out-of-distribution data sample; extract the sample data pattern corresponding to the first out-of-distribution data sample; reconstruct the sample data pattern and the first sample data content to obtain the third out-of-distribution data sample; compare the consistency between the first out-of-distribution data sample and the third out-of-distribution data sample to obtain the second comparison result; and adjust the model parameters of the data recognition model based on the second comparison result.

[0193] In one specific embodiment, the training module is specifically used to determine a first category prediction result sample and a first domain prediction result sample corresponding to the content of the first sample data; determine a second category prediction result sample and a second domain prediction result sample corresponding to the sample data pattern; and remove the correlation between the content of the first sample data and the sample data pattern based on the first category prediction result sample, the first domain prediction result sample, the second category prediction result sample and the second domain prediction result sample.

[0194] In one specific embodiment, the device further includes a generation module for acquiring original data samples, wherein the original data samples are data with the same content as the in-distribution data samples but different data styles; extracting the data content to be processed and the data style to be processed corresponding to the original data samples; and performing data augmentation operations on the data content to be processed and the data style to be processed respectively to obtain a first out-of-distribution data sample and a second out-of-distribution data sample.

[0195] In one specific embodiment, the generation module is further configured to determine a first category result and a first domain result corresponding to the data content to be processed; determine a second category result and a second domain result corresponding to the data style to be processed; and remove the correlation between the data content to be processed and the data style to be processed based on the first category result, the first domain result, the second category result, and the second domain result.

[0196] In one specific embodiment, the generation module is specifically used to perform a positive data augmentation operation on the data pattern to be processed, and obtain a first out-of-distribution data sample while ensuring that the content of the data to be processed remains unchanged; and to perform a negative data augmentation operation on the content of the data to be processed to obtain a second out-of-distribution data sample.

[0197] In one specific embodiment, the generation module is specifically used to obtain perturbation data based on the original data sample and the model parameters of the data recognition model; and, while ensuring that the content of the data to be processed remains unchanged, to obtain a first out-of-distribution data sample based on the perturbation data and the new data pattern.

[0198] In one specific embodiment, the generation module is specifically used to obtain perturbation data based on the original data sample and the model parameters of the data recognition model; and, while ensuring that the style of the data to be processed remains unchanged, to modify the content of the data to be processed based on the perturbation data to obtain a second out-of-distribution data sample.

[0199] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include a processor 601, a communication interface 602, a memory 603, and a communication bus 604. The processor 601, communication interface 602, and memory 603 communicate with each other via the communication bus 604. The processor 601 can call logical instructions in the memory 603 to execute a method for identifying out-of-distribution data. This method includes: acquiring data to be identified; inputting the data to be identified into a data recognition model to extract target data content corresponding to the data to be identified; and obtaining and outputting an identification result indicating that the data to be identified is out-of-distribution data based on the target data content. The data recognition model is trained using samples of the data to be identified and preset labels carried by the samples. The samples of the data to be identified are obtained by data decoupling and data augmentation of the original data samples.

[0200] Furthermore, the logical instructions in the aforementioned memory 603 can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this disclosure, essentially, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0201] On the other hand, this disclosure also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer is able to execute the out-of-distribution data identification method provided by the above methods. The method includes: acquiring data to be identified; inputting the data to be identified into a data identification model to extract target data content corresponding to the data to be identified; and obtaining and outputting an identification result indicating that the data to be identified is out-of-distribution data based on the target data content. The data identification model is trained using a sample of data to be identified and a preset label carried by the sample of data to be identified. The sample of data to be identified is obtained by data decoupling and data augmentation of the original data sample.

[0202] In another aspect, this disclosure also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned methods for identifying out-of-distribution data. The method includes: acquiring data to be identified; inputting the data to be identified into a data identification model to extract target data content corresponding to the data to be identified; and, based on the target data content, obtaining and outputting an identification result indicating that the data to be identified is out-of-distribution data. The data identification model is trained using a sample of data to be identified and preset labels carried by the sample. The sample of data to be identified is obtained by data decoupling and data augmentation of the original data sample.

[0203] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0204] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0205] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit them. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure.

Claims

1. A method for identifying out-of-distribution data, characterized in that, include: Acquire data to be identified, which includes image data collected during vehicle operation; Input the data to be identified into the data recognition model and extract the target data content corresponding to the data to be identified; Based on the target data content, an identification result is obtained and output to indicate that the data to be identified is out-of-distribution data, wherein the target data content includes the content of the object of interest in the image data; The data recognition model is trained using a data sample to be recognized and a preset label carried by the data sample to be recognized. The data sample to be identified is obtained by decoupling and augmenting the original data sample. The data samples to be identified include: a first out-of-distribution data sample and a second out-of-distribution data sample; Wherein, the first out-of-distribution data sample is: sample data with the same data content but different data style compared with the in-distribution data sample; the second out-of-distribution data sample is: sample data with different data content compared with the in-distribution data sample. After inputting the data to be identified into the data recognition model, the method further includes: Extract the target data style corresponding to the data to be identified; After extracting the target data content corresponding to the data to be identified, the method further includes: Determine the first category prediction result and the first domain prediction result corresponding to the target data content; Determine the second category prediction result and the second domain prediction result corresponding to the target data style; Based on the prediction results of the first category, the prediction results of the first domain, the prediction results of the second category, and the prediction results of the second domain, the correlation between the target data content and the target data style is removed.

2. The method for identifying out-of-distribution data according to claim 1, characterized in that, The step of obtaining and outputting an identification result based on the target data content to indicate that the data to be identified is out-of-distribution data includes: Determine the predicted classification result corresponding to the target data content; Compare the predicted classification results with the preset classification results; If it is determined that the predicted classification result does not belong to the preset classification result, an identification result is output to indicate that the data to be identified is out-of-distribution data.

3. The method for identifying out-of-distribution data according to claim 2, characterized in that, The training process of the data recognition model includes: Input the data sample to be identified into the data recognition model, extract the sample data content corresponding to the data sample to be identified, and output the predicted classification label corresponding to the sample data content; The consistency between the predicted classification label and the preset label is compared to obtain the first comparison result; Based on the first comparison result, the model parameters of the data recognition model are adjusted until the number of iterations reaches a preset value, at which point the training of the data recognition model is determined to be complete.

4. The method for identifying out-of-distribution data according to claim 3, characterized in that, The step of extracting the sample data content corresponding to the data sample to be identified includes: Extract the first sample data content corresponding to the first out-of-distribution data sample; Before adjusting the model parameters of the data recognition model based on the first comparison result, the method further includes: Extract the sample data pattern corresponding to the first out-of-distribution data sample; Reconstruct the sample data style and the first sample data content to obtain a third out-of-distribution data sample; By comparing the consistency between the first out-of-distribution data sample and the third out-of-distribution data sample, a second comparison result is obtained; After adjusting the model parameters of the data recognition model based on the first comparison result, the method further includes: Based on the second comparison result, the model parameters of the data recognition model are adjusted.

5. The method for identifying out-of-distribution data according to claim 4, characterized in that, After extracting the sample data pattern corresponding to the first out-of-distribution data sample, the method further includes: Determine the first category prediction result sample and the first domain prediction result sample corresponding to the content of the first sample data; Determine the second category prediction result sample and the second domain prediction result sample corresponding to the sample data pattern; Based on the first category prediction result sample, the first domain prediction result sample, the second category prediction result sample, and the second domain prediction result sample, the correlation between the first sample data content and the sample data style is removed.

6. The method for identifying out-of-distribution data according to claim 1 or 2, characterized in that, Before acquiring the data to be identified, the process also includes: Obtain the original data sample, which is data with the same content as the data sample in the distribution but different in data style; Extract the data content and data style to be processed corresponding to the original data sample; Data augmentation operations are performed on the data content and the data style to be processed, respectively, to obtain the first out-of-distribution data sample and the second out-of-distribution data sample.

7. The method for identifying out-of-distribution data according to claim 6, characterized in that, After extracting the data content and data style to be processed corresponding to the original data sample, the process further includes: Determine the first category result and the first domain result corresponding to the data content to be processed; Determine the second category result and the second domain result corresponding to the data style to be processed; Based on the results of the first category, the results of the first domain, the results of the second category, and the results of the second domain, the correlation between the data content to be processed and the data style to be processed is removed.

8. The method for identifying out-of-distribution data according to claim 6, characterized in that, The step of performing data augmentation operations on the data content and the data style to be processed, respectively, to obtain the first out-of-distribution data sample and the second out-of-distribution data sample includes: A positive data augmentation operation is performed on the data pattern to be processed, and the first out-of-distribution data sample is obtained while ensuring that the content of the data to be processed remains unchanged. A negative data augmentation operation is performed on the data to be processed to obtain the second out-of-distribution data sample.

9. The method for identifying out-of-distribution data according to claim 8, characterized in that, The step of performing positive data augmentation on the data pattern to be processed, and obtaining the first out-of-distribution data sample while ensuring that the content of the data to be processed remains unchanged, includes: Based on the original data sample and the model parameters of the data recognition model, perturbation data is obtained; If the content of the data to be processed remains unchanged, the first out-of-distribution data sample is obtained based on the perturbation data and the new data pattern.

10. The method for identifying out-of-distribution data according to claim 8, characterized in that, The step of performing negative data augmentation on the data to be processed to obtain the second out-of-distribution data sample includes: Based on the original data sample and the model parameters of the data recognition model, perturbation data is obtained; If the pattern of the data to be processed remains unchanged, the content of the data to be processed is modified based on the perturbation data to obtain the second out-of-distribution data sample.

11. A device for identifying out-of-distribution data, characterized in that, include: The acquisition module is used to acquire data to be identified, which includes image data collected during vehicle operation. The identification module is used to input the data to be identified into the data identification model and extract the target data content corresponding to the data to be identified; Based on the target data content, an identification result is obtained and output to indicate that the data to be identified is out-of-distribution data, wherein the target data content includes the content of the object of interest in the image data; The data recognition model is trained using a data sample to be recognized and a preset label carried by the data sample to be recognized. The data sample to be identified is obtained by decoupling and augmenting the original data sample. The data samples to be identified include: a first out-of-distribution data sample and a second out-of-distribution data sample; Wherein, the first out-of-distribution data sample is: sample data with the same data content but different data style compared with the in-distribution data sample; the second out-of-distribution data sample is: sample data with different data content compared with the in-distribution data sample. The identification module is also used for: Extract the target data style corresponding to the data to be identified; After extracting the target data content corresponding to the data to be identified, the method further includes: Determine the first category prediction result and the first domain prediction result corresponding to the target data content; Determine the second category prediction result and the second domain prediction result corresponding to the target data style; Based on the prediction results of the first category, the prediction results of the first domain, the prediction results of the second category, and the prediction results of the second domain, the correlation between the target data content and the target data style is removed.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for identifying out-of-distribution data as described in any one of claims 1 to 10.

13. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method for identifying out-of-distribution data as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Open set image recognition method based on self-supervised learning

    CN114627349A

  • Discriminant model training method, data processing method, device and equipment

    CN115392346A