WO2023053216A1 - 機械学習プログラム、機械学習方法および機械学習装置 - Google Patents

機械学習プログラム、機械学習方法および機械学習装置 Download PDF

Info

Publication number
WO2023053216A1
WO2023053216A1 PCT/JP2021/035678 JP2021035678W WO2023053216A1 WO 2023053216 A1 WO2023053216 A1 WO 2023053216A1 JP 2021035678 W JP2021035678 W JP 2021035678W WO 2023053216 A1 WO2023053216 A1 WO 2023053216A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
machine learning
learning model
abnormal
unit
Prior art date
Application number
PCT/JP2021/035678
Other languages
English (en)
French (fr)
Inventor
佳寛 大川
泰斗 横田
Original Assignee
富士通株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士通株式会社 filed Critical 富士通株式会社
Priority to JP2023550801A priority Critical patent/JPWO2023053216A1/ja
Priority to PCT/JP2021/035678 priority patent/WO2023053216A1/ja
Publication of WO2023053216A1 publication Critical patent/WO2023053216A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Definitions

  • the present invention relates to machine learning technology using training data.
  • Machine learning models when judging and classifying data. Since machine learning models make judgments and classifications based on training data used for machine learning, if data trends change during operation, the performance of machine learning models will deteriorate.
  • Figs. 18 and 19 are diagrams for explaining a conventional technique for automatically assigning correct labels to data.
  • a device that implements the prior art is referred to as a "prior art device.”
  • the vertical axis in FIG. 18 is the axis corresponding to the density of data in the feature space.
  • the horizontal axis is an axis corresponding to feature amounts (coordinates in feature space).
  • Line 1 shows the relationship between coordinates in feature space and the density of data corresponding to the coordinates.
  • Conventional devices map the data before the trend changes to the feature space and calculate the density of each mapped data.
  • the conventional apparatus performs clustering, and records the number of clusters and the center coordinates of the regions where the density is equal to or greater than the threshold value Dth in each cluster.
  • data in the feature space are classified into cluster A and cluster B.
  • cluster A the center coordinates of the region where the density is equal to or greater than the threshold value D th are defined as XA .
  • cluster B let X B be the center coordinates of the region where the density is equal to or greater than the threshold value D th .
  • the conventional apparatus records the number of clusters "2", the central coordinates X A of cluster A, and the central coordinates X B of cluster B.
  • the processing after starting operation will be described with reference to FIG.
  • the vertical axis in FIG. 19 is the axis corresponding to the density of data in the feature space.
  • the horizontal axis is an axis corresponding to feature amounts (coordinates in feature space).
  • Line 2 shows the relationship between the feature space coordinates and the density of the data corresponding to the coordinates.
  • the number of clusters before starting operation is "2".
  • the conventional apparatus gradually lowers the density threshold and sets the threshold to D, thereby adjusting the number of clusters of data used in operation (data mapped to the feature space) to "2".
  • the conventional device extracts (clusters) the data contained in the area 2-1 and the data contained in the area 2-2.
  • Conventional devices assign correct labels to data by performing matching based on the total distance moved between the center coordinates stored before operation and the center coordinates of the cluster after operation starts. For example, such matching associates clusters in region 2-1 with cluster A and clusters in region 2-2 with cluster B. FIG. In this case, the conventional device assigns the correct label "class A” to each data in the area 2-1, and assigns the correct label "class B" to each data in the area 2-2.
  • the conventional technology described above has the problem that if the number of data belonging to a certain class is small, a correct label cannot be automatically assigned.
  • FIG. 20 is a diagram for explaining problems of the conventional technology.
  • the vertical axis in FIG. 20 is the axis corresponding to the density of data in the feature space.
  • the horizontal axis is an axis corresponding to feature amounts (coordinates in feature space).
  • Line 3 shows the relationship between the feature space coordinates and the density of the data corresponding to the coordinates.
  • the data is classified into either the "normal data” class or the "abnormal data” class.
  • the object of the present invention is to provide a machine learning program, a machine learning method, and a machine learning apparatus capable of automatically assigning a correct label even when the number of data belonging to a certain class is small. do.
  • the machine learning program inputs multiple data into the machine learning model and causes the computer to execute the process of obtaining multiple prediction results for the multiple data.
  • the machine learning program causes the computer to execute a process of generating one or a plurality of data based on first data, the prediction result of which indicates a first group, among the plurality of data.
  • the machine learning program clusters the plurality of data and the one or more data based on the plurality of feature amounts of each of the plurality of data and the one or more data obtained based on the parameters of the machine learning model.
  • the machine learning program causes the computer to execute a process of updating the parameters of the machine learning model based on training data including a plurality of data and one or a plurality of data with clustering results as correct labels.
  • FIG. 1 is a diagram for explaining an approach and problems in generating pseudo-abnormal data.
  • FIG. 2 is a diagram for explaining the process of generating pseudo-abnormal data.
  • FIG. 3 is a functional block diagram showing the configuration of the machine learning device according to this embodiment.
  • FIG. 4 is a diagram showing an example of the data structure of training data.
  • FIG. 5 is a diagram (1) for explaining the processing of the label assigning unit.
  • FIG. 6 is a diagram (2) for explaining the processing of the labeling unit.
  • FIG. 7 is a diagram (3) for explaining the processing of the label assigning unit.
  • FIG. 8 is a diagram (4) for explaining the processing of the labeling unit.
  • FIG. 9 is a diagram (5) for explaining the processing of the label assigning unit.
  • FIG. 10 is a diagram for explaining deterioration determination by the deterioration detection unit.
  • FIG. 11 is a flow chart showing the processing procedure of the machine learning device according to this embodiment.
  • FIG. 12 is a diagram showing changes in data trends due to changes in the external environment.
  • FIG. 13 is a diagram (1) showing verification results.
  • FIG. 14 is a diagram showing an example of changes in camera AUC scores.
  • FIG. 15 is a diagram showing an example of data generated by different generation methods.
  • FIG. 16 is a diagram (2) showing verification results.
  • FIG. 17 is a diagram illustrating an example of a hardware configuration of a computer that implements functions similar to those of the machine learning device of the embodiment;
  • FIG. 18 is a diagram (1) for explaining a conventional technique for automatically assigning a correct label to data.
  • FIG. 19 is a diagram (2) for explaining a conventional technique for automatically assigning a correct label to data.
  • FIG. 20 is a diagram for explaining the problem of the conventional technology.
  • the machine learning device uses a machine learning model that classifies input data into either an abnormal class or a normal class.
  • the 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 are referred to as "normal data”.
  • Data classified into the abnormal class are referred to as "abnormal data”.
  • the machine learning device generates pseudo-abnormal data using the abnormal data and normal data classified during operation, and performs clustering including the pseudo-abnormal data, thereby automatically assigning correct labels to the data.
  • pseudo-abnormal data is referred to as "pseudo-abnormal data”.
  • Fig. 1 is a diagram for explaining the approach and issues in generating pseudo-abnormal data.
  • generating pseudo-abnormal data it may not be possible to automatically assign a correct label depending on the generation method.
  • the vertical axes of graphs G1, G2, and G3 are axes corresponding to the density of data in the data feature space.
  • the horizontal axis is an axis corresponding to feature amounts (coordinates in feature space).
  • data is input to a machine learning model, and a vector output from a layer that is a predetermined number before the output layer of the machine learning model becomes a feature amount.
  • the coordinates of the data on the feature space are determined according to the feature amount.
  • distribution dis1a indicates “distribution of normal data”. Illustration of normal data in the feature space is omitted.
  • the distribution dis1b indicates the “distribution of true abnormal data”. For example, let abnormal data 10, 11, 12, 13, and 14 be abnormal data in the feature space. If the number of abnormal data is small, the distribution of abnormal data will not be like the distribution dis1b, and as described with reference to FIG. 20, correct labels cannot be assigned automatically.
  • the distribution of the abnormal data is shown in the graph
  • the distributions dis2a, dis2b, dis2c, dis2d, and dis2e shown in G2 are obtained. Since the distributions dis2a, dis2b, dis2c, dis2d, and dis2e are different from the true abnormal data distribution dis1b, the clustering fails, and the correct label cannot be automatically assigned to the data.
  • the machine learning device generates pseudo-abnormal data such that the distribution of the abnormal data approaches the distribution dis1b of the true abnormal data, as shown in the graph G3 of FIG.
  • the machine learning device executes the processing described later with reference to FIG. 2 to generate pseudo-abnormal data, so that the distribution of the abnormal data becomes the distribution dis3.
  • FIG. 2 is a diagram for explaining the process of generating pseudo-abnormal data.
  • the machine learning device performs processing in order of steps S1 and S2 when generating pseudo-abnormal data.
  • the machine learning device maps a plurality of data included in the operational data to the feature space F.
  • a machine learning device inputs data to a machine learning model, and uses a feature quantity output from a layer that is a predetermined number before the output layer of the machine learning model as a value obtained by mapping the data.
  • the coordinates of the feature space F are determined by the feature amount.
  • Abnormal data mapped to the feature space F are assumed to be abnormal data 20 and 21 . Let the normal data mapped in the feature space F be normal data 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , and 39 .
  • the processing of the machine learning device will be described using abnormal data 20, 21 and normal data 30-39.
  • the machine learning device selects normal data similar to abnormal data in feature space F.
  • the normal data whose distance from the abnormal data is less than the threshold is defined as normal data similar to the abnormal data.
  • the machine learning device compares the abnormal data 20 with the normal data 30 to 39 and selects normal data 30, 31, 32, 34 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, 35 similar to the abnormal data 21.
  • step S2 executed by the machine learning device.
  • the machine learning device uses a uniform random number as the ratio ⁇ for each of the normal data selected in step S1, synthesizes the abnormal data and the normal data by linear combination, and generates pseudo-abnormal data. For example, the machine learning device generates pseudo-abnormality data using ⁇ -blending or the like.
  • the machine learning device generates pseudo-abnormal data 51 corresponding to the coordinates (feature amounts) obtained by dividing the 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 amounts) obtained by dividing the 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 amounts) 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 the coordinates (feature amounts) obtained by dividing the line segment connecting the abnormal data 20 and the normal data 31 by "1- ⁇ : ⁇ ".
  • the machine learning device generates pseudo-abnormal data 55 corresponding to the coordinates (feature amounts) obtained by dividing the 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 amounts) obtained by dividing the 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 amounts) obtained by dividing the 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 amounts) obtained by dividing the line segment connecting the abnormal data 21 and the normal data 33 by "1- ⁇ : ⁇ ".
  • the distribution of the abnormal data including the pseudo-abnormal data becomes the distribution dis3 described with reference to FIG. Therefore, when the machine learning device performs clustering based on each feature amount of normal data, abnormal data, and pseudo-abnormal data, it can associate the result of clustering based on the feature amount of training data. Therefore, even if the number of data (for example, abnormal data) belonging to a certain class is small, a correct label can be automatically assigned.
  • FIG. 3 is a functional block diagram showing the configuration of the machine learning device according to this embodiment.
  • this machine learning device 100 has a communication section 110 , an input section 120 , a display section 130 , a storage section 140 and a control section 150 .
  • 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 an external device.
  • the machine learning device 100 may receive the training data 141 and the operational data 143 from the input unit 120, which will be described later.
  • the input unit 120 is an interface for inputting data.
  • Input unit 120 receives data input via an input device such as a mouse and a keyboard.
  • the display unit 130 is an interface for outputting data.
  • display unit 130 outputs data to an output device such as a display.
  • the storage unit 140 has training data 141 , machine learning models 142 , operational 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.
  • the training data 141 is used when executing machine learning for the machine learning model 142.
  • FIG. 4 is a diagram showing an example of the data structure of training data. As shown in FIG. 4, the training data associates item numbers, data, and correct labels.
  • the item number is a number that identifies the record of the training data 141 .
  • the data is image data.
  • a correct label is a label indicating whether the data is normal or abnormal.
  • the correct label for the data with the item number "1” is “normal”, so the data with the item number "1” is normal data. Since the correct label of the data with the item number "3" is "abnormal”, the data with the item number "3" is abnormal data.
  • 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 is subjected to machine learning based on error backpropagation or the like.
  • the operational data 143 is a data set containing multiple data used during operation.
  • the retraining data 144 is training data used when performing machine learning of the machine learning model 142 again.
  • the cluster-related data 145 has the number of clusters when each data included in the training data 141 is mapped onto the feature space, and the central coordinates of the regions whose density is equal to or greater than the threshold in each cluster.
  • the cluster-related data 145 also has center coordinates of each cluster based on the clustering result of the labeling unit 156, which will be described later.
  • the control unit 150 has an acquisition unit 151 , a machine learning unit 152 , a preprocessing unit 153 , an inference unit 154 , a generation unit 155 , a labeling unit 156 and a deterioration detection unit 157 .
  • the acquisition unit 151 acquires the training data 141 from the external device or the input unit 120 and stores the training data 141 in the storage unit 140 .
  • Acquisition unit 151 acquires operation data 143 from an external device or input unit 120 and stores operation data 143 in storage unit 140 .
  • the machine learning unit 152 uses the training data 141 to perform machine learning for the machine learning model 142 by error backpropagation.
  • the machine learning unit 152 performs machine learning 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. Train model 142 .
  • the machine learning unit 152 verifies the machine learning model 142 using the verification data.
  • the pre-processing unit 153 maps the data of the training data 141 to the feature space and performs clustering, so that the number of clusters of the data before the start of operation and the center of the region where the density is equal to or higher than the threshold in the cluster Identify coordinates.
  • the preprocessing unit 153 records the number of clusters and the center coordinates of each cluster in the cluster-related data 145 .
  • the preprocessing unit 153 maps each data included in the training data 141 to the feature space. For example, the preprocessing unit 153 inputs each data of the training data 141 to the machine learning model 142, and maps the feature amount output from the layer a predetermined number before the output layer of the machine learning model 142 to the data. value. This feature quantity is a value obtained based on the parameters of the trained machine learning model 142 . The coordinates of the feature space F are determined by the feature amount.
  • the preprocessing unit 153 calculates the density of data in the feature space using Equation (1).
  • N indicates the total number of data
  • indicates standard deviation
  • x is the expected value (average value) of the feature amount of the data
  • x j indicates the feature amount of the j-th data.
  • the preprocessing unit 153 calculates the Gaussian density as the density of the data has been described, but it is not limited to this, and eccentricity, KNN distance (K-Nearest Neighbor Algorithm), etc. Density may be calculated.
  • the preprocessing unit 153 generates a graph in which the vertical axis is the density and the horizontal axis is the feature amount.
  • a graph generated by the preprocessing unit 153 corresponds to the graph described with reference to FIG. 18 .
  • the pre-processing unit 153 performs clustering, and records the number of clusters and the center coordinates of regions where the density is equal to or greater than the threshold value Dth in each cluster.
  • cluster A is a cluster to which normal data belongs.
  • Cluster B is a cluster to which abnormal data belongs.
  • the center coordinates of the region where the density is equal to or greater than the threshold value D th are defined as XA .
  • X B be the center coordinates of the region where the density is equal to or greater than the threshold value D th .
  • the preprocessing unit 153 records the number of clusters “2”, the center coordinates X A of cluster A, and the center coordinates X B of cluster B in the cluster related data 145 .
  • the preprocessing unit 153 specifies the number of clusters and the central coordinates of each cluster has been described, but the number of clusters and the central coordinates of each cluster may be obtained in advance from an external device.
  • the inference unit 154 obtains data from the operational data 143 and inputs the obtained 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 data included in the operational data 143 .
  • the inference unit 154 sets an estimation result as to whether the data is normal data or abnormal data for each data of the operation data 143 , and outputs the 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.
  • the generating unit 155 generates pseudo-abnormal data by executing the process described in FIG. An example of processing of the generation unit 155 will be described below.
  • the generation unit 155 maps a plurality of data included in the operational data 143 to the feature space F. For example, the generation unit 155 inputs data to the machine learning model 142, and sets the feature amount output from the layer a predetermined number before the output layer of the machine learning model 142 as the value obtained by mapping the data. This feature quantity is a value obtained based on the parameters of the trained machine learning model 142 .
  • the abnormal data and normal data mapped to the feature space are abnormal data 20 and 21 and normal data 30 to 39 shown in FIG.
  • the generation unit 155 identifies whether the data is abnormal data or normal data based on the inference result of the inference unit 154 .
  • the generation unit 155 selects normal data similar to abnormal data in the feature space F.
  • the normal data whose distance from the abnormal data is less than the threshold is defined as normal data similar to the abnormal data.
  • generation unit 155 selects normal data 30, 31, 32, and 34 as normal data similar to abnormal data 20 in FIG.
  • the generator 155 selects normal data 30 , 32 , 33 , and 35 as normal data similar to the abnormal data 21 .
  • the generation unit 155 generates pseudo-abnormal data by synthesizing the abnormal data and the normal data by linearly combining the ratio ⁇ of each of the normal data selected by the above process as a uniform random number. For example, the generator 155 generates pseudo-abnormal data using ⁇ -blending or the like. The generation unit 155 generates the pseudo-abnormality data 51 to 58 by executing the processing described with reference to FIG.
  • the generation unit 155 outputs the feature amount of abnormal data, the feature amount of normal data, and the feature amount of pseudo-abnormal data to the labeling unit 156 .
  • the label assigning unit 156 performs clustering based on the feature amount of abnormal data, the feature amount of normal data, and the feature amount of pseudo-abnormal data, and assigns a correct label to the data according to the clustering result.
  • the label assigning unit 156 registers each piece of data to which the correct label is assigned in the storage unit 140 as the retraining data 144 . An example of the processing of the labeling unit 156 will be described below.
  • the label assigning unit 156 also assigns correct labels to the pseudo-abnormal data generated by the ⁇ blending, and registers them in the retraining data 144 .
  • FIG. 5 is a diagram (1) for explaining the processing of the label assigning unit.
  • the labeling unit 156 generates a graph G10 in which the vertical axis is the density and the horizontal axis is the feature amount based on the feature amount of the abnormal data, the feature amount of the normal data, and the feature amount of the pseudo-abnormal data (step S10).
  • the labeling unit 156 calculates the density of data (normal data, abnormal data, and pseudo-abnormal data) based on Equation (1).
  • the labeling unit 156 decreases the threshold value corresponding to the density by a predetermined value, and searches for the minimum threshold value that is the same as the number of clusters recorded in advance in the cluster-related data 145 (step S11).
  • the number of clusters recorded in the cluster-related data 145 in advance is assumed to be "2".
  • the labeling unit 156 performs persistent homology transformation (PH transformation) on the feature amount of the data that is equal to or greater than the threshold, and refers to the 0-dimensional connected component.
  • the labeling unit 156 calculates and identifies clusters depending on whether or not the number of bars having a radius equal to or greater than a predetermined threshold matches a preset number of clusters (step S12).
  • the labeling unit 156 reduces the threshold by a predetermined value and repeats the process (step S13).
  • the labeling unit 156 performs the processing of lowering the density threshold to extract data having a density equal to or higher than the threshold and the processing of calculating the number of clusters by PH conversion processing on the extracted data. Repeat until the numbers match.
  • the labeling unit 156 specifies the central coordinates C1 and C2 of the data area having a density equal to or higher 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 each time the clustering process is performed.
  • the PH conversion performed by the labeling unit 156 is, for example, the PH conversion described in Patent Document 1 (International Publication No. 2021/079442).
  • the label assigning unit 156 assigns a correct label to each data included in the operational data 143 based on the result of the above clustering process.
  • the labeling unit 156 generates the retraining data 144 by performing correct labeling based on the cluster to which each of the data whose density determined by the clustering process is equal to or higher than the threshold value.
  • FIG. 6 is a diagram (2) for explaining the processing of the labeling unit.
  • the description regarding the graph G10 in FIG. 6 is the same as the description regarding the graph G10 in FIG.
  • the labeling unit 156 identifies the data exceeding the minimum threshold when the number of clusters is 2, and the two central coordinates C1 and C2.
  • the labeling 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.
  • FIG. 7 is a diagram (3) for explaining the processing of the labeling unit. An example of matching processing will be described with reference to FIG.
  • the labeling unit 156 maps the central coordinates of each cluster identified up to the present into the feature space, estimates the traveling direction, and calculates the currently extracted 2 clusters. Determine a cluster for each of the two central coordinates (C1, C2).
  • FIG. 7(a) when the center coordinates are fluctuating and two new points are newly matched, matching at close points results in FIG. 7(b), which is the direction of change. It is an unnatural movement from It is more natural to fluctuate as shown in FIG. 7(c).
  • the labeling unit 156 introduces a correction distance. For example, when moving in the direction of travel, a mechanism is introduced to determine that the point is closer. identify.
  • the label assigning unit 156 selects the closest point using the value obtained by multiplying the distance between the two points with c as the value of the inner product and (tan(c)+1)/2 as the weight as the correction distance.
  • the corrected distance is obtained by multiplying the distance between the center coordinates Cb1 and C1 by a weight ((tan(c)+1)/2) based on the inner product c of the vector v1 and the vector v2.
  • the labeling unit 156 calculates the correction distance between the center coordinates, and repeats the process of matching the center coordinates with a close correction distance.
  • Cb3-1 be the central coordinates of cluster A identified by the clustering result of the preprocessing unit 153
  • Cb3-2 be the central coordinates of cluster B.
  • the central coordinates Cb3-1 and Cb2-1 are matched, the central coordinates Cb2-1 and Cb1-1 are matched, and the central coordinates Cb1-1 and C1 are matched by the labeling unit 156, the central coordinates C1 is associated with cluster A.
  • the class corresponding to cluster A is called the "normal class".
  • the central coordinates C2 is associated with cluster B;
  • the class corresponding to cluster B is defined as an "abnormal class".
  • cluster A normal class
  • a cluster B abnormal class
  • the labeling unit 156 sets the correct label “normal” to data included in the operational data 143 that has a density equal to or greater than the threshold value and belongs to the same cluster as the central coordinate C1.
  • the labeling unit 156 sets the correct label “abnormal” to the data included in the operational data 143 whose density is equal to or greater than the threshold and which belongs to the same cluster as the central coordinate C2.
  • FIG. 8 is a diagram (4) for explaining the processing of the labeling unit.
  • the labeling unit 156 measures the distance to the center coordinate C1 and the distance to C2 of each cluster for each data not extracted, and the second closest distance is the maximum distance between the centers of the clusters. If it is larger, it is determined as data belonging to the closest cluster.
  • the labeling unit 156 extracts the data of the area P outside the area X, out of the areas other than the area X (cluster A) and the area Y (cluster B) whose clusters are determined by the above method. is determined as cluster A.
  • the labeling unit 156 determines that the data in the area Q outside the area Y is cluster B.
  • the labeling unit 156 determines that the data of the region Z (in the middle of a plurality of clusters) where the second closest distance is smaller than the maximum value of the distance between the centers of the clusters is mixed with data of a plurality of nearby clusters. It is determined that In this case, the label assigning unit 156 measures and assigns the probability of each cluster with respect to each data. For example, the labeling unit 156 calculates the probability of belonging to each cluster for each piece of data belonging to the region Z using the k-nearest neighbor method, the uniform probability method, the distribution ratio holding method, etc. probability, abnormal class probability, other class probability) are generated and given.
  • FIG. 9 shows correct label information that the label assigning unit 156 assigns to each data by estimating by the above-described method.
  • FIG. 9 is a diagram (5) for explaining the processing of the label assigning unit.
  • the estimated correct label is assigned with the probability of belonging to each cluster (probability of belonging to normal class, probability of belonging to abnormal class, probability of belonging to other class).
  • an estimated label (correct label) [1, 0, 0] is given to each data of the region X and the region P, and an estimated label [ 0, 1, 0] are given, and each input data in the region Z is given an estimated label [a, b, c].
  • a, b, and c are probabilities calculated by a method such as the k-nearest neighbor method.
  • the labeling unit 156 stores the retraining data 144 in which each data and the estimated label are associated in the storage unit 140 .
  • the deterioration detection unit 157 detects accuracy deterioration of the machine learning model 142 .
  • the deterioration detection unit 157 detects accuracy deterioration of the machine learning model 142 by comparing the determination result of the machine learning model 142 and the estimation result (retraining data 144) generated by the labeling unit 156.
  • FIG. 10 is a diagram for explaining deterioration determination by the deterioration detection unit.
  • the deterioration detection unit 157 determines the determination result [1, 0, 0] based on the output result (normal class) when data (operation data 143 data) is input to the machine learning model 142. Generate.
  • the deterioration detection unit 157 obtains the estimation result [1, 0, 0] when the data belongs to the region X or the region P, and the estimation result [0 , 1, 0] or an estimation result [a, b, c] when belonging to the region Z is acquired.
  • the deterioration detection unit 157 acquires the determination result and the estimation result for each input data, and performs deterioration determination by comparing these. For example, the deterioration detection unit 157 uses the sum (inner product) of the component products of the vector representation of the determination result by the machine learning model 142 for the probability vector of each data (each point) indicated by each estimation result as the score of that point. , the sum of the scores divided by the number of data is compared with a threshold value to determine deterioration.
  • the deterioration detection unit 157 may detect accuracy deterioration of the machine learning model 142 by executing the following processing.
  • the deterioration detection unit 157 refers to the cluster-related data 145, and compares the central coordinates of the cluster A identified by the clustering processing of the training data 141 and the central coordinates of the cluster A identified by the clustering processing of the current operational data 143. The reciprocal of the distance is calculated as the score.
  • the deterioration detection unit 157 determines that the accuracy of the machine learning model 142 has deteriorated when the score is less than the threshold.
  • the deterioration detection unit 157 outputs a machine learning re-execution request to the machine learning unit 152 when the accuracy deterioration of the machine learning model 142 is detected.
  • the machine learning unit 152 receives a machine learning re-execution request from the deterioration detection unit 157 , the machine learning unit 152 uses the retraining data 144 to execute the machine learning of the machine learning model 142 again.
  • FIG. 11 is a flow chart showing the processing procedure of the machine learning device according to this embodiment.
  • the machine learning unit 152 of the machine learning device 100 performs machine learning of the machine learning model 142 using the training data 141 (step S101).
  • the preprocessing 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 operational data 143 and stores it in the storage unit 140 (step S103).
  • the inference unit 154 of the machine learning device 100 inputs the data of the operational data 143 to 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-abnormality data based on the feature amount of the normal data and the feature amount of the abnormal data (step S105).
  • the labeling unit 156 of the machine learning device 100 performs clustering processing based on each feature amount of normal data, abnormal data, and pseudo-abnormal data (step S106). Based on the result of the clustering process, the label assigning unit 156 assigns a correct label to the data to generate the retraining data 144 (step S107).
  • the deterioration detection unit 157 of the machine learning device 100 calculates a score regarding the performance of the machine learning model 142 (step S108). When the score is not less than the threshold (step S109, No), the machine learning device 100 proceeds to step S103. On the other hand, when the score is less than the threshold (step S109, Yes), the machine learning device 100 proceeds to step S110.
  • 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.
  • the machine learning device 100 specifies feature amounts of normal data and abnormal data by inputting data of the operational data 143 into the trained machine learning model 142 .
  • the machine learning device 100 generates pseudo-abnormal data based on the feature amounts of normal data and abnormal data, and performs clustering based on the feature amounts of normal data, abnormal data, and pseudo-abnormal data.
  • the machine learning device 100 generates retraining data 144 by assigning a correct label based on the clustering result to each data of the operational data and the pseudo-abnormal data, and based on the retraining data 144, the machine learning model. Update parameters. As described above, by generating pseudo-abnormal data based on the feature values of normal data and abnormal data, it is possible to automatically assign a correct label when the number of data belonging to a certain class is small. can.
  • the machine learning device 100 can automatically generate the retraining data 144 by automatically assigning the correct label, and use the retraining data 144 to perform the machine learning of the machine learning model 142 again. It can be executed to suppress the accuracy deterioration of the machine learning model 142 .
  • 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. As a result, the distribution of the data in the feature space can be made a distribution to which correct labels can be automatically assigned.
  • the machine learning device 100 described above generates pseudo-abnormal data based on the feature amounts of normal data and abnormal data in the feature space
  • the present invention is not limited to this.
  • the generating unit 155 of the machine learning device 100 may duplicate abnormal data among the data included in the operational data 143, and add noise such as Gaussian noise to the duplicated abnormal data to generate abnormal data.
  • noise data abnormal data to which noise is added is referred to as noise data.
  • the label assigning unit 156 of the machine learning device 100 performs clustering processing based on the feature amount of the abnormal data, the feature amount of the noise data, and the feature amount of the normal data, and assigns a correct label to the data according to the clustering result. do.
  • the feature amount of noise data is a feature amount output from a layer a predetermined number before the output layer of the machine learning model 142 when the noise data is input to the trained machine learning model 142 .
  • the machine learning device 100 described above generates pseudo-abnormal data when there is a difference between the number of abnormal data and the number of normal data in the operational data 143, but the present invention is not limited to this. Even if there is a difference between the number of abnormal data and the number of normal data in the training data 141, the generation unit 155 of the machine learning device 100 generates the feature amount of the abnormal data in the training data 141 and the feature amount of the normal data. may be used to generate pseudo-anomaly data and use it for machine learning of the machine learning model 142 .
  • the machine learning device 100 As a verification condition, the machine learning model is DNN, and the machine learning model 142 is pre-trained to classify data as abnormal data or normal data.
  • an anomaly detection AI Artificial Intelligence
  • FIG. 12 is a diagram showing changes in data trends due to changes in the external environment.
  • Im1-0 to Im1-8 are normal data. Assume that the abnormal data are 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.
  • Normal data Im1-1 is the first batch of normal data (image with a brightness of 90%).
  • Abnormal data Im2-1 is abnormal data of the first batch (image data with a brightness of 90%).
  • Normal data Im1-2 is the second batch of normal data (80% brightness image).
  • Abnormal data Im2-2 is the second batch of abnormal data (image data with a brightness of 80%).
  • the normal data Im1-3 are the normal data of the third batch (image with a brightness of 70%).
  • Abnormal data Im2-3 is the third batch of abnormal data (image data with a brightness of 70%).
  • Normal data Im1-4 are normal data of the fourth batch (images with a brightness of 60%).
  • Abnormal data Im2-4 is abnormal data of the fourth batch (image data with a brightness of 60%).
  • the normal data Im1-5 is the fifth batch of normal data (image with a brightness of 50%).
  • the abnormal data Im2-5 is the fifth batch of abnormal data (image data with a brightness of 50%).
  • the normal data Im1-6 is the sixth batch of normal data (image with a brightness of 40%).
  • Abnormal data Im2-6 is abnormal data of the sixth batch (image data with a brightness of 40%).
  • Normal data Im1-7 is normal data of the 7th batch (image with a brightness of 30%).
  • Abnormal data Im2-7 is abnormal data of the seventh batch (image data with a brightness of 30%).
  • Normal data Im1-8 is normal data (image with 20% brightness) of the eighth batch.
  • Abnormal data Im2-8 is the eighth batch of abnormal data (image data with a brightness of 20%).
  • AUC rea Under Curve
  • An anomaly detection AI that applies the machine learning device 100 of the present embodiment to an anomaly detection data set (operational data) of seven cameras (camera IDs 1 to 7) in the factory, and an anomaly detection AI that does not perform retraining.
  • the AUC score with was the verification result shown in FIG. 13 .
  • 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).
  • Baseline represents the anomaly detection AI without retraining.
  • the proposed method shows anomaly detection AI to which the machine learning device 100 of this embodiment is applied. As shown in FIG. 13, the AUC scores of the proposed method exceed the baseline AUC scores for all cameras, and the detection performance is maintained even in dark conditions (data trends change).
  • FIG. 14 is a diagram showing an example of changes in camera AUC scores.
  • a graph G20 in FIG. 14 represents the transition of the AUC score for camera ID "3".
  • the vertical axis of the graph G20 is the axis corresponding to the AUC score, and the horizontal axis is the axis corresponding to the batch (batch number).
  • Line segment 20a shows the transition of the AUC score in each batch of baseline.
  • a line segment 20b indicates the transition of the AUC score in each batch of the proposed method.
  • Graph G21 in FIG. 14 represents the transition of the AUC score for camera ID "6".
  • the vertical axis of the graph G21 is the axis corresponding to the AUC score, and the horizontal axis is the axis corresponding to the batch (batch number).
  • a line segment 21a indicates the transition of the AUC score in each batch of baseline.
  • a line segment 21b indicates the transition of the AUC score in each batch of the proposed method.
  • the anomaly detection AI to which the machine learning device 100 of this embodiment is applied maintains its detection performance even in dark conditions.
  • the data is classified into abnormal data or normal data, and the number of abnormal data is small compared to the number of normal data.
  • FIG. 15 is a diagram showing an example 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 the generation method (1).
  • Data D(2) is data generated by the generation method (2).
  • Data D(3) is data generated by the generation method (3).
  • Data D(4) is data generated by the generation method (4).
  • Data D(5) is data generated by the generation method (5).
  • FIG. 16 is a diagram (2) showing the verification results.
  • the verification results in FIG. 16 show average AUC scores for all batches by camera ID when the generation methods (1) to (5) are used.
  • generation method (5) maintains the highest or second highest AUC score compared to other generation methods (1) to (4).
  • data is classified into abnormal data or normal data, and the number of abnormal data is smaller than the number of normal data.
  • a small number compared to the number is equally applicable.
  • data is classified into abnormal data or normal data, but the data is not limited to this, and may be classified into other classes.
  • FIG. 17 is a diagram illustrating an example of a hardware configuration of a computer that implements functions similar to those of the machine learning device of the embodiment.
  • the computer 200 has a CPU 201 that executes various arithmetic processes, an input device 202 that receives data input from the user, and a display 203 .
  • the computer 200 also has a communication device 204 and an interface device 205 for exchanging data with an external device or the like via a wired or wireless network.
  • the computer 200 also has a RAM 206 that temporarily stores various information, and a hard disk device 207 . Each device 201 - 207 is then connected to a bus 208 .
  • the hard disk device 207 has an acquisition program 207a, a machine learning program 207b, a preprocessing program 207c, an inference program 207d, a generation program 207e, a labeling program 207f, and a deterioration detection program 207g. Further, the CPU 201 reads each program 207a to 207g and develops them in the RAM 206. FIG.
  • the acquisition program 207a functions as an acquisition process 206a.
  • Machine learning program 207b functions as machine learning process 206b.
  • the preprocessing program 207c functions as a preprocessing process 206c.
  • the inference program 207d functions as an inference process 206d.
  • the generation program 207e functions as a generation process 206e.
  • Labeling program 207f functions as labeling process 206f.
  • the degradation detection program 207g functions as a degradation detection process 206g.
  • the processing of the acquisition process 206a corresponds to the processing of the acquisition unit 151.
  • Processing of the machine learning process 206 b corresponds to processing of the machine learning unit 152 .
  • the processing of the preprocessing process 206 c corresponds to the processing of the preprocessing unit 153 .
  • the processing of the inference process 206 d corresponds to the processing of the inference section 154 .
  • Processing of the generation process 206 e corresponds to processing of the generation unit 155 .
  • the processing of the labeling process 206f corresponds to the processing of the labeling unit 156.
  • the processing of the deterioration detection process 206g corresponds to the processing of the deterioration detection unit 157.
  • each program 207a to 207g do not necessarily have to be stored in the hard disk device 207 from the beginning.
  • each program is stored in a “portable physical medium” such as a flexible disk (FD), CD-ROM, DVD, magneto-optical disk, IC card, etc. inserted into the computer 200 .
  • the computer 200 may read and execute each of the programs 207a-207g.
  • machine learning device 110 communication unit 120 input unit 130 display unit 140 storage unit 141 training data 142 machine learning model 143 operation data 144 retraining data 145 cluster related data 150 control unit 151 acquisition unit 152 machine learning unit 153 preprocessing unit 154 inference Section 155 Generation Section 156 Labeling Section 157 Degradation Detection Section

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

機械学習装置は、複数のデータを機械学習モデルに入力して、複数のデータの複数の予測結果を取得する。機械学習装置は、複数のデータのうち予測結果が第1のグループを示す第1のデータに基づいて、一又は複数のデータを生成する。機械学習装置は、機械学習モデルのパラメータに基づいて得られた、複数のデータと一又は複数のデータとのそれぞれの複数の特徴量に基づいて、複数のデータと一又は複数のデータとのクラスタリングを実行する。機械学習装置は、クラスタリングの結果を正解ラベルとする複数のデータと一又は複数のデータとを含む訓練データに基づいて、機械学習モデルのパラメータを更新する。

Description

機械学習プログラム、機械学習方法および機械学習装置
 本発明は、訓練データを用いた機械学習の技術に関する。
 企業等の情報システムでは、データの判定や分類を行う場合に、機械学習モデルを利用する。機械学習モデルは、機械学習に利用した訓練データに基づいて判定や分類を行うため、運用中にデータの傾向が変化すると、機械学習モデルの性能か低下する。
 機械学習モデルの性能を維持するため、機械学習モデルの正解率等が低下した場合には、正解ラベル付けを行ったデータを生成し、機械学習モデルの機械学習を再度実行している。
 図18および図19は、自動で正解ラベルをデータに付与する従来技術を説明するための図である。従来技術を実行する装置を「従来装置」と表記する。
 運用を開始する前の処理を、図18について説明する。図18の縦軸は、特徴空間のデータの密度に対応する軸である。横軸は、特徴量(特徴空間の座標)に対応する軸である。線1は、特徴空間の座標と、座標に対応するデータの密度との関係を示す。従来装置は、傾向が変化する前のデータを特徴空間に写像して、写像した各データの密度を計算する。従来装置は、クラスタリングを実行し、クラスタ数と、各クラスタ中で密度が閾値Dth以上となる領域の中心座標を記録する。
 図18に示す例では、特徴空間のデータが、クラスタAおよびクラスタBに分類されている。クラスタAについて、密度が閾値Dth以上となる領域の中心座標をXとする。クラスタBについて、密度が閾値Dth以上となる領域の中心座標をXとする。この場合には、従来装置は、クラスタ数「2」と、クラスタAの中心座標Xと、クラスタの中心座標Xとを記録する。
 運用を開始した後の処理を、図19について説明する。図19の縦軸は、特徴空間のデータの密度に対応する軸である。横軸は、特徴量(特徴空間の座標)に対応する軸である。線2は、特徴空間の座標と、座標に対応するデータの密度との関係を示す。従来装置は、運用を開始した後に、運用で使用しているデータを特徴空間に写像し、写像した各データの密度を計算する。従来装置は、密度の閾値を下げていき、クラスタ数が、運用を開始する前に記録したクラスタ数と同じになる最小の閾値を探索する。
 図18で説明した例を用いて、運用を開始する前のクラスタ数を「2」とする。従来装置は、密度の閾値を徐々に下げていき、閾値をDに設定することで、運用で使用しているデータ(特徴空間に写像したデータ)のクラスタ数を「2」に調整する。従来装置は、領域2-1に含まれるデータと、領域2-2に含まれるデータとをそれぞれ抽出(クラスタリング)する。
 従来装置は、運用前に記憶しておいた中心座標と、運用を開始した後のクラスタの中心座標との移動距離の合計等に基づくマッチングを行うことで、データに正解ラベルを付与する。たとえば、かかるマッチングによって、領域2-1のクラスタが、クラスタAに対応付けられ、領域2-2のクラスタが、クラスタBに対応付けられる。この場合、従来装置は、領域2-1の各データに、正解ラベル「クラスA」を付与し、領域2-2の各データに、正解ラベル「クラスB」を付与する。
国際公開第2021/079442号
 しかしながら、上述した従来技術では、あるクラスに属するデータの数が少ない場合には、自動的に正解ラベルを付与することができないという問題がある。
 図20は、従来技術の課題を説明するための図である。図20の縦軸は、特徴空間のデータの密度に対応する軸である。横軸は、特徴量(特徴空間の座標)に対応する軸である。線3は、特徴空間の座標と、座標に対応するデータの密度との関係を示す。図20に示す例では、データを機械学習モデルに入力した場合に、データが「正常データ」または「異常データ」のいずれかのクラスに分類されるものとする。
 図20では、領域3-1に含まれるデータが「正常データ」のクラスに属し、領域3-2に含まれるデータが「異常データ」のクラスに属するものとする。領域3-2に含まれるデータが極端に少ないと、図19で説明したように、閾値を下げても、クラスタ数が、運用を開始する前に記録したクラスタ数と同じにならず、クラスタリングを正しく行うことができない。このため、あるクラスに属するデータ数が少ない場合には、自動的に正解ラベルを付与することができない。
 なお、運用中のデータを機械学習モデルに入力した際に分類されるクラス間のサンプル数が極端に異なる場合も、クラスタリングを正しく行えず、自動的に正解ラベルを付与することができない。
 1つの側面では、本発明は、あるクラスに属するデータの数が少ない場合でも、自動的に正解ラベルを付与することができる機械学習プログラム、機械学習方法および機械学習装置を提供することを目的とする。
 第1の案では、機械学習プログラムは、複数のデータを機械学習モデルに入力して、複数のデータの複数の予測結果を取得する処理をコンピュータに実行させる。機械学習プログラムは、複数のデータのうち予測結果が第1のグループを示す第1のデータに基づいて、一又は複数のデータを生成する処理をコンピュータに実行させる。機械学習プログラムは、機械学習モデルのパラメータに基づいて得られた、複数のデータと一又は複数のデータとのそれぞれの複数の特徴量に基づいて、複数のデータと一又は複数のデータとのクラスタリングを実行する処理をコンピュータに実行させる。機械学習プログラムは、クラスタリングの結果を正解ラベルとする複数のデータと一又は複数のデータとを含む訓練データに基づいて、機械学習モデルのパラメータを更新する処理をコンピュータに実行させる。
 あるクラスに属するデータの数が少ない場合でも、自動的に正解ラベルを付与することができる。
図1は、疑似異常データを生成する際のアプローチと課題を説明するための図である。 図2は、疑似異常データを生成する処理を説明するための図である。 図3は、本実施例に係る機械学習装置の構成を示す機能ブロック図である。 図4は、訓練データのデータ構造の一例を示す図である。 図5は、ラベル付与部の処理を説明するための図(1)である。 図6は、ラベル付与部の処理を説明するための図(2)である。 図7は、ラベル付与部の処理を説明するための図(3)である。 図8は、ラベル付与部の処理を説明するための図(4)である。 図9は、ラベル付与部の処理を説明するための図(5)である。 図10は、劣化検出部の劣化判定を説明するための図である。 図11は、本実施例に係る機械学習装置の処理手順を示すフローチャートである。 図12は、外部環境の変化によるデータの傾向の変化を示す図である。 図13は、検証結果を示す図(1)である。 図14は、カメラのAUCスコアの推移の一例を示す図である。 図15は、異なる生成方法によって生成したデータの一例を示す図である。 図16は、検証結果を示す図(2)である。 図17は、実施例の機械学習装置と同様の機能を実現するコンピュータのハードウェア構成の一例を示す図である。 図18は、自動で正解ラベルをデータに付与する従来技術を説明するための図(1)である。 図19は、自動で正解ラベルをデータに付与する従来技術を説明するための図(2)である。 図20は、従来技術の課題を説明するための図である。
 以下に、本願の開示する機械学習プログラム、機械学習方法および機械学習装置の実施例を図面に基づいて詳細に説明する。なお、この実施例によりこの発明が限定されるものではない。
 本実施例に係る機械学習装置は、入力されたデータを異常クラスまたは正常クラスのうちいずれかのクラスに分類する機械学習モデルを利用するものとする。たとえば、機械学習モデルに入力するデータは、画像データ等である。機械学習モデルは、DNN(Deep Neural Network)等である。正常クラスに分類されたデータを「正常データ」と表記する。異常クラスに分類されたデータを「異常データ」と表記する。
 機械学習装置は、運用時に分類した異常データと正常データとを用いて疑似的な異常データを生成し、疑似的な異常データを含めてクラスタリングを実行することで、自動的にデータに正解ラベルを付与する。以下の説明では、疑似的な異常データを「疑似異常データ」と表記する。
 図1は、疑似異常データを生成する際のアプローチと課題を説明するための図である。疑似異常データを生成する場合に、生成方法によっては、自動的に正解ラベルを付与することができない場合がある。
 図1において、グラフG1,G2,G3の縦軸はデータの特徴空間のデータの密度に対応する軸である。横軸は、特徴量(特徴空間の座標)に対応する軸である。たとえば、データを機械学習モデルに入力し、機械学習モデルの出力層よりも所定数前の層から出力されるベクトルが特徴量となる。特徴量に応じて、データの特徴空間上の座標が決まる。
 グラフG1において、分布dis1aは、「正常データの分布」を示す。特徴空間における正常データの図示を省略する。分布dis1bは、「真の異常データの分布」を示す。たとえば、特徴空間における異常データを、異常データ10,11,12,13,14とする。異常データの数が少ないと、異常データの分布は、分布dis1bのようにならず、図20で説明したように、自動的に正解ラベルを付与することができない。
 ここで、異常データの数を増やすために、単純に、異常データ10,11,12,13,14に対応するデータ(画像データ)と同一の画像データを複製すると、異常データの分布は、グラフG2に示す、分布dis2a,dis2b,dis2c,dis2d,dis2eとなる。分布dis2a,dis2b,dis2c,dis2d,dis2eは、真の異常データの分布dis1bとは異なるため、クラスタリングが失敗し、自動的にデータに正解ラベルを付与することができない。
 一方、機械学習装置は、図1のグラフG3に示すように、異常データの分布が、真の異常データの分布dis1bに近づくように、疑似異常データを生成する。たとえば、後述する図2で説明する処理を、機械学習装置が実行し、疑似異常データを生成することで、異常データの分布は、分布dis3となる。
 図2は、疑似異常データを生成する処理を説明するための図である。たとえば、機械学習装置は、疑似異常データを生成する場合に、ステップS1、S2の順に処理を実行する。
 機械学習装置が実行するステップS1の処理について説明する。機械学習装置は、運用データに含まれる複数のデータを、特徴空間Fに写像する。たとえば、機械学習装置は、データを機械学習モデルに入力し、機械学習モデルの出力層よりも所定数前の層から出力される特徴量を、データを写像した値とする。特徴量により、特徴空間Fの座標が決まる。特徴空間Fに写像された異常データを、異常データ20,21とする。特徴空間Fの写像された正常データを、正常データ31,32,33,34,35,36,37,38,39とする。異常データ20,21、正常データ30~39を用いて、機械学習装置の処理について説明する。
 機械学習装置は、特徴空間Fにおいて、異常データと類似する正常データを選択する。特徴空間Fにおいて、異常データとの距離が閾値未満となる正常データを、異常データに類似する正常データとする。
 機械学習装置は、異常データ20と、正常データ30~39とを比較して、異常データ20に類似する正常データ30,31,32,34を選択する。機械学習装置は、異常データ21と、正常データ30~39とを比較して、異常データ21に類似する正常データ30,32,33,35を選択する。
 機械学習装置が実行するステップS2の処理について説明する。機械学習装置は、ステップS1で選択した正常データそれぞれに対し、割合αを一様乱数とし、異常データと正常データとの線形結合により合成して、疑似異常データを生成する。たとえば、機械学習装置は、αブレンディング等を用いて、疑似異常データを生成する。
 機械学習装置は、異常データ20と、正常データ30とを結ぶ線分を「1-α:α」で分割した座標(特徴量)に対応する、疑似異常データ51を生成する。機械学習装置は、異常データ20と、正常データ34とを結ぶ線分を「1-α:α」で分割した座標(特徴量)に対応する、疑似異常データ52を生成する。機械学習装置は、異常データ20と、正常データ32とを結ぶ線分を「1-α:α」で分割した座標(特徴量)に対応する、疑似異常データ53を生成する。機械学習装置は、異常データ20と、正常データ31とを結ぶ線分を「1-α:α」で分割した座標(特徴量)に対応する、疑似異常データ54を生成する。
 機械学習装置は、異常データ21と、正常データ30とを結ぶ線分を「1-α:α」で分割した座標(特徴量)に対応する、疑似異常データ55を生成する。機械学習装置は、異常データ21と、正常データ32とを結ぶ線分を「1-α:α」で分割した座標(特徴量)に対応する、疑似異常データ56を生成する。機械学習装置は、異常データ21と、正常データ35とを結ぶ線分を「1-α:α」で分割した座標(特徴量)に対応する、疑似異常データ57を生成する。機械学習装置は、異常データ21と、正常データ33とを結ぶ線分を「1-α:α」で分割した座標(特徴量)に対応する、疑似異常データ58を生成する。
 機械学習装置が、図2で説明した処理を実行して疑似異常データを生成すると、疑似異常データを含む異常データの分布が、図1で説明した分布dis3となる。このため、機械学習装置は、正常データ、異常データ、疑似異常データの各特徴量を基にして、クラスタリングを実行すると、訓練データの特徴量に基づくクラスタリング結果と対応付けることができる。したがって、あるクラスに属するデータ(たとえば、異常データ)の数が少ない場合でも、自動的に正解ラベルを付与することができる。
 次に、本実施例に係る機械学習装置の構成の一例について説明する。図3は、本実施例に係る機械学習装置の構成を示す機能ブロック図である。図3に示すように、この機械学習装置100は、通信部110と、入力部120と、表示部130と、記憶部140と、制御部150を有する。
 通信部110は、ネットワークを介して、外部装置との間でデータ通信を行う。通信部110は、外部装置から、訓練データ141、運用データ143等を受信する。機械学習装置100は、訓練データ141、運用データ143を、後述する入力部120から受け付けてもよい。
 入力部120は、データを入力するためのインタフェースである。入力部120は、マウス、およびキーボードなどの入力装置を介してデータの入力を受け付ける。
 表示部130は、データを出力するためのインタフェースである。たとえば、表示部130は、ディスプレイなどの出力装置にデータを出力する。
 記憶部140は、訓練データ141、機械学習モデル142、運用データ143、再訓練データ144、クラスタ関連データ145を有する。記憶部140は、メモリ等の記憶装置の一例である。
 訓練データ141は、機械学習モデル142の機械学習を実行する場合に用いられる。図4は、訓練データのデータ構造の一例を示す図である。図4に示すように、訓練データは、項番と、データと、正解ラベルとを対応付ける。項番は、訓練データ141のレコードを識別する番号である。データは、画像データである。正解ラベルは、データが正常であるか、異常であるかを示すラベルである。
 たとえば、項番「1」のデータの正解ラベルは「正常」であるため、項番「1」のデータは、正常データである。項番「3」のデータの正解ラベルは「異常」であるため、項番「3」のデータは、異常データである。
 機械学習モデル142は、DNN等であり、入力層、隠れ層、出力層を有する。機械学習モデル142は、誤差逆伝播法等に基づいて機械学習が実行される。
 機械学習モデル142に、データを入力すると、入力されたデータが正常であるか異常であるかの分類結果が出力される。
 運用データ143は、運用時に利用する複数のデータを含むデータセットである。
 再訓練データ144は、機械学習モデル142の機械学習を再度実行する場合に用いられる訓練データである。
 クラスタ関連データ145は、訓練データ141に含まれる各データを特徴空間に写像した場合における、クラスタ数と、各クラスタ中で密度が閾値以上となる領域の中心座標とを有する。また、クラスタ関連データ145は、後述するラベル付与部156のクラスタリング結果に基づく各クラスタの中心座標を有する。
 制御部150は、取得部151、機械学習部152、事前処理部153、推論部154、生成部155、ラベル付与部156、劣化検出部157を有する。
 取得部151は、外部装置または入力部120から、訓練データ141を取得し、訓練データ141を記憶部140に格納する。取得部151は、外部装置または入力部120から、運用データ143を取得し、運用データ143を記憶部140に格納する。
 機械学習部152は、訓練データ141を用いて、誤差逆伝播法により、機械学習モデル142の機械学習を実行する。機械学習部152は、訓練データ141の各データを、機械学習モデル142の入力層に入力した場合に、出力層から出力される出力結果が、入力したデータの正解ラベルに近づくように、機械学習モデル142を訓練する。機械学習部152は、検証データを用いて、機械学習モデル142の検証を行う。
 事前処理部153は、訓練データ141のデータを特徴空間に写像して、クラスタリングを実行することで、運用を開始する前のデータのクラスタ数と、クラスタ中で密度が閾値以上となる領域の中心座標を特定する。事前処理部153は、クラスタ数と、各クラスタの中心座標を、クラスタ関連データ145に記録する。
 事前処理部153は、訓練データ141に含まれる各データを、特徴空間に写像する。たとえば、事前処理部153は、訓練データ141の各データを、機械学習モデル142に入力し、機械学習モデル142の出力層よりも所定数前の層から出力される特徴量を、データを写像した値とする。この特徴量は、訓練された機械学習モデル142のパラメータに基づいて得られる値である。特徴量により、特徴空間Fの座標が決まる。
 事前処理部153は、式(1)を用いて、特徴空間におけるデータの密度を算出する。式(1)において、Nはデータの総数を示し、σは標準偏差を示す。xは、データの特徴量の期待値(平均値)であり、xは、j番目のデータの特徴量を示す。
Figure JPOXMLDOC01-appb-M000001
 ここでは、事前処理部153は、データの密度として、ガウス密度を算出する場合について説明したが、これに限定されるものではなく、eccentricityや、KNN距離(K-Nearest Neighbor Algorithm)等を用いて密度を計算してもよい。
 事前処理部153は、縦軸を密度、横軸を特徴量とするグラフを生成する。事前処理部153によって生成されるグラフは、図18で説明したグラフに対応する。事前処理部153は、クラスタリングを実行し、クラスタ数と、各クラスタ中で密度が閾値Dth以上となる領域の中心座標を記録する。
 図18に示す例では、特徴空間のデータが、クラスタAおよびクラスタBに分類されている。たとえば、クラスタAは、正常データの属するクラスタである。クラスタBは、異常データの属するクラスタである。クラスタAについて、密度が閾値Dth以上となる領域の中心座標をXとする。クラスタBについて、密度が閾値Dth以上となる領域の中心座標をXとする。この場合には、事前処理部153は、クラスタ数「2」と、クラスタAの中心座標Xと、クラスタの中心座標Xとを、クラスタ関連データ145に記録する。
 ここでは、事前処理部153が、クラスタ数と、各クラスタの中心座標を特定する場合について説明したが、クラスタ数および各クラスタの中心座標を、外部装置から事前に取得しておいてもよい。
 推論部154は、運用データ143からデータを取得し、取得したデータを機械学習モデル142に入力することで、入力したデータが、正常データであるか、異常データであるかを推論する。推論部154は、運用データ143に含まる各データについて、上記処理を繰り返し実行する。推論部154は、運用データ143の各データについて、データが正常データであるか異常データであるかの推定結果を設定し、生成部155に出力する。推論部154は、推論結果を、表示部130に出力して、推論結果を表示させてもよい。
 生成部155は、図2で説明した処理を実行することで、疑似異常データを生成する。以下において、生成部155の処理の一例について説明する。
 生成部155は、運用データ143に含まれる複数のデータを、特徴空間Fに写像する。たとえば、生成部155は、データを機械学習モデル142に入力し、機械学習モデル142の出力層よりも所定数前の層から出力される特徴量を、データを写像した値とする。この特徴量は、訓練された機械学習モデル142のパラメータに基づいて得られる値である。たとえば、特徴空間に写像された異常データ、正常データは、図2に示す、異常データ20,21、正常データ30~39となる。生成部155は、データが異常データであるか、正常データであるかを、推論部154の推論結果を基にして特定する。
 生成部155は、特徴空間Fにおいて、異常データと類似する正常データを選択する。特徴空間Fにおいて、異常データとの距離が閾値未満となる正常データを、異常データに類似する正常データとする。たとえば、生成部155は、図2において、異常データ20に類似する正常データとして、正常データ30,31,32,34を選択する。生成部155は、異常データ21に類似する正常データとして、正常データ30,32,33,35を選択する。
 生成部155は、上記処理によって選択した正常データそれぞれに対し、割合αを一様乱数とし、異常データと正常データとの線形結合により合成して、疑似異常データを生成する。たとえば、生成部155は、αブレンディング等を用いて、疑似異常データを生成する。生成部155は、図2で説明した処理を実行することで、疑似異常データ51~58を生成する。
 生成部155は、異常データの特徴量、正常データの特徴量、疑似異常データの特徴量を、ラベル付与部156に出力する。
 ラベル付与部156は、異常データの特徴量、正常データの特徴量、疑似異常データの特徴量に基づいて、クラスタリングを実行し、クラスタリング結果に応じて、データに正解ラベルを付与する。ラベル付与部156は、正解ラベルを付与した各データを、再訓練データ144として、記憶部140に登録する。以下において、ラベル付与部156の処理の一例について説明する。ラベル付与部156は、αブレンディングによって生成した疑似異常データについても、正解ラベルを付与して、再訓練データ144に登録する。
 ラベル付与部156が実行するクラスタリング処理を実行する。図5は、ラベル付与部の処理を説明するための図(1)である。ラベル付与部156は、異常データの特徴量、正常データの特徴量、疑似異常データの特徴量に基づいて、縦軸を密度、横軸を特徴量とするグラフG10を生成する(ステップS10)。ラベル付与部156は、事前処理部153と同様にして、式(1)を基にして、データ(正常データ、異常データおよび疑似異常データ)の密度を算出する。
 ラベル付与部156は、密度に対応する閾値を所定値ごとに下げていき、クラスタ関連データ145に記録された事前のクラスタ数と同じになる最小の閾値を探索する(ステップS11)。ここでは、クラスタ関連データ145に記録された事前のクラスタ数を「2」とする。
 ラベル付与部156は、閾値以上であるデータの特徴量に対してパーシステントホモロジ変換(PH変換)を実行して、0次元の連結成分を参照する。ラベル付与部156は、予め定めた閾値以上の半径を有するバー(bar)の数が事前に設定したクラスタ数と一致するか否かにより、クラスタの計算および特定を実行する(ステップS12)。
 ラベル付与部156は、閾値を超えるバーの数が事前のクラスタ数と一致しない場合は、閾値を所定値下げて、処理を繰り返す(ステップS13)。
 上記のように、ラベル付与部156は、密度の閾値を下げて密度が閾値以上のデータを抽出する処理と、抽出されたデータに対するPH変換処理によりクラスタ数を計算する処理とを、事前のクラスタ数と一致するまで繰り返す。ラベル付与部156は、クラスタ数が一致した場合に、その時の閾値(密度)以上の密度を有するデータ領域の中心座標C1、C2を特定し、クラスタ関連データ145に記録する。ラベル付与部156は、クラスタリング処理を行うたびに、中心座標を、クラスタ関連データ145に記録する。
 ラベル付与部156が実行するPH変換は、たとえば、特許文献1(国際公開第2021/079442号)に記載されたPH変換である。
 ラベル付与部156は、上記のクラスタリング処理の結果を基にして、運用データ143に含まれる各データに正解ラベルを付与する。ラベル付与部156は、クラスタリング処理によって決定された密度が閾値以上のデータに対して、それぞれが属するクラスタに基づく正解ラベル付けを行うことで、再訓練データ144を生成する。
 図6は、ラベル付与部の処理を説明するための図(2)である。図6のグラフG10に関する説明は、図5のグラフG10に関する説明と同様である。ラベル付与部156は、上記のクラスタリング処理を実行することで、クラスタ数が2の状態で最小となった閾値以上となったデータと、2つの中心座標C1、C2を特定する。ラベル付与部156は、クラスタ関連データ145に記録された中心座標の履歴と、マッチング処理に基づき、2つの中心座標それぞれが属するクラスタを決定する。
 図7は、ラベル付与部の処理を説明するための図(3)である。図7を用いて、マッチング処理の一例について説明する。ラベル付与部156は、機械学習モデル142の訓練が完了してから、現在に至るまでに特定された各クラスタの中心座標を特徴空間にマッピングし、進行方向を推定して、現在抽出された2つの中心座標(C1,C2)それぞれのクラスタを決定する。
 単に一番近い中心座標のマッチングでは、中心座標の変動を加味すると妥当でないことがある。図7の(a)のように、中心座標が変動していて、新しい2点を新たにマッチングする場合、近い点でマッチングすると図7の(b)のようになるが、これは変動の方向からは不自然な動きである。図7の(c)のように、変動する方が自然である。
 このため、ラベル付与部156は、補正距離を導入する。たとえば、進行方向に進む場合はより近い点と判定する仕組みを導入し、前回の座標からの進行方向ベクトルと、前回の座標から今回の座標を結ぶベクトルとの内積を計算することで、進行方向を特定する。ラベル付与部156は、内積の値をcとして、(tan(c)+1)/2を重みとして2点間の距離に乗算した値を補正距離として、最近傍点を選択する。たとえば、中心座標Cb1および中心座標C1の距離に、ベクトルv1およびベクトルv2の内積cに基づく重み((tan(c)+1)/2)を乗算した値が、補正距離となる。
 ラベル付与部156は、クラスタの中心座標が特定される度に、中心座標間の補正距離を算出し、補正距離の近い中心座標同士をマッチングする処理を繰り返し実行する。
 たとえば、事前処理部153のクラスタリング結果により特定されたクラスタAの中心座標をCb3-1とし、クラスタBの中心座標をCb3-2とする。ラベル付与部156によって、中心座標Cb3-1とCb2-1とがマッチングされ、中心座標Cb2-1とCb1-1とがマッチングされ、中心座標Cb1-1とC1とがマッチングされたとすると、中心座標C1は、クラスタAに対応付けられる。本実施例では、クラスタAに対応するクラスを「正常クラス」とする。
 ラベル付与部156によって、中心座標Cb3-2とCb2-2とがマッチングされ、中心座標Cb2-2とCb1-2とがマッチングされ、中心座標Cb1-2とC2とがマッチングされたとすると、中心座標C2は、クラスタBに対応付けられる。本実施例では、クラスタBに対応するクラスを「異常クラス」とする。
 図6の説明に戻る。図6に示す例では、中心座標C1にクラスタA(正常クラス)が対応付けられる。中心座標C2にクラスタB(異常クラス)が対応付けられる。この場合、ラベル付与部156は、運用データ143に含まれるデータのうち、密度が閾値以上かつ、中心座標C1と同じクラスタに属するデータに、正解ラベル「正常」を設定する。一方、ラベル付与部156は、運用データ143に含まれるデータのうち、密度が閾値以上かつ、中心座標C2と同じクラスタに属するデータに、正解ラベル「異常」を設定する。
 続いて、ラベル付与部156は、クラスタリング処理によって抽出されなかった閾値未満のデータそれぞれに正解ラベルを付与する。図8は、ラベル付与部の処理を説明するための図(4)である。ラベル付与部156は、抽出されなかった各データについて、各クラスタの中心座標C1との距離およびC2との距離をそれぞれ計測し、2番目に近い距離が各クラスタの中心間の距離の最大値より大きい場合は、一番近いクラスタに属するデータと決定する。
 図8の例の場合、ラベル付与部156は、上記手法によりクラスタが決定された領域X(クラスタA)と領域Y(クラスタB)以外の領域のうち、領域Xよりも外側の領域Pのデータについては、クラスタAと決定する。ラベル付与部156は、領域Yよりも外側の領域Qのデータについては、クラスタBと決定する。
 ラベル付与部156は、2番目に近い距離が各クラスタの中心間の距離の最大値より小さい(複数のクラスタの中間にある)領域Zのデータについては、近くにある複数のクラスタのデータが混在していると判定する。この場合、ラベル付与部156は、各データに関して各クラスタの確率を測定して付与する。たとえば、ラベル付与部156は、k近傍法、一様確率法、分布比率保持法などを用いて、領域Zに属する各データについて、各クラスタに属する確率を算出し、確率的なラベル(正常クラスの確率、異常クラスの確率、他のクラスの確率)を生成して付与する。
 ラベル付与部156は、領域Zに属する各入力データに対して、そのデータに近傍に位置するすでにラベル付けされたデータをk個抽出し、その割合が正常クラス=0.6、異常クラス=0.4、他のクラス=0であれば、その割合をラベルとして付与する。
 ラベル付与部156は、領域Zに属する各データに対して、各クラスタにすべて同じ確率を付与する。例えば、ラベル付与部156は、2クラス分類の場合には、正常クラス=0.5、異常クラス=0.5をラベルとして付与し、3クラス分類の場合には、正常クラス=0.3、異常クラス=0.3、他のクラス=0.3などをラベルとして付与する。
 上述した手法により推定して、ラベル付与部156が、各データに付与する正解ラベルの情報が図9である。図9は、ラベル付与部の処理を説明するための図(5)である。推定された正解ラベルは、各クラスタに属する確率(正常クラスに属する確率,異常クラスに属する確率,他のクラスに属する確率)で付与される。図9に示すように、領域Xと領域Pの各データには、推定ラベル(正解ラベル)[1,0,0]が付与され、領域Yと領域Qの各入力データには、推定ラベル[0,1,0]が付与され、領域Zの各入力データには、推定ラベル[a,b,c]が付与される。なお、a,b,cは、k近傍法などの手法により算出される確率である。そして、ラベル付与部156は、各データと推定ラベルとの対応付けた再訓練データ144を、記憶部140に格納する。
 図3の説明に戻る。劣化検出部157は、機械学習モデル142の精度劣化を検出する。たとえば、劣化検出部157は、機械学習モデル142の判定結果と、ラベル付与部156により生成された推定結果(再訓練データ144)とを比較して、機械学習モデル142の精度劣化を検出する。
 図10は、劣化検出部の劣化判定を説明するための図である。図10に示すように、劣化検出部157は、データ(運用データ143のデータ)を機械学習モデル142に入力した場合の出力結果(正常クラス)に基づき、判定結果[1,0,0]を生成する。一方で、劣化検出部157は、データに対する上記推定処理により、領域Xまたは領域Pに属した場合の推定結果[1,0,0]、領域Yまたは領域Qに属した場合の推定結果[0,1,0]、または、領域Zに属した場合の推定結果[a,b,c]を取得する。
 劣化検出部157は、各入力データについて、判定結果と推定結果とを取得し、これらの比較により劣化判定を実行する。例えば、劣化検出部157は、各推定結果で示される各データ(各点)の確率ベクトルに対し、機械学習モデル142による判定結果のベクトル表示の成分積の和(内積)をその点のスコアとし、そのスコアの合計をデータ数で割った値と閾値との比較により、劣化判定を実行する。
 なお、劣化検出部157は、次の処理を実行して、機械学習モデル142の精度劣化を検出してもよい。劣化検出部157は、クラスタ関連データ145を参照し、訓練データ141のクラスタリング処理によって特定されるクラスタAの中心座標と、現在の運用データ143のクラスタリング処理によって特定されるクラスタAの中心座標との距離の反数を、スコアとして算出する。劣化検出部157は、かかるスコアが閾値未満である場合に、機械学習モデル142の精度が劣化したと判定する。
 劣化検出部157は、機械学習モデル142の精度劣化を検出した場合に、機械学習部152に対して、機械学習の再実行依頼を出力する。機械学習部152は、劣化検出部157から、機械学習の再実行依頼を受け付けた場合、再訓練データ144を用いて、機械学習モデル142の機械学習を再度実行する。
 次に、本実施例に係る機械学習装置100の処理手順について説明する。図11は、本実施例に係る機械学習装置の処理手順を示すフローチャートである。図11に示すように、機械学習装置100の機械学習部152は、訓練データ141を用いて、機械学習モデル142の機械学習を実行する(ステップS101)。
 機械学習装置100の事前処理部153は、訓練データ141を基にして、クラスタ数、各クラスタの中心座標を特定し、クラスタ関連データ145に記録する(ステップS102)。機械学習装置100の取得部151は、運用データ143を取得し、記憶部140に格納する(ステップS103)。
 機械学習装置100の推論部154は、運用データ143のデータを、機械学習モデル142に入力し、データのクラスを推定する(ステップS104)。機械学習装置100の生成部155は、正常データの特徴量、異常データの特徴量を基にして、異常疑似データを生成する(ステップS105)。
 機械学習装置100のラベル付与部156は、正常データ、異常データ、疑似異常データの各特徴量を基にして、クラスタリング処理を実行する(ステップS106)。ラベル付与部156は、クラスタリング処理の結果を基にして、データに正解ラベルを付与し、再訓練データ144を生成する(ステップS107)。
 機械学習装置100の劣化検出部157は、機械学習モデル142の性能に関するスコアを算出する(ステップS108)。機械学習装置100は、スコアが閾値未満でない場合には(ステップS109,No)、ステップS103に移行する。一方、機械学習装置100は、スコアが閾値未満である場合には(ステップS109,Yes)、ステップS110に移行する。
 機械学習部152は、再訓練データ144を基にして、機械学習モデル142の機械学習を再度実行し(ステップS110)、ステップS103に移行する。
 次に、本実施例に係る機械学習装置100の効果について説明する。機械学習装置100は、訓練済みの機械学習モデル142に、運用データ143のデータを入力することで、正常データおよび異常データの特徴量を特定する。機械学習装置100は、正常データおよび異常データの特徴量を基にして、疑似異常データを生成し、正常データ、異常データ、疑似異常データの各特徴量を基にして、クラスタリングを実行する。機械学習装置100は、クラスタリング結果に基づく正解ラベルを、運用データおよび疑似異常データの各データに付与することで、再訓練データ144を生成し、再訓練データ144を基にして、機械学習モデルのパラメータを更新する。上記のように、正常データおよび異常データの特徴量を基にして、疑似異常データを生成することで、あるクラスに属するデータの数が少ない場合には、自動的に正解ラベルを付与することができる。
 機械学習装置100は、上記のように、自動的に正解ラベルを付与することで、自動的に再訓練データ144を生成でき、再訓練データ144を用いて、機械学習モデル142の機械学習を再度実行して、機械学習モデル142の精度劣化を抑止することができる。
 機械学習装置100は、特徴空間において、異常データに類似する正常データを選択し、異常データと選択した正常データとの間に、疑似異常データを生成する。これによって、特徴空間のデータの分布を、自動的に正解ラベルを付与することが可能な分布とすることができる。
 次に、機械学習装置100が実行するその他の処理(1)、(2)について説明する。
 その他の処理(1)について説明する。上述した機械学習装置100は、特徴空間において、正常データと異常データの特徴量を基にして、疑似異常データを生成していたが、これに限定されるものではない。たとえば、機械学習装置100の生成部155は、運用データ143に含まれるデータのうち、異常データを複製し、複製した異常データに、ガウシアンノイズ等のノイズを付与した異常データを生成してもよい。以下の説明では、ノイズを付与した異常データを、ノイズデータと表記する。
 機械学習装置100のラベル付与部156は、異常データの特徴量、ノイズデータの特徴量、正常データの特徴量に基づいて、クラスタリング処理を実行し、クラスタリング結果に応じて、データに正解ラベルを付与する。ノイズデータの特徴量は、ノイズデータを、訓練済みの機械学習モデル142に入力した場合に、機械学習モデル142の出力層よりも所定数前の層から出力される特徴量である。
 その他の処理(2)について説明する。上述した機械学習装置100は、運用データ143について、異常データの数と、正常データの数とに差異がある場合に、疑似異常データを生成していたが、これに限定されるものではない。機械学習装置100の生成部155は、訓練データ141について、異常データの数と、正常データの数とに差異がある場合でも、訓練データ141の異常データの特徴量と、正常データの特徴量とを用いて、疑似異常データを生成し、機械学習モデル142の機械学習に利用してもよい。
 次に、本実施例に係る機械学習装置100を、ある工場における異常検知AI(Artificial Intelligence)に適用して性能を検証した結果について説明する。検証条件として、機械学習モデルをDNNとし、データを異常データまたは正常データに分類するように、機械学習モデル142を事前に訓練する。
 運用時想定シナリオとして、証明器具の寿命により、徐々に暗くなることを想定する。バッチ(batch)毎に10%ずつ明度が低下する。各バッチにおいて、運用データとして、正常データを80枚、異常データを5枚取得する。
 図12は、外部環境の変化によるデータの傾向の変化を示す図である。正常データを、Im1-0~Im1-8とする。異常データを、Im2-0~Im2-8とする。正常データIm1-0は、0バッチ目の正常なデータ(元画像データ)である。異常データIm2-0は、0バッチ目の異常なデータ(元画像データ)である。
 正常データIm1-1は、1バッチ目の正常なデータ(明度90%の画像)である。異常データIm2-1は、1バッチ目の異常なデータ(明度90%の画像データ)である。正常データIm1-2は、2バッチ目の正常なデータ(明度80%の画像)である。異常データIm2-2は、2バッチ目の異常なデータ(明度80%の画像データ)である。
 正常データIm1-3は、3バッチ目の正常なデータ(明度70%の画像)である。異常データIm2-3は、3バッチ目の異常なデータ(明度70%の画像データ)である。正常データIm1-4は、4バッチ目の正常なデータ(明度60%の画像)である。異常データIm2-4は、4バッチ目の異常なデータ(明度60%の画像データ)である。
 図示を省略するが、正常データIm1-5は、5バッチ目の正常なデータ(明度50%の画像)である。異常データIm2-5は、5バッチ目の異常なデータ(明度50%の画像データ)である。図示を省略するが、正常データIm1-6は、6バッチ目の正常なデータ(明度40%の画像)である。異常データIm2-6は、6バッチ目の異常なデータ(明度40%の画像データ)である。
 正常データIm1-7は、7バッチ目の正常なデータ(明度30%の画像)である。異常データIm2-7は、7バッチ目の異常なデータ(明度30%の画像データ)である。正常データIm1-8は、8バッチ目の正常なデータ(明度20%の画像)である。異常データIm2-8は、8バッチ目の異常なデータ(明度20%の画像データ)である。
 評価指標として、データを機械学習モデルに入力し、入力したデータが正常データであるか異常データであるかを判定し、各バッチにおけるAUC(Area Under Curve)スコアを算出する。AUCスコアが高いほど、機械学習モデルの検知性能が維持されていることを示す。工場の7か所のカメラ(カメラID1~7)の異常検知データセット(運用データ)に対して、本実施例の機械学習装置100を適用した異常検知AIと、再訓練を行わない異常検知AIとのAUCスコアは、図13に示す検証結果となった。
 図13は、検証結果を示す図(1)である。図13の検証結果は、最終バッチ(8バッチ目)におけるAUCスコアを示す。ベースラインは、再訓練を行わない異常検知AIを示す。提案手法は、本実施例の機械学習装置100を適用した異常検知AIを示す。図13に示すように、全てのカメラにおいて、提案手法のAUCスコアは、ベースラインのAUCスコアを上回っており、暗い状態(データの傾向が変化)でも、検知性能を維持している。
 図14は、カメラのAUCスコアの推移の一例を示す図である。図14のグラフG20は、カメラID「3」のAUCスコアの推移を表す。グラフG20の縦軸は、AUCスコアに対応する軸であり、横軸はバッチ(batch number)に対応する軸である。線分20aは、ベースラインの各バッチにおけるAUCスコアの推移を示す。線分20bは、提案手法の各バッチにおけるAUCスコアの推移を示す。
 図14のグラフG21は、カメラID「6」のAUCスコアの推移を表す。グラフG21の縦軸は、AUCスコアに対応する軸であり、横軸はバッチ(batch number)に対応する軸である。線分21aは、ベースラインの各バッチにおけるAUCスコアの推移を示す。線分21bは、提案手法の各バッチにおけるAUCスコアの推移を示す。
 図14のグラフG20、G21に示すように、本実施例の機械学習装置100を適用した異常検知AIは、暗い状態でも検知性能を維持している。
 続いて、生成方法(1)~(5)によって、疑似異常データを生成し、機械学習モデル142の性能を検証した結果について説明する。前提条件として、データは、異常データまたは正常データに分類され、異常データの数が、正常データの数と比較して少ないものとする。
(1)同一の異常データを複製する。
(2)(1)で複製した異常データにガウシアンノイズ(ノイズ強度:弱<標準偏差σ=0.01>)を付加したノイズデータを生成する。
(3)(1)で複製した異常データにガウシアンノイズ(ノイズ強度:中<標準偏差σ=0.1>)を付加したノイズデータを生成する。
(4)(1)で複製した異常データにガウシアンノイズ(ノイズ強度:強<標準偏差σ=1>)を付加したノイズデータを生成する。
(5)機械学習装置100のαブレンディングにより、異常データと、異常データに類似の正常データとを合成した疑似異常データを生成する。
 図15は、異なる生成方法によって生成したデータの一例を示す図である。データD1-1は、正常データである。データD1-2は、異常データである。データD(1)は、生成方法(1)により生成したデータである。データD(2)は、生成方法(2)により生成したデータである。データD(3)は、生成方法(3)により生成したデータである。データD(4)は、生成方法(4)により生成したデータである。データD(5)は、生成方法(5)により生成したデータである。
 図16は、検証結果を示す図(2)である。図16の検証結果は、生成方法(1)~(5)を用いた場合において、全バッチのカメラID別の平均AUCスコアを示す。図16に示すように、生成方法(5)は、他の生成方法(1)~(4)と比較して、AUCスコアが、最高値または次点の性能維持を達成している。
 なお、本実施例では一例として、データが異常データまたは正常データに分類され、異常データの数が、正常データの数と比較して少ない場合について説明したが、正常データの数が、異常データの数と比較して少ない場合も同様に適用可能である。また、本実施例では、データが、異常データまたは正常データに分類される場合について説明したが、これに限定されるものではなく、他のクラスに分類されてもよい。
 次に、上記実施例に示した機械学習装置100と同様の機能を実現するコンピュータのハードウェア構成の一例について説明する。図17は、実施例の機械学習装置と同様の機能を実現するコンピュータのハードウェア構成の一例を示す図である。
 図17に示すように、コンピュータ200は、各種演算処理を実行するCPU201と、ユーザからのデータの入力を受け付ける入力装置202と、ディスプレイ203とを有する。また、コンピュータ200は、有線または無線ネットワークを介して、外部装置等との間でデータの授受を行う通信装置204と、インタフェース装置205とを有する。また、コンピュータ200は、各種情報を一時記憶するRAM206と、ハードディスク装置207とを有する。そして、各装置201~207は、バス208に接続される。
 ハードディスク装置207は、取得プログラム207a、機械学習プログラム207b、事前処理プログラム207c、推論プログラム207d、生成プログラム207e、ラベル付与プログラム207f、劣化検出プログラム207gを有する。また、CPU201は、各プログラム207a~207gを読み出してRAM206に展開する。
 取得プログラム207aは、取得プロセス206aとして機能する。機械学習プログラム207bは、機械学習プロセス206bとして機能する。事前処理プログラム207cは、事前処理プロセス206cとして機能する。推論プログラム207dは、推論プロセス206dとして機能する。生成プログラム207eは、生成プロセス206eとして機能する。ラベル付与プログラム207fは、ラベル付与プロセス206fとして機能する。劣化検出プログラム207gは、劣化検出プロセス206gとして機能する。
 取得プロセス206aの処理は、取得部151の処理に対応する。機械学習プロセス206bの処理は、機械学習部152の処理に対応する。事前処理プロセス206cの処理は、事前処理部153の処理に対応する。推論プロセス206dの処理は、推論部154の処理に対応する。生成プロセス206eの処理は、生成部155の処理に対応する。ラベル付与プロセス206fの処理は、ラベル付与部156の処理に対応する。劣化検出プロセス206gの処理は、劣化検出部157の処理に対応する。
 なお、各プログラム207a~207gについては、必ずしも最初からハードディスク装置207に記憶させておかなくても良い。例えば、コンピュータ200に挿入されるフレキシブルディスク(FD)、CD-ROM、DVD、光磁気ディスク、ICカードなどの「可搬用の物理媒体」に各プログラムを記憶させておく。そして、コンピュータ200が各プログラム207a~207gを読み出して実行するようにしてもよい。
 100  機械学習装置
 110  通信部
 120  入力部
 130  表示部
 140  記憶部
 141  訓練データ
 142  機械学習モデル
 143  運用データ
 144  再訓練データ
 145  クラスタ関連データ
 150  制御部
 151  取得部
 152  機械学習部
 153  事前処理部
 154  推論部
 155  生成部
 156  ラベル付与部
 157  劣化検出部

Claims (12)

  1.  複数のデータを機械学習モデルに入力して、前記複数のデータの複数の予測結果を取得し、
     前記複数のデータのうち予測結果が第1のグループを示す第1のデータに基づいて、一又は複数のデータを生成し、
     前記機械学習モデルのパラメータに基づいて得られた、前記複数のデータと前記一又は複数のデータとのそれぞれの複数の特徴量に基づいて、前記複数のデータと前記一又は複数のデータとのクラスタリングを実行し、
     前記クラスタリングの結果を正解ラベルとする前記複数のデータと前記一又は複数のデータとを含む訓練データに基づいて、前記機械学習モデルのパラメータを更新する、
     処理をコンピュータに実行させることを特徴とする機械学習プログラム。
  2.  前記生成する処理は、前記複数のデータのうち前記複数の予測結果が第2のグループを示す第1の複数のデータのうち、前記第1のデータに類似する第2のデータを選択し、前記第1のデータの特徴量と前記第2のデータの特徴量との間の特徴量に対応する前記一又は複数のデータを生成する処理を含む、
     ことを特徴とする請求項1に記載の機械学習プログラム。
  3.  前記生成する処理は、前記第1のデータを複製することによって得られた第3のデータにノイズを付加することで、前記一又は複数のデータを生成する処理を含む、
     ことを特徴とする請求項1に記載の機械学習プログラム。
  4.  前記予測結果と、前記訓練データに含まれる正解ラベルとを基にして、前記機械学習モデルのパラメータを更新するか否かを判定する処理を更にコンピュータに実行させることを特徴とする請求項1に記載の機械学習プログラム。
  5.  複数のデータを機械学習モデルに入力して、前記複数のデータの複数の予測結果を取得し、
     前記複数のデータのうち予測結果が第1のグループを示す第1のデータに基づいて、一又は複数のデータを生成し、
     前記機械学習モデルのパラメータに基づいて得られた、前記複数のデータと前記一又は複数のデータとのそれぞれの複数の特徴量に基づいて、前記複数のデータと前記一又は複数のデータとのクラスタリングを実行し、
     前記クラスタリングの結果を正解ラベルとする前記複数のデータと前記一又は複数のデータとを含む訓練データに基づいて、前記機械学習モデルのパラメータを更新する、
     処理をコンピュータが実行することを特徴とする機械学習方法。
  6.  前記生成する処理は、前記複数のデータのうち前記複数の予測結果が第2のグループを示す第1の複数のデータのうち、前記第1のデータに類似する第2のデータを選択し、前記第1のデータの特徴量と前記第2のデータの特徴量との間の特徴量に対応する前記一又は複数のデータを生成する処理を含む、
     ことを特徴とする請求項5に記載の機械学習方法。
  7.  前記生成する処理は、前記第1のデータを複製することによって得られた第3のデータにノイズを付加することで、前記一又は複数のデータを生成する処理を含む、
     ことを特徴とする請求項5に記載の機械学習方法。
  8.  前記予測結果と、前記訓練データに含まれる正解ラベルとを基にして、前記機械学習モデルのパラメータを更新するか否かを判定する処理を更にコンピュータが実行することを特徴とする請求項5に記載の機械学習方法。
  9.  複数のデータを機械学習モデルに入力して、前記複数のデータの複数の予測結果を取得し、
     前記複数のデータのうち予測結果が第1のグループを示す第1のデータに基づいて、一又は複数のデータを生成し、
     前記機械学習モデルのパラメータに基づいて得られた、前記複数のデータと前記一又は複数のデータとのそれぞれの複数の特徴量に基づいて、前記複数のデータと前記一又は複数のデータとのクラスタリングを実行し、
     前記クラスタリングの結果を正解ラベルとする前記複数のデータと前記一又は複数のデータとを含む訓練データに基づいて、前記機械学習モデルのパラメータを更新する、
     処理を実行する制御部を有する機械学習装置。
  10.  前記生成する処理は、前記複数のデータのうち前記複数の予測結果が第2のグループを示す第1の複数のデータのうち、前記第1のデータに類似する第2のデータを選択し、前記第1のデータの特徴量と前記第2のデータの特徴量との間の特徴量に対応する前記一又は複数のデータを生成する処理を含む、
     ことを特徴とする請求項9に記載の機械学習装置。
  11.  前記生成する処理は、前記第1のデータを複製することによって得られた第3のデータにノイズを付加することで、前記一又は複数のデータを生成する処理を含む、
     ことを特徴とする請求項9に記載の機械学習装置。
  12.  前記制御部は、前記予測結果と、前記訓練データに含まれる正解ラベルとを基にして、前記機械学習モデルのパラメータを更新するか否かを判定する処理を更に実行することを特徴とする請求項9に記載の機械学習装置。
PCT/JP2021/035678 2021-09-28 2021-09-28 機械学習プログラム、機械学習方法および機械学習装置 WO2023053216A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2023550801A JPWO2023053216A1 (ja) 2021-09-28 2021-09-28
PCT/JP2021/035678 WO2023053216A1 (ja) 2021-09-28 2021-09-28 機械学習プログラム、機械学習方法および機械学習装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/035678 WO2023053216A1 (ja) 2021-09-28 2021-09-28 機械学習プログラム、機械学習方法および機械学習装置

Publications (1)

Publication Number Publication Date
WO2023053216A1 true WO2023053216A1 (ja) 2023-04-06

Family

ID=85781501

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/035678 WO2023053216A1 (ja) 2021-09-28 2021-09-28 機械学習プログラム、機械学習方法および機械学習装置

Country Status (2)

Country Link
JP (1) JPWO2023053216A1 (ja)
WO (1) WO2023053216A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018134952A1 (ja) * 2017-01-19 2018-07-26 株式会社島津製作所 分析データ解析方法および分析データ解析装置
WO2021059509A1 (ja) * 2019-09-27 2021-04-01 日本電気株式会社 学習装置、判別システム、学習方法及び学習プログラムが格納された非一時的なコンピュータ可読媒体
JP2021057042A (ja) * 2019-10-01 2021-04-08 三星ディスプレイ株式會社Samsung Display Co.,Ltd. 製品の分類システムおよび製品の分類方法
WO2021079442A1 (ja) 2019-10-23 2021-04-29 富士通株式会社 推定プログラム、推定方法、情報処理装置、再学習プログラムおよび再学習方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018134952A1 (ja) * 2017-01-19 2018-07-26 株式会社島津製作所 分析データ解析方法および分析データ解析装置
WO2021059509A1 (ja) * 2019-09-27 2021-04-01 日本電気株式会社 学習装置、判別システム、学習方法及び学習プログラムが格納された非一時的なコンピュータ可読媒体
JP2021057042A (ja) * 2019-10-01 2021-04-08 三星ディスプレイ株式會社Samsung Display Co.,Ltd. 製品の分類システムおよび製品の分類方法
WO2021079442A1 (ja) 2019-10-23 2021-04-29 富士通株式会社 推定プログラム、推定方法、情報処理装置、再学習プログラムおよび再学習方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
AJINKYA MORE: "Survey of resampling techniques for improving classification performance in unbalanced datasets", , CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 22 August 2016 (2016-08-22), XP080721470 *

Also Published As

Publication number Publication date
JPWO2023053216A1 (ja) 2023-04-06

Similar Documents

Publication Publication Date Title
JP2020119543A (ja) 分類モデルを訓練する装置及び方法
CN108647583B (zh) 一种基于多目标学习的人脸识别算法训练方法
CN103136504B (zh) 人脸识别方法及装置
US8626682B2 (en) Automatic data cleaning for machine learning classifiers
CN111339990A (zh) 一种基于人脸特征动态更新的人脸识别系统和方法
JP2015087903A (ja) 情報処理装置及び情報処理方法
CN110543906B (zh) 基于Mask R-CNN模型的肤质自动识别方法
CN111834010A (zh) 一种基于属性约简和XGBoost的COVID-19检测假阴性识别方法
US20220245405A1 (en) Deterioration suppression program, deterioration suppression method, and non-transitory computer-readable storage medium
WO2020190480A1 (en) Classifying an input data set within a data category using multiple data recognition tools
WO2021079442A1 (ja) 推定プログラム、推定方法、情報処理装置、再学習プログラムおよび再学習方法
CN112668482B (zh) 人脸识别训练方法、装置、计算机设备及存储介质
CN113469091B (zh) 人脸识别方法、训练方法、电子设备及存储介质
JP2019067299A (ja) ラベル推定装置及びラベル推定プログラム
WO2023053216A1 (ja) 機械学習プログラム、機械学習方法および機械学習装置
CN112380374A (zh) 一种基于语义扩充的零样本图像分类方法
CN112561073A (zh) 使用基于批次的主动学习方案训练机器学习模型
CN115795355A (zh) 一种分类模型训练方法、装置及设备
CN112738724B (zh) 一种区域目标人群的精准识别方法、装置、设备和介质
CN112346126B (zh) 低级序断层的识别方法、装置、设备及可读存储介质
Lipor et al. Margin-based active subspace clustering
US20230027309A1 (en) System and method for image de-identification to humans while remaining recognizable by machines
Luebke et al. Linear dimension reduction in classification: adaptive procedure for optimum results
CN112905166A (zh) 人工智能编程系统、计算机设备、计算机可读存储介质
Atallah et al. NEURAL NETWORK WITH AGNOSTIC META-LEARNING MODEL FOR FACE-AGING RECOGNITION

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21959264

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023550801

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2021959264

Country of ref document: EP

Effective date: 20240429