Machine learning program, machine learning method, and machine learning device

JP7652276B2Active Publication Date: 2025-03-27FUJITSU LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023550801
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-09-28
Publication Date
2025-03-27
Estimated Expiration
2041-09-28

AI Technical Summary

Benefits of technology

【0017】 あるクラスに属するデータの数が少ない場合でも、自動的に正解ラベルを付与することができる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007652276000002
    Figure 0007652276000002
  • Figure 0007652276000003
    Figure 0007652276000003
  • Figure 0007652276000004
    Figure 0007652276000004
Patent Text Reader

Abstract

This machine learning device inputs a plurality of items of data into a machine learning model to obtain a plurality of prediction results for the plurality of items of data. The machine learning device generates one or more items of data on the basis of first items of data which are among the plurality of items of data and for which the prediction results indicate a first group. The machine learning device clusters the plurality of items of data and the one or more items of data on the basis of a plurality of feature quantities of each of the plurality of items of data and the one or more items of data as obtained on the basis of the parameters of the machine learning model. The machine learning device updates the parameters of the machine learning model on the basis of training data including a plurality of items of data to which clustering results are assigned as correct labels and one or more items of data.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a machine learning technique using training data. [Background technology]

[0002] In information systems for companies, etc., machine learning models are used to judge and classify data. Since machine learning models judge and classify based on the training data used for machine learning, if the trend of the data changes during operation, the performance of the machine learning model will deteriorate.

[0003] In order to maintain the performance of the machine learning model, if the accuracy rate of the machine learning model decreases, data with correct labels is generated and machine learning of the machine learning model is performed again.

[0004] 18 and 19 are diagrams for explaining a conventional technique for automatically assigning correct labels to data. An apparatus that executes the conventional technique is referred to as a "conventional apparatus."

[0005] The process before the start of operation will be described with reference to FIG. 18. The vertical axis in FIG. 18 corresponds to the density of data in the feature space. The horizontal axis corresponds to the feature amount (coordinates in the feature space). Line 1 shows the relationship between the coordinates in the feature space and the density of data corresponding to the coordinates. The conventional device maps data before the trend changes into the feature space and calculates the density of each mapped data. The conventional device executes clustering, and calculates the number of clusters and the density in each cluster when the density is greater than or equal to a threshold D th The center coordinates of the area where the above is true are recorded.

[0006] In the example shown in FIG. 18, data in the feature space is classified into cluster A and cluster B. For cluster A, the density is greater than or equal to the threshold D th The center coordinate of the area where X is greater than or equal to A For cluster B, the density is threshold D th The center coordinate of the area where X is greater than or equal to BIn this case, the conventional device sets the number of clusters to "2" and the center coordinates of cluster A, X A and cluster B Center coordinate X B Record the following.

[0007] The processing after operation has started will be described with reference to FIG. 19. The vertical axis in FIG. 19 corresponds to the density of data in the feature space. The horizontal axis corresponds to the feature amount (coordinates in the feature space). Line 2 shows the relationship between the coordinates in the feature space and the density of data corresponding to the coordinates. After operation has started, the conventional device maps the data used in operation into the feature space and calculates the density of each piece of mapped data. The conventional device gradually lowers the density threshold and searches for the minimum threshold at which the number of clusters becomes the same as the number of clusters recorded before operation started.

[0008] Using the example described in Fig. 18, the number of clusters before starting operation is assumed to be "2". The conventional device gradually lowers the density threshold and sets the threshold to D, thereby adjusting the number of clusters of the data used in operation (data mapped into the feature space) to "2". The conventional device extracts (clusters) the data contained in area 2-1 and the data contained in area 2-2, respectively.

[0009] The conventional device assigns a correct label to data by performing matching based on the total distance traveled between the center coordinates stored before operation and the center coordinates of the cluster after operation has started. For example, such matching associates the cluster in area 2-1 with cluster A, and the cluster in area 2-2 with cluster B. In this case, the conventional device assigns the correct label "class A" to each data in area 2-1, and the correct label "class B" to each data in area 2-2. [Prior art documents] [Patent documents]

[0010] [Patent Document 1] International Publication No. 2021 / 079442 Summary of the Invention [Problem to be solved by the invention]

[0011] However, the above-mentioned conventional technology has a problem in that when the number of data belonging to a certain class is small, it is not possible to automatically assign a correct label.

[0012] FIG. 20 is a diagram for explaining the problems of the conventional technology. The vertical axis of FIG. 20 corresponds to the density of data in the feature space. The horizontal axis corresponds to the feature amount (coordinates in the feature space). Line 3 shows the relationship between the coordinates in the feature space and the density of data corresponding to the coordinates. In the example shown in FIG. 20, when data is input to a machine learning model, it is assumed that the data is classified into one of the classes of "normal data" or "abnormal data."

[0013] In Fig. 20, the data contained in area 3-1 belongs to the "normal data" class, and the data contained in area 3-2 belongs to the "abnormal data" class. If the amount of data contained in area 3-2 is extremely small, as explained in Fig. 19, even if the threshold is lowered, the number of clusters will not be the same as the number of clusters recorded before the start of operation, and clustering will not be performed correctly. For this reason, when the amount of data belonging to a certain class is small, it is not possible to automatically assign a correct label.

[0014] In addition, if the number of samples between classes differs significantly when operational data is input into a machine learning model, clustering cannot be performed correctly and correct labels cannot be automatically assigned.

[0015] In one aspect, the present invention aims to provide a machine learning program, a machine learning method, and a machine learning device that can automatically assign correct labels even when the number of data belonging to a certain class is small. [Means for solving the problem]

[0016] In a first proposal, the machine learning program causes the computer to execute a process of inputting a plurality of data into a machine learning model and obtaining a plurality of prediction results for the plurality of data. The machine learning program causes the computer to execute a process of generating one or more data based on first data, among the plurality of data, whose prediction result indicates a first group. The machine learning program causes the computer to execute a process of clustering the plurality of data and the one or more data based on a plurality of feature amounts of each of the plurality of data and the one or more data obtained based on parameters of the machine learning model. The machine learning program causes the computer to execute a process of updating parameters of the machine learning model based on training data including a plurality of data whose correct labels are the results of the clustering and the one or more data. Effect of the Invention

[0017] Even if the number of data belonging to a certain class is small, the correct label can be automatically assigned. [Brief description of the drawings]

[0018] [Figure 1] FIG. 1 is a diagram for explaining the approach and issues involved in generating pseudo-anomalous data. [Diagram 2] FIG. 2 is a diagram for explaining the process of generating pseudo abnormal data. [Diagram 3] FIG. 3 is a functional block diagram illustrating a configuration of the machine learning device according to the present embodiment. [Figure 4] FIG. 4 is a diagram illustrating an example of a data structure of the training data. [Diagram 5] FIG. 5 is a diagram (1) for explaining the process of the label assignment unit. [Figure 6] FIG. 6 is a diagram (2) for explaining the process of the label assignment unit. [Figure 7] FIG. 7 is a diagram (3) for explaining the process of the label assignment unit. [Figure 8] FIG. 8 is a diagram (4) for explaining the process of the label assignment unit. [Figure 9] FIG. 9 is a diagram (5) for explaining the process of the label assignment unit. [Figure 10] FIG. 10 is a diagram for explaining the deterioration determination by the deterioration detection unit. [Figure 11] FIG. 11 is a flowchart illustrating a processing procedure of the machine learning device according to the present embodiment. [Figure 12] FIG. 12 is a diagram showing changes in data trends due to changes in the external environment. [Figure 13] FIG. 13 is a diagram showing the verification results (1). [Figure 14] FIG. 14 is a diagram showing an example of a transition of the AUC score of a camera. [Figure 15] FIG. 15 is a diagram showing an example of data generated by different generation methods. [Figure 16] FIG. 16 is a diagram showing the verification results (2). [Figure 17] FIG. 17 is a diagram illustrating an example of a hardware configuration of a computer that realizes the same functions as the machine learning device of the embodiment. [Figure 18] FIG. 18 is a diagram (1) for explaining a conventional technique for automatically assigning correct labels to data. [Figure 19] FIG. 19 is a diagram (2) for explaining a conventional technique for automatically assigning correct labels to data. [Figure 20] FIG. 20 is a diagram for explaining the problem with the conventional technology. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0019] Hereinafter, embodiments of the machine learning program, the machine learning method, and the machine learning device disclosed in the present application will be described in detail with reference to the accompanying drawings. Note that the present invention is not limited to these embodiments. EXAMPLES

[0020] The machine learning device according to the present embodiment uses a machine learning model that classifies input data into either an abnormal class or a normal class. For example, data input to the machine learning model is image data or the like. The machine learning model is a DNN (Deep Neural Network) or the like. Data classified into the normal class is referred to as "normal data". Data classified into the abnormal class is referred to as "abnormal data".

[0021] The machine learning device generates pseudo-anomalous data using the anomalous data and normal data classified during operation, and performs clustering including the pseudo-anomalous data to automatically assign a correct label to the data. In the following description, the pseudo-anomalous data is referred to as "pseudo-anomalous data."

[0022] Fig. 1 is a diagram for explaining approaches and problems in generating pseudo-anomalous data. When generating pseudo-anomalous data, depending on the generation method, it may not be possible to automatically assign a correct label.

[0023] In FIG. 1, the vertical axis of graphs G1, G2, and G3 corresponds to the density of data in the feature space of the data. The horizontal axis corresponds to the feature amount (coordinates in the feature space). For example, data is input to a machine learning model, and the vector output from a layer a certain number of layers before the output layer of the machine learning model becomes the feature amount. The coordinates in the feature space of the data are determined according to the feature amount.

[0024] In graph G1, distribution dis1a indicates the "distribution of normal data." Normal data in the feature space is omitted. Distribution dis1b indicates the "distribution of truly abnormal data." For example, the abnormal data in the feature space are abnormal data 10, 11, 12, 13, and 14. If the number of abnormal data is small, the distribution of the abnormal data will not be like distribution dis1b, and as explained in FIG. 20, it is not possible to automatically assign a correct label.

[0025] Here, if the same image data as the data (image data) corresponding to the abnormal data 10, 11, 12, 13, and 14 is simply duplicated in order to increase the number of abnormal data, the distribution of the abnormal data will be distributions dis2a, dis2b, dis2c, dis2d, and dis2e shown in graph G2. Since distributions dis2a, dis2b, dis2c, dis2d, and dis2e differ from the distribution dis1b of true abnormal data, clustering will fail and it will not be possible to automatically assign correct labels to the data.

[0026] On the other hand, the machine learning device generates pseudo-abnormal data so that the distribution of abnormal data approaches the distribution dis1b of true abnormal data, as shown in graph G3 in Fig. 1. For example, the machine learning device executes the process described in Fig. 2, which will be described later, to generate pseudo-abnormal data, so that the distribution of abnormal data becomes the distribution dis3.

[0027] 2 is a diagram for explaining a process for generating pseudo-abnormal data. For example, when generating pseudo-abnormal data, the machine learning device executes the process in the order of steps S1 and S2.

[0028] The process of step S1 executed by the machine learning device will be described. The machine learning device maps a plurality of data included in the operational data into the feature space F. For example, the machine learning device inputs the data into a machine learning model, and the feature amount output from a layer a predetermined number prior to the output layer of the machine learning model is regarded as the value onto which the data is mapped. The coordinates of the feature space F are determined by the feature amount. The abnormal data mapped into the feature space F is regarded as abnormal data 20 and 21. The normal data mapped into the feature space F is regarded as normal data 31, 32, 33, 34, 35, 36, 37, 38, and 39. The process of the machine learning device will be described using the abnormal data 20 and 21 and the normal data 30 to 39.

[0029] The machine learning device selects normal data similar to the abnormal data in the feature space F. In the feature space F, normal data whose distance from the abnormal data is less than a threshold is determined to be normal data similar to the abnormal data.

[0030] The machine learning device compares the abnormal data 20 with the normal data 30 to 39, and selects normal data 30, 31, 32, and 34 that is similar to the abnormal data 20. The machine learning device compares the abnormal data 21 with the normal data 30 to 39, and selects normal data 30, 32, 33, and 35 that is similar to the abnormal data 21.

[0031] The process of step S2 executed by the machine learning device will be described. The machine learning device generates pseudo-abnormal data by linearly combining the abnormal data and the normal data with a proportion α set as a uniform random number for each normal data selected in step S1. For example, the machine learning device generates pseudo-abnormal data by using α blending or the like.

[0032] The machine learning device generates pseudo abnormal data 51 corresponding to coordinates (feature values) obtained by dividing a line segment connecting the abnormal data 20 and the normal data 30 by "1-α:α". The machine learning device generates pseudo abnormal data 52 corresponding to coordinates (feature values) obtained by dividing a line segment connecting the abnormal data 20 and the normal data 34 by "1-α:α". The machine learning device generates pseudo abnormal data 53 corresponding to coordinates (feature values) obtained by dividing a line segment connecting the abnormal data 20 and the normal data 32 by "1-α:α". The machine learning device generates pseudo abnormal data 54 corresponding to coordinates (feature values) obtained by dividing a line segment connecting the abnormal data 20 and the normal data 31 by "1-α:α".

[0033] The machine learning device generates pseudo abnormal data 55 corresponding to coordinates (feature values) obtained by dividing a line segment connecting the abnormal data 21 and the normal data 30 by "1-α:α". The machine learning device generates pseudo abnormal data 56 corresponding to coordinates (feature values) obtained by dividing a line segment connecting the abnormal data 21 and the normal data 32 by "1-α:α". The machine learning device generates pseudo abnormal data 57 corresponding to coordinates (feature values) obtained by dividing a line segment connecting the abnormal data 21 and the normal data 35 by "1-α:α". The machine learning device generates pseudo abnormal data 58 corresponding to coordinates (feature values) obtained by dividing a line segment connecting the abnormal data 21 and the normal data 33 by "1-α:α".

[0034] When the machine learning device generates pseudo-anomalous data by executing the process described in Fig. 2, the distribution of the anomalous data including the pseudo-anomalous data becomes the distribution dis3 described in Fig. 1. Therefore, when the machine learning device executes clustering based on the feature amounts of the normal data, anomalous data, and pseudo-anomalous data, it can associate the clustering results based on the feature amounts of the training data. Therefore, even if the number of data (e.g., anomalous data) belonging to a certain class is small, it is possible to automatically assign a correct label.

[0035] Next, an example of the configuration of the machine learning device according to the present embodiment will be described. Fig. 3 is a functional block diagram showing the configuration of the machine learning device according to the present embodiment. As shown in Fig. 3, the machine learning device 100 includes a communication unit 110, an input unit 120, a display unit 130, a storage unit 140, and a control unit 150.

[0036] The communication unit 110 performs data communication with an external device via a network. The communication unit 110 receives training data 141, operation data 143, and the like from the external device. The machine learning device 100 may receive the training data 141 and operation data 143 from an input unit 120, which will be described later.

[0037] The input unit 120 is an interface for inputting data, and receives data input via input devices such as a mouse and a keyboard.

[0038] The display unit 130 is an interface for outputting data. For example, the display unit 130 outputs data to an output device such as a display.

[0039] The storage unit 140 stores training data 141, a machine learning model 142, operation data 143, retraining data 144, and cluster-related data 145. The storage unit 140 is an example of a storage device such as a memory.

[0040] The training data 141 is used when executing machine learning of the machine learning model 142. FIG. 4 is a diagram showing an example of a data structure of the training data. As shown in FIG. 4, the training data associates an item number, data, and a correct label. The item number is a number that identifies a record of the training data 141. The data is image data. The correct label is a label that indicates whether the data is normal or abnormal.

[0041] For example, the correct label for data item number "1" is "normal," so data item number "1" is normal data. The correct label for data item number "3" is "abnormal," so data item number "3" is abnormal data.

[0042] The machine learning model 142 is a DNN or the like, and has an input layer, a hidden layer, and an output layer. The machine learning model 142 executes machine learning based on the backpropagation method or the like.

[0043] When data is input to the machine learning model 142, a classification result as to whether the input data is normal or abnormal is output.

[0044] The operation data 143 is a data set including a plurality of data used during operation.

[0045] The retraining data 144 is training data that is used when machine learning of the machine learning model 142 is performed again.

[0046] The cluster-related data 145 includes the number of clusters and the center coordinates of the area in each cluster where the density is equal to or greater than a threshold when each data included in the training data 141 is mapped onto a feature space. The cluster-related data 145 also includes the center coordinates of each cluster based on the clustering result of the label assignment unit 156 described later.

[0047] The control unit 150 includes an acquisition unit 151 , a machine learning unit 152 , a pre-processing unit 153 , an inference unit 154 , a generation unit 155 , a label assignment unit 156 , and a degradation detection unit 157 .

[0048] The acquisition unit 151 acquires training data 141 from an external device or the input unit 120, and stores the training data 141 in the storage unit 140. The acquisition unit 151 acquires operation data 143 from the external device or the input unit 120, and stores the operation data 143 in the storage unit 140.

[0049] The machine learning unit 152 executes machine learning of the machine learning model 142 by backpropagation using the training data 141. The machine learning unit 152 trains the machine learning model 142 so that when each data of the training data 141 is input to the input layer of the machine learning model 142, the output result output from the output layer approaches the correct label of the input data. The machine learning unit 152 verifies the machine learning model 142 using verification data.

[0050] The pre-processing unit 153 maps the training data 141 data into a feature space and performs clustering to identify the number of clusters in the data before the start of operation and the central coordinates of areas in the clusters where the density is equal to or greater than a threshold value. The pre-processing unit 153 records the number of clusters and the central coordinates of each cluster in the cluster-related data 145.

[0051] The pre-processing unit 153 maps each data included in the training data 141 onto the feature space. For example, the pre-processing unit 153 inputs each data of the training data 141 into the machine learning model 142, and sets a feature amount output from a layer that is a predetermined number prior to the output layer of the machine learning model 142 as a value onto which the data is mapped. This feature amount is a value obtained based on parameters of the trained machine learning model 142. The coordinates of the feature space F are determined by the feature amount.

[0052] The pre-processing unit 153 calculates the density of data in the feature space using formula (1). In formula (1), N indicates the total number of data, σ indicates the standard deviation, x is the expected value (average value) of the feature amount of the data, and x j indicates the feature value of the jth data.

[0053]

number

[0054] Here, the pre-processing unit 153 has been described as calculating Gaussian density as the density of the data, but this is not limited to this, and the density may be calculated using eccentricity, KNN distance (K-Nearest Neighbor Algorithm), etc.

[0055] The pre-processing unit 153 generates a graph with the vertical axis representing density and the horizontal axis representing features. The graph generated by the pre-processing unit 153 corresponds to the graph described in FIG. 18. The pre-processing unit 153 executes clustering, and calculates the number of clusters and the density in each cluster when the density is greater than or equal to a threshold D th The center coordinates of the area where the above is true are recorded.

[0056] In the example shown in FIG. 18, data in the feature space is classified into cluster A and cluster B. For example, cluster A is a cluster to which normal data belongs. Cluster B is a cluster to which abnormal data belongs. For cluster A, when the density is greater than or equal to a threshold D th The center coordinate of the area where X is greater than or equal to A For cluster B, the density is threshold D th The center coordinate of the area where X is greater than or equal to B In this case, the pre-processing unit 153 sets the number of clusters to "2" and the center coordinates X A and cluster B Center coordinate X B The above is recorded in the cluster-related data 145.

[0057] Here, the case has been described where the pre-processing unit 153 identifies the number of clusters and the center coordinates of each cluster, but the number of clusters and the center coordinates of each cluster may be acquired in advance from an external device.

[0058] The inference unit 154 acquires data from the operational data 143 and inputs the acquired data to the machine learning model 142 to infer whether the input data is normal data or abnormal data. The inference unit 154 repeatedly executes the above process for each piece of data included in the operational data 143. The inference unit 154 sets an estimation result as to whether each piece of data in the operational data 143 is normal data or abnormal data, and outputs the estimation result to the generation unit 155. The inference unit 154 may output the inference result to the display unit 130 to display the inference result.

[0059] The generating unit 155 generates pseudo abnormal data by executing the process described with reference to Fig. 2. An example of the process of the generating unit 155 will be described below.

[0060] The generating unit 155 maps a plurality of data included in the operational data 143 onto the feature space F. For example, the generating unit 155 inputs the data into the machine learning model 142, and sets a feature amount output from a layer a predetermined number prior to the output layer of the machine learning model 142 as a value onto which the data is mapped. This feature amount is a value obtained based on the parameters of the trained machine learning model 142. For example, the abnormal data and normal data mapped onto the feature space are abnormal data 20 and 21 and normal data 30 to 39 shown in FIG. 2. The generating unit 155 specifies whether the data is abnormal data or normal data based on the inference result of the inference unit 154.

[0061] The generating unit 155 selects normal data similar to the abnormal data in the feature space F. In the feature space F, normal data whose distance from the abnormal data is less than a threshold value is regarded as normal data similar to the abnormal data. For example, in FIG. 2, the generating unit 155 selects normal data 30, 31, 32, and 34 as normal data similar to the abnormal data 20. The generating unit 155 selects normal data 30, 32, 33, and 35 as normal data similar to the abnormal data 21.

[0062] The generating unit 155 generates pseudo-abnormal data by linearly combining the abnormal data and the normal data with a rate α of uniform random numbers for each normal data selected by the above process. For example, the generating unit 155 generates pseudo-abnormal data by using α blending or the like. The generating unit 155 generates pseudo-abnormal data 51 to 58 by executing the process described in FIG. 2.

[0063] The generation unit 155 outputs the feature amounts of the abnormal data, the feature amounts of the normal data, and the feature amounts of the pseudo-abnormal data to the label assignment unit 156.

[0064] The labeling unit 156 performs clustering based on the feature amounts of the abnormal data, the feature amounts of the normal data, and the feature amounts of the pseudo-abnormal data, and assigns correct labels to the data according to the clustering results. The labeling unit 156 registers each piece of data to which the correct labels have been assigned as retraining data 144 in the storage unit 140. An example of the processing of the labeling unit 156 will be described below. The labeling unit 156 also assigns correct labels to the pseudo-abnormal data generated by α blending, and registers the data in the retraining data 144.

[0065] The label assignment unit 156 executes the clustering process. Fig. 5 is a diagram (1) for explaining the process of the label assignment unit. The label assignment unit 156 generates a graph G10 in which the vertical axis represents density and the horizontal axis represents features based on the features of the abnormal data, the normal data, and the pseudo-abnormal data (step S10). The label assignment unit 156 calculates the density of the data (normal data, abnormal data, and pseudo-abnormal data) based on formula (1) in the same manner as the pre-processing unit 153.

[0066] The labeling unit 156 lowers the threshold corresponding to the density by a predetermined value at a time, and searches for the minimum threshold that is the same as the number of clusters in advance recorded in the cluster-related data 145 (step S11). Here, the number of clusters in advance recorded in the cluster-related data 145 is set to "2".

[0067] The labeling unit 156 performs persistent homology transformation (PH transformation) on the feature quantities of data that are equal to or greater than the threshold value, and refers to the zero-dimensional connected components. The labeling unit 156 performs calculation and identification of clusters based on whether or not the number of bars having a radius equal to or greater than a predetermined threshold value matches the number of clusters set in advance (step S12).

[0068] If the number of bars exceeding the threshold does not match the number of clusters in advance, the labeling unit 156 reduces the threshold by a predetermined value and repeats the process (step S13).

[0069] As described above, the labeling unit 156 repeats the process of lowering the density threshold and extracting data whose density is equal to or greater than the threshold, and the process of calculating the number of clusters by performing PH conversion on the extracted data, until the number of clusters matches the number of clusters previously determined. When the number of clusters matches, the labeling unit 156 identifies center coordinates C1, C2 of data areas having a density equal to or greater than the threshold (density) at that time, and records them in the cluster-related data 145. The labeling unit 156 records the center coordinates in the cluster-related data 145 every time it performs clustering processing.

[0070] The PH conversion performed by the label assignment unit 156 is, for example, the PH conversion described in Patent Document 1 (WO 2021 / 079442).

[0071] Based on the result of the clustering process, the labeling unit 156 assigns a correct label to each piece of data included in the operational data 143. The labeling unit 156 generates retraining data 144 by performing correct labeling based on the cluster to which each piece of data belongs, for data whose density determined by the clustering process is equal to or greater than a threshold value.

[0072] Fig. 6 is a diagram (2) for explaining the processing of the label assignment unit. The explanation of the graph G10 in Fig. 6 is the same as the explanation of the graph G10 in Fig. 5. The label assignment unit 156 executes the above-mentioned clustering process to identify data that is equal to or greater than the minimum threshold when the number of clusters is 2, and two center coordinates C1 and C2. The label assignment unit 156 determines the cluster to which each of the two center coordinates belongs, based on the history of the center coordinates recorded in the cluster-related data 145 and the matching process.

[0073] Fig. 7 is a diagram (3) for explaining the processing of the labeling unit. An example of the matching processing will be explained with reference to Fig. 7. The labeling unit 156 maps the center coordinates of each cluster identified from the completion of training of the machine learning model 142 to the present time onto a feature space, estimates a direction of travel, and determines the clusters of the two currently extracted center coordinates (C1, C2).

[0074] Simply matching the closest center coordinates may not be appropriate when considering fluctuations in the center coordinates. When the center coordinates have fluctuated and two new points are matched, as in Figure 7(a), matching with nearby points results in Figure 7(b), which is an unnatural movement in terms of the direction of the fluctuation. It would be more natural to have the coordinates fluctuate, as in Figure 7(c).

[0075] For this reason, the labeling unit 156 introduces a correction distance. For example, a mechanism is introduced to determine that a point is closer when moving in the direction of travel, and the direction of travel is identified by calculating the inner product of a travel direction vector from the previous coordinates and a vector connecting the previous coordinates to the current coordinates. The labeling unit 156 selects the nearest point by multiplying the value of the inner product by the distance between the two points using (tan(c)+1) / 2 as a weight as c and setting the value as the correction distance. For example, the correction distance is the value obtained by multiplying the distance between the center coordinates Cb1 and the center coordinates C1 by a weight ((tan(c)+1) / 2) based on the inner product c of the vectors v1 and v2.

[0076] The labeling unit 156 calculates a correction distance between the center coordinates every time the center coordinates of the clusters are identified, and repeatedly executes a process of matching center coordinates that are close in correction distance to each other.

[0077] For example, the central coordinates of cluster A identified by the clustering result of the pre-processing unit 153 are set to Cb3-1, and the central coordinates of cluster B are set to Cb3-2. If the label assignment unit 156 matches the central coordinates Cb3-1 and Cb2-1, matches the central coordinates Cb2-1 and Cb1-1, and matches the central coordinates Cb1-1 and C1, the central coordinate C1 is associated with cluster A. In this embodiment, the class corresponding to cluster A is set to the "normal class."

[0078] If the label assignment unit 156 matches the center coordinates Cb3-2 and Cb2-2, matches the center coordinates Cb2-2 and Cb1-2, and matches the center coordinates Cb1-2 and C2, the center coordinate C2 is associated with cluster B. In this embodiment, the class corresponding to cluster B is set as the "abnormal class."

[0079] Returning to the explanation of Fig. 6, in the example shown in Fig. 6, cluster A (normal class) is associated with central coordinate C1. Cluster B (abnormal class) is associated with central coordinate C2. In this case, the label assignment unit 156 sets the correct label "normal" to data included in the operational data 143 that has a density equal to or greater than a threshold and that belongs to the same cluster as the central coordinate C1. On the other hand, the label assignment unit 156 sets the correct label "abnormal" to data included in the operational data 143 that has a density equal to or greater than a threshold and that belongs to the same cluster as the central coordinate C2.

[0080] Next, the labeling unit 156 assigns a correct label to each of the data below the threshold that was not extracted by the clustering process. Fig. 8 is a diagram (4) for explaining the process of the labeling unit. For each of the data that was not extracted, the labeling unit 156 measures the distance from the center coordinates C1 and C2 of each cluster, and if the second closest distance is greater than the maximum distance between the centers of the clusters, it determines that the data belongs to the closest cluster.

[0081] In the example of Fig. 8, among the areas other than area X (cluster A) and area Y (cluster B) in which clusters have been determined by the above method, the labeling unit 156 determines that data in area P outside area X is cluster A. The labeling unit 156 determines that data in area Q outside area Y is cluster B.

[0082] The labeling unit 156 determines that data in area Z, in which the second closest distance is smaller than the maximum distance between the centers of the clusters (in the middle of the clusters), is a mixture of data from multiple nearby clusters. In this case, the labeling unit 156 measures the probability of each cluster for each piece of data and assigns it. For example, the labeling unit 156 uses the k-nearest neighbor method, the uniform probability method, the distribution ratio preservation method, or the like to calculate the probability that each piece of data in area Z belongs to each cluster, and generates and assigns probabilistic labels (probability of normal class, probability of abnormal class, probability of other classes).

[0083] For each input data belonging to region Z, the label assignment unit 156 extracts k pieces of already labeled data located in the vicinity of the input data, and if the proportions are normal class = 0.6, abnormal class = 0.4, and other classes = 0, the label assignment unit 156 assigns the proportions as a label.

[0084] The label assignment unit 156 assigns the same probability to each cluster for each piece of data belonging to region Z. For example, in the case of two-class classification, the label assignment unit 156 assigns normal class=0.5 and abnormal class=0.5 as labels, and in the case of three-class classification, the label assignment unit 156 assigns normal class=0.3, abnormal class=0.3, other classes=0.3, and the like as labels.

[0085] FIG. 9 shows information on the correct labels that are estimated by the above-mentioned method and assigned to each data by the label assignment unit 156. FIG. 9 is a diagram (5) for explaining the processing of the label assignment unit. The estimated correct labels are assigned with the probability of belonging to each cluster (probability of belonging to a normal class, probability of belonging to an abnormal class, probability of belonging to another class). As shown in FIG. 9, an estimated label (correct label) [1,0,0] is assigned to each data in the area X and area P, an estimated label [0,1,0] is assigned to each input data in the area Y and area Q, and an estimated label [a,b,c] is assigned to each input data in the area Z. Note that a,b,c are probabilities calculated by a method such as the k-nearest neighbor method. Then, the label assignment unit 156 stores the retraining data 144 in which each data is associated with an estimated label in the storage unit 140.

[0086] Returning to the description of Fig. 3, the degradation detection unit 157 detects deterioration in the accuracy of the machine learning model 142. For example, the degradation detection unit 157 compares the determination result of the machine learning model 142 with the estimation result (retraining data 144) generated by the label assignment unit 156 to detect deterioration in the accuracy of the machine learning model 142.

[0087] Fig. 10 is a diagram for explaining the deterioration judgment of the deterioration detection unit. As shown in Fig. 10, the deterioration detection unit 157 generates a judgment result [1,0,0] based on the output result (normal class) when data (data of the operation data 143) is input to the machine learning model 142. Meanwhile, the deterioration detection unit 157 obtains an estimation result [1,0,0] when the data belongs to the region X or region P, an estimation result [0,1,0] when the data belongs to the region Y or region Q, or an estimation result [a,b,c] when the data belongs to the region Z, by the above estimation process on the data.

[0088] The deterioration detection unit 157 acquires the judgment result and the estimation result for each input data, and performs the deterioration judgment by comparing them. For example, for the probability vector of each data (each point) shown in each estimation result, the deterioration detection unit 157 performs the deterioration judgment by comparing the sum (inner product) of the component products of the vector representation of the judgment result by the machine learning model 142 as the score of that point, and the value obtained by dividing the sum of the scores by the number of data with a threshold value.

[0089] The degradation detection unit 157 may execute the following process to detect deterioration in accuracy of the machine learning model 142. The degradation detection unit 157 refers to the cluster-related data 145 and calculates, as a score, the inverse of the distance between the center coordinates of cluster A identified by the clustering process of the training data 141 and the center coordinates of cluster A identified by the clustering process of the current operation data 143. If the score is less than a threshold, the degradation detection unit 157 determines that the accuracy of the machine learning model 142 has deteriorated.

[0090] When the degradation detection unit 157 detects a deterioration in accuracy of the machine learning model 142, it outputs a request to re-execute machine learning to the machine learning unit 152. When the machine learning unit 152 receives the request to re-execute machine learning from the degradation detection unit 157, it executes machine learning of the machine learning model 142 again using the retraining data 144.

[0091] Next, a processing procedure of the machine learning device 100 according to the present embodiment will be described. Fig. 11 is a flowchart showing the processing procedure of the machine learning device according to the present embodiment. As shown in Fig. 11, the machine learning unit 152 of the machine learning device 100 executes machine learning of the machine learning model 142 using the training data 141 (step S101).

[0092] The pre-processing unit 153 of the machine learning device 100 identifies the number of clusters and the center coordinates of each cluster based on the training data 141, and records them in the cluster-related data 145 (step S102). The acquisition unit 151 of the machine learning device 100 acquires the operation data 143, and stores it in the storage unit 140 (step S103).

[0093] The inference unit 154 of the machine learning device 100 inputs the operational data 143 into the machine learning model 142 and estimates the class of the data (step S104). The generation unit 155 of the machine learning device 100 generates pseudo abnormal data based on the feature amounts of the normal data and the feature amounts of the abnormal data (step S105).

[0094] The label assignment unit 156 of the machine learning device 100 executes a clustering process based on the feature amounts of the normal data, the abnormal data, and the pseudo abnormal data (step S106). The label assignment unit 156 assigns a correct answer label to the data based on the result of the clustering process, and generates retraining data 144 (step S107).

[0095] The degradation detection unit 157 of the machine learning device 100 calculates a score related to the performance of the machine learning model 142 (step S108). If the score is not less than the threshold (step S109, No), the machine learning device 100 proceeds to step S103. On the other hand, if the score is less than the threshold (step S109, Yes), the machine learning device 100 proceeds to step S110.

[0096] The machine learning unit 152 re-executes machine learning of the machine learning model 142 based on the retraining data 144 (step S110), and proceeds to step S103.

[0097] Next, the effect of the machine learning device 100 according to the present embodiment will be described. The machine learning device 100 inputs data of the operational data 143 to the trained machine learning model 142 to identify the feature quantities of the normal data and the abnormal data. The machine learning device 100 generates pseudo-abnormal data based on the feature quantities of the normal data and the abnormal data, and performs clustering based on the feature quantities of the normal data, the abnormal data, and the pseudo-abnormal data. The machine learning device 100 generates retraining data 144 by assigning a correct answer label based on the clustering result to each data of the operational data and the pseudo-abnormal data, and updates the parameters of the machine learning model based on the retraining data 144. As described above, by generating pseudo-abnormal data based on the feature quantities of the normal data and the abnormal data, when the number of data belonging to a certain class is small, a correct answer label can be automatically assigned.

[0098] As described above, the machine learning device 100 can automatically generate retraining data 144 by automatically assigning correct labels, and can use the retraining data 144 to re-run machine learning on the machine learning model 142, thereby preventing deterioration in the accuracy of the machine learning model 142.

[0099] The machine learning device 100 selects normal data similar to abnormal data in the feature space, and generates pseudo abnormal data between the abnormal data and the selected normal data. This makes it possible to make the distribution of data in the feature space a distribution to which a correct label can be automatically assigned.

[0100] Next, other processes (1) and (2) executed by the machine learning device 100 will be described.

[0101] Other processing (1) will be described. The above-described machine learning device 100 generates pseudo abnormal data based on the feature quantities of normal data and abnormal data in the feature space, but is not limited to this. For example, the generation unit 155 of the machine learning device 100 may generate abnormal data by duplicating abnormal data among data included in the operational data 143 and adding noise such as Gaussian noise to the copied abnormal data. In the following description, the abnormal data added with noise will be referred to as noise data.

[0102] The labeling unit 156 of the machine learning device 100 executes a clustering process based on the feature amounts of the abnormal data, the feature amounts of the noise data, and the feature amounts of the normal data, and assigns a correct label to the data according to the clustering result. The feature amount of the noise data is a feature amount output from a layer that is a predetermined number prior to the output layer of the machine learning model 142 when the noise data is input to the trained machine learning model 142.

[0103] Other processing (2) will be described. The above-described machine learning device 100 generates pseudo-abnormal data when there is a difference between the number of abnormal data and the number of normal data for the operational data 143, but this is not limited to the above. Even when there is a difference between the number of abnormal data and the number of normal data for the training data 141, the generation unit 155 of the machine learning device 100 may generate pseudo-abnormal data using the feature amount of the abnormal data and the feature amount of the normal data of the training data 141, and use the pseudo-abnormal data for machine learning of the machine learning model 142.

[0104] Next, a description will be given of the results of verifying the performance of the machine learning device 100 according to this embodiment by applying it to an anomaly detection AI (Artificial Intelligence) in a factory. As a verification condition, the machine learning model is a DNN, and the machine learning model 142 is trained in advance to classify data into abnormal data or normal data.

[0105] As an assumed operational scenario, it is assumed that the lighting fixtures will gradually become darker as they reach the end of their lifespan. The brightness will decrease by 10% for each batch. For each batch, 80 normal data and 5 abnormal data will be collected as operational data.

[0106] 12 is a diagram showing changes in data trends due to changes in the external environment. Normal data is Im1-0 to Im1-8. Abnormal data is Im2-0 to Im2-8. Normal data Im1-0 is normal data (original image data) of the 0th batch. Abnormal data Im2-0 is abnormal data (original image data) of the 0th batch.

[0107] Normal data Im1-1 is normal data of the first batch (image with 90% brightness). Abnormal data Im2-1 is abnormal data of the first batch (image data with 90% brightness). Normal data Im1-2 is normal data of the second batch (image with 80% brightness). Abnormal data Im2-2 is abnormal data of the second batch (image data with 80% brightness).

[0108] The normal data Im1-3 is the normal data of the third batch (image with a brightness of 70%). The abnormal data Im2-3 is the abnormal data of the third batch (image data with a brightness of 70%). The normal data Im1-4 is the normal data of the fourth batch (image data with a brightness of 60%). The abnormal data Im2-4 is the abnormal data of the fourth batch (image data with a brightness of 60%).

[0109] Although not shown in the figure, normal data Im1-5 is normal data of the 5th batch (image with 50% brightness). Abnormal data Im2-5 is abnormal data of the 5th batch (image data with 50% brightness). Although not shown in the figure, normal data Im1-6 is normal data of the 6th batch (image data with 40% brightness). Abnormal data Im2-6 is abnormal data of the 6th batch (image data with 40% brightness).

[0110] The normal data Im1-7 is normal data from the 7th batch (image with 30% brightness). The abnormal data Im2-7 is abnormal data from the 7th batch (image data with 30% brightness). The normal data Im1-8 is normal data from the 8th batch (image with 20% brightness). The abnormal data Im2-8 is abnormal data from the 8th batch (image data with 20% brightness).

[0111] As an evaluation index, data is input to a machine learning model, and it is determined whether the input data is normal or abnormal, and an AUC (Area Under Curve) score for each batch is calculated. A higher AUC score indicates that the detection performance of the machine learning model is maintained. For an anomaly detection dataset (operational data) of cameras (camera IDs 1 to 7) at seven locations in a factory, the AUC scores of an anomaly detection AI to which the machine learning device 100 of this embodiment is applied and an anomaly detection AI that is not retrained are verified as shown in FIG. 13.

[0112] FIG. 13 is a diagram (1) showing the verification results. The verification results in FIG. 13 show the AUC scores in the final batch (8th batch). The baseline shows the anomaly detection AI without retraining. The proposed method shows the anomaly detection AI to which the machine learning device 100 of this embodiment is applied. As shown in FIG. 13, for all cameras, the AUC scores of the proposed method exceed the AUC scores of the baseline, and the detection performance is maintained even in dark conditions (when the trend of the data changes).

[0113] FIG. 14 is a diagram showing an example of the transition of the AUC score of a camera. Graph G20 in FIG. 14 shows the transition of the AUC score of camera ID "3". The vertical axis of graph G20 corresponds to the AUC score, and the horizontal axis corresponds to the batch number. Line segment 20a shows the transition of the AUC score in each batch of the baseline. Line segment 20b shows the transition of the AUC score in each batch of the proposed method.

[0114] Graph G21 in FIG. 14 shows the transition of the AUC score for camera ID "6". The vertical axis of graph G21 corresponds to the AUC score, and the horizontal axis corresponds to the batch number. Line 21a shows the transition of the AUC score for each batch of the baseline. Line 21b shows the transition of the AUC score for each batch of the proposed method.

[0115] As shown by graphs G20 and G21 in FIG. 14, the anomaly detection AI to which the machine learning device 100 of this embodiment is applied maintains its detection performance even in dark conditions.

[0116] Next, a description will be given of the results of generating pseudo abnormal data by the generation methods (1) to (5) and verifying the performance of the machine learning model 142. As a prerequisite, data is classified into abnormal data or normal data, and the number of abnormal data is smaller than the number of normal data.

[0117] (1) Duplicating the same abnormal data. (2) Generate noise data by adding Gaussian noise (noise intensity: weak <standard deviation σ = 0.01>) to the anomalous data replicated in (1). (3) Generate noise data by adding Gaussian noise (noise intensity: medium <standard deviation σ=0.1>) to the anomalous data replicated in (1). (4) Generate noise data by adding Gaussian noise (noise intensity: strong <standard deviation σ=1>) to the anomalous data replicated in (1). (5) The machine learning device 100 uses alpha blending to generate pseudo abnormal data by combining the abnormal data with normal data that is similar to the abnormal data.

[0118] FIG. 15 is a diagram showing examples of data generated by different generation methods. Data D1-1 is normal data. Data D1-2 is abnormal data. Data D(1) is data generated by generation method (1). Data D(2) is data generated by generation method (2). Data D(3) is data generated by generation method (3). Data D(4) is data generated by generation method (4). Data D(5) is data generated by generation method (5).

[0119] Figure 16 is a diagram (2) showing the verification results. The verification results in Figure 16 show the average AUC scores by camera ID for all batches when generation methods (1) to (5) were used. As shown in Figure 16, generation method (5) achieved the highest or second-best performance in terms of AUC score compared to the other generation methods (1) to (4).

[0120] In this embodiment, as an example, a case where data is classified into abnormal data or normal data and the number of abnormal data is small compared to the number of normal data is described, but the present invention can be applied to a case where the number of normal data is small compared to the number of abnormal data. In addition, in this embodiment, a case where data is classified into abnormal data or normal data is described, but the present invention is not limited to this and data may be classified into other classes.

[0121] Next, a description will be given of an example of a hardware configuration of a computer that realizes the same functions as the machine learning device 100 described in the above embodiment. Fig. 17 is a diagram showing an example of a hardware configuration of a computer that realizes the same functions as the machine learning device of the embodiment.

[0122] 17, the computer 200 includes a CPU 201 that executes various arithmetic processes, an input device 202 that accepts data input from a user, and a display 203. The computer 200 also includes a communication device 204 that transmits and receives data to and from external devices, etc., via a wired or wireless network, and an interface device 205. The computer 200 also includes a RAM 206 that temporarily stores various information, and a hard disk device 207. The devices 201 to 207 are connected to a bus 208.

[0123] The hard disk device 207 stores an acquisition program 207a, a machine learning program 207b, a pre-processing program 207c, an inference program 207d, a generation program 207e, a label assignment program 207f, and a deterioration detection program 207g. The CPU 201 reads out each of the programs 207a to 207g and loads them in the RAM 206.

[0124] The acquisition program 207a functions as an acquisition process 206a. The machine learning program 207b functions as a machine learning process 206b. The pre-processing program 207c functions as a pre-processing process 206c. The inference program 207d functions as an inference process 206d. The generation program 207e functions as a generation process 206e. The label assignment program 207f functions as a label assignment process 206f. The degradation detection program 207g functions as a degradation detection process 206g.

[0125] The processing of the acquisition process 206a corresponds to the processing of the acquisition unit 151. The processing of the machine learning process 206b corresponds to the processing of the machine learning unit 152. The processing of the pre-processing process 206c corresponds to the processing of the pre-processing unit 153. The processing of the inference process 206d corresponds to the processing of the inference unit 154. The processing of the generation process 206e corresponds to the processing of the generation unit 155. The processing of the label assignment process 206f corresponds to the processing of the label assignment unit 156. The processing of the degradation detection process 206g corresponds to the processing of the degradation detection unit 157.

[0126] It should be noted that each of the programs 207a to 207g does not necessarily have to be stored in the hard disk device 207 from the beginning. For example, each of the programs may be stored in a "portable physical medium" such as a flexible disk (FD), CD-ROM, DVD, magneto-optical disk, or IC card that is inserted into the computer 200. Then, the computer 200 may read and execute each of the programs 207a to 207g. [Explanation of symbols]

[0127] 100 Machine Learning Device 110 Communications Department 120 Input section 130 Display section 140 Storage section 141 Training Data 142 Machine Learning Models 143 Operational Data 144 Retraining Data 145 Cluster related data 150 Control section 151 Acquisition Department 152 Machine Learning Department 153 Pre-processing section 154 Reasoning part 155 Generation part 156 Labeling Unit 157 Deterioration detection unit

Claims

1. Inputting a plurality of data into a machine learning model to obtain a plurality of prediction results for the plurality of data; selecting second data similar to the first data whose prediction result indicates the first group from a first plurality of data whose prediction result indicates the second group among the plurality of data, and generating one or more data corresponding to a feature amount between the feature amount of the first data and the feature amount of the second data; Executing clustering of the plurality of data and the one or more data based on a plurality of feature amounts of the plurality of data and the one or more data obtained based on parameters of the machine learning model; updating parameters of the machine learning model based on training data including the plurality of data whose results of the clustering are used as correct answer labels and the one or more pieces of data; A machine learning program that causes a computer to execute processing.

2. The generating process includes a process of generating the one or more pieces of data by adding noise to third data obtained by replicating the first data.

2. The machine learning program according to claim 1 .

3. The machine learning program according to claim 1, further comprising a step of causing a computer to execute a process of determining whether or not to update parameters of the machine learning model based on the prediction result and a correct label included in the training data.

4. Inputting a plurality of data into a machine learning model to obtain a plurality of prediction results for the plurality of data; selecting second data similar to the first data whose prediction result indicates the first group from a first plurality of data whose prediction result indicates the second group among the plurality of data, and generating one or more data corresponding to a feature amount between the feature amount of the first data and the feature amount of the second data; Executing clustering of the plurality of data and the one or more data based on a plurality of feature amounts of the plurality of data and the one or more data obtained based on parameters of the machine learning model; updating parameters of the machine learning model based on training data including the plurality of data whose results of the clustering are used as correct answer labels and the one or more pieces of data; A machine learning method characterized in that processing is executed by a computer.

5. Inputting a plurality of data into a machine learning model to obtain a plurality of prediction results for the plurality of data; selecting second data similar to the first data whose prediction result indicates the first group from a first plurality of data whose prediction result indicates the second group among the plurality of data, and generating one or more data corresponding to a feature amount between the feature amount of the first data and the feature amount of the second data; Executing clustering of the plurality of data and the one or more data based on a plurality of feature amounts of the plurality of data and the one or more data obtained based on parameters of the machine learning model; updating parameters of the machine learning model based on training data including the plurality of data whose results of the clustering are used as correct answer labels and the one or more pieces of data; A machine learning device having a control unit that executes processing.

Citation Information

Patent Citations

  • Product classification system and product classification method

    JP2021057042A

  • Analysis data analytics method and analysis data analytics device

    WO2018134952A1

  • Learning device, discrimination system, learning method, and non-transitory computer-readable medium having learning program stored thereon

    WO2021059509A1

  • Estimation program, estimation method, information processing device, relearning program, and relearning method

    WO2021079442A1