Anomaly detection apparatus and anomaly detection method
The anomaly detection device improves regression analysis accuracy by converting continuous labels to discrete variables and calculating anomaly degrees, addressing over-detection and data drift issues.
Patent Information
- Application Number
- JP2023078407
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2024-11-21
AI Technical Summary
Existing anomaly detection methods in predictive models, particularly for regression analysis, fail to accurately identify anomalies due to data drift and lack confidence measures, leading to over-detection and inefficiencies.
Anomaly detection device and method that converts continuous labels into discrete variables using a discretization table, calculates anomaly degrees based on classification model probabilities, and optionally updates the learning database with high-anomaly data.
Enhances anomaly detection accuracy in regression analysis by classifying input data into discrete classes, assigning confidence levels, and adaptively improving the prediction model with relevant data.
Smart Images

Figure 2024162667000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an anomaly detection device and an anomaly detection method suitable for detecting anomalies in data input to a prediction model. [Background technology]
[0002] One of the challenges in operating a predictive model built using machine learning in a production environment is that the model's prediction accuracy can decrease due to inputs that were not initially anticipated. Technologies such as anomaly detection and drift detection have been developed to detect unexpected inputs. Meanwhile, for models that perform multi-class classification, a method is widely used in which the probability of belonging to each class is regarded as the confidence of the inference, and if the confidence is low, it is determined that the input is unexpected.
[0003] Incidentally, regression analysis is one of the data analysis techniques. Regression analysis is an analytical multiplication technique that applies a model that predicts continuous value labels (objective variables) from features (explanatory variables). In recent years, such predictive models are often constructed using machine learning. In machine learning, a large number of pairs of features and labels are prepared as a learning dataset, and this is used to train a predictive model that predicts labels from features.
[0004] However, when using a predictive model, the prediction accuracy may deteriorate due to the input of features that were not expected in the learning dataset (data drift). In order to prevent erroneous predictions in a predictive model, a method is required to detect the input of such unexpected features.
[0005] Since regression models generally do not output the confidence level of inferences, detection based on data divergence is a common approach. For example, Patent Document 1 discloses a method for detecting anomalies based on divergence in data distribution. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Patent Publication No. 2021-140297 Summary of the Invention [Problem to be solved by the invention]
[0007] However, in the technology described in Patent Document 1, the prediction model does not contribute to anomaly detection based on data distribution. Therefore, in anomaly detection based on data deviation, even if a feature value that does not contribute to prediction at all changes significantly, it may be determined to be an anomaly, which may increase overdetection.
[0008] In addition, anomaly detection based on the probability of belonging to each class in a multi-class classification model cannot be applied to problems where classes are not defined, such as regression analysis.
[0009] The present invention has been made against this background, and has an object to provide an anomaly detection device and an anomaly detection method that are capable of detecting anomalies in input data even in regression analysis. [Means for solving the problem]
[0010] In order to solve the above problem, an anomaly detection device according to one aspect of the present invention is an anomaly detection device that detects anomalies in data input to a model that performs regression analysis, the anomaly detection device comprising: a classification model that predicts a class to which input data belongs from the input data, a conversion unit that converts the predicted class by the classification model into a continuous value according to a preset rule, and a calculation unit that calculates the degree of anomaly of the input data from the probability of belonging to each class output by the classification model. The classification model is trained to estimate, from the input data, a class defined such that the same discrete variables are classified into the same class and different discrete variables are classified into different classes, by discretizing the labels of the continuous variables and converting them into labels of discrete variables based on a database that stores pairs of data and labels of continuous variables corresponding to the data. Effect of the Invention
[0011] According to at least one aspect of the present invention, it is possible to provide an anomaly detection device and an anomaly detection method that are capable of detecting an anomaly in input data even in regression analysis. Problems, configurations and effects other than those described above will become apparent from the following description of the embodiments. [Brief description of the drawings]
[0012] [Figure 1] 2 is a diagram illustrating an example of the hardware configuration of a control system of the anomaly detection device according to the first embodiment of the present invention. FIG. [Diagram 2] 1 is a diagram illustrating an example of a functional configuration of an anomaly detection device according to a first embodiment of the present invention. [Diagram 3] 5 is a flowchart showing an example of a processing procedure of a model creation unit according to the first embodiment of the present invention. [Figure 4] FIG. 2 is a diagram showing an example of a discretization table according to the first embodiment of the present invention. [Diagram 5] FIG. 2 is a diagram showing an example of discretizing labels of data in a learning database according to the first embodiment of the present invention. [Figure 6] 5 is a flowchart showing an example of a processing procedure of an abnormality degree calculation unit according to the first embodiment of the present invention. [Figure 7] FIG. 11 is a diagram showing a specific example of a process for determining a result of regression analysis and a degree of anomaly from a classification result by a classification model, using a discretization table, in the first embodiment of the present invention. [Figure 8] FIG. 11 is a diagram illustrating an example of a functional configuration of an anomaly detection device according to a second embodiment of the present invention. [Figure 9] 10 is a flowchart showing an example of a processing procedure of an abnormality degree calculation unit according to the second embodiment of the present invention. [Figure 10] 13 is a flowchart showing an example of a processing procedure of a model creation unit according to the third embodiment of the present invention. [Figure 11] FIG. 13 is a diagram showing examples of a plurality of discretization tables according to the third embodiment of the present invention. [Figure 12]13 is a flowchart showing an example of a processing procedure of an abnormality degree calculation unit according to the third embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, examples of modes for carrying out the present invention (hereinafter referred to as "embodiments") will be described with reference to the accompanying drawings. In this specification and the accompanying drawings, identical components or components having substantially the same functions are designated by the same reference numerals, and duplicated descriptions will be omitted.
[0014] <First embodiment> First, the configuration of an anomaly detection device according to a first embodiment of the present invention will be described with reference to FIGS. 1 and 2. FIG.
[0015] [Hardware configuration of anomaly detection device] Fig. 1 is a diagram showing an example of the hardware configuration of a control system of an anomaly detection device according to a first embodiment of the present invention. The anomaly detection device 1 shown in Fig. 1 is an information processing device (computer) used in regression analysis for anomaly detection, and includes a processor 2, a main storage device 3, an auxiliary storage device 4, an input device 5, an output device 6, and a communication device 7. Each device is connected to each other via a system bus so as to be able to communicate with each other.
[0016] The processor 2 is a device that performs arithmetic processing, and is configured, for example, using a CPU (Central Processing Unit), an MPU (Micro Processing Unit), or a GPU (Graphics Processing Unit). The main memory device 3 is a device that stores various programs and data, and is configured, for example, using a ROM (Read Only Memory), a RAM (Random Access Memory), etc. The auxiliary memory device 4 is a device that stores computer programs and data, and is configured, for example, using an HDD (Hard Disk Drive), a flash memory, or an SSD (Solid State Drive).
[0017] The computer programs and data stored in the auxiliary storage device 4 are loaded into the main storage device 3 by the processor 2 as needed, and are used for the processing and control performed by the processor 2. The processor 2 executes the computer programs stored in the auxiliary storage device 4 to achieve the functions of the anomaly detection device 1. Note that a cloud environment can also be used to store these computer programs and data.
[0018] The input device 5 is a user interface that generates an input signal according to a user's operation, and is, for example, a keyboard, a mouse, a card reader, a touch panel, etc. The output device 6 is a user interface that outputs various information (display output, audio output, print output, etc.), and is, for example, a display device (LCD (Liquid Crystal Display), a graphic card, etc.) that visualizes various information, an audio output device (speaker), a printer, etc.
[0019] The communication device 7 is a communication interface that communicates with other devices via a communication means. The configuration of the communication means is not necessarily limited, but may be, for example, a communication device conforming to various communication standards such as USB (Universal Serial Bus) and RS-232C, a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, or a dedicated line.
[0020] The communication device 7 is, for example, a network interface card (NIC), a wireless communication module, a USB module, or a serial communication module. The communication device 7 can also function as an input device that receives information from another device that is communicatively connected. The communication device 7 can also function as an output device that transmits information to another device that is communicatively connected.
[0021] [Functional configuration of the anomaly detection device] Next, the functional configuration of the anomaly detection device 1 will be described with reference to FIG. Fig. 2 is a diagram showing an example of the functional configuration of the anomaly detection device 1 according to this embodiment. As shown in Fig. 2, the anomaly detection device 1 has the functions of a storage unit 10, a model creation unit 20, and an anomaly degree calculation unit 30. The storage unit 10 is realized, for example, by a main storage unit 3 or an auxiliary storage unit 4 (see Fig. 1). Furthermore, the model creation unit 20 and the anomaly degree calculation unit 30 are realized, for example, by the processor 2 reading out parameters of a program or a model stored in the main storage unit 3 and executing processing in accordance with these.
[0022] The anomaly detection device 1 may further include hardware such as a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or an artificial intelligence (AI) chip in addition to the components shown in Fig. 1. In the anomaly detection device 1, some or all of the functions of the anomaly detection device 1 shown in Fig. 2 may be realized by using these pieces of hardware alone or in cooperation with the processor 2.
[0023] (Storage part) The storage unit 10 stores a training database 11, a classification model 12, and a discretization table 13. The storage unit 10 can store these databases, for example, as tables provided by a DBMS (DataBase Management System) or files provided by a file system.
[0024] A large number of pairs of pre-collected features and real-valued labels are stored in the learning database 11. For example, the features are data acquired by various sensors. The labels may be values acquired by the sensors, or may be annotated (additional information is added) manually or by other machine learning models.
[0025] The classification model 12 is a machine learning model that predicts a class to which input data belongs from the input data. For example, each class is assigned identification information (numbers, letters, etc.).
[0026] (Model Creation Department) The model creation unit 20 generates the classification model 12 and the discretization table 13. The model creation unit 20 includes a label discretization unit 21 and a classifier learning unit 22.
[0027] The label discretization unit 21 converts the real-value (continuous value) labels into discrete value labels using a conversion table based on the labels of the data stored in the learning database 11. The label conversion method will be described in detail later. The conversion table used here is stored in the storage unit 10 as the discretization table 13.
[0028] The classifier learning unit 22 learns based on the discrete value labels generated by the label discretization unit 21 and the feature amounts in the learning database 11, and stores the learning result in the storage unit 10 as a classification model 12 (an example of a classifier).
[0029] (Abnormality calculation unit) The anomaly degree calculation unit 30 calculates an inference result for input data and an anomaly degree of the input data based on the classification model 12 and the discretization table 13. The anomaly degree calculation unit 30 includes an input data classification unit 31, a classification result conversion unit 32, and an anomaly degree calculation processing unit 33. A specific calculation method for calculating the inference result and anomaly degree for input data using these functions of the anomaly degree calculation unit 30 will be described later.
[0030] [Model creation process] Next, the processing of the model creation unit 20 will be described with reference to FIGS. Fig. 3 is a flowchart showing an example of a processing procedure of the model creation unit 20. Fig. 3 shows a processing flow in which the model creation unit 20 generates the classification model 12 and the discretization table 13.
[0031] First, in step S10, the label discretization unit 21 references the training database 11 to generate the discretization table 13. The discretization table 13 converts continuous value labels into discretized class labels.
[0032] FIG. 4 is a diagram showing an example of the discretization table 13 according to the present embodiment. As shown in FIG. 4, for example, depending on the value of the continuous value label y, it is converted into a discretized class label (continuous value label y') of c1, c2, c3, or c4. In this example, a continuous value label y less than 4 (y<4) is converted into a discrete value label y' of "c1". Similarly, a continuous value label y of 4 or more and less than 8 (4≦y<8) is converted into a discrete value label y' of "c2", a continuous value label y of 8 or more and less than 12 (8≦y<12) is converted into a discrete value label y' of "c3", and a continuous value label y of 12 or more (12≦y) is converted into a discrete value label y' of "c4".
[0033] As a discretization method, for example, there is a method in which the number of classes to be generated is determined in advance, and the value range of the continuous value labels in the learning database 11 is equally divided based on the determined classes. Other possible methods include a method of dividing the value range of the continuous value labels so that the number of data included in each class is equal, and a method of dividing the value range of the continuous value labels by applying a data clustering algorithm to the continuous value labels. In this embodiment, from these discretization methods, a discretization method suitable for operating a prediction model built using machine learning in a production environment can be adopted.
[0034] Returning to the description of the flowchart in Fig. 3, next, in step S11, the label discretization unit 21 converts the continuous value labels of the data (e.g., feature amounts) in the training database 11 into discrete value labels based on the discretization table 13 generated in step S10.
[0035] Fig. 5 is a diagram showing an example of discretizing continuous value labels of data in the training database 11. Fig. 5 shows data conversion based on the discretization table 13 in Fig. 4, whereby each continuous value label y∈R is converted into a discrete value label y'∈{c1, c2, c3, c4}. "R" represents a real number.
[0036] In the example shown in FIG. 5, the continuous value label y "3.2" of the feature x1 is converted to a discrete value label y' "c1" by discretization based on the discretization table 13, and the continuous value label y "9.5" of the feature x2 is converted to a discrete value label y' "c3" by discretization based on the discretization table 13. Similarly, the features x3 to x 10 Each continuous value label y is converted to a discrete value label y' (here, one of c1 to c4).
[0037] Returning to the description of the flowchart in FIG. 3, next, in step S12, the classifier learning unit 22 learns a classification model based on the feature amount x (1.6 to 14.9 in FIG. 5) of the data in the learning database 11 and the discrete value label y' generated from the feature amount x in step S11. For example, in the case of the data obtained in FIG. 5, a classification model that predicts the discrete value label y'∈{c1, c2, c3, c4} from the feature amount x is learned. The classification model can be implemented using a decision tree, a support vector machine, a neural network, or the like. After the process of step S12, the process by the model creation unit 20 ends.
[0038] As described above, in this embodiment, the classification model 12 is based on a learning database 11 that stores pairs of data (features) and corresponding continuous value (continuous variable) labels, and discretizes the continuous variable labels to convert them into discrete value (discrete variable) labels. As an example, the classification model 12 is trained to predict (estimate) classes from the input data, defined so that the same discrete variables are in the same class and different discrete variables are in different classes.
[0039] [Processing of the anomaly calculation section] Next, the processing of the abnormality degree calculation unit 30 will be described with reference to FIGS. Fig. 6 is a flowchart showing an example of a processing procedure of the anomaly calculation unit 30. Fig. 6 shows a process of calculating a prediction for input data and the anomaly degree of the input data based on the classification model 12 and the discretization table 13. FIG. 7 is a diagram showing a specific example of processing in which the anomaly degree calculation unit 30 uses the discretization table 13 to obtain the regression analysis result and the degree of anomaly from the classification result by the classification model 12.
[0040] First, in step S20, the input data classification unit 31 of the anomaly degree calculation unit 30 inputs the input data to the classification model 12 and obtains the classification result (discrete value label y') of the input data. For example, the output of the classification model 12 is given as the attribute result of the input data to each class.
[0041] 7, the probability of a feature x input to the input data classification unit 31 belonging to each class is c1: 0.01, c2: 0.15, c3: 0.82, and c4: 0.02 (the sum of c1 to c4 is 1). In this example, a certain feature x input to the input data classification unit 31 is determined to belong to class c3 with the highest probability of belonging.
[0042] Next, in step S21, the classification result conversion unit 32 uses the discretization table 13 to inversely convert the classification result (discrete value label y') by the input data classification unit 31 to obtain an estimation result (=prediction result) of a continuous value. For example, in the case of the example of FIG. 7, the class c3 corresponds to the case where the continuous value label y is equal to or greater than 8 and less than 12 (8≦y<12) in the discretization table 13, so any value in this range is output as a representative value. Here, the median value "10" of the range of continuous values belonging to class c3 is output as a representative value (prediction result). Such a representative value is also an example of a discrete variable corresponding to a prediction class, and the classification result conversion unit 32 outputs a discrete variable such as the representative value as a prediction result of a continuous variable (continuous value). In other words, the classification result conversion unit 32 uses the discrete variable corresponding to the prediction class as a continuous value, and outputs the continuous value to obtain a prediction result by regression analysis.
[0043] Then, in step S22, the anomaly degree calculation processing unit 33 calculates the anomaly degree of the input data based on the classification result by the input data classification unit 31. The anomaly degree of the input data can be defined as, for example, a value "1-p" obtained by subtracting the probability p of belonging to the predicted class from 1. As an example, in the case of FIG. 7, the anomaly degree is "0.18". In this manner, in this embodiment, the probability of belonging to the predicted class is regarded as the confidence of the prediction, and the anomaly degree of the input data in the regression model is calculated using the confidence of the prediction. In addition, the entropy (information amount) calculated using the probability of belonging to each class can be used as an index of the anomaly degree. After the process of step S22, the process by the anomaly degree calculation unit 30 is terminated.
[0044] Although an example has been described in which the median of the range of continuous values belonging to the class ("10" for class c3 in FIG. 7) is used as the representative value, the present invention is not limited to this example. Other methods for selecting the representative value include using the average value or the most frequent value of the data belonging to the class among the data contained in the training database 11.
[0045] The prediction result may be calculated by weighting the representative values of each class using the probability of belonging to each class. That is, the classification result conversion unit 32 (an example of a conversion unit) calculates a continuous value as a result of the regression analysis by adding up the discrete variables corresponding to each class, weighted by the probability of belonging to each class. This makes it possible to output various values (continuous values) as a result of the regression analysis, whereas it was previously possible to output only discretized values (representative values).
[0046] For example, an example of inversely converting the classification results into continuous values using the weighted sum will be described. The representative values (examples of discrete variables) belonging to classes c1 to c4 are 2, 6, 10, and 14, respectively. In this case, the continuous value "9.4" is obtained by the following formula (1) using the attribution probability shown in FIG. 7. The degree of anomaly at this time is calculated as "0.18" based on the largest attribution probability of "0.84."
[0047] (0.01×2)+(0.15×6)+(0.82×10)+(0.02×14) =9.4 (1)
[0048] Furthermore, the anomaly detection device 1 may output only the degree of anomaly calculated by the anomaly degree calculation processing unit 33, and use another regression model (for example, linear regression, support vector regression, neural network, etc.) learned using a learning database as the result of the regression analysis. This other regression model (classification model) is assumed to be external to the anomaly detection device 1.
[0049] As described above, the anomaly detection device (anomaly detection device 1) according to the first embodiment is an anomaly detection device that detects anomalies in data input to a model that performs regression analysis. This anomaly detection device includes a classification model (classification model 12) that predicts a class to which input data belongs from the input data, a conversion unit (classification result conversion unit 32) that converts the predicted class by the classification model into a continuous value according to a preset rule, and a calculation unit (anomaly calculation processing unit 33) that calculates the degree of anomaly of the input data from the probability of belonging to each class output by the classification model. The classification model is trained to estimate, from the input data, a class defined such that the same discrete variables are classified into the same class and different discrete variables are classified into different classes, by discretizing the labels of the continuous variables and converting them into labels of discrete variables based on a database (learning database 11) that stores pairs of data and labels of continuous variables corresponding to the data.
[0050] According to the present embodiment having the above configuration, anomaly detection of input data based on a prediction model can be performed even in regression analysis. In conventional regression analysis, continuous values do not have a degree of certainty of inference (such as YES / NO), but in this embodiment, input data is first classified into discrete value labels (classes) and then converted back to continuous value labels (inverse conversion), thereby assigning an anomaly degree based on the degree of certainty of inference to the input data. By solving the regression problem using a classification model (classifier), the probability of belonging to each class of the classification model can be used as the degree of certainty of inference, and high accuracy of anomaly detection can be achieved.
[0051] <Second embodiment> In the first embodiment of the present invention described above, the result of regression analysis on input data (prediction result) and the degree of anomaly of the input data are calculated. Here, the result of regression analysis on input data with a high degree of anomaly is highly likely to be erroneous. For such data, the accuracy of regression analysis can be improved by adding the data to the learning database 11 and creating a new classification model. Therefore, in the second embodiment of the present invention, a method for selecting newly added learning data based on the degree of anomaly is provided. An example of the hardware configuration of the anomaly detection device according to the second embodiment is the same as the example of the hardware configuration according to the first embodiment shown in FIG. 1, and therefore a description thereof will be omitted.
[0052] [Functional configuration of the anomaly detection device] Fig. 8 is a diagram illustrating an example of the functional configuration of an anomaly detection device according to a second embodiment. In an anomaly detection device 1A illustrated in Fig. 8, parts common to the functional configuration of the anomaly detection device 1 according to the first embodiment illustrated in Fig. 2 are given the same reference numerals, and description thereof will be omitted.
[0053] The anomaly detection device 1A differs from the anomaly detection device 1 according to the first embodiment in that it includes an anomaly degree calculation unit 30A instead of the anomaly degree calculation unit 30. The anomaly degree calculation unit 30A includes an input data classification unit 31, a classification result conversion unit 32, and an anomaly degree calculation processing unit 33, as well as a learning data addition unit 81.
[0054] The learning data adding unit 81 determines data to be added to the learning database 11 from the input data based on the degree of abnormality of the input data calculated by the degree of abnormality calculation processing unit 33 , and stores the data in the learning database 11 .
[0055] [Processing of the anomaly calculation section] Next, the processing of the abnormality degree calculation unit 30A will be described with reference to FIG. Fig. 9 is a flowchart showing an example of the procedure of processing by the anomaly calculation unit 30A. Fig. 9 shows a process of calculating a prediction for input data and the anomaly degree of the input data based on the classification model 12 and the discretization table 13, and determining whether or not to add the input data to new learning data based on the anomaly degree. The same reference numerals are given to parts common to the flowchart of the anomaly calculation according to the first embodiment shown in Fig. 6, and detailed explanations will be omitted.
[0056] 9, the input data classification unit 31 of the anomaly degree calculation unit 30A classifies input data such as feature quantities using the classification model 12 (S20). Next, the classification result conversion unit 32 converts the classification result (discrete value label y') into a continuous value based on the discretization table 13 (S21). Next, the anomaly degree calculation processing unit 33 calculates the degree of anomaly based on the classification result (S22).
[0057] Next, in step S90, the learning data adding unit 81 determines whether or not to add the input data to the learning database 11 based on the degree of abnormality calculated in step S22. This can be achieved, for example, by determining a threshold value τ in advance, and determining to add the input data to the learning database 11 when the degree of abnormality exceeds τ. Then, the learning data adding unit 81 performs a process of adding the input data determined to be added to the learning database 11 to the learning database 11. After the process of step S90, the process by the abnormality degree calculation unit 30A ends.
[0058] As described above, the anomaly detection device according to the second embodiment (anomaly detection device 1A) further includes a learning data adding unit that adds input data whose degree of anomaly exceeds the threshold to a database for learning (learning database 11) when the degree of anomaly calculated by the calculation unit (classification result conversion unit 32) exceeds the threshold. Then, the classification model is re-learned using the input data whose degree of anomaly exceeds the threshold.
[0059] This makes it possible to selectively label only input data that is likely to contribute to improving a prediction model (e.g., classification model 12), thereby reducing annotation costs. Even when the degree of anomaly is equal to or less than τ, annotation can be performed at a certain rate, allowing the prediction model to be adapted at the stage of a sign of anomaly when the degree of anomaly is not so high.
[0060] <Third embodiment> In the first and second embodiments, a discretization table is created based on a predetermined number of divisions into classes. However, depending on the division method, an error in the regression analysis associated with discretization may occur. Also, it is not easy to determine an appropriate number of divisions in advance. In a third embodiment of the present invention, a method for detecting anomalies based on multiple discretization tables is provided.
[0061] An example of a hardware configuration of an anomaly detection device according to a third embodiment of the present invention is the same as the example of the hardware configuration according to the first embodiment shown in Fig. 1, and therefore a description thereof will be omitted. Also, an example of a functional configuration of an anomaly detection device according to a third embodiment of the present invention is the same as the example of the functional configuration according to the first embodiment shown in Fig. 2, and therefore a description thereof will be omitted.
[0062] [Model creation process] Here, the processing of the model creating unit 20 according to the third embodiment will be described with reference to FIGS. Fig. 10 is a flowchart showing an example of the processing procedure of the model creation unit 20 according to this embodiment. Fig. 10 shows a processing flow in which the model creation unit 20 generates a plurality of classification models 12 and a plurality of discretization tables 13. Hereinafter, when there is no particular need to distinguish between different classification models 12 and a plurality of discretization tables 13, they will simply be referred to as "classification models 12" and "discretization tables 13."
[0063] First, in step S30, the label discretization unit 21 of the model creation unit 20 generates a plurality of discretization tables 13 with reference to the learning database 11. In Fig. 11, an example of two discretization tables 13-1 and 13-2 is shown as the discretization tables 13.
[0064] Fig. 11 is a diagram showing an example of a plurality of discretization tables. In Fig. 11, according to the value of the continuous value label y, discretization table 13-1 converts it into discretized class labels of c1', c2', c3', and c4', and discretization table 13-2 converts it into discretized class labels of c1', c2', c3', and c4'.
[0065] The contents of the discretization table 13-1 are the same as those of the discretization table 13 shown in Fig. 4. On the other hand, in the discretization table 13-2, a continuous value label y less than 6 (y<6) is converted to a discrete value label y' of "c1'". Similarly, a continuous value label y' of 6 or more and less than 10 (6≦y<10) is converted to a discrete value label y' of "c2'", a continuous value label y of 10 or more and less than 14 (10≦y<14) is converted to a discrete value label y' of "c3'", and a continuous value label y of 14 or more (14≦y) is converted to a discrete value label y' of "c4'".
[0066] Returning to the description of the flowchart in Fig. 10, next, in step S31, the label discretization unit 21 discretizes the labels of the data (feature amount x) in the training database 11 based on each of the multiple discretization tables 13-1 and 13-2, and converts them into discrete value labels.
[0067] Next, in step S32, the classifier training unit 22 trains a plurality of classification models 12 based on the feature amount x of the data in the training database 11 and each discrete value label y' generated from the feature amount x in step S21. Each classification model 12 has a one-to-one correspondence with the discretization table 13 used for training. For example, the discretization table 13-1 corresponds to the first classification model 12 (not shown), and the discretization table 13-2 corresponds to the second classification model 12 (not shown). After the processing of step S32, the processing by the model creation unit 20 ends.
[0068] By using a plurality of different classification models 12 trained in this way, it is possible to reduce the effect of discretization errors, which, for example, have a large effect near the boundaries of divisions (for example, 4, 8, and 12 in the upper part of Fig. 4 and Fig. 11) when only one discretization table 13 is used. In addition, the effect of model ensemble is expected to improve prediction accuracy. The ensemble method is a method of predicting things by combining several prediction models, and then producing a final prediction result based on the principle of majority vote among the prediction results of those models.
[0069] In addition, the number of divisions into classes may be different in the multiple discretization tables. This allows for accurate anomaly detection as long as an appropriate number is included in the number of divisions to be considered. This alleviates the need to determine a single appropriate number of divisions in advance.
[0070] The number of divisions may be determined by cross-validation using the learning database 11. This makes it possible to select the number of divisions that provides the highest accuracy of regression analysis. In this case, only one classification model 12 and one discretization table 13 are stored, and the operation of the anomaly degree calculation unit 30 is the same as in the first embodiment of the present invention.
[0071] [Processing of the anomaly calculation section] Next, the process of the abnormality degree calculation unit 30 according to the third embodiment will be described with reference to FIG. Fig. 12 is a flowchart showing an example of a processing procedure of the anomaly calculation unit 30 according to this embodiment. Fig. 12 shows a process of calculating a prediction for input data and an anomaly degree of the input data based on a plurality of classification models 12 and a plurality of discretization tables 13.
[0072] First, in step S40, the input data classification unit 31 of the abnormality degree calculation unit 30 inputs input data to a plurality of classification models 12, and classifies the input data in the same procedure as in step S20 of FIG.
[0073] Next, in step S41, the classification result conversion unit 32 converts each classification result obtained from the multiple classification models 12 into a continuous value using the corresponding discretization table 13 in the same procedure as in step S21 in Fig. 6. Thereafter, the classification result conversion unit 32 integrates each conversion result to obtain one continuous value. As a method of integration, for example, a simple average can be used.
[0074] Next, in step S42, the anomaly degree calculation processing unit 33 calculates each degree of anomaly based on each classification result in the same procedure as step S22 in Fig. 6. Then, the anomaly degree calculation processing unit 33 obtains one degree of anomaly by integrating the degrees of anomaly derived from each classification result. As a method of integration, for example, a simple average can be used. After the processing of step S42, the processing by the anomaly degree calculation unit 30 ends.
[0075] As described above, the anomaly detection device according to the third embodiment includes a plurality of different classification models and a plurality of different discretization tables (e.g., discretization tables 13-1 and 13-2) that discretize labels of continuous variables. Each classification model discretizes labels of continuous variables for input data using a corresponding discretization table, and outputs a predicted class. The conversion unit (classification result conversion unit 32) obtains a continuous value as a result of regression analysis by integrating discrete variables corresponding to the predicted class derived from each classification model.
[0076] The present invention is not limited to the above-described embodiment, and various other applications and modifications are possible without departing from the gist of the present invention described in the claims. For example, the above-described embodiment has been described in detail and specifically in order to explain the present invention in an easy-to-understand manner, and is not necessarily limited to having all of the components described. It is also possible to replace a part of the configuration of one embodiment with a component of another embodiment. It is also possible to add a component of another embodiment to the configuration of one embodiment. It is also possible to add, replace, or delete other components to or from a part of the configuration of each embodiment.
[0077] Furthermore, each component of the anomaly detection device according to the above-described embodiment may be implemented in any hardware as long as the respective hardware can transmit and receive information to each other via a network. Furthermore, the processing performed by a certain processing unit may be realized by a single piece of hardware, or may be realized by distributed processing using multiple pieces of hardware.
[0078] In the above-described embodiment, the control lines and information lines are those that are considered necessary for the explanation, and not all control lines and information lines in the product are necessarily shown. In reality, it may be considered that almost all components are connected to each other.
[0079] In addition, in this specification, the processing steps describing chronological processing include not only processing that is performed chronologically in the order described, but also processing that is not necessarily performed chronologically but is performed in parallel or individually (e.g., processing by objects). [Explanation of symbols]
[0080] REFERENCE SIGNS LIST 1,1A... anomaly detection device, 10... storage unit, 11... learning database, 12... classification model, 13,13-1,13-2... discretization table, 20... model creation unit, 21... label discretization unit, 22... classifier learning unit, 30,30A... anomaly calculation unit, 31... input data classification unit, 32... classification result conversion unit, 33... anomaly calculation processing unit, 81... learning data addition unit
Claims
1. An anomaly detection device that detects anomalies in data input to a model that performs regression analysis, comprising: A classification model that predicts a class to which input data belongs based on the input data; A conversion unit that converts the predicted class by the classification model into a continuous value according to a preset rule; A calculation unit that calculates an anomaly degree of the input data from the probability of belonging to each class output by the classification model, The classification model is trained to estimate classes from input data, the classes being defined such that identical discrete variables are classified into the same class and different discrete variables are classified into different classes, based on a database that stores pairs of data and labels of continuous variables corresponding to the data. Anomaly detection device.
2. In the classification model, discretization of the labels of the continuous variables is achieved by equally dividing the range of values of the continuous variables based on the predetermined plurality of classes. The anomaly detection device according to claim 1 .
3. In the classification model, the labels of the continuous variables are discretized by dividing the range of the continuous variables in advance so that the number of data belonging to each class is equal. The anomaly detection device according to claim 1 .
4. In the classification model, discretization of the labels of the continuous variables is realized by performing data clustering on the labels of the continuous variables in the database in advance to divide the range of values of the continuous variables. The anomaly detection device according to claim 1 .
5. The conversion unit outputs a discrete variable corresponding to the predicted class as the continuous value, and the continuous value is a result of the regression analysis. The anomaly detection device according to claim 1 .
6. The conversion unit obtains the continuous value as a result of the regression analysis by weighting and adding up the discrete variables corresponding to each class by the probability of belonging to each class. The anomaly detection device according to claim 1 .
7. a learning data adding unit that, when the degree of abnormality calculated by the calculation unit exceeds a threshold, adds the input data whose degree of abnormality exceeds the threshold to the database for learning, The classification model is retrained using the input data in which the degree of anomaly exceeds a threshold. The anomaly detection device according to claim 1 .
8. a plurality of different classification models and a plurality of different discretization tables for discretizing labels of the continuous variables; Each of the classification models discretizes the labels of the continuous variables for the input data using the corresponding discretization table to output a predicted class; The conversion unit obtains the continuous value as a result of the regression analysis by integrating discrete variables corresponding to the predicted classes derived from each of the classification models. The anomaly detection device according to claim 1 .
9. An anomaly detection method using an anomaly detection device that detects anomalies in data input to a model that performs regression analysis, comprising: A process of converting a predicted class by a classification model that predicts a class to which input data belongs from the input data into a continuous value according to a preset rule; A process of calculating an anomaly degree of the input data from the probability of belonging to each class output by the classification model, The classification model is trained to estimate classes from input data, the classes being defined such that identical discrete variables are classified into the same class and different discrete variables are classified into different classes, based on a database that stores pairs of data and labels of continuous variables corresponding to the data. Anomaly detection methods.
Citation Information
Patent Citations
Diagnosis result estimation device
JP2021177325A
Feature selection based on unsupervised learning
US20220374765A1
Abnormality diagnosis device
JP2021140297A
Cited By
Semiconductor device and method of manufacturing the same
CN121729119A
