Abnormal operator detection method and device, equipment, storage medium and program product
By acquiring the network layer output data of the target anomaly neural network for feature processing, and combining it with the output data of the baseline network, different feature algorithms and virtual three-dimensional spatial data models are used to construct segmented feature data. Anomaly operators are determined using a classification model, which solves the problems of accuracy and efficiency in anomaly operator detection in existing technologies and improves the accuracy in the training and inference process of neural networks.
Patent Information
- Application Number
- CN202410666145.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-11-28
AI Technical Summary
Existing technologies have low accuracy in detecting anomalous operators, making it difficult to quickly and accurately identify anomalous operators in neural networks.
By acquiring the network layer output data of the target anomaly neural network, performing feature processing, and combining it with the output data of the baseline network, different feature algorithms and virtual three-dimensional spatial data models are used to construct segmented feature data, and an anomaly operator is determined using a classification model.
It improves the accuracy and efficiency of anomaly operator detection, enabling rapid identification of anomaly operators in neural networks and ensuring the accuracy of neural network training and inference processes.
Smart Images

Figure CN121031702A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to an abnormal operator detection method and device, equipment, a storage medium and a program product. BACKGROUND
[0002] With the development of artificial intelligence technologies such as machine learning, a deep learning framework is increasingly valued as an operating system role in the artificial intelligence era. In order to ensure the accuracy requirements of a deep learning model in the training and prediction processes, the deep learning framework needs to provide operators with sufficient accuracy.
[0003] In the related art, in order to adapt to a specific hardware platform or improve performance, a custom operator usually needs to be written. However, when a network is constructed using the custom operator for training or inference, problems are inevitably encountered. In order to quickly repair the network, the operator needs to be detected to determine an abnormal operator.
[0004] However, in the related art, when the abnormal operator is detected, there is a technical problem of low detection accuracy. SUMMARY
[0005] Therefore, it is necessary to provide an abnormal operator detection method, device, equipment, storage medium and program product to improve the accuracy of abnormal operator detection.
[0006] In a first aspect, an embodiment of the present application provides an abnormal operator detection method, comprising:
[0007] obtaining network layer output data of a target abnormal neural network; the target abnormal neural network represents a neural network causing an abnormality due to an operator;
[0008] performing feature processing on the network layer output data to obtain network layer feature data of the network layer output data;
[0009] determining an abnormal operator in the target abnormal neural network according to the network layer output data and the network layer feature data.
[0010] In the abnormal operator detection method provided by the embodiments of the present application, the network layer output data of the target abnormal neural network is obtained, the target abnormal neural network represents a neural network that causes an abnormality due to an operator, then the network layer output data is processed to obtain network layer feature data of the network layer output data, and finally, the abnormal operator in the target abnormal neural network is determined according to the network layer output data and the network layer feature data. In the method, the network layer of the neural network includes an operator, and therefore, the data output by the network layer can directly represent whether the corresponding operator in the network layer has a problem. Therefore, when it is necessary to detect the abnormal operator of the target abnormal neural network, the output data of the network layer in the target abnormal neural network can be obtained, and then the network layer output data is processed, and the abnormal operator is determined according to the processed network output data. In other words, the abnormal operator is detected by obtaining the network layer output data that can directly represent whether the operator has a problem, and the accuracy of the abnormal operator detection is improved.
[0011] In one of the embodiments, the network layer output data of the target abnormal neural network is obtained, including:
[0012] Obtaining test data corresponding to the target abnormal neural network;
[0013] Inputting the test data into the target abnormal neural network to obtain data output by each network layer in the target abnormal neural network;
[0014] The data output by each network layer in the target abnormal neural network is determined as the network layer output data.
[0015] In the abnormal operator detection method provided by the embodiments of the present application, the test data corresponding to the target abnormal neural network is obtained, then the test data is input into the target abnormal neural network to obtain data output by each network layer in the target abnormal neural network, and finally, the data output by each network layer in the target abnormal neural network is determined as the network layer output data. In the method, an optional way of quickly obtaining the network layer output data is provided. The test data is input into the target abnormal neural network, each network layer in the target abnormal neural network calculates the test data and outputs the calculated data, the data output by each network layer is determined as the network layer output data, and thus the network layer output data is obtained, and the efficiency of obtaining the network layer output data is improved.
[0016] In one of the embodiments, the network layer output data is processed to obtain network layer feature data of the network layer output data, including:
[0017] Obtaining baseline network layer output data of a baseline network; the baseline network is a neural network with a higher network performance than the target abnormal neural network;
[0018] The difference feature data of the network layer output data and the baseline network layer output data under different feature algorithms is obtained.
[0019] The difference feature data under different feature algorithms is determined as the network layer feature data.
[0020] In the abnormal operator detection method provided by the embodiment, the baseline network layer output data of the baseline network is obtained, the baseline network is a neural network with higher network performance than the target abnormal neural network, then the difference feature data of the network layer output data and the baseline network layer output data under different feature algorithms is obtained by using different feature algorithms, and finally the difference feature data under different feature algorithms is determined as the network layer feature data. In the method, the baseline network layer output data of the baseline network is combined with the network layer output data of the target abnormal neural network for feature processing to obtain the network layer feature data, so that the network layer feature data can better represent the potential problems of the target abnormal neural network, and the accuracy of the abnormal operator determination is improved.
[0021] In one of the embodiments, before the difference feature data of the network layer output data and the baseline network layer output data under different feature algorithms is obtained by using different feature algorithms, the method further includes:
[0022] The abnormal data in the network layer output data and the baseline network layer output data is corrected.
[0023] In the abnormal operator detection method provided by the embodiment, before the difference feature data of the network layer output data and the baseline network layer output data under different feature algorithms is obtained by using different feature algorithms, the abnormal data in the network layer output data and the baseline network layer output data is corrected. In the method, the abnormal data in the network layer output data and the baseline network layer output data is corrected before the network layer feature data is obtained, then the network layer output data and the baseline network layer output data after the correction are processed for feature processing to obtain the network layer feature data, so that the obtained network layer feature data is more accurate, and the accuracy of the abnormal operator detection is improved.
[0024] In one of the embodiments, the abnormal operator in the target abnormal neural network is determined according to the network layer output data and the network layer feature data, including:
[0025] A virtual three-dimensional space data model is constructed according to the network layer output data and the network layer feature data.
[0026] The virtual three-dimensional space data model is processed in segments to obtain a plurality of segmented feature data; each segmented feature data includes data of a plurality of network layers.
[0027] Determine the abnormal operator in the target abnormal neural network according to the segmented feature data.
[0028] In the abnormal operator detection method provided by the embodiments of the application, a virtual three-dimensional space data model is constructed according to the network layer output data and the network layer feature data, and then the virtual three-dimensional space data model is segmented to obtain a plurality of segmented feature data, each of which includes data of a plurality of network layers. The abnormal operator in the target abnormal neural network is determined according to the segmented feature data. In this method, the network layer output data and the network layer feature data are segmented according to the virtual three-dimensional space data model constructed according to the network layer output data and the network layer feature data, and then the abnormal operator can be determined according to the plurality of segmented feature data obtained after the segmentation, thereby improving the detection efficiency of the abnormal operator.
[0029] In one of the embodiments, constructing a virtual three-dimensional space data model according to the network layer output data and the network layer feature data comprises:
[0030] Arranging each data in the network layer output data in the horizontal axis direction according to the execution order of each data in the target abnormal neural network;
[0031] Arranging each data in the network layer output data in the vertical axis direction according to the execution round of each data in the target abnormal neural network;
[0032] Arranging each data in the network feature data in the vertical axis direction according to the corresponding feature algorithm of each data in the network feature data to obtain the virtual three-dimensional space data model.
[0033] In the abnormal operator detection method provided by the embodiments of the application, each data in the network layer output data is arranged in the horizontal axis direction according to the execution order of each data in the target abnormal neural network, each data in the network layer output data is arranged in the vertical axis direction according to the execution round of each data in the target abnormal neural network, and each data in the network feature data is arranged in the vertical axis direction according to the corresponding feature algorithm of each data in the network feature data to obtain the virtual three-dimensional space data model. In this method, the network layer output data is input into the target abnormal neural network in different batches and different iteration numbers, and the network layer feature data is divided into different feature algorithms. Therefore, the network layer output data and the network layer feature data can be arranged in the horizontal axis, the vertical axis and the vertical axis of the three-dimensional space according to this attribute, and the virtual three-dimensional space data model can be obtained, thereby providing an optional way for quickly constructing the virtual three-dimensional space data model.
[0034] In one of the embodiments, the determining the abnormal operator in the target abnormal neural network according to the segmented feature data comprises:
[0035] The neural network model is trained by using the segmented feature data to obtain a classification model.
[0036] The segmented feature data is input into the classification model to obtain a feature classification result of the segmented feature data output by the classification model.
[0037] The abnormal operator is determined according to the feature classification result.
[0038] In the abnormal operator detection method provided by the embodiments, the neural network model is trained by using the segmented feature data to obtain a classification model, and then the segmented feature data is input into the classification model to obtain a feature classification result of the segmented feature data output by the classification model. Finally, the abnormal operator is determined according to the feature classification result. In this method, an optional way of quickly determining the abnormal operator is provided. After obtaining the segmented feature data, the neural network is trained by using the segmented feature data to obtain a classification model that can perform abnormal judgment on the network layer data in the segmented feature data. Then, the segmented feature data is input into the classification model to obtain a classification result. According to the classification result, the abnormal operator in the target abnormal neural network can be determined, and the efficiency of abnormal operator detection is improved.
[0039] In one of the embodiments, the determining the abnormal operator according to the feature classification result comprises:
[0040] The reference feature classification result of the reference segmented feature data of the segmented feature data is obtained.
[0041] The feature classification result is compared with the corresponding reference feature classification result to obtain the same abnormal network layer data existing between the feature classification result and the reference feature classification result.
[0042] The abnormal operator is determined according to the operator corresponding to the same abnormal network layer data.
[0043] In the abnormal operator detection method provided by the embodiments, the reference feature classification result of the reference segmented feature data of the segmented feature data is obtained, and then the feature classification result is compared with the corresponding reference feature classification result to obtain the same abnormal network layer data existing between the feature classification result and the reference feature classification result. Finally, the abnormal operator is determined according to the operator corresponding to the same abnormal network layer data. In this method, by introducing the reference segmented feature data, the abnormal operator can be determined by comparing the reference feature classification result of the reference segmented feature data with the feature classification result, and the efficiency of determining the abnormal operator is improved.
[0044] Secondly, embodiments of this application also provide an anomaly operator detection device, comprising:
[0045] The data acquisition module is used to acquire the network layer output data of the target abnormal neural network; the target abnormal neural network represents the neural network that causes anomalies due to operators;
[0046] The feature processing module is used to perform feature processing on the network layer output data to obtain the network layer feature data of the network layer output data;
[0047] The result determination module is used to determine the anomaly operators in the target anomaly neural network based on the network layer output data and network layer feature data.
[0048] Thirdly, embodiments of this application also provide a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in any of the embodiments of the first aspect described above.
[0049] Fourthly, embodiments of this application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps in any of the embodiments of the first aspect described above.
[0050] Fifthly, embodiments of this application also provide a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps in any of the embodiments of the first aspect described above.
[0051] The aforementioned anomaly operator detection method, apparatus, device, storage medium, and program product acquire network layer output data of a target anomalous neural network (representing a neural network where anomalies are caused by operators), then perform feature processing on the network layer output data to obtain network layer feature data. Finally, based on the network layer output data and network layer feature data, the anomalous operators in the target anomalous neural network are determined. In this method, because the network layers of the neural network contain operators, the network layer output data can directly characterize whether the corresponding operators in the network layer have problems. Thus, when it is necessary to detect anomalous operators in a target anomalous neural network, the output data of the network layers in the target anomalous neural network can be acquired, and after feature processing, the anomalous operators can be determined based on the feature-processed network output data. Essentially, by acquiring network layer output data that can directly characterize whether operators have problems, the accuracy of anomalous operator detection is improved. Attached Figure Description
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the accompanying drawings needed to be used in the embodiments or the related art description will be briefly introduced. Obviously, the accompanying drawings in the following description only represent some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative effort based on these drawings.
[0053] Figure 1 An internal structure diagram of a computer device in one embodiment;
[0054] Figure 2 A flowchart of an abnormal operator detection method in one embodiment;
[0055] Figure 3 A flowchart of obtaining network layer output data in one embodiment;
[0056] Figure 4 A flowchart of obtaining network layer feature data in one embodiment;
[0057] Figure 5 A flowchart of performing correction processing on data in one embodiment;
[0058] Figure 6 A flowchart of determining an abnormal operator in one embodiment;
[0059] Figure 7 A flowchart of constructing a virtual three-dimensional space data model in one embodiment;
[0060] Figure 8 A flowchart of determining an abnormal operator in another embodiment;
[0061] Figure 9 A flowchart of determining an abnormal operator in another embodiment;
[0062] Figure 10 A flowchart of an abnormal operator detection method in another embodiment;
[0063] Figure 11 A structural diagram of an abnormal operator detection device in one embodiment. DETAILED DESCRIPTION
[0064] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0065] The abnormal operator detection method provided by the embodiments of the present application can be applied to a computer device. The computer device can be a server, and an internal structure diagram of the computer device can be as shown in Figure 1 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store data. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement an abnormal operator detection method. Those skilled in the art can understand that Figure 1 the structure shown in the description is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0066] With the rapid development of artificial intelligence (AI) technology, deep learning frameworks are playing an increasingly important role as the operating system of the AI era. Quality assurance of deep learning frameworks is crucial to ensure correct predictions of deep learning models. In order to ensure the accuracy of deep learning models during training and prediction, deep learning frameworks need to provide operators with sufficient accuracy.
[0067] When using neural networks, custom operators are often needed to adapt to specific hardware platforms or improve performance. However, when using custom operators to build networks for training or inference, problems are inevitable. In order to quickly discover and locate these problems and fix the neural network, it is necessary to detect the operators to determine the abnormal operators.
[0068] In the related art, a method for detecting an operator is provided. The method comprises the following steps: obtaining a to-be-detected operator, inputting verification data into the to-be-detected operator to obtain a first result output by the to-be-detected operator, inputting the verification data into at least one reference operator corresponding to the to-be-detected operator to obtain a second result obtained by processing the verification data by the at least one reference operator, and detecting the to-be-detected operator according to the first result and the second result. The reference operator corresponding to the to-be-detected operator is determined, and the same verification data is input into the to-be-detected operator and the reference operator, so that the to-be-detected operator can be detected by comparing the obtained results.
[0069] The above method mainly focuses on the precision detection of a single operator. However, it is difficult to fully and sufficiently detect a single operator. When these insufficiently detected operators are applied to a neural network, errors may occur in the training and inference processes of the neural network. This situation often results from the input that may cause the calculation error of the operator in the training and inference stages of the neural network. For example, when the results of multiple operators with errors are superimposed, a large error may be generated, which eventually leads to an incorrect input.
[0070] Therefore, the present application provides an abnormal operator detection method. The method comprises the following steps: obtaining network layer output data of a target abnormal neural network, the target abnormal neural network representing a neural network in which an abnormal operator is caused, processing the network layer output data to obtain network layer feature data of the network layer output data, and determining an abnormal operator in the target abnormal neural network according to the network layer output data and the network layer feature data. In the method, the network layer of the neural network includes an operator, and the data output by the network layer can directly represent whether the corresponding operator in the network layer has a problem. Therefore, when the target abnormal neural network needs to be detected for an abnormal operator, the output data of the network layer in the target abnormal neural network can be obtained, and the network layer output data can be processed to determine the abnormal operator according to the processed network output data. In other words, the abnormal operator is detected by obtaining the network layer output data that can directly represent whether the operator has a problem, thereby improving the accuracy of the abnormal operator detection.
[0071] It should be noted that the beneficial effects or technical problems solved by the embodiments of the present application are not limited to the above, but also include other implicit or related problems. For details, please refer to the description of the following embodiments.
[0072] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0073] In one exemplary embodiment, as shown in Figure 2 , an abnormal operator detection method is provided, which is applied to a computer device in Figure 1 for example, and includes the following steps 201 to 203. Among them:
[0074] S201, obtaining network layer output data of a target abnormal neural network.
[0075] In the embodiments of the present application, the target abnormal neural network refers to a neural network that causes an abnormality due to an operator.
[0076] The operator in the neural network generally refers to the basic mathematical operation used in the network layer of the neural network, which can include linear layer, convolutional layer, pooling layer, recurrent layer, normalization layer, activation function, loss function, etc.
[0077] The network layer output data is the data output by each network layer of the target abnormal neural network. When training or inference is performed using the target abnormal neural network, the training data is input into the target abnormal neural network, and each network layer in the target abnormal neural network will calculate the training data based on the operator therein, and then the data output by each network layer can be obtained.
[0078] In one embodiment, the data output by each network layer when the target abnormal neural network is trained in a historical time period can be obtained as the network layer output data. Alternatively, the data output by each network layer when the target abnormal neural network is inferred in a historical time period can also be obtained as the network layer output data. In addition, the data output by each network layer when the target abnormal neural network is trained in a historical time period and the data output by each network layer when the target abnormal neural network is inferred in a historical time period can also be obtained as the network layer output data.
[0079] In another embodiment, the test data required for accurately detecting the abnormal operator in the target abnormal neural network can be obtained in advance, and then the test data can be input into the target abnormal neural network to obtain the network layer output data of the target abnormal neural network.
[0080] S202, performing feature processing on the network layer output data to obtain network layer feature data of the network layer output data.
[0081] After obtaining the network layer output data of the target abnormal neural network, the network layer output data needs to be processed to determine the abnormal operator according to the processed network layer output data.
[0082] In one embodiment, a feature processing algorithm can be used to process the network layer output data to obtain network layer feature data of the network layer output data.
[0083] In another embodiment, in order to highlight the features of the network layer output data and make it more representative of the potential problems of the target abnormal neural network, a neural network with higher performance than the target abnormal neural network can be introduced to obtain network layer feature data of the network layer output data by combining the network layer output data of the neural network with higher performance and the network layer output data of the target abnormal neural network.
[0084] S203, determining the abnormal operator in the target abnormal neural network according to the network layer output data and the network layer feature data.
[0085] After obtaining the network layer feature data, the abnormal operator in the target abnormal neural network is determined according to the network layer output data and the network layer feature data.
[0086] In one embodiment, the network layer output data and the network layer feature data can be used to train the neural network to obtain an abnormal operator identification model, and then the trained abnormal operator identification model is used to analyze the network layer output data and the network layer feature data to identify the abnormal network layer data, and finally the operator corresponding to the abnormal network layer data is determined as the abnormal operator.
[0087] For example, the network layer output data and the network layer feature data can be divided into training set and test set, and then the training set is used to train the preset neural network to obtain an initial abnormal operator identification model, and then the initial abnormal operator identification model is tested according to the test set, if the test is passed, the initial abnormal operator identification model is determined as the abnormal operator identification model, if the test is not passed, the initial abnormal operator identification model is continuously trained until the test is passed, and the abnormal operator identification model is obtained.
[0088] Further, after obtaining the trained abnormal operator identification model, the network layer output data and the network layer feature data can be input into the abnormal operator identification model, and the abnormal network layer data is output by the abnormal operator identification model, and the operator corresponding to the abnormal network layer data is determined as the abnormal operator.
[0089] In the method for detecting an abnormal operator provided by the embodiments of the present application, network layer output data of a target abnormal neural network is obtained, the target abnormal neural network represents a neural network that causes an abnormality due to an operator, and then feature processing is performed on the network layer output data to obtain network layer feature data of the network layer output data. Finally, an abnormal operator in the target abnormal neural network is determined according to the network layer output data and the network layer feature data. In the method, the network layer of the neural network includes an operator, and therefore the data output by the network layer can directly represent whether the corresponding operator in the network layer has a problem. Therefore, when it is necessary to detect an abnormal operator in the target abnormal neural network, the output data of the network layer in the target abnormal neural network can be obtained, and then the network layer output data is processed to determine the abnormal operator according to the processed network output data. In other words, the detection of the abnormal operator is performed by obtaining the network layer output data that can directly represent whether the operator has a problem, thereby improving the accuracy of the detection of the abnormal operator.
[0090] When the network layer output data is obtained, the preset test data can be input into the target abnormal neural network. Based on this, one of the embodiments will be described below.
[0091] In one exemplary embodiment, as shown in Figure 3 The network layer output data of the target abnormal neural network is obtained, including:
[0092] In S301, test data corresponding to the target abnormal neural network is obtained.
[0093] In one embodiment, the data can be obtained from multiple different sources, and then the data obtained from the multiple different sources is fused to obtain the test data.
[0094] For example, the same field data can be obtained from different search engines, and then the data obtained from the different search engines is fused to obtain the test data. The search engines can include, but are not limited to, Baidu search, Google search, 360 comprehensive search, etc. The same field can include the financial field, the medical field, the speech recognition field, etc.
[0095] In another embodiment, the historical training data of other neural networks can be obtained, and the historical training data is determined as the test data corresponding to the target abnormal neural network. For example, in a historical time, training data in a certain field is used to train other neural networks, and these training data are stored in a database. When the test data corresponding to the target abnormal neural network is obtained, the historical training data used by other neural networks can be obtained from the database, and the historical training data is determined as the test data corresponding to the target abnormal neural network.
[0096] S302, input the test data into the target abnormal neural network to obtain data output by each network layer in the target abnormal neural network.
[0097] After obtaining the test data of the target abnormal neural network, the test data is input into the target abnormal neural network. After each network layer in the target abnormal neural network calculates the test data, the calculated data is output, and the data output by each network layer in the target abnormal neural network is obtained.
[0098] It should be noted that when the test data is input into the target abnormal neural network, it is performed in different batches, rather than all test data is input into the target abnormal neural network at one time. That is, after obtaining the test data, the test data can be divided into batches, and then the test data in different batches is input into the target abnormal neural network to obtain the data output by each network layer in the target abnormal neural network.
[0099] In addition, in the embodiment of the present application, when the test data is input into the target abnormal neural network, it can be input in the process of multiple iterations of training, or in the process of multiple inferences, or in the process of multiple iterations of training and multiple inferences. That is, the network layer output data can be the data output by each network layer in the process of multiple iterations of training, or the data output by each network layer in the process of multiple inferences, or the data output by each network layer in the process of multiple iterations of training and multiple inferences.
[0100] S303, determine the data output by each network layer in the target abnormal neural network as the network layer output data.
[0101] After obtaining the data output by each network layer in the target abnormal neural network, the data output by each network layer in the target abnormal neural network is determined as the network layer output data.
[0102] In the abnormal operator detection method provided by the embodiment of the present application, the test data corresponding to the target abnormal neural network is obtained, and then the test data is input into the target abnormal neural network to obtain the data output by each network layer in the target abnormal neural network. Finally, the data output by each network layer in the target abnormal neural network is determined as the network layer output data. In this method, an optional way of quickly obtaining network layer output data is provided. By inputting the preset test data into the target abnormal neural network, each network layer in the target abnormal neural network will calculate the test data and output the calculated data. The data output by each network layer is determined as the network layer output data, and the network layer output data is obtained, which improves the efficiency of obtaining the network layer output data.
[0103] In order to more accurately determine the abnormal operator, when the network layer output data is processed, the network layer feature data can be obtained by combining the data whose baseline network output is higher than the network performance of the target abnormal neural network. Based on this, the following embodiment describes the method of obtaining network layer feature data.
[0104] In an exemplary embodiment, as shown in Figure 4 The network layer output data is processed to obtain network layer feature data of the network layer output data, including:
[0105] S401, obtaining baseline network layer output data of the baseline network.
[0106] In the embodiment of the application, the baseline network is a neural network whose network performance is higher than that of the target abnormal neural network. The operators included in the baseline network are the same as those in the target abnormal neural network, but the operators in the baseline network are all normal operators.
[0107] The network layer output data of the target abnormal neural network is obtained by inputting the test data into the target abnormal neural network. In order to improve the accuracy of subsequent determination of abnormal operators, the baseline network layer output data also needs to be obtained by inputting the test data into the baseline network. The test data here refers to the same data as the test data of the target abnormal neural network.
[0108] For example, the test data corresponding to the target abnormal neural network is obtained, and then the test data is input into the baseline network to obtain the data output by each network layer in the baseline network, and finally the data output by each network layer in the baseline network is determined as the baseline network layer output data. Wherein, the process of inputting the test data into the baseline network is the same as the process of inputting the test data into the target abnormal neural network, including inputting the test data in batches, and inputting the test data in the process of multiple iteration training / multiple inference.
[0109] S402, using different feature algorithms to obtain difference feature data of the network layer output data and the baseline network layer output data under different feature algorithms.
[0110] When the network layer output data is processed, a variety of different feature algorithms can be used to process it to obtain network layer feature data.
[0111] As described above, when the network layer output data and the baseline network layer output data are obtained, the test data is input into the target abnormal neural network and the baseline network in batches, and the data output from the target abnormal neural network and the baseline network is also in batches. Before feature processing, the data output from each network layer of the target abnormal neural network and the baseline network needs to be averaged in the batch dimension, that is, the mean value of the data output from each network layer of different batches is calculated to obtain the network layer mean value data and the baseline network layer mean value data. Wherein, the mean value of the data output from each network layer of different batches can be calculated according to the following formula (1).
[0112] (1)
[0113] Wherein, N is the total number of data output from each network layer of a batch; j and k are the row number and column number of the data.
[0114] After the mean value of the data output from each network layer of different batches is calculated to obtain the network layer mean value data and the baseline network layer mean value data, different feature algorithms are used to calculate the network layer mean value data and the baseline network layer mean value data to obtain the difference feature data under different feature algorithms. Wherein, the feature algorithm can include but is not limited to KL divergence, cosine similarity, mean square error, etc.
[0115] S403, the difference feature data under different feature algorithms is determined as the network layer feature data.
[0116] After obtaining the difference feature data under different feature algorithms, the difference feature data under different feature algorithms is determined as the network layer feature data.
[0117] In the abnormal operator detection method provided by the embodiment of the application, the baseline network layer output data of the baseline network is obtained, the baseline network is a neural network with higher network performance than the target abnormal neural network, and then different feature algorithms are used to obtain the difference feature data of the network layer output data and the baseline network layer output data under different feature algorithms, and finally the difference feature data under different feature algorithms is determined as the network layer feature data. In this method, by introducing the baseline network, the baseline network layer output data of the baseline network is combined with the network layer output data of the target abnormal neural network for feature processing to obtain the network layer feature data, so that the network layer feature data can better represent the potential problems of the target abnormal neural network, and the accuracy of the abnormal operator determination is improved.
[0118] Before obtaining the network layer feature data, the network layer output data and the baseline network layer output data can also be processed for abnormal data to further improve the accuracy of abnormal operator detection. Based on this, in one exemplary embodiment, as Figure 5As shown, before acquiring the difference feature data of the network layer output data and the baseline network layer output data under different feature algorithms by using different feature algorithms, the method further includes:
[0119] S501, correcting the abnormal data in the network layer output data and the baseline network layer output data.
[0120] It can be understood that after the test data is input into the target abnormal neural network and the baseline network, there may be abnormal data in the data output by each network layer, that is, there may be some abnormal data in the network layer output data and the baseline network layer output data. In order to improve the accuracy of the abnormal operator detection, the abnormal data in the network layer output data and the baseline network layer output data can be processed, and then feature processing is performed to obtain more accurate network layer feature data.
[0121] In the embodiment of the application, the correction processing of the abnormal data in the network layer output data and the baseline network layer output data is mainly filling. When filling, a plurality of different ways can be used, for example, mean sampling or Gaussian distribution sampling can be performed, and then the abnormal data in the network layer output data and the baseline network layer output data is restored, that is, the abnormal data is restored to normal data.
[0122] In the abnormal operator detection method provided by the embodiment of the application, before acquiring the difference feature data of the network layer output data and the baseline network layer output data under different feature algorithms by using different feature algorithms, the abnormal data in the network layer output data and the baseline network layer output data is corrected. In the method, the abnormal data in the network layer output data and the baseline network layer output data is corrected before acquiring the network layer feature data, and then the network layer output data and the baseline network layer output data after the correction processing are processed to obtain the network layer feature data, so that the obtained network layer feature data is more accurate, and the accuracy of the abnormal operator detection is improved.
[0123] After obtaining the network layer feature data, the network layer feature data and the network layer output data can be preprocessed, and then the data after preprocessing is used to determine the abnormal operator. Based on this, in the following embodiment, the way of determining the abnormal operator is described.
[0124] In an exemplary embodiment, as shown, Figure 6 According to the network layer output data and the network layer feature data, the abnormal operator in the target abnormal neural network is determined, including:
[0125] S601, constructing a virtual three-dimensional space data model according to the network layer output data and the network layer feature data.
[0126] Among them, the virtual three-dimensional spatial data model refers to the data model obtained by arranging the network layer output data and network layer feature data according to a preset arrangement.
[0127] As mentioned earlier, the network layer output data is divided into different batches and different iteration numbers, while the network layer feature data is obtained under different feature algorithms. Therefore, the network layer output data can be arranged according to different batches and different iteration numbers, and the network layer feature data can be arranged according to different feature algorithms to obtain a virtual three-dimensional space data model.
[0128] S602 performs segmentation processing on the virtual three-dimensional spatial data model to obtain multiple segmented feature data.
[0129] In this embodiment of the application, each segment feature data includes data from multiple network layers.
[0130] After obtaining the virtual 3D spatial data model, the virtual 3D spatial data model can be segmented to divide the data in the virtual 3D spatial data model into multiple segments, resulting in multiple segmented feature data. When segmenting, it is necessary to divide the data into segments according to the data of multiple network layers. That is, each segmented feature data obtained must include data from multiple network layers.
[0131] For example, a virtual 3D spatial data model is composed of three-dimensional coordinates. Taking the coordinates as an example, the x-axis ranges from 0 to 10, the y-axis from 0 to 20, and the ordinate from 0 to 30. The virtual 3D spatial data model can be segmented according to the coordinates of each axis, thus achieving segmentation processing and obtaining multiple segmented feature data. For example, along the x-axis, the virtual 3D spatial data model can be segmented according to coordinates such as 0~2, 1~3, 2~5, 3~5, 4~8, 6~9, 7~10, and 4~7, obtaining multiple segmented feature data. Similarly, the y-axis and z-axis can also be segmented to obtain multiple segmented feature data. These segmented feature data obtained from segmentation along different axes are then identified as multiple segmented feature data sets. The position for segmentation can be arbitrarily set and is not specifically limited here.
[0132] S603, determine the anomaly operator in the target anomaly neural network based on the feature data of each segment.
[0133] For example, after obtaining the feature data of each segment, the feature data of each segment can be input into a preset anomaly operator detection model, and the anomaly operator detection model outputs the anomaly operator in the target anomaly neural network.
[0134] In the method for detecting abnormal operators provided in the embodiments of the present application, a virtual three-dimensional space data model is constructed according to the network layer output data and the network layer feature data, and then the virtual three-dimensional space data model is processed in segments to obtain a plurality of segmented feature data, each of which includes data of a plurality of network layers, and the abnormal operators in the target abnormal neural network are determined according to the segmented feature data. In the method, the network layer output data and the network layer feature data are arranged in the three-dimensional space according to different attributes of the network layer output data and the network layer feature data to construct the virtual three-dimensional space data model, so that the network layer output data and the network layer feature data can be processed in segments, and then the abnormal operators can be determined according to the plurality of segmented feature data obtained after the processing in segments, thereby improving the detection efficiency of the abnormal operators.
[0135] According to different attributes of the network layer output data and the network layer feature data, the network layer output data and the network layer feature data are arranged in the three-dimensional space to construct the virtual three-dimensional space data model. Based on this, the following embodiment describes the way of constructing the virtual three-dimensional space data model.
[0136] In an exemplary embodiment, as shown in FIG. 7, constructing the virtual three-dimensional space data model according to the network layer output data and the network layer feature data includes: Figure 7
[0137] S701, arranging each data in the network layer output data in the horizontal axis direction according to the execution order of each data in the target abnormal neural network.
[0138] As mentioned earlier, the network layer output data is in batches, that is, the execution order (input order) of the network layer output data in the target abnormal neural network is different.
[0139] For example, the network layer output data of different batches can be arranged in the horizontal axis direction according to the execution order of each data in the target abnormal neural network.
[0140] S702, arranging each data in the network layer output data in the vertical axis direction according to the execution round of each data in the target abnormal neural network.
[0141] As mentioned earlier, the network layer output data is also input in multiple iterations, that is, the network layer output data is in iterations, that is, the execution round (iteration number) of the network layer output data in the target abnormal neural network is different.
[0142] For example, the network layer output data of different iterations can be arranged in the vertical axis direction according to the execution round of each data in the target abnormal neural network.
[0143] S703, arranging each data in the network feature data in the vertical axis direction according to the feature algorithm corresponding to each data in the network feature data, to obtain a virtual three-dimensional space data model.
[0144] As described above, the network layer feature data is obtained under different feature processing algorithms, that is, the network layer feature data is divided according to different feature algorithms, and different network layer feature data corresponds to different feature algorithms.
[0145] For example, the network layer feature data obtained by different feature algorithms can be arranged in the vertical axis direction according to the corresponding feature algorithm.
[0146] Further, after arranging the network layer output data and the network layer feature data in the horizontal axis, the vertical axis and the vertical axis directions of the three-dimensional space, the virtual three-dimensional space data model can be obtained.
[0147] In the abnormal operator detection method provided by the embodiment of the application, each data in the network layer output data is arranged in the horizontal axis direction according to the execution order of each data in the network layer output data in the target abnormal neural network, each data in the network layer output data is arranged in the vertical axis direction according to the execution round of each data in the network layer output data in the target abnormal neural network, and each data in the network feature data is arranged in the vertical axis direction according to the feature algorithm corresponding to each data in the network feature data, to obtain a virtual three-dimensional space data model. In this method, the network layer output data is obtained by inputting different batches and different iteration numbers into the target abnormal neural network, and the network layer feature data is divided according to different feature algorithms. Therefore, according to this attribute, the network layer output data and the network layer feature data can be arranged in the horizontal axis, the vertical axis and the vertical axis directions of the three-dimensional space, and the virtual three-dimensional space data model can be obtained, which provides an optional way for quickly constructing the virtual three-dimensional space data model.
[0148] After obtaining the plurality of segmented feature data, the neural network can be trained according to each segmented feature data to obtain a classification model that can perform abnormal judgment on each network layer data in the segmented feature data, and then the abnormal operator in the target abnormal neural network is determined based on the classification model. Based on this, the next embodiment will describe the way of determining the abnormal operator.
[0149] In an exemplary embodiment, as shown in Figure 8 the abnormal operator in the target abnormal neural network is determined according to each segmented feature data, including:
[0150] S801, performing neural network model training by using each segmented feature data to obtain a classification model.
[0151] Exemplarily, after obtaining the segmented feature data, the segmented feature data can be input into a preset neural network model for training to obtain a classification model.
[0152] The preset neural network model can include, but is not limited to, a fully connected neural network, a convolutional neural network, a feedback neural network, a recurrent neural network, etc.
[0153] S802, inputting the segmented feature data into the classification model to obtain a feature classification result of the segmented feature data output by the classification model.
[0154] After the classification model is trained, the segmented feature data is input into the classification model respectively, and the classification model can analyze the input segmented feature data and output a feature classification result of the segmented feature data.
[0155] The feature classification result refers to a classification result of whether the data of the network layer in the segmented feature data is abnormal. For any segmented feature data, if the data of each network layer included in the segmented feature data is analyzed by the classification model, it is found that the data of a certain network layer in the segmented feature data is abnormal, then the feature classification result is output as the segmented feature data is abnormal, otherwise, the segmented feature data is normal.
[0156] S803, determining an abnormal operator according to the feature classification results.
[0157] After obtaining the feature classification results of the segmented feature data, the feature classification results of the segmented feature data can be compared respectively to determine the abnormal operator.
[0158] In the abnormal operator detection method provided by the embodiment, the neural network model is trained by using the segmented feature data to obtain a classification model, then the segmented feature data is input into the classification model to obtain a feature classification result of the segmented feature data output by the classification model, and finally the abnormal operator is determined according to the feature classification results. In this method, an optional way of quickly determining the abnormal operator is provided. After obtaining the segmented feature data, the neural network is trained by using the segmented feature data to obtain a classification model that can judge the abnormality of the data of each network layer in the segmented feature data, then the segmented feature data is input into the classification model to obtain a classification result, and the abnormal operator in the target abnormal neural network is determined according to the classification result, thereby improving the efficiency of abnormal operator detection.
[0159] After obtaining the feature classification results corresponding to the segmented feature data, the feature classification results are compared with the corresponding reference feature classification results to determine the abnormal operator. Based on this, the next embodiment describes a way of determining the abnormal operator.
[0160] In one example embodiment, as shown in Figure 9 According to the feature classification result, the abnormal operator is determined, including:
[0161] S901, obtaining the reference feature classification result of the reference segment feature data of each segment feature data.
[0162] In the embodiment of the application, for any segment feature data, the reference segment feature data of the segment feature data refers to the segment feature data including any network layer data in the segment feature data. For example, a certain segment feature data includes network layers 1, 2 and 3, and the reference segment feature data includes one or more network layers in the network layers 1, 2 and 3, such as the network layers included in the reference segment feature data can be 3, 4 and 5 layers, that is, the data of the same network layer 3 is included in the segment feature data and the reference segment feature data.
[0163] For example, each network layer included in each segment feature data can be obtained, and then for any segment feature data, the network layers in the segment feature data are compared with the network layers in other segment feature data, if one of the network layers in a certain other segment feature data is the same as a certain network layer in the segment feature data, the other segment feature data is determined as the reference segment feature data, and the feature classification result of the other segment feature data is determined as the reference feature classification result. The reference segment feature data can be one or more, that is, the reference feature classification result can be one or more.
[0164] S902, comparing each feature classification result with the corresponding reference feature classification result, and obtaining the same abnormal network layer data existing between each feature classification result and each reference feature classification result.
[0165] For example, for any feature classification result, the feature classification result is compared with the corresponding reference feature classification result, and the same abnormal network layer data existing between the feature classification result and the corresponding reference feature classification result is obtained.
[0166] For example, a certain feature classification result is abnormal, and the corresponding segment feature data includes data of network layers 1, 2 and 3, the corresponding reference segment feature data includes data of network layers 3, 4 and 5, and the reference feature classification result of the reference segment feature data is abnormal, then the two can be compared, and the same abnormal network layer data is the data of network layer 3.
[0167] S903, determining the abnormal operator according to the operator corresponding to the same abnormal network layer data.
[0168] After obtaining the same abnormal network layer data, the operator corresponding to the same abnormal network layer data is determined as an abnormal operator.
[0169] In the abnormal operator detection method provided by the embodiment of the application, the reference feature classification result of the reference segment feature data of each segment feature data is obtained, and then each feature classification result is compared with the corresponding reference feature classification result to obtain the same abnormal network layer data existing between each feature classification result and each reference feature classification result, and finally the abnormal operator is determined according to the operator corresponding to the same abnormal network layer data. In the method, the reference segment feature data is introduced, and the abnormal operator is determined by comparing the reference feature classification result of the reference segment feature data with each feature classification result, thereby improving the efficiency of determining the abnormal operator.
[0170] In addition, in an exemplary embodiment, the application also provides an optional example of an abnormal operator detection method, as shown in Figure 10 may include the following steps:
[0171] S1001, obtaining test data corresponding to a target abnormal neural network.
[0172] S1002, inputting the test data into the target abnormal neural network to obtain data output by each network layer in the target abnormal neural network.
[0173] S1003, determining the data output by each network layer in the target abnormal neural network as network layer output data.
[0174] S1004, obtaining baseline network layer output data of a baseline network.
[0175] The baseline network is a neural network with higher network performance than the target abnormal neural network.
[0176] S1005, obtaining difference feature data of the network layer output data and the baseline network layer output data under different feature algorithms by using different feature algorithms.
[0177] S1006, determining the difference feature data under different feature algorithms as network layer feature data.
[0178] S1007, constructing a virtual three-dimensional space data model according to the network layer output data and the network layer feature data.
[0179] S1008, segmenting the virtual three-dimensional space data model to obtain a plurality of segment feature data.
[0180] Each segment feature data includes data of a plurality of network layers.
[0181] S1009, determining an abnormal operator in the target abnormal neural network according to the segmented feature data.
[0182] Optionally, the segmented feature data is used for neural network model training to obtain a classification model; the segmented feature data is input into the classification model to obtain feature classification results of the segmented feature data output by the classification model; reference feature classification results of reference segmented feature data of the segmented feature data are obtained; the feature classification results are compared with the corresponding reference feature classification results to obtain same abnormal network layer data existing between the feature classification results and the reference feature classification results; and the abnormal operator is determined according to the operator corresponding to the same abnormal network layer data.
[0183] The processes of S1001-S1009 can refer to the descriptions of the method embodiments, and have similar implementation principles and technical effects, which will not be described here.
[0184] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps has no strict sequence limitation, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.
[0185] Based on the same inventive concept, the embodiments of the present application also provide an abnormal operator detection device for implementing the above-mentioned abnormal operator detection method. The implementation scheme of the device for solving the problem is similar to the implementation scheme described in the above method, so the specific limitations in one or more abnormal operator detection device embodiments provided below can refer to the limitations of the abnormal operator detection method in the above, which will not be described here.
[0186] In one exemplary embodiment, as shown in Figure 11 An abnormal operator detection device 1 is provided, which includes a data acquisition module 10, a feature processing module 20, and a result determination module 30, wherein:
[0187] The data acquisition module 10 is configured to acquire network layer output data of a target abnormal neural network; the target abnormal neural network represents a neural network that causes an abnormality due to an operator;
[0188] The feature processing module 20 is configured to perform feature processing on the network layer output data to obtain network layer feature data of the network layer output data.
[0189] The result determination module 30 is configured to determine the abnormal operator in the target abnormal neural network according to the network layer output data and the network layer feature data.
[0190] In one of the embodiments, the data acquisition module 10 is further configured to:
[0191] acquire test data corresponding to the target abnormal neural network, input the test data into the target abnormal neural network to obtain data output by each network layer of the target abnormal neural network, and determine the data output by each network layer of the target abnormal neural network as the network layer output data.
[0192] In one of the embodiments, the feature processing module 20 is further configured to:
[0193] acquire baseline network layer output data of a baseline network, the baseline network being a neural network with higher network performance than the target abnormal neural network, acquire difference feature data of the network layer output data and the baseline network layer output data under different feature algorithms by using different feature algorithms, and determine the difference feature data under the different feature algorithms as the network layer feature data.
[0194] In one of the embodiments, the abnormal operator detection device 1 further comprises:
[0195] a correction processing module configured to perform correction processing on abnormal data in the network layer output data and the baseline network layer output data.
[0196] In one of the embodiments, the result determination module 30 is further configured to:
[0197] construct a virtual three-dimensional space data model according to the network layer output data and the network layer feature data, perform segmentation processing on the virtual three-dimensional space data model to obtain a plurality of segmented feature data, each of the segmented feature data including data of a plurality of network layers, and determine the abnormal operator in the target abnormal neural network according to the segmented feature data.
[0198] In one of the embodiments, the result determination module 30 is further configured to:
[0199] The data in the network layer output data are arranged in the horizontal axis direction according to the execution sequence of the data in the target abnormal neural network; the data in the network layer output data are arranged in the vertical axis direction according to the execution round of the data in the target abnormal neural network; and the data in the network feature data are arranged in the vertical axis direction according to the corresponding feature algorithm of the data, so as to obtain a virtual three-dimensional space data model.
[0200] In one of the embodiments, the result determining module 30 is further configured to:
[0201] The neural network model is trained by using the segmented feature data, so as to obtain a classification model; the segmented feature data are input into the classification model, so as to obtain the feature classification results of the segmented feature data output by the classification model; and the abnormal operator is determined according to the feature classification results.
[0202] In one of the embodiments, the result determining module 30 is further configured to:
[0203] The reference feature classification results of the reference segmented feature data of the segmented feature data are obtained; the feature classification results are compared with the corresponding reference feature classification results, so as to obtain the same abnormal network layer data existing between the feature classification results and the reference feature classification results; and the abnormal operator is determined according to the operator corresponding to the same abnormal network layer data.
[0204] The modules in the abnormal operator detection apparatus can be realized by software, hardware and combinations thereof in whole or in part. The modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the modules.
[0205] In one of the embodiments, a computer device is provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0206] The network layer output data of a target abnormal neural network are obtained; the target abnormal neural network represents a neural network in which an abnormality is caused by an operator;
[0207] The network layer output data are processed to obtain network layer feature data of the network layer output data;
[0208] The abnormal operator in the target abnormal neural network is determined according to the network layer output data and the network layer feature data.
[0209] The steps implemented by the processor in the embodiments have similar principles and technical effects to those of the above-described abnormal operator detection method, and thus will not be described herein.
[0210] In one embodiment, a computer readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, implements the following steps:
[0211] obtaining network layer output data of a target abnormal neural network; the target abnormal neural network represents a neural network causing an abnormality due to an operator;
[0212] performing feature processing on the network layer output data to obtain network layer feature data of the network layer output data;
[0213] determining an abnormal operator in the target abnormal neural network according to the network layer output data and the network layer feature data.
[0214] The steps implemented by the computer program executed by the processor in the embodiments of the present application have similar principles and technical effects to those of the above abnormal operator detection method, and thus will not be described here.
[0215] In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the following steps:
[0216] obtaining network layer output data of a target abnormal neural network; the target abnormal neural network represents a neural network causing an abnormality due to an operator;
[0217] performing feature processing on the network layer output data to obtain network layer feature data of the network layer output data;
[0218] determining an abnormal operator in the target abnormal neural network according to the network layer output data and the network layer feature data.
[0219] The steps implemented by the computer program executed by the processor in the embodiments of the present application have similar principles and technical effects to those of the above abnormal operator detection method, and thus will not be described here.
[0220] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0221] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0222] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0223] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. An anomaly operator detection method, characterized in that, The method includes: Obtain the network layer output data of the target abnormal neural network; the target abnormal neural network represents a neural network whose abnormality is caused by an operator; The network layer output data is subjected to feature processing to obtain the network layer feature data of the network layer output data; Based on the network layer output data and the network layer feature data, the anomaly operator in the target anomaly neural network is determined.
2. The method according to claim 1, characterized in that, The acquisition of network layer output data of the target abnormal neural network includes: Obtain the test data corresponding to the target abnormal neural network; The test data is input into the target anomaly neural network to obtain the data output by each network layer in the target anomaly neural network; The data output by each network layer in the target anomaly neural network is determined as the network layer output data.
3. The method according to claim 1 or 2, characterized in that, The step of performing feature processing on the network layer output data to obtain network layer feature data of the network layer output data includes: Obtain the baseline network layer output data of the baseline network; the baseline network is a neural network whose network performance is higher than that of the target abnormal neural network; Different feature algorithms are used to obtain the difference feature data between the network layer output data and the baseline network layer output data under different feature algorithms; The difference feature data under the different feature algorithms are determined as the network layer feature data.
4. The method according to claim 3, characterized in that, Before employing different feature algorithms to obtain the difference feature data between the network layer output data and the baseline network layer output data under different feature algorithms, the method further includes: Abnormal data in the network layer output data and the baseline network layer output data are corrected.
5. The method according to claim 1 or 2, characterized in that, The step of determining the anomaly operator in the target anomaly neural network based on the network layer output data and the network layer feature data includes: A virtual three-dimensional spatial data model is constructed based on the network layer output data and the network layer feature data. The virtual three-dimensional spatial data model is segmented to obtain multiple segmented feature data; each segmented feature data includes data from multiple network layers. The anomaly operator in the target anomaly neural network is determined based on the segmented feature data.
6. The method according to claim 5, characterized in that, The step of constructing a virtual three-dimensional spatial data model based on the network layer output data and the network layer feature data includes: Arrange the data in the network layer output data in the horizontal axis according to the execution order of each data in the target abnormal neural network; Arrange the data in the network layer output data along the vertical axis according to the execution round of each data in the target abnormal neural network; According to the feature algorithm corresponding to each data in the network feature data, the data in the network feature data are arranged in the vertical direction to obtain the virtual three-dimensional space data model.
7. The method according to claim 5, characterized in that, The step of determining the anomaly operator in the target anomaly neural network based on each of the segmented feature data includes: The segmented feature data described above are used to train a neural network model to obtain a classification model. Each segmented feature data is input into the classification model to obtain the feature classification result of each segmented feature data output by the classification model; The anomaly operator is determined based on the classification results of each feature.
8. The method according to claim 7, characterized in that, The step of determining the anomaly operator based on the classification results of each feature includes: Obtain the reference feature classification result of the reference segment feature data for each of the segmented feature data; The classification results of each feature are compared with the corresponding reference feature classification results to obtain the network layer data with the same abnormality between each feature classification result and each reference feature classification result. The anomaly operator is determined based on the operator corresponding to the same abnormal network layer data.
9. An anomaly operator detection device, characterized in that, The device includes: The data acquisition module is used to acquire the network layer output data of the target abnormal neural network; the target abnormal neural network represents a neural network that causes anomalies due to operators; The feature processing module is used to perform feature processing on the network layer output data to obtain network layer feature data of the network layer output data; The result determination module is used to determine the anomaly operator in the target anomaly neural network based on the network layer output data and the network layer feature data.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.