Learning methods, inference models, anomaly detection methods, anomaly detection programs, and anomaly detection systems.
The learning method addresses the challenge of anomaly detection by incorporating anomaly removal and addition steps during training, enabling accurate detection from mixed data without prior classification, thus improving model accuracy and reducing dataset costs.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- HAMAMATSU PHOTONICS KK
- Filing Date
- 2025-02-27
- Publication Date
- 2026-04-22
AI Technical Summary
Existing methods for generating inference models to detect anomalies in images require only normal images, leading to a risk of misidentifying anomalies if abnormal images are included, and preparing a dataset of normal images is costly.
A learning method that includes anomaly removal and addition steps during training, using an inference model to generate learning data with and without anomalies, allowing the model to be trained without distinguishing between normal and abnormal images.
Enables appropriate anomaly detection from data containing anomalies, generating a more accurate inference model capable of identifying abnormalities without prior distinction, thus reducing the need for costly dataset preparation.
Smart Images

Figure 0007850362000001 
Figure 0007850362000002 
Figure 0007850362000003
Abstract
Description
Technical Field
[0001] The present invention relates to a learning method for generating an inference model used to detect an abnormality of an object related to data from the data, the generated inference model, and an abnormality detection method, an abnormality detection program, and an abnormality detection system for detecting an abnormality from data using the generated inference model.
Background Art
[0002] Conventionally, a technique for generating an inference model for detecting an abnormality of an object shown in an image from the image by machine learning has been proposed. For example, Non-Patent Documents 1 to 4 disclose techniques for performing learning using only normal images in which no abnormality is shown. Specifically, Non-Patent Documents 1 to 3 disclose techniques for detecting an abnormality using a distance based on a feature vector of a normal image. Non-Patent Document 4 discloses a technique for detecting an abnormality for each pixel by learning to remove an abnormality added to a normal image.
Prior Art Documents
Non-Patent Documents
[0003]
Non-Patent Document 1
Non-Patent Document 2
Non-Patent Document 3
[0004] According to the techniques described in Non-Patent Documents 1-4 above, generating an inference model for detecting anomalies from images does not require abnormal images containing anomalies, and therefore there is no need to prepare abnormal images. However, if abnormal images are mixed in with the images used to generate the inference model, there is a risk that images that should be detected as abnormal may be mistakenly identified as normal during detection using that inference model. Therefore, it is necessary to distinguish between normal and abnormal images in advance from the candidate images used to generate the inference model, and to use only normal images as the images used to generate the inference model. Preparing such a dataset is costly.
[0005] One embodiment of the present invention has been made in view of the above, and aims to provide a learning method, an inference model, anomaly detection method, anomaly detection program, and anomaly detection system that can appropriately detect anomalies from data without making distinctions regarding anomalies, even when the data used to generate an inference model by training a machine learning model includes data containing anomalies. [Means for solving the problem]
[0006] To achieve the above objective, a learning method according to one embodiment of the present invention is a learning method for generating an inference model used to detect anomalies in an object related to data having multiple values, and includes: a learning acquisition step of acquiring learning data having multiple values; an anomaly removal step of generating learning data after anomaly removal using an inference model in the middle of training from the learning data acquired in the learning acquisition step; an anomaly addition step of adding pre-set anomalies to the learning data after anomaly removal generated in the anomaly removal step to generate learning data with anomaly added; and a training step of training the machine learning of the inference model using a combination of the learning data acquired in the learning acquisition step and the learning data with anomaly added generated in the anomaly addition step, wherein after the inference model is trained in the training step, the anomaly removal step generates learning data after anomaly removal using the trained inference model as an inference model in the middle of training, and the anomaly removal step, the anomaly addition step, and the training step are repeated.
[0007] In the learning method according to one embodiment of the present invention, anomaly-added learning data, which is used to train an inference model together with the learning data, is generated from the learning data. The anomaly-added learning data is obtained by removing anomalies contained in the learning data using an inference model during training, and then adding pre-set anomalies. Therefore, even if the learning data contains data with anomalies, the anomalies can be excluded and the inference model can be trained. As a result, the learning method according to one embodiment of the present invention can generate an inference model that can appropriately detect anomalies. Thus, according to the learning method according to one embodiment of the present invention, even if the data used to generate an inference model by training a machine learning model contains data with anomalies, anomalies can be appropriately detected from the data without making distinctions regarding the anomalies.
[0008] In the training step, the training data acquired in the training data acquisition step may be treated as normal data without anomalies, and the anomaly-added training data generated in the anomaly-adding step may be treated as anomaly data containing anomalies, thereby training the machine learning of the inference model. With this configuration, it is possible to train the machine learning of the inference model more appropriately and generate a more appropriate inference model.
[0009] Each time the inference model is trained in the training step, the anomaly removal step may be performed using the trained inference model as the inference model in progress to generate the anomaly-removed training data. With this configuration, a new combination of training data and anomaly-added training data can be obtained with each iteration of training using the same training data. As a result, an inference model can be generated more appropriately.
[0010] In one of the iterations, during the training step, the machine learning of the inference model may be trained using the training data acquired in the training data acquisition step, instead of the anomaly-adding training data generated in the anomaly-adding step. This configuration allows for a more appropriate range of values for the data output from the generated inference model, and enables more accurate detection of anomalies from the data.
[0011] In the anomaly addition step, anomalies that are amplified from anomalies expected to be detected may be added as pre-set anomalies to generate data for anomaly addition training. With this configuration, anomalies can be detected more appropriately from the data.
[0012] In the anomaly addition step, pre-set anomalies may be added according to the iteration to generate anomaly-added training data. With this configuration, anomaly-added training data, to which various anomalies have been added according to the iteration, can be used to train the inference model. As a result, anomalies can be detected more appropriately from the data.
[0013] The inference model generated by the learning method according to one embodiment of the present invention is itself an invention with a novel configuration. That is, the inference model according to one embodiment of the present invention is an inference model that causes a computer to function by taking data having multiple values as input, performing calculations according to the input, and outputting information, and is generated by the learning method described above.
[0014] To achieve the above objective, an anomaly detection method according to one embodiment of the present invention is an anomaly detection method that uses an inference model generated by the above learning method to detect anomalies in an object relating to data having multiple values, and includes a detection acquisition step of acquiring anomaly detection target data that has multiple values and is subject to anomaly detection, and an anomaly detection step of detecting anomalies from the anomaly detection target data acquired in the detection acquisition step using the inference model.
[0015] In the anomaly detection method according to one embodiment of the present invention, the above-described inference model is used to detect anomalies. Therefore, according to the anomaly detection method according to one embodiment of the present invention, anomalies can be appropriately detected from the data.
[0016] One embodiment of the present invention can be described as an anomaly detection method as described above, but it can also be described as an anomaly detection program and an anomaly detection system as described below. These are substantially the same invention, differing only in category, and they have similar functions and effects.
[0017] In other words, an anomaly detection program according to one embodiment of the present invention is an anomaly detection program that causes a computer to operate as an anomaly detection system that detects anomalies in an object related to data having multiple values from data having multiple values using an inference model generated by the learning method described above, wherein the computer functions as a detection acquisition means that acquires anomaly detection target data having multiple values and which is the target of anomaly detection, and an anomaly detection means that detects anomalies from the anomaly detection target data acquired by the detection acquisition means using an inference model.
[0018] An abnormality detection system according to an embodiment of the present invention is an abnormality detection system that uses an inference model generated by the above learning method to detect an abnormality of an object related to data from data having a plurality of values, and includes: a detection acquisition unit that acquires abnormality detection target data having a plurality of values and being a target for abnormality detection; and an abnormality detection unit that detects an abnormality using the inference model from the abnormality detection target data acquired by the detection acquisition unit.
Advantages of the Invention
[0019] According to the present invention, even when data including data having an abnormality is included in the data used for generating an inference model by training of machine learning, an abnormality can be appropriately detected from the data without making a distinction related to the abnormality.
Brief Description of the Drawings
[0020] [Figure 1] It is a diagram showing the configuration of a learning system and an abnormality detection system according to an embodiment of the present invention. [Figure 2] It is a diagram showing an outline of a learning method according to an embodiment. [Figure 3] It is a flowchart showing a learning method which is a process executed by a learning system according to an embodiment of the present invention. [Figure 4] It is a flowchart showing an abnormality detection method which is a process executed by an abnormality detection system according to an embodiment of the present invention. [Figure 5] It is an image used in an example. [Figure 6] It is an example of an image with an abnormality removed for each number of repetitions (number of learning times) of machine learning training when generating an inference model. [Figure 7] It is an example of a result of detecting an abnormal part. [Figure 8] It is an example of a result of detecting an abnormal part and an image with the abnormality removed. [Figure 9] It is a diagram showing the configuration of a learning program and an abnormality detection program according to an embodiment of the present invention together with a recording medium. [Modes for carrying out the invention]
[0021] Hereinafter, embodiments of the learning method, inference model, anomaly detection method, anomaly detection program, and anomaly detection system according to the present invention will be described in detail with reference to the drawings. In the description of the drawings, the same elements are denoted by the same reference numerals, and redundant explanations are omitted.
[0022] Figure 1(a) shows a learning system 10 that executes the learning method according to this embodiment. Figure 1(b) shows an anomaly detection system 20 that executes the anomaly detection method according to this embodiment. The learning system 10 is a system (device) that generates an inference model (learning model) used to detect anomalies in an object related to data from data having multiple values. The anomaly detection system 20 is a system (device) that uses the inference model generated by the learning system 10 to detect anomalies in an object related to data having multiple values.
[0023] In this embodiment, the detection data used to detect abnormalities in an object is, for example, an image of the object obtained by imaging the object. Furthermore, the detection data does not necessarily have to be an image; it may also be, for example, spectral data or time-series data. Spectral data is, for example, intensity data with respect to wavenumber (wavelength, frequency). Time-series data is, for example, intensity data for each time period, and specifically, it may be output data (output signals) from a detector such as a photomultiplier tube or point sensor, or measurement data of biological information such as hemoglobin concentration.
[0024] The abnormalities to be detected are, for example, defects such as holes and scratches that should not be present in the object shown in the image. Alternatively, the abnormalities to be detected may be the presence of foreign matter such as dust that should not be present in the object other than the object itself. The abnormalities to be detected are assumed to be partial abnormalities. That is, it is assumed that the majority of the object is free of abnormalities, but an abnormality occurs in only a part of it. The abnormality detection according to this embodiment can be used, for example, to detect abnormalities in manufactured products. However, the abnormalities to be detected may be other than those described above. Furthermore, the abnormality detection according to this embodiment may be performed for purposes other than those described above.
[0025] The learning system 10 and the anomaly detection system 20 are comprised of a conventional computer including hardware such as a processor, memory, and communication modules. The processor is, for example, a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit).
[0026] Furthermore, the learning system 10 and the anomaly detection system 20 may include imaging devices such as cameras for acquiring images used in processing. Alternatively, the learning system 10 and the anomaly detection system 20 may be included in imaging devices such as cameras for acquiring images used in processing. In Figure 1, the learning system 10 and the anomaly detection system 20 are shown as separate systems (devices), but they may be implemented by the same system (device).
[0027] The computers comprising the learning system 10 and the anomaly detection system 20 may be a computer system including multiple computers. Furthermore, the computers may be configured using cloud computing or edge computing. The functions of the learning system 10 and the anomaly detection system 20, as described later, are performed by these components operating through programs or the like.
[0028] Next, the functions of the learning system 10 and the anomaly detection system 20 according to this embodiment will be described. As shown in Figure 1, the learning system 10 is configured to include a learning acquisition unit 11, an anomaly removal unit 12, an anomaly addition unit 13, and a training unit 14.
[0029] The learning system 10 generates an inference model through machine learning training. The inference model is composed of, for example, a neural network. The neural network may be multi-layered. That is, the inference model may be generated by deep learning. The neural network may also be a convolutional neural network (CNN). The form of the inference model may be similar to that of conventional inference models generated by machine learning training, for example, a 6-layer Conv2D+ReLU.
[0030] An inference model is used to detect anomalies in an object from data that has multiple values. For example, an inference model takes data to be detected as an anomaly as input and outputs data that does not contain the anomaly, i.e., data from which the anomaly has been removed. The output from the inference model is, for example, an image in which the anomaly in the input image has been removed so that the anomaly does not occur. Specifically, if the image input to the inference model is an image of an object with a defect, the image output from the inference model will be an image of the object without the defect. By comparing these inputs and outputs, for example by taking the difference between the input and output, it is possible to detect anomalies in the object (the parts where the anomaly occurs).
[0031] In this case, the inference model is equipped with neurons in the input layer to receive the data to be detected for anomaly detection. For example, the information input to the inference model is the pixel value (luminance value) of each pixel in an image, which is the data to be detected for anomaly detection. In this case, the input layer is equipped with neurons equal to the number of pixels in the image, and each neuron is input with the pixel value of the corresponding pixel.
[0032] Furthermore, the inference model includes neurons in the output layer to output the data after anomaly removal. For example, the information output from the inference model is the pixel value of each pixel in the image, which is the data after anomaly removal. In this case, the output layer has as many neurons as there are pixels in the image, and the pixel value of the corresponding pixel is output from each neuron.
[0033] Alternatively, the inference model may take data to be detected for anomalies as input and output data indicating anomalies in the object. The output from the inference model may be, for example, an image of the object in which the anomaly is located and has pixel values corresponding to the anomaly. Specifically, the image output from the inference model may be an image in which the defect is located and has pixel values corresponding to the defect. In this case, the data output from the inference model can be used as the anomaly detection result. Furthermore, the inference model may be anything other than those described above, as long as it is used to detect anomalies in the object related to the data to be detected for anomalies.
[0034] An inference model is designed to allow a computer to take data with multiple values as input, perform calculations based on the input, and output information. Inference models are intended to be used as program modules, which are part of artificial intelligence software. For example, an inference model is used in a computer equipped with a processor and memory, where the computer's processor operates according to instructions from the model stored in memory. For instance, the computer's processor operates according to these instructions, inputting information into the model, performing calculations appropriate to the model, and outputting results from the model. Specifically, the computer's processor operates according to these instructions, inputting information into the input layer of a neural network, performing calculations based on parameters such as learning weighting coefficients in the neural network, and outputting results from the output layer of the neural network. Note that an inference model may be composed of something other than a neural network.
[0035] Figure 2 shows an overview of the learning method for generating the inference model according to this embodiment. The learning method in this embodiment, as described below, is called contrastive synthesis learning (CSL).
[0036] The learning data acquisition unit 11 is a learning data acquisition means that acquires learning data having multiple values. The learning data acquisition unit 11 acquires learning data as follows, for example.
[0037] The training data is in the same format as the data targeted for anomaly detection. For example, if the data targeted for anomaly detection is an image, the training data is an image of the same size. The image is, for example, an image obtained by imaging an object prepared in advance using an imaging device. The object used for training may be of the same type as the data targeted for anomaly detection, or it may be of a different type.
[0038] In this embodiment, it is assumed that the training data basically consists of data without abnormalities in the object being trained (e.g., normal images). However, the training data may also include data with abnormalities in the object being trained (e.g., abnormal images). For example, the majority of the training data may consist of data without abnormalities in the object being trained, and a portion of the training data may consist of data with abnormalities in the object being trained. In this embodiment, by allowing such training data, it is not necessary to distinguish in advance between data without abnormalities in the object being trained (e.g., normal images) and data with abnormalities in the object being trained (e.g., abnormal images) when preparing the training data. That is, in this embodiment, an inference model is generated without annotation (no label indication).
[0039] The learning data acquisition unit 11 acquires images that are larger in size than the training data as the source images (source data) for training. Source images are acquired, for example, by receiving them from the imaging device that captured the source images, or by accepting a source image input operation from the user to the learning system 10.
[0040] As shown in Figure 2, the training data acquisition unit 11 extracts and acquires training data 31 from the original image 30, specifically from a region (part) of a predetermined size smaller than the original image. The training data acquisition unit 11 may, for example, acquire multiple training data at randomly different positions from a single original image. Alternatively, the training data acquisition unit 11 may acquire training data 31 (images) from multiple original images (original image pool).
[0041] The learning data acquisition unit 11 may acquire learning data by methods other than cropping from the original image as described above. The number of learning data acquired may be one or multiple. The learning data acquisition unit 11 outputs the acquired learning data to the anomaly removal unit 12 and the training unit 14.
[0042] The anomaly removal unit 12 is an anomaly removal means that generates anomaly-removed training data from the training data acquired by the training data acquisition unit 11 using an inference model in the process of training. After the inference model has been trained by the training unit 14, the anomaly removal unit 12 generates anomaly-removed training data using the trained inference model as an inference model in the process of training. Each time the inference model is trained by the training unit 14, the anomaly removal unit 12 may generate anomaly-removed training data using the trained inference model as an inference model in the process of training.
[0043] The anomaly removal unit 12 generates training data after anomaly removal, for example, as follows. The generation of the inference model is performed by repeatedly performing the processing by the anomaly removal unit 12 (anomaly removal step), the processing by the anomaly addition unit 13 (anomaly addition step), and the processing by the training unit 14 (training step).
[0044] As described later, the training unit 14 trains the machine learning of the inference model. The training unit 14 outputs the inference model after machine learning training, i.e., the inference model in the middle of training, to the anomaly removal unit 12 during the above iteration. The anomaly removal unit 12 receives the inference model from the training unit 14 and stores it. The output of the inference model from the training unit 14 to the anomaly removal unit 12 may be performed, for example, by sharing the inference model or copying the inference model. The output of the inference model from the training unit 14 to the anomaly removal unit 12 may be performed each time the inference model is trained. Alternatively, the output may be performed not each time the inference model is trained, but at a predetermined timing in the above iteration.
[0045] The anomaly removal unit 12 receives training data from the training data acquisition unit 11. The anomaly removal unit 12 generates anomaly-removed training data from the input training data using an inference model that is in the process of being trained. For example, if the inference model outputs data with anomalies removed, i.e., anomaly-removed images, then, as shown in Figure 2, the anomaly removal unit 12 inputs the training data 31 (image) into the inference model and obtains the output of anomaly-removed training data 32 (image) from the inference model.
[0046] Furthermore, the anomaly removal unit 12 may generate data indicating anomalies in the target object related to the training data 31. In the above case, the anomaly removal unit 12 takes the difference between the training data 31 and the training data 32 after anomaly removal and generates data 33 indicating anomalies in the target object. The difference is, for example, obtained by subtracting the pixel values of the pixels at the same positions in the training data 32 after anomaly removal from the pixel values of the pixels at the same positions in the training data 31.
[0047] For example, if the inference model outputs data indicating an anomaly in the object, the anomaly removal unit 12 removes the data indicating the anomaly in the object obtained using the inference model 33 from the training data to obtain the training data 32 after anomaly removal. For example, the anomaly removal unit 12 subtracts the pixel values of the pixels at the same positions in the data indicating the anomaly in the object 33 from the pixel values of the pixels at the same positions in the training data 31 to obtain the training data 32 after anomaly removal. Alternatively, the anomaly removal unit 12 may generate the training data after anomaly removal by any method other than those described above, as long as it uses an inference model.
[0048] As shown in Figure 2, the anomaly addition unit 13 stores the anomaly-indicating data generated by the anomaly removal unit 12 in the anomaly detection memory of the anomaly (negative example) pool 13a. The anomaly addition unit 13 stores the anomaly-indicating data in the anomaly detection memory for each iteration of the inference model. When the anomaly addition unit 13 stores new anomaly-indicating data in the anomaly detection memory, if it exceeds a preset number of stored data (for example, 50), it erases the oldest anomaly-indicating data and rewrites the stored data. Alternatively, the anomaly addition unit 13 may probabilistically overwrite any of the already stored anomaly-indicating data.
[0049] While the inference model in the training phase may not have sufficient anomaly detection capabilities, it can be used to generate training data after anomaly removal. Therefore, if the training data contains anomalies, the training data generated by the anomaly removal unit 12 will have fewer anomalies than the original training data.
[0050] If there are no abnormalities in the object related to the training data, the training data after abnormality removal will be identical to the training data. In this case, the data indicating abnormalities in the object related to the training data will indicate that there are no abnormalities in the object. The data indicating abnormalities in the object will be, for example, an image in which all pixel values are 0. The abnormality removal unit 12 outputs the generated abnormality-removed training data to the abnormality addition unit 13.
[0051] The anomaly addition unit 13 is an anomaly addition means that adds pre-set anomalies to the training data after anomaly removal generated by the anomaly removal unit 12 to generate anomaly-added training data. The anomaly addition unit 13 may generate anomaly-added training data by adding anomalies that are amplified from anomalies expected to be detected as pre-set anomalies. The anomaly addition unit 13 may generate anomaly-added training data by adding pre-set anomalies according to the repetition.
[0052] The anomaly addition unit 13 generates anomaly-added learning data, for example, as follows. The anomaly-added learning data generated by the anomaly addition unit 13 is used for training the machine learning of the inference model by the training unit 14. The anomaly addition unit 13 receives the learning data after anomaly removal from the anomaly removal unit 12. The anomaly addition unit 13 adds (combines) pre-set data indicating anomalies in the target object to the input learning data after anomaly removal to generate anomaly-added learning data. In this embodiment, the learning data after anomaly removal is called a positive example, and the data indicating anomalies is called a negative example.
[0053] For example, the anomaly addition unit 13 pre-stores data indicating anomalies in an object for creating anomaly addition training data. The data indicating anomalies in an object is, for example, an image unrelated to the object's data. The image unrelated to the object's data is, for example, an image generated by geometric fractals. Such images may be obtained from an existing database (for example, FractalDB of the National Institute of Advanced Industrial Science and Technology). The data indicating anomalies in an object may be smaller in size than the training data (training data after anomaly removal). The anomaly addition unit 13 pre-stores the image unrelated to the object's data in the anomaly pool created as an anomaly (negative example) pool. Multiple images may be stored in the created anomaly pool.
[0054] Furthermore, as described above, the anomaly addition unit 13 stores data indicating anomalies generated when the training data after anomaly removal is generated by the anomaly removal unit 12 in the anomaly detection memory of the anomaly (negative example) pool 13a. If anomalies included in the training data are anomalies that are expected to be detected, the data indicating anomalies stored in the anomaly detection memory of the anomaly (negative example) pool 13a is of the same type as the anomalies expected to be detected. In addition, the anomaly addition unit 13 may also store other pre-set anomaly data.
[0055] The anomaly addition unit 13 selects and acquires one of the data indicating an anomaly stored in the anomaly (negative example) pool 13a. The selection of data indicating an anomaly can be done randomly, for example. However, in each iteration, the data indicating an anomaly that is generated when the anomaly removal unit 12 generates the training data after anomaly removal may not be selected. This is because if this is selected, the generated anomaly-added training data will be the same as the original training data.
[0056] As shown in Figure 2, the anomaly addition unit 13 adds the acquired anomaly-indicating data (image) to the training data 32 (image) after anomaly removal to generate anomaly-added training data 34 (image). The anomaly addition unit 13 generates the anomaly-added training data 34 by adding the pixel value of the training data 32 after anomaly removal and the pixel value of the anomaly-indicating data for each pixel. Alternatively, the anomaly addition unit 13 may generate the anomaly-added training data 34 by replacing the pixel value of the training data 32 after anomaly removal with the pixel value of the anomaly-indicating data for each pixel.
[0057] If the size of the data showing anomalies is smaller than the size of the training data 32 after anomaly removal, the anomaly addition unit 13 can determine the locations to which anomalies will be added in the training data 32 after anomaly removal using a predetermined method (for example, randomly). If the size of the data showing anomalies is the same as the size of the training data 32 after anomaly removal, the anomaly addition unit 13 can add anomalies to the training data 32 after anomaly removal for each pixel at the same location.
[0058] The anomaly addition unit 13 may generate anomaly-added learning data such that the similarity between the generated anomaly-added learning data and the learning data after anomaly removal used to generate the anomaly-added learning data is reduced. That is, the anomaly addition unit 13 may combine positive and negative examples such that the similarity to the source data is reduced.
[0059] In this case, the anomaly addition unit 13 first generates anomaly-added training data as described above. The anomaly addition unit 13 calculates the similarity between the generated anomaly-added training data and the training data after anomaly removal used to generate the anomaly-added training data. For example, the anomaly addition unit 13 calculates SSIM (Structural Similarity) as this similarity. If the calculated SSIM indicates a low similarity (for example, if the SSIM is around 0 (-0.25 to +0.25)), the anomaly addition unit 13 adopts the generated anomaly-added training data.
[0060] If the calculated SSIM indicates a high degree of similarity (for example, if the SSIM is not near 0 (-1.0 to -0.25, +0.25 to +1.0)), the anomaly addition unit 13 discards the generated anomaly addition training data without adopting it, and again obtains data indicating a different anomaly from the anomaly (negative example) pool 13a to generate new anomaly addition training data. The anomaly addition unit 13 then decides whether to adopt the generated anomaly addition training data in the same manner as described above.
[0061] Furthermore, the similarity between the data used for anomaly-added training and the training data after anomaly removal may be measured using a method other than SSIM. For example, this similarity may be calculated using a pseudo-evaluation function such as cosine similarity.
[0062] The technical significance of using similarity as described above is explained below. When using a U-Net type model as an inference model, encoders and decoders of the same resolution are connected by a shortcut path. Encoder-decoder models used in autoencoders do not have a shortcut path, and the signal travels through to the inner block with reduced resolution. On the other hand, the U-Net type allows processing without passing through the inner encoder-decoder section with reduced resolution due to the shortcut path.
[0063] Therefore, even if feature processing is performed only in layers close to the input and output, a model is learned that works well for the target data. The problem with convolutions, where shallow layers = narrow activation range = locality, is that accuracy does not improve for this reason. In contrast, Transformers and MLP-Mixers aim to learn global features (solving the problem of local features in convolutions).
[0064] As described above, preparing training data with low similarity after anomaly removal and training data with added anomalies is not merely data augmentation, but contributes to training at deeper layers. If training data with added anomalies is generated randomly without evaluation based on similarity, the training will be processed by shallow layers (encoder-decoder), resulting in a narrow activation range (recognition range). By preparing training data with low similarity after anomaly removal and training data with added anomalies, training will extend to deeper layers (encoder-decoder), resulting in a wider activation range (recognition range).
[0065] The fact that the learning of the inner encoder-decoder block (layer) described above changes based on the similarity evaluation can be seen by visualizing the feature vectors within the model using methods that project multidimensional vectors onto two dimensions, such as u-map and T-SNE. This is why this should be done with data augmentation. In other words, it is important to perform anomaly synthesis in a contrastive manner.
[0066] As will be discussed later, in machine learning training of an inference model, for example, anomaly-added training data is used as the input to the inference model, and training data is used as the output from the inference model. When a neural network with multiple layers is used as the inference model, the anomaly-added training data corresponds to the input to the input layer, and the training data corresponds to the output from the output layer. If the anomaly-added training data and the training data after anomaly removal are highly similar, the similarity between the anomaly-added training data and the training data will also be high. In other words, the similarity between the input to the input layer and the output from the output layer in machine learning training of an inference model will be high.
[0067] When there is a high degree of similarity between the input to the input layer and the output from the output layer, machine learning training becomes less efficient in the layers between the input and output layers, especially in deeper layers far from the input and output layers. This is particularly noticeable when there are shortcut paths (for example, between layers with the same resolution but not adjacent to each other, such as the path between the input and output layers). In this case, as mentioned above, due to the high degree of similarity, machine learning training is mainly carried out in the input and output layers, as well as in their immediate vicinity.
[0068] By reducing the similarity between the anomaly-added training data and the training data after anomaly removal, the similarity between the anomaly-added training data and the training data can also be reduced. This reduces the similarity between the input to the input layer and the output from the output layer during machine learning training of the inference model. When the similarity between the input to the input layer and the output from the output layer is low, the above phenomenon that occurs when the similarity is high can be suppressed, and machine learning training can proceed more easily in the layers between the input layer and the output layer. Therefore, as described above, by adopting anomaly-added training data to be used for machine learning training based on similarity, machine learning training can be performed efficiently and appropriately. Note that the similarity used in the above adoption decision may also be the similarity between the anomaly-added training data and the training data related to the anomaly-added training data.
[0069] If the anomaly added to the training data after anomaly removal is an anomaly expected to be detected, the anomaly addition unit 13 may add an amplified version of the anomaly shown in the acquired data to the training data 32 after anomaly removal to generate anomaly-added training data 34. For example, the anomaly addition unit 13 generates anomaly-added training data 34 (image) by multiplying the data (image) showing the anomaly by an adjustment variable and adding it to the training data 32 (image) after anomaly removal.
[0070] The adjustment variable is a value pre-set and stored in the anomaly addition unit 13 for amplifying anomalies. The adjustment variable is a value greater than 1 (specifically, 2, 3, or 4). For example, the anomaly addition unit 13 multiplies the pixel value of each pixel in the anomaly-indicating data (image) by the adjustment variable. The anomaly addition unit 13 adds the pixel values of the anomaly-indicating data (image) multiplied by the adjustment variable to the pixel values of the training data 32 (image) after anomaly removal, or replaces the pixel values of the training data 32 (image) after anomaly removal with the pixel values of the anomaly-indicating data (image) multiplied by the adjustment variable to generate anomaly-added training data 34 (image).
[0071] The anomaly addition unit 13 may generate anomaly-adding learning data by adding anomalies corresponding to the repetition. For example, the anomaly addition unit 13 may generate anomaly-adding learning data by obtaining data showing a different anomaly each time anomaly-adding learning data is generated from the anomaly (negative example) pool 13a.
[0072] Furthermore, the anomaly addition unit 13 may generate anomaly-added training data that can be used for training the machine learning of the inference model described later, by adding pre-set anomalies to the training data after anomaly removal generated by the anomaly removal unit 12. The anomaly addition unit 13 outputs the generated anomaly-added training data to the training unit 14.
[0073] The training unit 14 is a training means that trains the machine learning of an inference model using a combination of training data acquired by the learning acquisition unit 11 and anomaly-added training data generated by the anomaly-adding unit 13. The training unit 14 may train the machine learning of the inference model by treating the training data acquired by the learning acquisition unit 11 as normal data that does not contain anomalies, and the anomaly-added training data generated by the anomaly-adding unit 13 as anomaly-added data. In any of the above iterations, the training unit 14 may train the machine learning of the inference model using training data acquired by the learning acquisition unit 11 instead of anomaly-added training data generated by the anomaly-adding unit 13.
[0074] The training unit 14 performs machine learning training of an inference model, for example, as follows: The training unit 14 receives training data from the training data acquisition unit 11. The training unit 14 receives anomaly-added training data based on the training data from the anomaly-added unit 13. The training unit 14 trains the inference model using a combination of this training data and anomaly-added training data.
[0075] The training unit 14 trains the inference model using machine learning by using a combination of training data, where the training data consists of normal data without anomalies, and the anomaly-added training data consists of anomaly-added data. For example, if the inference model is to take data to be detected for anomalies as input and output data after anomaly removal, the training unit 14 trains the inference model to take the anomaly-added training data as input and output training data. The training unit 14 trains the inference model using a conventional method (e.g., Noise2Clean).
[0076] In this case, for example, as shown in Figure 2, the training unit 14 inputs the anomaly-added learning data 34 (image) into the inference model and obtains data 35 (image) from which the anomalies have been removed by the inference model at that point. The training unit 14 compares the anomaly-removed data 35 with the training data 31 (image) and updates the parameters of the inference model by backpropagation based on the loss calculated from the comparison.
[0077] Furthermore, if the inference model is configured to take data to be detected for anomalies as input and output anomaly data, the training unit 14 trains the inference model to take anomaly-adding training data as input and output anomaly data, which is the difference between the anomaly-adding training data and the training data.
[0078] The training unit 14 trains the inference model, i.e., updates the parameters of the inference model, and then outputs the trained inference model to the anomaly removal unit 12. The anomaly removal unit 12 receives the inference model from the training unit 14 and uses the inference model to generate the anomaly-removed training data as described above. The training data used to generate the anomaly-removed training data may be data that has already been used to train the inference model, or it may be data that has not yet been used to train the inference model. The anomaly-removed training data generated by the anomaly removal unit 12 is used in the same way as described above. The training unit 14 uses the combination of training data and anomaly-added training data to train the machine learning model. This process is repeated, and the training of the inference model progresses.
[0079] In any of the above iterations, the training unit 14 may train the inference model using training data instead of anomaly-added training data. For example, the training unit 14 selects either training data or anomaly-added training data as the data to be used for training, and trains the inference model using the selected data. If anomaly-added training data is selected, the training unit 14 trains the inference model as described above.
[0080] If training data is selected, the training unit 14 will train the inference model using only one set of training data. In this case as well, the training unit 14 can train the inference model in the same way as when using data for anomaly-added training.
[0081] For example, the training unit 14 inputs training data into the inference model and obtains data from which anomalies have been removed by the inference model at that point in time. The training unit 14 compares the data from which anomalies have been removed with the training data and updates the parameters of the inference model by backpropagation based on the loss calculated from the comparison.
[0082] The anomaly-added training data described above is the training data from which anomalies have been removed by an inference model during training. Because the anomaly removal function of the inference model during training is not sufficient, the anomaly-added training data may have had a significant amount of non-anomalous components removed as well. Therefore, if an inference model is trained using this anomaly-added training data, the inference model may not be able to output appropriate data. For example, the range of data values output by the inference model may deviate significantly from the anomaly-removed data.
[0083] The training data is either free of anomalies or contains only a few anomalies, and its value range does not deviate significantly from that of data from which anomalies have been appropriately removed. Therefore, by training the inference model using only the training data as described above, it is possible to prevent the range of values of the data output by the inference model from deviating significantly from the normal range.
[0084] The choice between using data for anomaly-added training or using training data instead of anomaly-added training data may be made probabilistically, for example. Alternatively, training data may be used instead of anomaly-added training data for a predetermined number of iterations, and anomaly-added training data may be used in all other cases. Training an inference model using training data instead of anomaly-added training data is, as described above, to bring the values of the data output from the inference model within a certain range. Therefore, the number of such training iterations may be less than the number of training iterations for an inference model using anomaly-added training data for anomaly detection, provided that the objective is achieved. For example, the number of such training iterations may be about 10% of the total number of iterations.
[0085] The training of the inference model described above is repeated, similar to conventional machine learning training, for example, until a predetermined number of repetitions or until the generation of the inference model converges based on predetermined conditions. Once the training of the inference model is completed, the training unit 14 outputs the generated inference model to the anomaly detection system 20. This completes the functions of the learning system 10.
[0086] As shown in Figure 1, the anomaly detection system 20 comprises a detection acquisition unit 21 and an anomaly detection unit 22.
[0087] The detection acquisition unit 21 is a detection acquisition means that acquires abnormal detection target data which has multiple values and is subject to abnormal detection. The detection acquisition unit 21 acquires abnormal detection target data as follows, for example.
[0088] The detection acquisition unit 21 acquires the data to be detected for anomaly detection by receiving it from the imaging device that captured the image that is the data to be detected for anomaly detection, or by accepting an image input operation from the user to the anomaly detection system 20. If the size of the data to be detected for anomaly detection input to the inference model is smaller than the size of the original image obtained by imaging by the imaging device, similar to the training data described above, the detection acquisition unit 21 may acquire the original image, divide the original image into sizes corresponding to the data to be detected for anomaly detection input to the inference model, and use the divided images as the data to be detected for anomaly detection.
[0089] The detection acquisition unit 21 may acquire the data to be detected as abnormal by a method other than those described above. The detection acquisition unit 21 outputs the acquired data to be detected as abnormal to the abnormal detection unit 22.
[0090] The anomaly detection unit 22 is an anomaly detection means that detects anomalies from the anomaly detection target data obtained by the detection acquisition unit 21 using an inference model. The anomaly detection unit 22 inputs and stores the inference model generated by the learning system 10 and uses it for anomaly detection.
[0091] The anomaly detection unit 22 receives anomaly detection target data from the detection acquisition unit 21. The anomaly detection unit 22 inputs the input anomaly detection target data into the inference model to detect anomalies. For example, if the inference model outputs data after anomaly removal, the anomaly detection unit 22 takes the difference between the anomaly removal image obtained using the inference model and the anomaly detection target data, and considers the difference portion as the part related to the anomaly of the object. Alternatively, if the inference model outputs anomaly data, the anomaly detection unit 22 considers the output from the inference model as the part related to the anomaly of the object. Furthermore, the anomaly detection unit 22 may detect anomalies by methods other than those described above, as long as they utilize an inference model.
[0092] The anomaly detection unit 22 outputs information indicating the anomaly detection result. The output of information indicating the anomaly detection result can be performed in the same way as conventional anomaly detection methods, depending on the purpose of anomaly detection. The above describes the functions of the anomaly detection system 20.
[0093] Next, the processes performed by the learning system 10 and the anomaly detection system 20 according to this embodiment (the operation methods performed by the learning system 10 and the anomaly detection system 20) will be explained using the flowcharts in Figures 3 and 4.
[0094] First, the learning method, which is the process executed in the learning system 10 according to this embodiment, will be explained using the flowchart in Figure 3. In this process, the learning acquisition unit 11 acquires learning data having multiple values (S01, learning acquisition step). Next, the anomaly removal unit 12 uses an inference model in the process of training to generate learning data after anomaly removal from the learning data (S02, anomaly removal step). Next, the anomaly addition unit 13 adds pre-set anomalies to the learning data after anomaly removal to generate learning data with anomaly addition (S03, anomaly addition step). Next, the training unit 14 uses a combination of the learning data and the learning data with anomaly addition to train the machine learning of the inference model (S04, training step).
[0095] Next, the training unit 14 determines whether or not to terminate the training of the inference model (S05). If it is determined not to terminate the training of the inference model (NO in S05), the processes of generating training data after anomaly removal (S02), generating training data with added anomalies (S03), and training the machine learning of the inference model (S04) are repeated. In this case, the inference model trained by the training unit 14 is used to generate the training data after anomaly removal. After the machine learning training (S04), the decision of whether or not to terminate the training of the inference model (S05) is made again.
[0096] In the decision to terminate the training of the inference model (S05), if it is decided to terminate the training of the inference model (YES in S05), the inference model generated by the training is output from the learning system 10 to the anomaly detection system 20 (S06). The anomaly detection system 20 stores the inference model and uses it in the following anomaly detection process. The above is the learning method which is the process executed by the learning system 10 according to this embodiment.
[0097] Next, the anomaly detection method, which is the process performed by the anomaly detection system 20 according to this embodiment, will be explained using the flowchart in Figure 4. In this process, the detection acquisition unit 21 acquires anomaly detection target data that has multiple values and is the target of anomaly detection (S11, detection acquisition step). Subsequently, the anomaly detection unit 22 detects anomalies from the anomaly detection target data using an inference model (S12, anomaly detection step). Information indicating the anomaly detection result is output from the anomaly detection unit 22 to a predetermined output destination (S13). The above is the anomaly detection method, which is the process performed by the anomaly detection system 20 according to this embodiment.
[0098] In this embodiment, anomaly-added training data is generated from the training data, along with the training data, for training the inference model. The anomaly-added training data is created by removing anomalies from the training data using the inference model during training, and then adding pre-set anomalies. Therefore, even if the training data contains data with anomalies, the anomalies can be excluded, and the inference model can be trained. As a result, in this embodiment, an inference model that can appropriately detect anomalies can be generated. Thus, according to this embodiment, even if the data used to generate an inference model through machine learning training contains data with anomalies, anomalies can be appropriately detected from the data without making distinctions regarding the anomalies. In other words, according to this embodiment, anomalies can be detected in an annotation-free (without label indication) manner.
[0099] For example, when dealing with small quantities of many different types of objects, it is costly to check for and classify abnormalities and prepare a dataset containing only normal objects. In this embodiment, abnormalities in objects can be detected from the data without requiring such preparation. Furthermore, since the method according to this embodiment does not distinguish between normal and abnormal objects, it is possible to learn while imaging the objects (including automating stage movement, etc.), and to complete machine learning training by the time the series of imaging is finished.
[0100] Furthermore, according to this embodiment, an appropriate inference model can be generated with fewer training iterations compared to conventional methods.
[0101] Furthermore, as in this embodiment, in the training step, the training data may be normal data without anomalies, and the data for anomaly-added training may be anomaly data containing anomalies, thereby training the machine learning of the inference model. This configuration allows for more appropriate training of the machine learning of the inference model and the generation of a more appropriate inference model. However, it is not necessary to treat the training data and the data for anomaly-added training in this manner during machine learning training; they may be treated in other ways.
[0102] Furthermore, as in this embodiment, in the anomaly removal step, the trained inference model may be used as the inference model in training each time the inference model is trained in the training step to generate the training data after anomaly removal. With this configuration, a new combination of training data and anomaly-added training data can be obtained with each iteration of training using the same training data. As a result, an inference model can be generated more appropriately. However, the inference model used to generate the training data after anomaly removal does not necessarily have to be the one used each time the inference model is trained in the training step; it is sufficient if it is the one used after the inference model has been trained in the training step.
[0103] Furthermore, as in this embodiment, in one of the iterations, the machine learning training of the inference model may be performed using the training data acquired in the training data acquisition step instead of the anomaly-adding training data generated in the anomaly-adding step during the training step. This configuration makes it possible to make the range of values of the data output from the generated inference model more appropriate, and to detect anomalies more appropriately from the data. However, if the range of values of the data output from the inference model becomes appropriate even when the inference model is trained using only a combination of training data and anomaly-adding training data, it is not necessarily required to use training data instead of anomaly-adding training data in the training step.
[0104] Furthermore, as in this embodiment, in the anomaly addition step, anomalies that are amplified from anomalies expected to be detected may be added as pre-set anomalies to generate anomaly addition learning data. With this configuration, anomalies can be detected more appropriately from the data.
[0105] Furthermore, as in this embodiment, in the anomaly addition step, pre-set anomalies may be added according to the iteration to generate anomaly-added training data. For example, as described above, different anomalies may be obtained from the anomaly (negative example) pool and added for each iteration. With this configuration, anomaly-added training data with various anomalies added according to the iteration can be used to train the inference model. As a result, anomalies can be detected more appropriately from the data.
[0106] As in this embodiment, the inference model generated in this embodiment may be used to detect anomalies in the object related to the data. As described above, the inference model generated in this embodiment can appropriately detect anomalies, and with this configuration, anomalies can be appropriately detected from the data.
[0107] Next, an example of this embodiment will be shown. Figure 5 shows an image of the data used to generate the inference model and detect anomalies in this embodiment. The object in the image is a peanut with its shell on. The anomalies in the object in the image are indicated by the arrows in the image. Specifically, the anomalies are chips in the peanut (2 places), cracks in the peanut (2 places), missing parts of the peanut shell (4 places), foreign objects such as pieces of plastic (3 places), and a foreign object such as a rubber band (1 place). The image was obtained by spreading the peanut on a piece of paper and taking an image with a smartphone camera.
[0108] Figure 5 shows an example of generating an inference model using the method according to this embodiment, with a portion of the image shown as training data (proposed method). As a comparative example, Figure 5 shows an example of generating an inference model with a portion of the image shown as a normal image and an image obtained by adding a FractalDB image to that portion as an abnormal image (conventional method).
[0109] Figure 6 shows examples of anomaly-removed images obtained by inputting a different portion of the image shown in Figure 5 into the inference model in these cases. The leftmost image in Figure 6 is the image input into the inference model. Each image to the right of it is an anomaly-removed image. The top row of images is the image obtained with the proposed method. The bottom row of images is the image obtained with the conventional method. Figure 6 also shows images for each number of training iterations (300th, 500th, 1,000th, and 1,500th) of the machine learning used to generate the inference model.
[0110] As shown in Figure 6, the proposed method's inference model is configured to repair abnormalities such as defects in peanut shells more effectively than conventional methods. Conventional methods, especially over long training periods, tend to treat abnormalities as normal, failing to recognize them.
[0111] Figure 7 shows the results of detecting anomalies in the entire image of Figure 5 using the inference models described above. In each figure in Figure 7, pixels other than black indicate anomalies. Figure 7(a) is an example of detection results using the conventional method. Figure 7(b) is an example of detection results using the proposed method. The number of machine learning training iterations (training iterations) used to generate each inference model was 3,000. The proposed method is able to detect anomalies more appropriately than the conventional method.
[0112] Figure 8 shows examples of the results of detecting anomalies in the entire image of Figure 5 (anomaly inference results) and the image with anomalies removed (normal inference results) using the inference models described above. The upper image is the image obtained using the proposed method. The lower image is the image obtained using the conventional method. The number of machine learning training iterations (training iterations) used to generate each inference model was 500 and 1,500, respectively. The proposed method is able to detect anomalies more appropriately than the conventional method.
[0113] Next, a learning program and an anomaly detection program for executing the processing performed by the series of learning systems 10 and anomaly detection systems 20 described above will be explained. As shown in Figure 9(a), the learning program 100 is stored in a program storage area 111 formed on a computer-readable recording medium 110 that is inserted into and accessed by a computer, or is provided by a computer. The recording medium 110 may be a non-temporary recording medium.
[0114] The learning program 100 comprises a learning acquisition module 101, an anomaly removal module 102, an anomaly addition module 103, and a training module 104. The functions realized by executing the learning acquisition module 101, the anomaly removal module 102, the anomaly addition module 103, and the training module 104 are the same as the functions of the learning acquisition unit 11, the anomaly removal unit 12, the anomaly addition unit 13, and the training unit 14 of the learning system 10 described above.
[0115] As shown in Figure 9(b), the anomaly detection program 200 is stored in a program storage area 211 formed on a computer-readable recording medium 210 that is inserted into and accessed by the computer, or is provided by the computer. The recording medium 210 may be a non-temporary recording medium. If the learning program 100 and the anomaly detection program 200 are executed on the same computer, the recording medium 210 may be the same as the recording medium 110.
[0116] The anomaly detection program 200 comprises a detection acquisition module 201 and an anomaly detection module 202. The functions realized by executing the detection acquisition module 201 and the anomaly detection module 202 are the same as the functions of the detection acquisition unit 21 and the anomaly detection unit 22 of the anomaly detection system 20 described above.
[0117] Furthermore, the learning program 100 and the anomaly detection program 200 may be configured such that part or all of them are transmitted via a transmission medium such as a communication line, received by other devices, and recorded (including installation). Also, each module of the learning program 100 and the anomaly detection program 200 may be installed on any of multiple computers, not just one. In that case, the series of processes described above will be performed by a computer system consisting of these multiple computers.
[0118] The learning method, inference model, anomaly detection method, anomaly detection program, and anomaly detection system of this disclosure have the following configurations. [1] A learning method for generating an inference model used to detect anomalies in an object related to data, which has multiple values, A training data acquisition step that acquires training data having multiple values, An anomaly removal step is performed to generate anomaly-removed training data from the training data acquired in the training acquisition step using an inference model in the middle of training, An anomaly addition step involves adding pre-set anomalies to the training data generated in the anomaly removal step to generate anomaly-added training data, The training step includes training the machine learning of an inference model using a combination of the training data acquired in the training acquisition step and the anomaly-added training data generated in the anomaly-adding step, After the inference model is trained in the training step, in the anomaly removal step, the trained inference model is used as an in-progress inference model to generate training data after anomaly removal. A learning method comprising repeating the anomaly removal step, the anomaly addition step, and the training step. [2] The learning method according to [1], wherein in the training step, the training data acquired in the learning acquisition step is treated as normal data that does not contain anomalies, and the anomaly-added learning data generated in the anomaly-adding step is treated as anomaly data that contains anomalies, and the learning method is performed to train the machine learning of the inference model. [3] The learning method according to [1] or [2], wherein each time the inference model in the training step is trained, the anomaly removal step generates training data after anomaly removal using the trained inference model as an inference model in training. [4] A learning method according to any one of [1] to [3], wherein in the training step, in any of the iterations, the machine learning of the inference model is trained using the training data acquired in the training data acquisition step instead of the anomaly-adding training data generated in the anomaly-adding step. [5] A learning method according to any one of [1] to [4], wherein in the anomaly addition step, an anomaly amplified from an anomaly expected to be detected is added as a pre-set anomaly to generate anomaly addition learning data. [6] A learning method according to any one of [1] to [5], wherein in the anomaly addition step, a predetermined anomaly is added according to the repetition to generate anomaly addition learning data. [7] An inference model for causing a computer to take data having multiple values as input and perform operations according to the input to output information, An inference model generated by one of the learning methods described in [1] to [6]. An anomaly detection method for detecting anomalies in an object related to data having multiple values, using an inference model generated by any of the learning methods described in [8] [1] to [6], A detection acquisition step that acquires anomaly detection target data which has multiple values and is subject to anomaly detection, An anomaly detection step involves detecting anomalies using the inference model from the anomaly detection target data acquired in the detection acquisition step, An anomaly detection method including [9] An anomaly detection program that causes a computer to operate as an anomaly detection system that detects anomalies in an object relating to data from data having multiple values, using an inference model generated by any of the learning methods described in [1] to [6], The aforementioned computer, A detection acquisition means for acquiring anomaly detection target data that has multiple values and is subject to anomaly detection, An anomaly detection means that detects anomalies using the inference model from the anomaly detection target data acquired by the detection acquisition means, An anomaly detection program that functions as such. An anomaly detection system that uses an inference model generated by any of the learning methods described in [1] to [6] to detect anomalies in an object related to data having multiple values, A detection acquisition means for acquiring anomaly detection target data that has multiple values and is subject to anomaly detection, An anomaly detection means that detects anomalies using the inference model from the anomaly detection target data acquired by the detection acquisition means, An anomaly detection system equipped with the following features. [Explanation of Symbols]
[0119] 10...Learning system, 11...Learning acquisition unit, 12...Anomaly removal unit, 13...Anomaly addition unit, 14...Training unit, 20...Anomaly detection system, 21...Detection acquisition unit, 22...Anomaly detection unit, 100...Learning program, 101...Learning acquisition module, 102...Anomaly removal module, 103...Anomaly addition module, 104...Training module, 110...Recording medium, 111...Program storage area, 200...Anomaly detection program, 201...Detection acquisition module, 202...Anomaly detection module, 210...Recording medium, 211...Program storage area.
Claims
1. A learning method for generating an inference model used to detect anomalies in an object related to data, from data having multiple values, A training data acquisition step that acquires training data having multiple values, An anomaly removal step generates anomaly-removed training data from the training data acquired in the training acquisition step using an inference model in the middle of training, An anomaly addition step involves adding pre-set anomalies to the training data generated in the anomaly removal step to generate anomaly-added training data, The training step includes training the machine learning of an inference model using a combination of the training data acquired in the training acquisition step and the anomaly-added training data generated in the anomaly-adding step, After the inference model is trained in the training step, in the anomaly removal step, the trained inference model is used as an in-progress inference model to generate training data after anomaly removal. A learning method comprising repeating the anomaly removal step, the anomaly addition step, and the training step.
2. The learning method according to claim 1, wherein in the training step, the training data acquired in the learning data acquisition step is treated as normal data that does not contain abnormalities, and the abnormal learning data generated in the abnormality addition step is treated as abnormal data that contains abnormalities, and the learning method for training the machine learning of the inference model is performed.
3. The learning method according to claim 1 or 2, wherein each time the inference model in the training step is trained, in the anomaly removal step, the trained inference model is used as an in-train inference model to generate training data after anomaly removal.
4. The learning method according to claim 1 or 2, wherein in one of the iterations, in the training step, the machine learning of the inference model is trained using the training data acquired in the training data acquisition step instead of the anomaly addition learning data generated in the anomaly addition step.
5. The learning method according to claim 1 or 2, wherein in the anomaly addition step, an anomaly amplified from an anomaly expected to be detected is added as a pre-set anomaly to generate anomaly addition learning data.
6. The learning method according to claim 1 or 2, wherein in the abnormality addition step, a predetermined abnormality is added according to the repetition to generate abnormality addition learning data.
7. An inference model for causing a computer to function by taking data with multiple values as input, performing calculations according to the input, and outputting information, An inference model generated by the learning method described in claim 1 or 2.
8. An anomaly detection method for detecting an anomaly in an object relating to data having multiple values, using an inference model generated by the learning method described in claim 1 or 2, A detection acquisition step that acquires anomaly detection target data which has multiple values and is subject to anomaly detection, An anomaly detection step involves detecting anomalies using the inference model from the anomaly detection target data acquired in the detection acquisition step, An anomaly detection method including
9. An anomaly detection program that causes a computer to operate as an anomaly detection system that detects anomalies in an object relating to data from data having multiple values, using an inference model generated by the learning method described in claim 1 or 2, The aforementioned computer, A detection acquisition means for acquiring anomaly detection target data that has multiple values and is subject to anomaly detection, An anomaly detection means that detects anomalies using the inference model from the anomaly detection target data acquired by the detection acquisition means, An anomaly detection program that functions as such.
10. An anomaly detection system that uses an inference model generated by the learning method described in claim 1 or 2 to detect an anomaly in an object related to data having multiple values, A detection acquisition means for acquiring anomaly detection target data that has multiple values and is subject to anomaly detection, An anomaly detection means that detects anomalies using the inference model from the anomaly detection target data acquired by the detection acquisition means, An anomaly detection system equipped with the following features.
Citation Information
Patent Citations
Defect detection method and device
JP2021190105A