Uncertainty learning device, uncertainty learning program, and uncertainty learning system

The uncertainty learning device improves the precision of uncertainty inference in machine learning models by using a weighted loss function based on learning data and noise-added learning data, addressing the issue of high uncertainty values for data close to the training data.

JP2025073129APending Publication Date: 2025-05-13MITSUBISHI ELECTRIC CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2023183611
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

Conventional machine learning models that infer uncertainty by adding noise to all training data struggle to accurately output uncertainty for data close to the training data, leading to potentially high uncertainty values even for reliable predictions.

Method used

The uncertainty learning device inputs operation-related data to generate a machine learning model that outputs predicted values and uncertainty. It uses a training data acquisition unit, a noise-added section, an outlier detection unit, and a model learning unit to calculate a weighted loss function based on learning data and noise-added learning data, thereby training the machine learning model.

Benefits of technology

This approach enables the machine learning model to infer uncertainty with more precision, distinguishing between uncertainty in the problem and uncertainty in learning, and reducing unnecessary high uncertainty outputs for data close to the training data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025073129000001_ABST
    Figure 2025073129000001_ABST
Patent Text Reader

Abstract

To provide a machine learning model that can infer uncertainty more accurately in comparison with a machine learning model created using a conventional method in which noise is imparted to all training data to train the machine learning model.SOLUTION: A device comprises: a training data acquisition unit (51) for acquiring training data created on the basis of operation-related data obtained from a machine device (1); a noise imparting unit (52) for creating noise-imparted training data in which noise is imparted to the training data acquired by the training data acquisition unit (51); an outlier value detection unit (53) for calculating an outlier value score from the training data acquired by the training data acquisition unit (51) and the noise-imparted training data created by the noise imparting unit (52); and a model learning unit (54) for calculating, on the basis of the training data and the noise-imparted training data, a loss function that is weighted on the basis of the outlier value score calculated by the outlier value detection unit (53), and performing learning of a machine learning model.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to an uncertainty learning device, an uncertainty learning program, and an uncertainty learning system that create a trained model (hereinafter referred to as a "machine learning model") that outputs a predicted value and uncertainty for input data. [Background technology]

[0002] In recent years, techniques for solving various tasks using machine learning models have become known in various scenarios. For example, when considering the application of a machine learning model to equipment used in life-threatening situations such as autonomous driving or medical settings, or to machinery and equipment such as factory automation (FA) equipment, the machine learning model will output some kind of data regardless of the input data. Sometimes, the machine learning model may output an output result that is not expected by humans, in other words, an output result with low reliability. If an output result with low reliability output by the machine learning model is used as is to control the machinery and equipment, an unexpected situation may occur. Therefore, there is a known technique for inferring the degree of uncertainty contained in the output of a machine learning model. Here, the uncertainty refers to the reliability. For example, Non-Patent Document 1 discloses a technology that expresses the amount of uncertainty contained in the output of a machine learning model itself as a range, and that adds noise to the training data of the machine learning model to increase the range of uncertainty output by the machine learning model for untrained data (extrapolated data). [Prior art documents] [Non-patent literature]

[0003] [Non-Patent Document 1] Danijar Hafner, Noise Contrastive Priors for Functional Uncertainty, 1 Jul 2019 Summary of the Invention [Problem to be solved by the invention]

[0004] In conventional technologies for outputting uncertainty, such as the technology disclosed in Non-Patent Document 1, noise is added to all training data to train a machine learning model. Therefore, when making an inference using the machine learning model, even if data close to the training data is input and a good predicted value is output, there is a possibility that the uncertainty output along with the predicted value will be high.

[0005] The present disclosure has been made to solve the above-mentioned problems, and aims to provide a machine learning model capable of inferring predicted values ​​and uncertainty, which is capable of inferring uncertainty more accurately than machine learning models created by conventional methods of training a machine learning model by adding noise to all training data. [Means for solving the problem]

[0006] The uncertainty learning device according to the present disclosure is an uncertainty learning device that takes as input data based on driving-related data related to the operation results of a mechanical device, and creates a machine learning model that outputs a predicted value corresponding to the driving-related data and the uncertainty of the predicted value, and includes a learning data acquisition unit that acquires learning data created based on the driving-related data obtained from the mechanical device, a noise addition unit that creates noise-added learning data by adding noise to the learning data acquired by the learning data acquisition unit, an outlier detection unit that calculates an outlier score from the learning data acquired by the learning data acquisition unit and the noise-added learning data created by the noise addition unit, and a model learning unit that calculates a loss function weighted based on the outlier score calculated by the outlier detection unit, based on the learning data and the noise-added learning data, and learns the machine learning model. Effect of the Invention

[0007] According to the present disclosure, as configured above, it is possible to provide a machine learning model that is capable of inferring uncertainty more accurately than a machine learning model created by a conventional method of training a machine learning model by adding noise to all training data. [Brief description of the drawings]

[0008] [Figure 1] FIG. 1A is a diagram for explaining the types of uncertainty inferred by a machine learning model and an example of ideal uncertainty inference by a machine learning model, where FIG. 1A is a diagram for explaining problem uncertainty, FIG. 1B is a diagram for explaining learning uncertainty, and FIG. 1C is a diagram for explaining ideal uncertainty. [Diagram 2] FIG. 2 is a diagram for explaining in more detail a problem that the conventional technology has and that is solved by the uncertainty learning device according to the first embodiment. [Diagram 3] FIG. 1 is a diagram illustrating a configuration example of an uncertainty learning system including an uncertainty learning device according to a first embodiment. [Figure 4] 4 is a flowchart for explaining an operation during learning of the uncertainty learning device according to the first embodiment. [Diagram 5] 5 is a flowchart for explaining details of the process of step ST3 in FIG. 4. [Figure 6] 4 is a flowchart for explaining an operation during inference of the uncertainty learning device according to the first embodiment. [Figure 7] 7A and 7B are diagrams illustrating an example of a hardware configuration of the uncertainty learning device according to the first embodiment. [Figure 8] FIG. 11 is a diagram illustrating a configuration example of an uncertainty learning system including an uncertainty learning device according to a second embodiment. [Figure 9] 13 is a flowchart for explaining an operation during learning of the uncertainty learning device according to the second embodiment. [Figure 10] 13 is a flowchart for explaining an operation during inference of the uncertainty learning device according to the second embodiment. [Figure 11] FIG. 11 is a diagram illustrating a configuration example of an uncertainty learning system including an uncertainty learning device according to a third embodiment. [Figure 12] 12A is a diagram illustrating an example of transfer learning, where FIG. 12A is a diagram illustrating an example of Fine Tuning, FIG. 12B is a diagram illustrating an example of Feature Extraction, and FIG. 12C is a diagram illustrating an example of Joint Training. [Figure 13] 13 is a flowchart for explaining an operation during learning of the uncertainty learning device according to the third embodiment. [Figure 14] 14 is a flowchart for explaining details of the process of step ST3a in FIG. 13. [Figure 15] FIG. 13 is a diagram illustrating a configuration example of an uncertainty learning system including an uncertainty learning device according to a fourth embodiment. [Figure 16] 13 is a flowchart for explaining the operation of the uncertainty learning device according to the fourth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] In order to describe the present disclosure in more detail, embodiments of the present disclosure will be described below with reference to the accompanying drawings.

[0010] Embodiment 1 The uncertainty learning device according to the first embodiment creates a trained model (hereinafter referred to as a "machine learning model"). A machine learning model outputs a predicted value (hereinafter referred to as a "predicted value") and uncertainty based on input data. Uncertainty is an index that indicates the degree of reliability of a prediction, that is, how confident the machine learning model is in the predicted value. When uncertainty is high, it means that the machine learning model is not confident in the predicted value, in other words, the reliability of the predicted value is low. On the other hand, when uncertainty is low, it can be interpreted that the machine learning model is highly confident in the predicted value, in other words, the reliability of the predicted value is high. It is important for users, etc. to know the uncertainty of the predicted value output by the machine learning model in order to perform appropriate processing. By using the uncertainty information, users, etc. can evaluate the risk of predictions made by the machine learning model and make decisions more carefully.

[0011] FIG. 1 is a diagram for explaining the types of uncertainty inferred by a machine learning model and an example of ideal uncertainty inference by the machine learning model. The uncertainties in the predicted values ​​include the uncertainty due to the variation of the data present in the training data (hereafter referred to as "interpolated data") caused by measurement noise or disturbances (see Figure 1A), and the uncertainty due to the data not present in the training data (hereafter referred to as "extrapolated data") (see Figure 1B). It is necessary to construct a machine learning model that can accurately output uncertainty for both the uncertainty due to variability in the interpolated data, in other words, the uncertainty of the problem, and the uncertainty in the extrapolated data, in other words, the uncertainty of learning (see Figure 1C).

[0012] Therefore, for example, in the conventional technology disclosed in the above-mentioned Non-Patent Document 1, noise is added to the training data, and the training data to which the noise has been added is trained so that the uncertainty of the training data increases, in other words, the reliability decreases. However, this conventional technology trains a machine learning model by adding noise, so while the machine learning model can output the uncertainty of the learning with a certain degree of accuracy, there is a problem in that it may not be able to output the uncertainty of the problem with high accuracy.

[0013] FIG. 2 is a diagram for explaining in more detail the problem that the above-mentioned conventional technology has and that is solved by the uncertainty learning device according to the first embodiment. For example, if a machine learning model is trained to output uncertainty by expressing the variance of the interpolated data as variance using the KL-divergence method, it will be possible to output the uncertainty of the problem with a certain degree of accuracy. However, when learning using this method, it is difficult to infer appropriate uncertainty for extrapolated data (see the diagram on the left in Figure 2). This is because the extrapolated data exists outside the range of the training data, and so there is a possibility that there will be a large difference between the true distribution. Since machine learning models are trained based on the training data, there is a problem in that it is difficult to infer accurate uncertainty for data (extrapolated data) that is outside the range of the training data. In contrast, the conventional technology disclosed in Non-Patent Document 1 adds noise to training data, and trains the training data to increase the uncertainty of the training data to which noise has been added (see the middle diagram in FIG. 2). Therefore, the conventional technology can solve the above-mentioned problem that it is difficult to infer accurate uncertainty for extrapolated data. However, in this conventional technique, noise is added to all training data to train the machine learning model. Therefore, when making an inference using the machine learning model, even if data similar to the training data is input and a good predicted value is output, the uncertainty output together with the predicted value may be high. In other words, in this conventional technique, there is a possibility that the uncertainty of the problem cannot be output with high accuracy.

[0014] The uncertainty learning device of embodiment 1 solves the problems associated with the above-mentioned conventional techniques, and provides a machine learning model capable of accurately inferring uncertainty for both the uncertainty of the problem and the uncertainty of learning, i.e., for both the uncertainty of the interpolated data and the uncertainty of the extrapolated data. Specifically, the uncertainty learning device according to the first embodiment learns a machine learning model to infer uncertainty by using the result of inferring how out of line the noise-added learning data is by using an outlier detection method (see the diagram on the right side of FIG. 2). The configuration and operation of the uncertainty learning device will be described in detail later.

[0015] FIG. 3 is a diagram showing an example of the configuration of an uncertainty learning system 100 including the uncertainty learning device 2 according to the first embodiment. The uncertainty learning system 100 includes an uncertainty learning device 2 and a machine device 1. The uncertainty learning device 2 and the machine device 1 are connected via a network. In the first embodiment, it is assumed that the mechanical device 1 is, for example, a Factory Automation (FA) device. The FA device includes, for example, a servo motor, a CNC, a processing machine such as a laser sheet metal processing machine or an electric discharge processing machine, or a robot.

[0016] The uncertainty learning device 2 is provided in, for example, a server. In the first embodiment, the uncertainty learning device 2 performs "learning" to create a machine learning model, and "inference" to infer a predicted value and uncertainty using the machine learning model created by "learning." Details of the "learning" process and the "inference" process will be described later. The uncertainty learning device 2 includes an acquisition unit 3, a preprocessing unit 4, a learning unit 5, and an inference unit 6. The acquisition unit 3 includes a driving result acquisition unit 31 and a driving result storage unit 32 . The preprocessing unit 4 includes a preprocessing execution unit 41, a learning data storage unit 42, and a test data storage unit 43. The learning unit 5 includes a learning data acquisition unit 51, a noise addition unit 52, an outlier detection unit 53, a model learning unit 54, and a model storage unit 55. The inference unit 6 includes a model reading unit 61, a prediction unit 62, a test data acquisition unit 63, and an evaluation unit 64. During learning, of the above-mentioned components of the uncertainty learning device 2, the driving result acquisition unit 31, the preprocessing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the test data acquisition unit 63, and the evaluation unit 64 function. During inference, in the uncertainty learning device 2, of the above-mentioned components, the driving result acquisition unit 31, the preprocessing execution unit 41, the model reading unit 61, and the prediction unit 62 function.

[0017] The driving result acquisition unit 31 of the acquisition unit 3 acquires data relating to the driving results of the machine 1 from the machine 1 (hereinafter referred to as "driving-related data"). The driving results include, for example, parameters set in the machine 1, the configuration of the machine 1, the driving mode, data indicating values ​​specific to the machine 1, or log data of the operation of the machine 1. The driving result acquisition unit 31 acquires driving-related data from the machine 1, for example, via an encoder (not shown) or the like. Here, the operation result acquisition unit 31 acquires operation-related data related to the operation result of the FA device from the FA device. For example, when the FA device is a CNC (Computer Numerical Control) processing machine, the operation-related data includes a command position, a command speed, a command acceleration, a feedback speed, a feedback acceleration, or a current value. For example, the operation-related data may include a measured value of a deviation in a processing position. In the following first embodiment, a mechanical device 1 refers to an FA device.

[0018] The driving result acquisition unit 31 directly acquires, for example, values ​​measured by various sensors installed in the machine 1 as driving-related data. The various sensors include a speed sensor, an acceleration sensor, a gyro sensor, a temperature sensor, a humidity sensor, etc. The driving result acquisition unit 31 may also acquire, for example, some value calculated based on values ​​measured by various sensors installed in the machine 1 as driving-related data. The driving result acquisition unit 31 stores the acquired driving-related data in the driving result storage unit 32. The driving result acquisition unit 31 stores the driving-related data in the driving result storage unit 32, for example, by adding the acquisition date and time of the driving-related data to the driving-related data.

[0019] The driving result storage unit 32 stores the driving-related data acquired by the driving result acquisition unit 31 . In this embodiment, the driving result storage unit 32 is provided in the uncertainty learning device 2, but this is merely an example. The driving result storage unit 32 may be provided in a location outside the uncertainty learning device 2 that can be referenced by the uncertainty learning device 2.

[0020] The pre-processing execution unit 41 of the pre-processing unit 4 acquires the driving-related data acquired by the driving result acquisition unit 31 from the driving result storage unit 32, and performs pre-processing to shape various data based on the driving-related data. In embodiment 1, the preprocessing performed by the preprocessing execution unit 41 includes preprocessing when the uncertainty learning device 2 creates a machine learning model, and preprocessing when the uncertainty learning device 2 performs inference to obtain predicted values ​​and uncertainty using the machine learning model that has already been created. In the first embodiment, the preprocessing performed by the preprocessing execution unit 41 when the uncertainty learning device 2 creates a machine learning model is also referred to as "learning preprocessing", and the preprocessing performed by the preprocessing execution unit 41 when the uncertainty learning device 2 performs inference is also referred to as "inference preprocessing". In the uncertainty learning device 2, the machine learning model is created by the learning unit 5 and the evaluation unit 64 of the inference unit 6, and inference using the machine learning model is performed by the prediction unit 62 of the inference unit 6. Details of the learning unit 5 and the inference unit 6 will be described later. The learning preprocessing and the inference preprocessing performed by the preprocessing execution unit 41 will be described below.

[0021] First, the learning preprocessing performed by the preprocessing execution unit 41 will be described. The pre-processing execution unit 41 acquires the driving-related data acquired by the driving result acquisition unit 31 from the driving result memory unit 32, and performs pre-processing, i.e., learning-time pre-processing, to shape the learning data to be used by the learning unit 5 and the test data to be used by the evaluation unit 64 of the inference unit 6 based on the driving-related data. In the first embodiment, the learning preprocessing performed by the preprocessing execution unit 41 includes, for example, a process of dividing the data included in the driving-related data into explanatory variables and target variables, a process of converting the data included in the driving-related data into features required for learning a machine learning model, or a process of dividing the driving-related data into learning data and test data.

[0022] Here, the explanatory variables and the objective variables will be explained. The type of data to be used as the explanatory variables and the objective variables is determined in advance by a user or the like. At least one of the data other than the objective variable is used as the explanatory variable. For example, if the objective variable is the deviation of the machining position, operation-related data indicating the machining position or speed can be the explanatory variable. The objective variable is at least one piece of data to be predicted by the machine learning model. Users can change the objective variable as appropriate depending on the problem. In the case of a regression problem, a numerical value is used as the objective variable, and in the case of a classification problem, a class to be classified is used as the objective variable. For example, when it is desired to predict the deviation of the machining position due to friction or the like in the machine 1, the user or the like may set a measured value of the deviation of the machining position as the objective variable.

[0023] Next, an example of feature conversion in pre-processing during learning performed by the pre-processing execution unit 41 will be described. The preprocessing execution unit 41 may transform the explanatory variables to create features effective for learning. For example, the preprocessing execution unit 41 may transform the explanatory variables by applying standardization for transforming the scale of the variables, linear transformation of Min-Max scaling, or nonlinear transformation such as Box-Cox, or when part of the data is a categorical variable, may transform the explanatory variables by applying one-hot encoding, embedding, or the like.

[0024] Next, an example of division of learning data and test data in the learning preprocessing performed by the preprocessing execution unit 41 will be described. When learning, the data contained in the driving-related data needs to be separated into training data used for learning and test data for evaluating the performance of the trained machine learning model. The pre-processing execution unit 41 may, for example, randomly divide the data included in the driving-related data into learning data and test data, or may create learning data by aligning the number of data for each class as in a classification problem, and divide the remainder into test data. In addition, when the driving-related data is time-series data, learning new data in the time direction means learning correct data for old data, which causes data leakage. Therefore, the pre-processing execution unit 41 needs to separate the learning data and the test data while paying attention to the time axis.

[0025] The preprocessing execution unit 41 stores the learning data created by performing the learning preprocessing in the learning data storage unit 42. The preprocessing execution unit 41 also stores the test data created by performing the learning preprocessing in the test data storage unit 43.

[0026] Next, the pre-processing during inference by the pre-processing execution unit 41 will be described. The pre-processing execution unit 41 acquires the driving-related data acquired by the driving result acquisition unit 31 from the driving result memory unit 32, and performs pre-processing, i.e., inference pre-processing, to shape data to be used in the prediction unit 62 of the inference unit 6 (hereinafter referred to as "model input data") based on the driving-related data. In the first embodiment, the pre-processing during inference performed by the pre-processing execution unit 41 includes, for example, a process of using data included in the driving-related data that is set as an explanatory variable as model input data, or a process of converting the data included in the driving-related data into features required as model input data for a machine learning model. The preprocessing execution unit 41 may perform conversion into features required as model input data for the machine learning model in the same manner as the conversion of features that converts explanatory variables to create features effective for learning during preprocessing during learning. In addition, inference using a machine learning model does not require separation into training data and test data. The pre-processing execution unit 41 outputs the model input data created by performing pre-processing during inference to the prediction unit 62.

[0027] The learning data storage unit 42 of the preprocessing unit 4 stores the learning data. In this embodiment, the learning data storage unit 42 is provided in the uncertainty learning device 2, but this is merely an example. The learning data storage unit 42 may be provided in a location outside the uncertainty learning device 2 that can be referenced by the uncertainty learning device 2.

[0028] The test data storage unit 43 of the preprocessing unit 4 stores the test data. In this embodiment, the test data storage unit 43 is provided in the uncertainty learning device 2, but this is merely an example. The test data storage unit 43 may be provided in a location outside the uncertainty learning device 2 that can be referenced by the uncertainty learning device 2.

[0029] The learning unit 5 creates a machine learning model based on the learning data stored in the learning data storage unit . The machine learning model uses one or more machine learning methods such as neural networks. The neural network can be of any type, such as a hierarchical neural network, a convolutional neural network, a recurrent neural network, etc. The neural network only needs to have at least two outputs so that it can output a predicted value and uncertainty. In addition, when the number of dimensions of the input data of the machine learning model, such as the number of parameters, becomes large, the learning unit 5 may use various dimension reduction methods to reduce the dimensions of the input data and use the dimension-reduced data as the input data of the machine learning model. Examples of the various dimension reduction methods include principal component analysis, singular value analysis, tensor analysis, and autoencoder. These dimension reduction methods are well known, so detailed explanations are omitted.

[0030] The learning data acquisition unit 51 of the learning unit 5 acquires learning data from the learning data storage unit . Regarding the learning data, N pieces of learning data are stored in the learning data storage unit 42. In this case, for the N pieces of learning data, assuming that the explanatory variable is xn and the objective variable is yn, the learning data D N ={{x1,y1},…,{x n ,y n The learning unit 5 uses this learning data D N The machine learning model is trained on the basis of the above-mentioned data. The machine learning model is trained by the model training unit 54 of the training unit 5. The model training unit 54 will be described in detail later. The learning data acquisition unit 51 outputs the acquired learning data to the noise addition unit 52, the outlier detection unit 53, and the model learning unit .

[0031] The noise adding unit 52 of the learning unit 5 creates data by adding noise to the learning data acquired by the learning data acquiring unit 51 (hereinafter referred to as "noise-added learning data"). For example, the noise adding unit 52 creates noise-added learning data by adding values ​​created from a Gaussian distribution, a uniform distribution, a gamma distribution, or a β distribution to the explanatory variables and the objective variables of the learning data.

[0032] For example, when the noise adding unit 52 creates noise-added learning data by adding together values ​​created using a Gaussian distribution, assuming that the explanatory variable is x and the objective variable is y, TIFF2025073129000002.tif23166 It is calculated as follows. At this time, N(·): Gaussian distribution, μ x ,σ x : The mean and standard deviation of the noise added to the explanatory variables, μ y ,σ y : The mean and standard deviation of the noise to be added to the objective variable, It is. In addition, μ y is μ y =y can be used.

[0033] For example, when the variation in the explanatory variables or the objective variables is known from the characteristics of the machine 1, the noise adding unit 52 may add noise that imitates the variation. The noise adding unit 52 outputs the noise-added learning data to the outlier detection unit 53 and the model learning unit 54. The noise adding unit 52 may add noise to all the learning data acquired by the learning data acquiring unit 51 from the learning data storage unit 42 to create the noise-added learning data, or may add noise to a portion of the learning data (mini-batch) of the learning data acquired by the learning data acquiring unit 51 from the learning data storage unit 42 to create the noise-added learning data.

[0034] The outlier detection unit 53 of the learning unit 5 calculates an outlier score from the learning data acquired by the learning data acquisition unit 51 and the noise-added learning data created by the noise adding unit 52.

[0035] The calculation of the outlier score by the outlier detection unit 53 will now be described in detail. First, the outlier detection unit 53 inputs the learning data acquired by the learning data acquisition unit 51 into an outlier detection method and performs learning. The outlier detection unit 53 inputs, for example, all the learning data acquired by the learning data acquisition unit 51 into an outlier detection method and performs learning. The outlier detection unit 53 may perform learning using a known outlier detection method such as Hotelling's theory, k-nearest neighbor method, Local Outlier Factor (LOF), One class Support Vector Machine, etc. The outlier detection unit 53 may use one or more of these known outlier detection methods. In addition, if the number of dimensions of the input data is large, the outlier detection unit 53 may reduce the dimensions of the input data using the publicly known dimension reduction method described above, and use the dimension-reduced data as input to the outlier detection method. The input data that the outlier detection unit 53 inputs to the outlier detection method may be, for example, all or some of the explanatory variables included in the training data, or may be data in which a target variable is added to all or some of the explanatory variables included in the training data.

[0036] After the outlier detection method has been trained using all the training data, the outlier detection unit 53 then inputs the noise-added training data created by the noise-adding unit 52 to the trained outlier detection method and calculates an outlier score. Then, the outlier detection unit 53 sets the weight γ of the NCP Loss from the calculated outlier score. In the first embodiment, the second term in the loss function used in learning the machine learning model is called "NCP Loss." Details of the loss function will be described later.

[0037] The outlier detection unit 53 sets the weight γ of the NCP Loss depending on the magnitude of the outlier score calculated by the outlier detection method, for example. The outlier detection unit 53 sets the weight γ so that the weight γ is large for noise-added learning data that deviates from the learning data, and sets the weight γ so that the weight γ is small for noise-added learning data that is close to the learning data. For example, when the outlier score is calculated using a known LOF, which is an outlier detection method that assumes that the greater the difference between the local density of a point and the local density of a neighboring point, the greater the outlier score, the more it deviates from the learning data. In this case, the outlier detection unit 53 sets the weight γ to a value normalized so that the value obtained by reversing the positive and negative of the outlier score falls within the range of [0, 1]. Furthermore, the outlier detection unit 53 may, for example, set a threshold value (hereinafter referred to as the "outlier determination threshold value") and set the weight γ by comparing the outlier score with the outlier determination threshold value. For example, the outlier detection unit 53 may set the weight γ=1 to the noise-added learning data that deviates from the learning data such that the outlier score is equal to or greater than the outlier determination threshold value, and may set the weight γ=0 to the noise-added learning data that is close to the learning data such that the outlier score is smaller than the outlier determination threshold value.

[0038] Note that the above example is merely an example. When deviating from the learning data, whether the outlier score is equal to or greater than the outlier judgment threshold or smaller than the outlier judgment threshold depends on the outlier detection method. When setting the weight γ by comparing the outlier score with the outlier judgment threshold, the outlier detection unit 53 may compare the outlier score with the outlier judgment threshold so as to set the weight γ=1 for noise-added learning data that deviates from the learning data and the weight γ=0 for noise-added learning data that is close to the learning data.

[0039] The outlier detection unit 53 outputs the set weight γ to the model learning unit 54.

[0040] The model learning unit 54 of the learning unit 5 calculates a loss function using the weight γ of the NCP Loss set by the outlier detection unit 53, and learns a machine learning model. More specifically, the model learning unit 54 calculates a loss function using the weight γ set by the outlier detection unit 53 based on the learning data acquired by the learning data acquisition unit 51 and the noise-added learning data created by the noise adding unit 52, and learns a machine learning model. In this way, the model learning unit 54 creates a machine learning model. The model learning unit 54 uses the following loss function L(θ) in learning the machine learning model. Note that the term after Epprior in the calculation formula of the loss function L(θ) is the second term in the loss function used in learning the machine learning model described above. TIFF2025073129000003.tif9166 In this case, p model(y|x,θ) is the probability distribution of the output y obtained when the explanatory variable x is input in the parameter θ. Also, -E ptrain(x,y) [Input model(y|x,θ) ] is the maximum likelihood inference for the training data, TIFF2025073129000004.tif10166 It is. D KL refers to KL-divergence, which is the distribution of correct data p(y|x) and the output distribution p from the machine learning model model The method is not limited to this as long as it is a method for obtaining the distribution distance with (y|x, θ). The distribution p(y|x) of the correct data may be regarded as a delta function distribution, or may be a normal distribution, for example. TIFF2025073129000005.tif25166 Due to the weight γ of the NCP Loss calculated by the outlier detection unit 53 from the outlier score, the influence of the second term becomes large for noise-added learning data that deviates from the learning data, and the influence of the second term becomes small for noise-added learning data that is close to the learning data.

[0041] The model learning unit 54 of the learning unit 5 learns a machine learning model, and when it creates a machine learning model, stores the created machine learning model in the model storage unit 55.

[0042] The model storage unit 55 stores the machine learning model. In this embodiment, the model storage unit 55 is provided in the uncertainty learning device 2, but this is merely an example. The model storage unit 55 may be provided in a location outside the uncertainty learning device 2 that can be referenced by the uncertainty learning device 2.

[0043] The inference unit 6 evaluates the machine learning model created by the learning unit 5 and infers, in other words, predicts, the predicted value and uncertainty using the machine learning model based on actual data, in this case, operation-related data obtained from the machine device 1. In the inference unit 6, the machine learning model created by the learning unit 5 is evaluated when the machine learning model is created, i.e., when it is learned. The machine learning model is evaluated by an evaluation unit 64 of the inference unit 6. Inference of the predicted value and uncertainty using a machine learning model based on actual data is performed during inference in the inference unit 6. Note that inference using the machine learning model is performed by a prediction unit 62 of the inference unit 6.

[0044] The model reading unit 61 refers to the model storage unit 55 and reads the machine learning model. The model reading unit 61 outputs the read machine learning model to the prediction unit 62 and the evaluation unit 64.

[0045] The test data acquisition unit 63 acquires test data from the test data storage unit 43 . The test data acquisition unit 63 outputs the acquired test data to the evaluation unit 64.

[0046] The evaluation unit 64 uses the test data acquired by the test data acquisition unit 63 to evaluate the machine learning model read by the model reading unit 61, in other words, the machine learning model created by the model learning unit 54 and stored in the model memory unit 55. More specifically, the evaluation unit 64 evaluates the accuracy of the machine learning model based on the inference result (prediction value and uncertainty) output from the machine learning model and the objective variable of the test data acquired by the test data acquisition unit 63. The evaluation index used by the evaluation unit 64 may be RMSE (Root Mean Square Error), MAE (Mean Absolute Error), a likelihood function, or the like. The evaluation unit 64 may acquire the inference result output from the machine learning model from the model learning unit 54. Note that an arrow from the model learning unit 54 to the evaluation unit 64 is omitted in FIG. 3. The evaluation unit 64 may evaluate the machine learning model using test data with a known method for evaluating machine learning models. During learning, the model learning unit 54 inputs explanatory variables to the machine learning model based on the learning data, and creates a machine learning model by learning so that the output inference results (predicted values ​​and uncertainties) match the objective variables corresponding to the explanatory variables. During learning, the evaluation unit 64 evaluates the accuracy of the machine learning model created by the model learning unit 54 to check how much the accuracy of the machine learning model has improved.

[0047] The prediction unit 62 acquires model input data based on the operation-related data from the machine 1, inputs the model input data to a machine learning model to obtain a predicted value and uncertainty, and infers the predicted value and uncertainty. As described above, the machine learning model takes input data (here, model input data based on driving-related data) as input and outputs a prediction value and uncertainty. The model input data input by the prediction unit 62 to the machine learning model is unknown data. The prediction unit 62 inputs the model input data, which is unknown data, to the machine learning model, and obtains a predicted value corresponding to the objective variable (position error or control value, etc.) of the unknown data and the uncertainty for the predicted value. Here, the predicted value is, for example, a numerical value in the case of a regression problem, and the probability of each class in the case of a classification problem. The uncertainty is, for example, a variance or standard deviation indicating the variation in data. As described above, the prediction unit 62 acquires model input data to be used as input for the machine learning model from the machinery 1 via the operation result acquisition unit 31 of the acquisition unit 3 and the pre-processing execution unit 41 of the pre-processing unit 4.

[0048] The prediction unit 62 outputs the obtained predicted value and uncertainty to the machine device 1. When the mechanical device 1 acquires the predicted value and the uncertainty from the uncertainty learning device 2, the mechanical device 1 performs control based on the acquired predicted value and uncertainty.

[0049] Here, a specific example will be given to explain control based on predicted values ​​and uncertainties in the machine 1. As an example, it is assumed that the uncertainty learning device 2 outputs, as predicted values ​​and uncertainties, a correction amount of a control command for a processing position based on data such as a CAD model and its uncertainty when machining (drilling) a workpiece into a certain shape in the machine 1. The machine 1 corrects the control command based on the correction amount and the uncertainty output from the uncertainty learning device 2. For example, when the uncertainty σ output from the uncertainty learning device 2 is equal to or greater than a preset threshold value (hereinafter referred to as the "uncertainty determination threshold value") th, in other words, when the reliability of the predicted value is low, the machine 1 determines the control command according to the following formula. In the following formula, the control command is U, the original command value is u, and the correction amount is f. TIFF2025073129000006.tif12166

[0050] Note that the above example is merely one example, and the mechanical device 1 may, for example, not correct the control command if the uncertainty is equal to or greater than the uncertainty determination threshold, and may correct the control command if the uncertainty is less than the uncertainty determination threshold. Also, for example, in the uncertainty learning device 2, the prediction unit 62 may determine whether or not to output the obtained predicted value and uncertainty to the mechanical device 1. For example, the prediction unit 62 may output the predicted value and uncertainty to the mechanical device 1 when the obtained uncertainty is smaller than the uncertainty determination threshold, and may not output the predicted value and uncertainty to the mechanical device 1 when the obtained uncertainty is equal to or larger than the uncertainty determination threshold. In addition, when the obtained uncertainty is high, the prediction unit 62 can also collect the model input data from which the uncertainty was obtained, in other words, the model input data input into the machine learning model, as learning data using the Active Learning method.

[0051] The operation of the uncertainty learning device 2 according to the first embodiment will be described. The operation of the uncertainty learning device 2 will be described below separately for the operation during learning and the operation during inference.

[0052] First, the operation of the uncertainty learning device 2 during learning will be described. FIG. 4 is a flowchart for explaining the operation of the uncertainty learning device 2 according to the first embodiment during learning. The uncertainty learning device 2 executes the operation during learning as shown in the flowchart of FIG. 4 based on, for example, an instruction from a user. For example, the user operates an input device (not shown) to input an instruction to start the operation. When the control unit (not shown) of the uncertainty learning device 2 receives the instruction to start the operation, it causes the driving result acquisition unit 31, the preprocessing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the test data acquisition unit 63, and the evaluation unit 64 to start their operations. For example, the user may input the instruction to start the operation by inputting driving-related data. The uncertainty learning device 2 repeats the operation during learning as shown in the flowchart of FIG. 4 until, for example, the machine learning model is evaluated to a certain extent or the control unit receives an instruction to end the operation from the user.

[0053] The driving result acquisition unit 31 acquires driving-related data from the machine 1 (step ST1). The driving result acquisition unit 31 stores the acquired driving-related data in the driving result storage unit 32 .

[0054] The pre-processing execution unit 41 acquires the driving-related data acquired by the driving result acquisition unit 31 in step ST1 from the driving result memory unit 32, and performs pre-processing, i.e., learning-time pre-processing, to shape the learning data to be used in the learning unit 5 and the test data to be used in the evaluation unit 64 of the inference unit 6 based on the driving-related data (step ST2). The preprocessing execution unit 41 stores the learning data created by performing the learning preprocessing in the learning data storage unit 42. The preprocessing execution unit 41 also stores the test data created by performing the learning preprocessing in the test data storage unit 43.

[0055] The learning unit 5 performs learning to create a machine learning model based on the learning data stored in the learning data storage unit 42 and the noise-added learning data created based on the learning data (step ST3). The learning unit 5 stores the created machine learning model in the model storage unit 55.

[0056] The evaluation unit 64 of the inference unit 6 evaluates the machine learning model created by the learning unit 5 in step ST3 (step ST4). Specifically, the test data acquisition unit 63 acquires test data from the test data storage unit 43. Then, the evaluation unit 64 evaluates the machine learning model read by the model reading unit 61 using the test data acquired by the test data acquisition unit 63.

[0057] FIG. 5 is a flowchart for explaining the details of the process of step ST3 in FIG. The learning data acquisition unit 51 acquires learning data from the learning data storage unit 42 (step ST11). More specifically, the learning data acquisition unit 51 acquires all the learning data from the learning data storage unit 42 . The learning data acquisition unit 51 outputs the acquired learning data to the noise addition unit 52, the outlier detection unit 53, and the model learning unit .

[0058] The outlier detection unit 53 inputs all the learning data acquired by the learning data acquisition unit 51 in step ST11 into an outlier detection method and performs learning (step ST12).

[0059] The noise adding unit 52 acquires the learning data acquired by the learning data acquiring unit 51 in step ST11 (step ST13). Here, the learning data acquired by the noise adding unit 52 may be all the learning data acquired by the learning data acquiring unit 51, or a part (mini-batch) of the learning data acquired by the learning data acquiring unit 51.

[0060] The noise adding unit 52 adds noise to the learning data acquired in step ST13 to generate noise-added learning data (step ST14). The noise adding unit 52 outputs the created noise-added learning data to the outlier detection unit 53 and the model learning unit 54.

[0061] The outlier detection unit 53 calculates an outlier score from the learning data acquired in step ST13 and the noise-added learning data created by the noise adding unit 52 in step ST14 (step ST15). More specifically, the outlier detection unit 53 inputs the noise-added learning data created by the noise adding unit 52 to the outlier detection method learned in step ST12, and calculates an outlier score.

[0062] Then, the outlier detection unit 53 sets a weight γ of the NCP Loss from the calculated outlier score (step ST16). The outlier detection unit 53 outputs the set weight γ to the model learning unit 54.

[0063] The model learning unit 54 calculates a loss function using the weight γ of the NCP Loss set by the outlier detection unit 53 in step ST16 based on the learning data acquired in step ST13 and the learning data after noise is added created in step ST14, and learns a machine learning model (step ST17).

[0064] The model learning unit 54 determines whether learning has been performed a designated number of times (step ST18). It should be noted that the number of times that model learning unit 54 performs learning is determined in advance by a user or the like.

[0065] If the model learning unit 54 has not learned the specified number of times (if "NO" in step ST18), the operation of the learning unit 5 proceeds to the processing of step ST19, and the noise adding unit 52 acquires the learning data acquired by the learning data acquisition unit 51 (step ST19). Here, the learning data acquired by the noise adding unit 52 may be all the learning data acquired by the learning data acquiring unit 51, or a part (mini-batch) of the learning data acquired by the learning data acquiring unit 51. Thereafter, the operation of the learning unit 5 proceeds to the process of step ST14. In this case, in step ST17, the model learning unit 54 calculates a loss function using the weight γ of the NCP Loss set by the outlier detection unit 53 in step ST16 based on the learning data acquired in step ST19 and the noise-added learning data created in step ST14, and learns a machine learning model.

[0066] On the other hand, if the model learning unit 54 has learned the specified number of times (if "YES" in step ST18), the model learning unit 54 stores the machine learning model in the model memory unit 55, and the operation of the learning unit 5 ends the processing as shown in the flowchart of Figure 5.

[0067] Next, the operation of the uncertainty learning device 2 during inference will be described. FIG. 6 is a flowchart for explaining the operation of the uncertainty learning device 2 according to the first embodiment at the time of inference. The uncertainty learning device 2 executes the operation during inference as shown in the flowchart of FIG. 6 based on, for example, an instruction from a user. For example, the user operates an input device to input an instruction to start an operation. Upon receiving the instruction to start the operation, the control unit of the uncertainty learning device 2 causes the driving result acquisition unit 31, the preprocessing execution unit 41, the model reading unit 61, and the prediction unit 62 to start their operations. The uncertainty learning device 2 repeats the operation during inference as shown in the flowchart of FIG. 6 until, for example, the control unit receives an instruction to end the operation from the user. Note that the operation of the uncertainty learning device 2 during inference, which will be explained using the flowchart of Figure 6, is premised on the fact that the operation of the uncertainty learning device 2 during learning, which will be explained using the flowchart of Figure 4, has been executed before the operation in question is executed.

[0068] The driving result acquisition unit 31 acquires driving-related data from the machine 1 (step ST10). The driving result acquisition unit 31 stores the acquired driving-related data in the driving result storage unit 32 .

[0069] The pre-processing execution unit 41 acquires the driving-related data acquired by the driving result acquisition unit 31 in step ST10 from the driving result memory unit 32, and performs pre-processing, i.e., inference time pre-processing, to shape model input data to be used in the prediction unit 62 of the inference unit 6 based on the driving-related data (step ST20). The pre-processing execution unit 41 outputs the model input data created by performing pre-processing during inference to the prediction unit 62.

[0070] The model reading unit 61 refers to the model storage unit 55 and reads the machine learning model (step ST30). The model reading unit 61 outputs the read machine learning model to the prediction unit 62.

[0071] The prediction unit 62 acquires model input data based on driving-related data from the machinery 1 via the driving result acquisition unit 31 and the preprocessing execution unit 41, and inputs the model input data into a machine learning model to obtain a predicted value and uncertainty, thereby inferring the predicted value and uncertainty (step ST40). Then, the prediction unit 62 outputs the obtained predicted value and uncertainty to the machine 1 (step ST50). In step ST50, the prediction unit 62 may determine whether to output the obtained predicted value and uncertainty to the mechanical device 1, and if it determines that the obtained predicted value and uncertainty should be output to the mechanical device 1, it may output the predicted value and uncertainty to the mechanical device 1.

[0072] 6, the processing is performed in the order of step ST10, step ST20, and step ST30, but this is merely an example. For example, the processing of step ST30 may be performed before the processing of step ST10, or may be performed in parallel with the processing of steps ST10 to ST20.

[0073] In this way, the uncertainty learning device 2 adds noise to the learning data created based on the operation results obtained from the machine device 1, and calculates an outlier score from the learning data and the noise-added learning data after the noise has been added. Then, the uncertainty learning device 2 calculates a loss function weighted based on the calculated outlier score based on the learning data and the noise-added learning data, and learns a machine learning model. When the uncertainty learning device 2 calculates a loss function to learn a machine learning model, the uncertainty learning device 2 uses a weight γ set based on the outlier score to set high uncertainty for extrapolated data far from the learning data and low uncertainty for data close to the learning data. This allows the uncertainty learning device 2 to provide a machine learning model capable of more accurate inference of uncertainty. In the conventional technology described above, the second term of the loss function is learned using data after noise is added, so that the uncertainty is increased for extrapolated data that is far from the training data, but there is also a possibility that the uncertainty may be increased for data that is close to the training data or for the training data itself. In contrast, the uncertainty learning device 2 can provide a machine learning model with improved uncertainty inference accuracy. In other words, in a single machine learning model capable of inferring both predicted values ​​and uncertainty, the uncertainty learning device 2 does not learn all data with noise added, but by controlling the data used for learning data using outlier detection technology, it is possible to provide a machine learning model that can more accurately infer uncertainty for both extrapolated data and data close to the learning data.

[0074] As a technique for inferring predicted values ​​and uncertainties, for example, as disclosed in the reference document below, a technique is known in which Monte Carlo dropout is repeatedly applied to a neural network to obtain predicted values ​​and uncertainties, and calibration is performed using a fitness function that evaluates the accuracy of the predicted values ​​and uncertainties. (Reference) JP 2018-200677 A However, when Monte Carlo dropout is applied iteratively as in the above-mentioned technique, the calculation time for prediction becomes long, making it difficult to apply to equipment such as FA equipment with control periods on the order of milliseconds. The uncertainty learning device 2 according to the first embodiment can provide a machine learning model capable of outputting predicted values ​​and uncertainties applicable to the control of a mechanical device 1 having a control period in milliseconds, such as an FA device.

[0075] In the above-described first embodiment, the uncertainty learning device 2 includes the acquisition unit 3, the preprocessing unit 4, and the inference unit 6, but this is merely an example. The uncertainty learning device 2 is required to be equipped with at least a learning unit 5, and for example, the acquisition unit 3, the pre-processing unit 4, and the inference unit 6 may be provided outside the uncertainty learning device 2 at a location that the uncertainty learning device 2 can reference. When the uncertainty learning device 2 is configured not to include the acquisition unit 3, the preprocessing unit 4, and the inference unit 6, the processes of steps ST1 to ST2 and ST4 can be omitted from the operation of the uncertainty learning device 2 described using the flowchart in Fig. 4. Also, the uncertainty learning device 2 can omit the operation described using the flowchart in Fig. 6.

[0076] In addition, in the above-mentioned first embodiment, the uncertainty learning device 2 is provided in the server, but this is merely an example. For example, the uncertainty learning device 2 may be provided in the machine device 1 . Also, for example, in the uncertainty learning device 2, some or all of the driving result acquisition unit 31, preprocessing execution unit 41, learning data acquisition unit 51, noise addition unit 52, outlier detection unit 53, model learning unit 54, model reading unit 61, prediction unit 62, test data acquisition unit 63, or evaluation unit 64 may be provided in a device external to the server.

[0077] In the above embodiment 1, the machine 1 is an FA device, but this is merely an example. For example, the machine 1 can be a control device that controls automatic driving of a moving object, or a medical device used in a medical field, or any other device that solves various tasks using a machine learning model.

[0078] 7A and 7B are diagrams illustrating an example of a hardware configuration of the uncertainty learning device 2 according to the first embodiment. In the first embodiment, the functions of the driving result acquisition unit 31, the preprocessing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, and a control unit (not shown) are realized by the processing circuit 1001. That is, the uncertainty learning device 2 includes the processing circuit 1001 for performing control to create a machine learning model capable of more accurately inferring uncertainty by learning so that the extrapolated data has high uncertainty and the data close to the learning data has low uncertainty by using the weight γ set based on the outlier score. The processing circuit 1001 may be dedicated hardware as shown in FIG. 7A, or may be a processor 1004 executing a program stored in a memory as shown in FIG. 7B.

[0079] When the processing circuit 1001 is dedicated hardware, the processing circuit 1001 may be, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a combination thereof.

[0080] When the processing circuit is the processor 1004, the functions of the driving result acquisition unit 31, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, and the control unit (not shown) are realized by software, firmware, or a combination of software and firmware. The software or firmware is described as a program and stored in the memory 1005. The processor 1004 reads and executes the program stored in the memory 1005 to execute the functions of the driving result acquisition unit 31, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, and the control unit (not shown). That is, the uncertainty learning device 2 includes a memory 1005 for storing a program that, when executed by the processor 1004, results in the execution of steps ST1 to ST4 in Fig. 4 described above, or steps ST10 to ST50 in Fig. 6 described above. Also, the program stored in the memory 1005 can be said to cause a computer to execute the procedures or methods of the processing of the driving result acquisition unit 31, the preprocessing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, and a control unit (not shown). Here, memory 1005 refers to, for example, non-volatile or volatile semiconductor memory such as RAM, ROM (Read Only Memory), flash memory, EPROM (Erasable Programmable Read Only Memory), EEPROM (registered trademark; description omitted below) (Electrically Erasable Programmable Read-Only Memory), magnetic disk, flexible disk, optical disk, compact disk, mini disk, DVD (Digital Versatile Disc), etc.

[0081] The functions of the driving result acquisition unit 31, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, and the control unit (not shown) may be partially realized by dedicated hardware and partially realized by software or firmware. For example, the functions of the driving result acquisition unit 31 and the pre-processing execution unit 41 may be realized by a processing circuit 1001 as dedicated hardware, and the functions of the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, and the control unit (not shown) may be realized by the processor 1004 reading and executing a program stored in the memory 1005. The driving result storage unit 32, the learning data storage unit 42, the test data storage unit 43, and the model storage unit 55 are configured, for example, with a HDD (Hard Disk Drive, not shown) or an SSD (Solid State Drive, not shown). The uncertainty learning device 2 also includes an input interface device 1002 and an output interface device 1003 that perform wired or wireless communication with devices such as the machine device 1.

[0082] As described above, the uncertainty learning device 2 according to the first embodiment is configured to include a learning data acquisition unit 51 that acquires learning data created based on operation-related data obtained from the mechanical device 1, a noise addition unit 52 that creates noise-added learning data by adding noise to the learning data acquired by the learning data acquisition unit 51, an outlier detection unit 53 that calculates an outlier score from the learning data acquired by the learning data acquisition unit 51 and the noise-added learning data created by the noise addition unit 52, and a model learning unit 54 that calculates a loss function weighted based on the outlier score calculated by the outlier detection unit 53 based on the learning data and the noise-added learning data, and learns a machine learning model. Therefore, the uncertainty learning device 2 can provide a machine learning model that can infer uncertainty more accurately than a machine learning model created by the conventional method of adding noise to all learning data to learn the machine learning model.

[0083] Embodiment 2 Even if multiple operation-related data obtained from a machine device have the same value, the conditions under which the multiple operation-related data were obtained may be different. For example, when a machine tool processes two different sheet metals made of materials A and B, the machine tool feeds the material at the same speed, but the behavior may differ due to the difference in the materials. For example, if a machine learning model trained based on operation-related data obtained when processing material A is used to infer predicted values ​​and uncertainty from operation-related data obtained when processing material B, the inferred uncertainty will be low. This is because the operation-related data obtained when processing material A and the operation-related data obtained when processing material B are operation-related data obtained by processing material A or material B at the same speed, the machine learning model erroneously recognizes them as the same data, that is, as already-learned data, and infers low uncertainty. In the first embodiment, the above-mentioned points are not taken into consideration. In the second embodiment, an embodiment is described in which a machine learning model is created that utilizes data acquired by an external sensor that cannot be acquired by a mechanical device, making it possible to make inferences with high uncertainty even when a certain explanatory variable has the same value, because the data acquired by the external sensor is different.

[0084] FIG. 8 is a diagram showing an example of the configuration of an uncertainty learning system 100a including an uncertainty learning device 2a according to the second embodiment. The uncertainty learning system 100a includes an uncertainty learning device 2a, a machine device 1, and an external sensor 7. The uncertainty learning device 2a is connected to the machine device 1 and the external sensor 7 via a network. In the second embodiment, the mechanical device 1 is assumed to be, for example, an FA device. The external sensor 7 is a variety of sensors provided outside the mechanical device 1 independently of the mechanical device 1, such as a temperature sensor, a humidity sensor, or a vibration sensor.

[0085] The uncertainty learning device 2a according to the second embodiment is provided in, for example, a server. In the configuration example of the uncertainty learning device 2a according to the embodiment 2, the same components as those in the configuration example of the uncertainty learning device 2 according to the embodiment 1 already explained using FIG. 3 are given the same symbols and redundant explanations are omitted. The configuration example of the uncertainty learning device 2a differs from the configuration example of the uncertainty learning device 2 of embodiment 1 in that the acquisition unit 3a includes a sensor data acquisition unit 33 and a sensor data storage unit 34 in addition to a driving result acquisition unit 31 and a driving result storage unit 32. The sensor data acquisition unit 33 functions during learning and inference. In addition, in embodiment 2, like the uncertainty learning device 2 in embodiment 1, the uncertainty learning device 2a performs "learning" to create a machine learning model, and "inference" to infer a predicted value and uncertainty using the machine learning model created by "learning".

[0086] The sensor data acquisition unit 33 acquires data acquired by the external sensor 7 (hereinafter referred to as “sensor data”) from the external sensor 7. The sensor data acquired by the sensor data acquisition unit 33 from the external sensor 7 includes, for example, at least one of temperature data of the location where the mechanical device 1 is installed, humidity data of the location where the mechanical device 1 is installed, vibration data of the mechanical device 1, data related to the state of the mechanical device 1, and data related to the task of the mechanical device 1. For example, in the case of a processing machine, examples of the sensor data include data indicating the temperature, vibration, and shape of the workpiece of the mechanical device 1, which affect the smoothness of the processed shape or the processing speed.

[0087] The sensor data acquiring unit 33 stores the acquired sensor data in the sensor data storage unit 34. The sensor data acquiring unit 33 stores the sensor data in the sensor data storage unit 34, for example, by adding an acquisition date and time of the sensor data to the sensor data.

[0088] The sensor data storage unit 34 stores the sensor data acquired by the sensor data acquisition unit 33 . In this embodiment, the sensor data storage unit 34 is provided in the uncertainty learning device 2a, but this is merely an example. The sensor data storage unit 34 may be provided in a location outside the uncertainty learning device 2 that can be referenced by the uncertainty learning device 2a.

[0089] In embodiment 2, the pre-processing execution unit 41 of the pre-processing unit 4 acquires the driving-related data acquired by the driving result acquisition unit 31 from the driving result memory unit 32, and acquires the sensor data acquired by the sensor data acquisition unit 33 from the sensor data memory unit 34. Then, the pre-processing execution unit 41 performs pre-processing during learning, which formats the learning data used by the learning unit 5 and the test data used by the evaluation unit 64 of the inference unit 6, based on the driving-related data and the sensor data. More specifically, the pre-processing execution unit 41 adds the sensor data obtained by the external sensor 7 to the explanatory variables. In addition, the pre-processing execution unit 41 acquires the driving-related data acquired by the driving result acquisition unit 31 from the driving result memory unit 32, and acquires the sensor data acquired by the sensor data acquisition unit 33 from the sensor data memory unit 34, and performs pre-processing, i.e., inference time pre-processing, to shape model input data to be used in the prediction unit 62 of the inference unit 6 based on the driving-related data and the sensor data.

[0090] The learning unit 5 creates a machine learning model based on the learning data including explanatory variables based on the sensor data. A specific method for creating a machine learning model by the learning unit 5 is similar to the specific method described in the first embodiment, so a duplicated description will be omitted. The learning unit 5 creates one machine learning model based on the learning data created by the pre-processing execution unit 41 based on the driving-related data and the sensor data.

[0091] Note that this is merely one example. For example, if the sensor data acquisition unit 33 is able to acquire several pieces of sensor data with different contents while the mechanical device 1 is operating, the learning unit 5 may create a machine learning model for each piece of sensor data. In this case, for example, the preprocessing execution unit 41 creates learning data and test data grouped based on the contents of the sensor data in the learning preprocessing. The learning unit 5 creates a machine learning model for each group based on the learning data. Note that when creating a machine learning model for each content of the sensor data, the preprocessing execution unit 41 only needs to use the sensor data to group the learning data and test data based on the driving-related data, and does not need to add the sensor data to the explanatory variables. As a specific example, suppose that data indicating various types of machining shapes (e.g., circles or straight lines) are acquired as sensor data. In this case, the pre-processing execution unit 41 creates learning data and test data based on the driving-related data for each type of machining shape, and links the sensor data indicating the type of machining shape to the created learning data and test data, respectively. The learning unit 5 creates a machine learning model for each type of machining shape. For example, in the case where the operation pattern (operation mode) of the machine device 1 changes depending on the type of machining shape, the uncertainty learning device 2a can provide a machine learning model corresponding to the operation pattern of the machine device 1 by creating a machine learning model for each type of machining shape. In the learning unit 5, the model learning unit 54 associates the created machine learning model with the sensor data (in the above example, data indicating the type of machining shape) and stores them in the model storage unit 55.

[0092] In the inference unit 6, the model reading unit 61 reads in a machine learning model corresponding to the test data grouped based on the contents of the sensor data. The model reading unit 61 may, for example, obtain test data from the test data obtaining unit 63, and identify the machine learning model to be read from the sensor data linked to the test data. Note that the arrow from the test data obtaining unit 63 to the model reading unit 61 is omitted in FIG. 8. The evaluation unit 64 of the inference unit 6 uses the test data acquired by the test data acquisition unit 63 to evaluate the machine learning model corresponding to the sensor data linked to the test data. The prediction unit 62 of the inference unit 6 inputs the model input data created by the preprocessing execution unit 41 in the inference preprocessing into a machine learning model corresponding to the sensor data linked to the model input data to obtain a predicted value and uncertainty, thereby inferring the predicted value and uncertainty. Note that when a machine learning model is created for each content of the sensor data, the preprocessing execution unit 41 creates model input data for each content of the sensor data in the inference preprocessing, links the created model input data with the sensor data, and outputs them to the prediction unit 62.

[0093] The operation of the uncertainty learning device 2a according to the second embodiment will be described. First, the operation of the uncertainty learning device 2a according to the second embodiment during learning will be described. FIG. 9 is a flowchart for explaining the operation of the uncertainty learning device 2a according to the second embodiment during learning. The operation during learning of the uncertainty learning device 2a shown in FIG. 9 is an operation in the case where the learning unit 5 in the uncertainty learning device 2a creates one machine learning model. The uncertainty learning device 2a executes the operation during learning as shown in the flowchart of FIG. 9 based on, for example, an instruction from a user. For example, the user operates an input device (not shown) to input an instruction to start the operation. When the control unit (not shown) of the uncertainty learning device 2a receives the instruction to start the operation, the control unit (not shown) causes the driving result acquisition unit 31, the sensor data acquisition unit 33, the preprocessing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the test data acquisition unit 63, and the evaluation unit 64 to start their operations. For example, the user may input the instruction to start the operation by inputting driving-related data. The uncertainty learning device 2a repeats the operation during learning as shown in the flowchart of FIG. 9 until, for example, the machine learning model is evaluated to a certain extent or the control unit receives an instruction to end the operation from the user. The specific contents of the processing of steps ST3 to ST4 in Fig. 9 are similar to the specific contents of the processing of steps ST3 to ST4 in Fig. 4 that have been explained in the first embodiment, respectively, and therefore duplicated explanations will be omitted. In addition, the processing of step ST3 in Fig. 9 in the uncertainty learning device 2a is, in detail, processing as shown in the flowchart in Fig. 5. The operation of the uncertainty learning device 2a shown in the flowchart in Fig. 5, more specifically, the operation of the model learning unit 54, has been explained in the first embodiment, and therefore duplicated explanations will be omitted.

[0094] The driving result acquisition unit 31 acquires driving-related data from the machine 1 (step ST1a). The driving result acquisition unit 31 stores the acquired driving-related data in the driving result storage unit 32 .

[0095] The sensor data acquiring unit 33 acquires sensor data from the external sensor 7 (step ST1b). The sensor data acquisition unit 33 stores the acquired sensor data in the sensor data storage unit .

[0096] The pre-processing execution unit 41 acquires the driving-related data acquired by the driving result acquisition unit 31 in step ST1a from the driving result storage unit 32, and acquires the sensor data acquired by the sensor data acquisition unit 33 from the sensor data storage unit 34 in step ST1b. The pre-processing execution unit 41 performs pre-processing for shaping the learning data to be used in the learning unit 5 and the test data to be used in the inference unit 6 based on the driving-related data and the sensor data, that is, pre-processing during learning (step ST2a). The preprocessing execution unit 41 stores the learning data created by performing the learning preprocessing in the learning data storage unit 42. The preprocessing execution unit 41 also stores the test data created by performing the learning preprocessing in the test data storage unit 43.

[0097] For example, when the learning unit 5, more specifically the model learning unit 54 of the learning unit 5, creates a machine learning model for each content of sensor data, the preprocessing execution unit 41 creates learning data and test data grouped based on the type of sensor data in preprocessing during learning in step ST2a. The learning unit 5 creates a machine learning model for each content of the sensor data in step ST3. The model reading unit 61 of the inference unit 6 reads in the machine learning model corresponding to the sensor data in step ST4, and the evaluation unit 64 uses the test data acquired by the test data acquisition unit 63 to evaluate the machine learning model corresponding to the sensor data linked to the test data.

[0098] Next, an operation of the uncertainty learning device 2a according to the second embodiment at the time of inference will be described. FIG. 10 is a flowchart for explaining the operation of the uncertainty learning device 2a according to the second embodiment at the time of inference. The operation of the uncertainty learning device 2a during inference shown in FIG. 10 is an operation in the case where the learning unit 5 in the uncertainty learning device 2a creates one machine learning model. The uncertainty learning device 2a executes the operation during learning as shown in the flowchart of FIG. 10 based on, for example, an instruction from a user. For example, the user operates an input device to input an instruction to start the operation. When the control unit of the uncertainty learning device 2a receives the instruction to start the operation, it causes the driving result acquisition unit 31, the sensor data acquisition unit 33, the preprocessing execution unit 41, the model reading unit 61, and the prediction unit 62 to start their operations. The uncertainty learning device 2a repeats the operation during inference as shown in the flowchart of FIG. 10 until, for example, the control unit receives an instruction to end the operation from the user. Note that the operation of the uncertainty learning device 2a during inference, which will be explained using the flowchart of Figure 10, is premised on the fact that the operation of the uncertainty learning device 2a during learning, which will be explained using the flowchart of Figure 9, has been executed before the operation in question is executed. The specific contents of the processes in steps ST30 to ST50 in FIG. 10 are similar to the specific contents of the processes in steps ST30 to ST50 in FIG. 6 already described in the first embodiment, and therefore duplicated description will be omitted.

[0099] The driving result acquisition unit 31 acquires driving-related data from the machine 1 (step ST10a). The driving result acquisition unit 31 stores the acquired driving-related data in the driving result storage unit 32 .

[0100] The sensor data acquiring unit 33 acquires sensor data from the external sensor 7 (step ST10b). The sensor data acquisition unit 33 stores the acquired sensor data in the sensor data storage unit .

[0101] The pre-processing execution unit 41 acquires the driving-related data acquired by the driving result acquisition unit 31 in step ST10a from the driving result memory unit 32, and acquires the sensor data acquired by the sensor data acquisition unit 33 in step ST10b from the sensor data memory unit 34, and performs pre-processing, i.e., inference time pre-processing, to shape model input data to be used in the prediction unit 62 of the inference unit 6 based on the driving-related data and the sensor data (step ST20a). The pre-processing execution unit 41 outputs the model input data created by performing pre-processing during inference to the prediction unit 62.

[0102] 10, the processing is performed in the order of steps ST10a and ST10b, step ST20a, and step ST30, but this is merely an example. For example, the processing of step ST30 may be performed before the processing of steps ST10a and ST10b, or may be performed in parallel with the processing of steps ST10a and ST10b to ST20.

[0103] Also, for example, when the learning unit 5, more specifically the model learning unit 54 of the learning unit 5, creates a machine learning model for each content of the sensor data, the preprocessing execution unit 41 creates model input data for each content of the sensor data in step ST20a, links the created model input data with the sensor data, and outputs the linked data to the prediction unit 62. In step ST40, the model reading unit 61 of the inference unit 6 reads in a machine learning model corresponding to the sensor data, and in step ST50, the prediction unit 62 inputs the model input data created by the preprocessing execution unit 41 into the machine learning model corresponding to the sensor data linked to the model input data to obtain a predicted value and uncertainty, thereby inferring the predicted value and uncertainty.

[0104] In this way, the uncertainty learning device 2a acquires sensor data acquired by an external sensor 7 provided independently of the machine device 1, and acquires learning data created based on the driving-related data and the sensor data obtained from the machine device 1. The uncertainty learning device 2a adds noise to the learning data created based on the driving-related data and the sensor data, and calculates an outlier score from the learning data and the noise-added learning data after the noise has been added. Then, the uncertainty learning device 2a calculates a loss function weighted based on the calculated outlier score based on the learning data and the noise-added learning data, and learns a machine learning model. The uncertainty learning device 2a can provide a machine learning model with improved uncertainty inference accuracy by creating a machine learning model that can recognize differences in driving results, in other words, differences in driving-related data that arise due to differences in the conditions when the driving-related data was obtained.

[0105] In the above second embodiment, the uncertainty learning device 2a includes the acquisition unit 3a, the preprocessing unit 4, and the inference unit 6, but this is merely an example. The uncertainty learning device 2a is required to have at least a learning unit 5, and for example, the acquisition unit 3a, the preprocessing unit 4, and the inference unit 6 may be provided outside the uncertainty learning device 2a in a location that can be referenced by the uncertainty learning device 2a. When the uncertainty learning device 2a is configured not to include the acquisition unit 3a, the preprocessing unit 4, and the inference unit 6, the processes of step ST1a, step ST1b to step ST2, and step ST4 can be omitted from the operation of the uncertainty learning device 2a described using the flowchart in Fig. 9. Also, the uncertainty learning device 2a can omit the operation described using the flowchart in Fig. 10.

[0106] In addition, in the above second embodiment, the uncertainty learning device 2a is provided in the server, but this is merely an example. For example, the uncertainty learning device 2 a may be provided in the machine device 1 . Also, for example, in the uncertainty learning device 2a, some or all of the driving result acquisition unit 31, the sensor data acquisition unit 33, the preprocessing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, or the evaluation unit 64 may be provided in a device external to the server.

[0107] In the above second embodiment, the machine 1 is an FA device, but this is merely an example. For example, the machine 1 can be a control device that controls automatic driving of a moving object, or a medical device used in a medical field, or any other device that solves various tasks using a machine learning model.

[0108] The hardware configuration of the uncertainty learning device 2a according to the second embodiment is the configuration shown in FIG. 7A and FIG. 7B in the first embodiment, and therefore is not shown in the drawings. In the second embodiment, the functions of the driving result acquisition unit 31, the sensor data acquisition unit 33, the preprocessing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, and a control unit (not shown) are realized by the processing circuit 1001. That is, the uncertainty learning device 2a learns to make the extrapolated data highly uncertain and the data close to the learning data less uncertain by the weight γ set based on the outlier score, thereby enabling more accurate inference of uncertainty, and includes the processing circuit 1001 for controlling the creation of a machine learning model capable of recognizing differences in driving-related data caused by differences in the conditions when the driving-related data was obtained. The processing circuit 1001 may be dedicated hardware as shown in FIG. 7A, or may be a processor 1004 executing a program stored in a memory as shown in FIG. 7B.

[0109] The processing circuit 1001 reads out and executes the programs stored in the memory 1005, thereby executing the functions of the driving result acquisition unit 31, the sensor data acquisition unit 33, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, and a control unit (not shown). That is, the uncertainty learning device 2a includes a memory 1005 for storing a program that, when executed by the processing circuit 1001, results in the execution of step ST1a, step ST1b to step ST4 in FIG. 9, or step ST10a, step ST10b to step ST50 in FIG. 10. In addition, the program stored in memory 1005 can also be said to cause the computer to execute the processing procedures or methods of the driving result acquisition unit 31, the sensor data acquisition unit 33, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, and a control unit not shown. The driving result storage unit 32, the sensor data storage unit 34, the learning data storage unit 42, the test data storage unit 43, and the model storage unit 55 are configured, for example, with an HDD or SSD. The uncertainty learning device 2a also includes an input interface device 1002 and an output interface device 1003 that perform wired or wireless communication with devices such as the mechanical device 1.

[0110] As described above, the uncertainty learning device 2a of embodiment 2 includes a sensor data acquisition unit 33 that acquires sensor data acquired by an external sensor 7 provided independently of the mechanical device 1, and the learning data acquisition unit 51 is configured to acquire learning data created based on the driving-related data obtained from the mechanical device 1 and the sensor data acquired by the sensor data acquisition unit 33. In the uncertainty learning device 2a, the model learning unit 54 calculates a loss function weighted based on the outlier score calculated by the outlier detection unit 53 based on the learning data created based on the driving-related data and the sensor data and the learning data after noise is added, and learns a machine learning model. Therefore, the uncertainty learning device 2a can provide a machine learning model capable of inferring uncertainty with higher accuracy than a machine learning model created by a conventional method of learning a machine learning model by adding noise to all learning data. Furthermore, the uncertainty learning device 2a can provide a machine learning model with improved accuracy in inferring uncertainty by creating a machine learning model capable of recognizing differences in driving-related data caused by differences in the conditions when the driving results, in other words, the driving-related data, were obtained.

[0111] Embodiment 3 Even without operating the machine 1, it may be possible to obtain data obtained in advance by running a simulator in a simulation (hereinafter referred to as "simulation data"), or operation-related data from past operations of the machine 1. In the third embodiment, an embodiment will be described in which a machine learning model is created using simulation data or past driving-related data that has been acquired in advance, and a machine learning model is then created based on that machine learning model by transfer learning to learning data created from driving-related data obtained by operating the machine 1. In the following third embodiment, simulation data or past driving-related data acquired in advance is referred to as "pre-data," and a machine learning model created using the pre-data is referred to as a "pre-learning model."

[0112] FIG. 11 is a diagram showing an example of the configuration of an uncertainty learning system 100b including an uncertainty learning device 2b according to the third embodiment. The uncertainty learning system 100b includes an uncertainty learning device 2b and a machine device 1. The uncertainty learning device 2b is connected to the machine device 1 via a network. In the third embodiment, the mechanical device 1 is assumed to be, for example, an FA device.

[0113] The uncertainty learning device 2b according to the third embodiment is provided in, for example, a server. In the configuration example of the uncertainty learning device 2b according to embodiment 3, the same components as those in the configuration example of the uncertainty learning device 2 according to embodiment 1 already explained using FIG. 3 are given the same symbols and redundant explanations are omitted. The configuration example of the uncertainty learning device 2b differs from the configuration example of the uncertainty learning device 2 according to embodiment 1 in that it includes a pre-data acquisition unit 8 and in that the learning unit 5a includes a pre-learning unit 56 in addition to a learning data acquisition unit 51, a noise addition unit 52, an outlier detection unit 53, a model learning unit 54, and a model memory unit 55. The prior data acquisition unit 8 and the prior learning unit 56 function during learning. In addition, in embodiment 3, like the uncertainty learning device 2 in embodiment 1, the uncertainty learning device 2b performs "learning" to create a machine learning model, and "inference" to infer a predicted value and uncertainty using the machine learning model created by "learning".

[0114] The advance data acquisition unit 8 acquires advance data. For example, simulation data obtained by running a simulation operation on a simulator (not shown), or operation-related data acquired when the machine 1 was operated in the past, are stored on a cloud (not shown) as advance data. The advance data acquisition unit 8 checks whether advance data is stored on the cloud, and acquires the advance data if it is stored. The simulator simulates and reproduces the operation or behavior of the machine 1. Simulation data obtained by causing the simulator to execute a simulation operation includes, for example, parameters set in the machine 1, the configuration of the machine 1, an operation mode, and the like, data indicating values ​​specific to the machine 1, or log data of the operation of the machine 1. The advance data acquisition unit 8 outputs the acquired advance data to the pre-processing execution unit 41 of the pre-processing unit 4.

[0115] In the third embodiment, when prior data is output from the prior data acquisition unit 8, the pre-processing execution unit 41 acquires the prior data, and performs pre-learning processing, based on the prior data, to shape learning data to be used by the prior learning unit 56 of the learning unit 5a. Details of the pre-learning unit 56 will be described later. In addition, the pre-processing execution unit 41 acquires the driving-related data acquired by the driving result acquisition unit 31 from the driving result memory unit 32, and performs pre-processing during learning to shape the learning data to be used by the model learning unit 54 of the learning unit 5a and the test data to be used by the model learning unit 54 of the inference unit 6 based on the driving-related data. Details of the learning preprocessing based on driving-related data performed by the preprocessing execution unit 41 have been described in the first embodiment, so a duplicated description will be omitted. In addition, the preprocessing execution unit 41 may shape the learning data based on the prior data in a manner similar to the manner of shaping the learning data based on driving-related data.

[0116] The preprocessing execution unit 41 adds data indicating that the learning data is based on the prior data to the learning data created by performing learning preprocessing based on the prior data, and stores the resulting data in the learning data storage unit 42. In the following embodiment 3, the learning data based on the prior data is also referred to as "pre-learning data". When the preprocessing execution unit 41 creates learning data by performing learning preprocessing based on driving-related data, the preprocessing execution unit 41 adds data indicating that the learning data is based on driving-related data to the created learning data, and stores the resulting data in the learning data storage unit 42. In addition, the preprocessing execution unit 41 stores test data created by performing learning preprocessing based on driving-related data in the test data storage unit 43.

[0117] In addition, details of the inference preprocessing performed by the preprocessing execution unit 41 in the third embodiment are similar to the details of the inference preprocessing explained in the first embodiment, so that a duplicated explanation will be omitted. In the inference preprocessing, the preprocessing execution unit 41 does not need advance data. The pre-processing execution unit 41 outputs the model input data created by performing pre-processing during inference to the prediction unit 62.

[0118] In the third embodiment, the learning data acquiring unit 51 of the learning unit 5a checks whether or not pre-learning data is stored in the learning data storage unit 42. If the pre-learning data is stored, the learning data acquiring unit 51 acquires the pre-learning data and outputs the acquired pre-learning data to the pre-learning unit 56. Furthermore, the learning data acquisition unit 51 acquires learning data from the learning data storage unit 42, and outputs the acquired learning data to the noise addition unit 52, the outlier detection unit 53, and the model learning unit .

[0119] The pre-learning section 56 of the learning unit 5a causes the pre-learning model to learn the relationship between the explanatory variables and the objective variables based on the pre-learning data output from the learning data acquisition section 51. It is preferable that the pre-learning model and the machine learning model learned by the model learning unit 54 are the same type of machine learning model. The pre-learning unit 56 outputs the learned pre-learned model to the model learning unit 54. The model learning unit 54 stores the pre-learned model in an internal buffer or the like.

[0120] In embodiment 3, the model learning unit 54 of the learning unit 5a reads the pre-learned model stored in an internal buffer or the like, calculates a loss function using the weight γ of the NCP Loss set by the outlier detection unit 53, and transfer learns the machine learning model. More specifically, based on the learning data acquired by the learning data acquisition unit 51 and the noise-added learning data created by the noise addition unit 52, the model learning unit 54 reads a pre-learning model stored in an internal buffer or the like, calculates a loss function using the weight γ set by the outlier detection unit 53, and learns a machine learning model. Note that the calculation of the loss function using the weight γ of the NCP Loss has been described in the first embodiment, and therefore a duplicated description will be omitted. Also, the details of the noise adding unit 52 and the outlier detection unit 53 are similar to the details of the noise adding unit 52 and the outlier detection unit 53 described in the first embodiment, and therefore a duplicated description will be omitted.

[0121] The transfer learning performed by the model learning unit 54 is a known technique, but here, a brief explanation of transfer learning will be given. FIG. 12 is a diagram for explaining an example of transfer learning. In FIG. 12, FIG. 12A shows an example of Fine Tuning, FIG. 12B shows an example of Feature Extraction, and FIG. 12C shows an example of Joint Training. Transfer learning is a technique for adapting a model trained in one domain to another domain. Specifically, it is an effective method for adapting a model trained in a domain where a wide range of data is available to a domain where there is little data, or for adapting a model trained in a simulator to a real-world environment. Examples of transfer learning include Fine Tuning, which learns only new data, Feature Extraction, which adds a new layer to a pre-trained model and trains it, and Joint Training, which can handle multiple tasks, as shown in Figure 12. Note that this is merely an example, and the model learning unit 54 may perform transfer learning using a transfer learning method other than these methods. When learning, the model learning unit 54 can arbitrarily change the layer of the neural network to be learned, and may learn all layers or may focus on one layer.

[0122] Here, the details of the outlier detection unit 53 are the same as those of the outlier detection unit 53 described in embodiment 1. That is, the outlier detection unit 53 inputs the learning data acquired by the learning data acquisition unit 51, more specifically, the learning data created based on the driving-related data, to an outlier detection method to learn it, and when the outlier detection method is learned, the outlier detection unit 53 inputs the noise-added learning data created by the noise addition unit 52 to the learned outlier detection method to calculate an outlier score. However, this is merely an example, and for example, the outlier detection unit 53 may use the pre-learning data to learn the outlier detection method. Specifically, the outlier detection unit 53 learns the outlier detection method using data including the learning data and the pre-learning data. Then, the outlier detection unit 53 inputs the noise-added learning data created by the noise adding unit 52 to the learned outlier detection method and calculates an outlier score. In this case, the learning data acquiring unit 51 outputs the pre-learning data acquired from the learning data storage unit 42 to the pre-learning unit 56 and the outlier detection unit 53.

[0123] When there is a large amount of prior data and a small amount of data to which the method is to be applied, i.e., the driving-related data obtained from the machine device 1, if the outlier detection method is trained using learning data based on a small amount of data, when the model learning unit 54 creates a machine learning model, a machine learning model is created that determines that data that is actually close to the learning data (more specifically, learning data after noise has been added) is out of line simply because it is not included in the small amount of learning data based on the small amount of driving-related data used for learning, and the learning of uncertainty is not controlled correctly. The outlier detection unit 53 trains the outlier detection method using data that includes both large and small amounts of data, and calculates an outlier score for the small amount of data to which noise has been added, thereby making it possible to prevent the occurrence of events such as those described above in which uncertainty learning is not properly controlled.

[0124] The operation of the uncertainty learning device 2b according to the third embodiment will be described. First, the operation during learning of the uncertainty learning device 2b according to the third embodiment will be described. FIG. 13 is a flowchart for explaining the operation during learning of the uncertainty learning device 2b according to the third embodiment. The uncertainty learning device 2b executes the operation during learning as shown in the flowchart of FIG. 13 based on, for example, an instruction from a user. For example, the user operates an input device (not shown) to input an instruction to start the operation. When the control unit (not shown) of the uncertainty learning device 2b receives the instruction to start the operation, it causes the driving result acquisition unit 31, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the pre-learning unit 56, the model reading unit 61, the test data acquisition unit 63, the evaluation unit 64, and the pre-data acquisition unit 8 to start their operations. For example, the user may input the instruction to start the operation by inputting driving-related data or pre-data. The uncertainty learning device 2b repeats the operation during learning as shown in the flowchart of FIG. 13 until, for example, the machine learning model is evaluated to a certain extent or the control unit receives an instruction to end the operation from the user. The specific contents of the processing of steps ST1 to ST2 and step ST4 in FIG. 13 are similar to the specific contents of the processing of steps ST1 to ST2 and step ST4 in FIG. 4, which have already been explained in embodiment 1, and therefore duplicate explanations will be omitted.

[0125] The pre-data acquiring unit 8 determines whether or not a pre-learning model has been created (step ST101). For example, a pre-learning model presence flag indicating whether or not a pre-learning model has been created is set in a location that can be referenced by each component of the uncertainty learning device 2b. The pre-learning model presence flag indicates, for example, "1: pre-learning model present" or "0: pre-learning model absent", and the initial value is "0". In the uncertainty learning device 2b, when the pre-learning unit 56 creates a pre-learning model, it sets the pre-learning model presence flag to "1". For example, the prior data acquiring unit 8 can determine whether or not a prior learning model has been created by referring to the prior learning model existence flag.

[0126] When the prior data acquiring unit 8 determines that the prior learning model has been created ("YES" in step ST101), the operation of the uncertainty learning device 2b proceeds to the processing of step ST1.

[0127] When it is determined that the pre-learning model has not been created ("NO" in step ST101), the pre-data acquisition unit 8 checks whether or not pre-data is stored on the cloud (step ST102). If the advance data is stored on the cloud ("YES" in step ST102), the advance data acquisition unit 8 acquires the advance data (step ST103). The advance data acquisition unit 8 outputs the acquired advance data to the pre-processing execution unit 41 of the pre-processing unit 4.

[0128] The pre-processing execution unit 41 acquires the pre-data output from the pre-data acquisition unit 8 in step ST103, and performs pre-processing, i.e., learning-time pre-processing, to shape the pre-learning data to be used by the pre-learning unit 56 of the learning unit 5a based on the pre-data (step ST104). The pre-processing execution unit 41 adds data indicating that the pre-learning data is based on the pre-data to the pre-learning data, and stores the data in the learning data storage unit 42.

[0129] The learning data acquisition unit 51 acquires the pre-learning data stored in the learning data storage unit 42 by the pre-processing execution unit 41 in step ST104, and the pre-learning unit 56 trains the pre-learning model to learn the relationship between the explanatory variables and the objective variables based on the pre-learning data acquired by the learning data acquisition unit 51 (step ST105). The pre-learning unit 56 outputs the learned pre-learned model to the model learning unit 54. The model learning unit 54 stores the pre-learned model in an internal buffer or the like.

[0130] On the other hand, if the pre-data is not stored on the cloud ("NO" in step ST102), the pre-data acquisition unit 8 sets the pre-learning model creation impossible flag to "1". The pre-learning model creation impossible flag is a flag indicating that a pre-learning model cannot be created, and is set in a location that can be referenced by each component of the uncertainty learning device 2b. The pre-learning model creation impossible flag indicates, for example, "1: pre-learning model creation impossible" or "0: pre-learning model creation possible", and the initial value of the pre-learning model creation impossible flag is "0". After that, the operation of the uncertainty learning device 2b proceeds to the processing of step ST1.

[0131] In step ST3a, the learning unit 5a performs transfer learning to create a machine learning model based on the learning data stored in the learning data storage unit 42, the noise-added learning data created based on the learning data, and the pre-learning model created by the pre-learning unit 56 in step ST105 (step ST3a). The learning unit 5 stores the created machine learning model in the model storage unit 55.

[0132] FIG. 14 is a flowchart for explaining the details of the process of step ST3a in FIG. The specific contents of the processing of steps ST11 to ST16 and steps ST18 to ST19 in FIG. 14 are similar to the specific contents of the processing of steps ST11 to ST16 and steps ST18 to ST19 in FIG. 5, which have already been explained in embodiment 1, and therefore duplicate explanations will be omitted.

[0133] When a pre-learning model has been created, the model learning unit 54 reads the pre-learning model stored in an internal buffer or the like, calculates a loss function using the read pre-learning model, the learning data acquired in step ST13, the noise-added learning data created in step ST14, and the weight γ of the NCP Loss set by the outlier detection unit 53 in step ST16, and transfer learns the machine learning model (step ST17a). If a pre-learning model has not been created, the model learning unit 54 calculates a loss function using the learning data acquired in step ST13, the noise-added learning data created in step ST14, and the weight γ of the NCP Loss set by the outlier detection unit 53 in step ST16, and learns a machine learning model. The model learning unit 54 can determine whether a pre-learning model has been created, for example, from the pre-learning model present flag and the pre-learning model creation impossible flag. For example, when the pre-learning model present flag is "0" and the pre-learning model creation impossible flag is "0", the model learning unit 54 may suspend the execution of the process of step ST17a until the pre-learning model present flag is set to "1", in other words, until the pre-learning model is created.

[0134] As described above, for example, the outlier detection unit 53 may use the pre-learning data to learn the outlier detection method. 14, the outlier detection unit 53 learns the outlier detection method using data including the learning data and the pre-learning data. Then, in step ST15, the outlier detection unit 53 inputs the noise-added learning data created by the noise adding unit 52 in step ST14 to the outlier detection method learned in step ST12, and calculates an outlier score. In step ST11, the learning data acquiring unit 51 outputs the pre-learning data acquired from the learning data storage unit 42 to the outlier detecting unit 53.

[0135] The operation of the uncertainty learning device 2b in embodiment 3 during inference is similar to the operation of the uncertainty learning device 2 in embodiment 1 during inference described using the flowchart of Figure 6 in embodiment 1, so duplicated explanations will be omitted.

[0136] In this way, the uncertainty learning device 2b acquires prior data based on simulation data obtained by simulating the operation of the machine 1 or operation-related data related to past operation results of the machine 1, and learns a pre-learning model based on pre-learning data created based on the acquired prior data. Then, the uncertainty learning device 2b calculates a loss function weighted based on the calculated outlier score based on the learning data and the noise-added learning data, and transfer learns the pre-learning model. If a certain amount of learning data is not available when the machine learning model is created, the machine learning model may not be able to infer prediction values ​​and uncertainty well, and as a result, the inference accuracy may be poor when making inferences based on actually unknown data (here, model input data based on driving-related data).In response to this, the uncertainty learning device 2b utilizes past driving-related data obtained in advance or simulation data obtained from a simulator to create a pre-learning model for the machine learning model and perform transfer learning, so that even if the driving-related data obtained from the machine 1 that is the source of the learning data when creating the machine learning model is small, it is possible to provide a machine learning model with high accuracy by successfully inferring prediction values ​​and uncertainty.

[0137] In the above third embodiment, the uncertainty learning device 2b includes the acquisition unit 3, the preprocessing unit 4, the inference unit 6, and the advance data acquisition unit 8, but this is merely an example. The uncertainty learning device 2b is required to have at least a learning unit 5a, and for example, the acquisition unit 3, the pre-processing unit 4, the inference unit 6, and the pre-data acquisition unit 8 may be provided outside the uncertainty learning device 2b at a location that can be referenced by the uncertainty learning device 2b. When the uncertainty learning device 2b is configured not to include the acquisition unit 3, the preprocessing unit 4, the inference unit 6, and the advance data acquisition unit 8, the processes of steps ST101 to ST105, steps ST1 to ST2, and steps ST4 to ST4 can be omitted from the operation of the uncertainty learning device 2b described using the flowchart in Fig. 13. Also, the uncertainty learning device 2b can omit the operation during inference as shown in the flowchart in Fig. 6.

[0138] In addition, in the above third embodiment, the uncertainty learning device 2b is provided in the server, but this is merely an example. For example, the uncertainty learning device 2b may be provided in the machine device 1. Also, for example, in the uncertainty learning device 2b, some or all of the driving result acquisition unit 31, pre-processing execution unit 41, learning data acquisition unit 51, noise addition unit 52, outlier detection unit 53, model learning unit 54, pre-learning unit 56, model reading unit 61, prediction unit 62, test data acquisition unit 63, evaluation unit 64, or pre-data acquisition unit 8 may be provided in a device external to the server.

[0139] In the above third embodiment, the machine 1 is an FA device, but this is merely an example. For example, the machine 1 can be a control device that performs automatic driving control of a moving object, or a medical device used in a medical field, or any other device that solves various tasks using a machine learning model.

[0140] The hardware configuration of the uncertainty learning device 2b according to the third embodiment is the configuration shown in FIG. 7A and FIG. 7B in the first embodiment, and therefore is not shown in the drawings. In the third embodiment, the functions of the driving result acquisition unit 31, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the pre-learning unit 56, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, the pre-data acquisition unit 8, and a control unit (not shown) are realized by the processing circuit 1001. That is, the uncertainty learning device 2b is provided with the processing circuit 1001 for performing control to create a pre-learning model based on the pre-data, and to perform transfer learning so that the extrapolated data has high uncertainty and the data close to the learning data has low uncertainty by using the weight γ set based on the outlier score, thereby creating a machine learning model capable of more accurate uncertainty inference. The processing circuit 1001 may be dedicated hardware as shown in FIG. 7A, or may be a processor 1004 executing a program stored in a memory as shown in FIG. 7B.

[0141] The processing circuit 1001 reads out and executes the programs stored in the memory 1005, thereby executing the functions of the driving result acquisition unit 31, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the pre-learning unit 56, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, the pre-data acquisition unit 8, and a control unit (not shown). That is, the uncertainty learning device 2b includes a memory 1005 for storing a program that, when executed by the processing circuit 1001, results in the execution of steps ST101 to ST105, ST1 to ST4 in FIG. 13, or steps ST10 to ST50 in FIG. 6. In addition, the program stored in memory 1005 can also be said to cause the computer to execute the processing procedures or methods of the driving result acquisition unit 31, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the pre-learning unit 56, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, the pre-data acquisition unit 8, and a control unit not shown. The driving result storage unit 32, the learning data storage unit 42, the test data storage unit 43, and the model storage unit 55 are configured, for example, with an HDD or SSD. Moreover, the uncertainty learning device 2b includes an input interface device 1002 and an output interface device 1003 that perform wired or wireless communication with devices such as the machine device 1.

[0142] As described above, the uncertainty learning device 2b according to embodiment 3 includes a pre-data acquisition unit 8 that acquires pre-data based on simulation data obtained by simulating the operation of the machine 1 or operation-related data related to past operating results of the machine 1, and a pre-learning unit 56 that learns a pre-learning model based on pre-learning data created based on the pre-data acquired by the pre-data acquisition unit 8. The model learning unit 54 is configured to calculate a loss function weighted based on the outlier score calculated by the outlier detection unit 53 based on the learning data and the learning data after noise is added, and to create a machine learning model by transfer learning the pre-learning model learned by the pre-learning unit 56. The uncertainty learning device 2b creates a pre-learning model for the machine learning model by utilizing past driving-related data obtained in advance or simulation data obtained from a simulator, and can thus successfully infer predicted values ​​and uncertainty even when the amount of driving-related data obtained from the machine 1 that serves as the source of the learning data for creating the machine learning model is small, thereby making it possible to provide a highly accurate machine learning model.

[0143] Embodiment 4 In the third embodiment, the uncertainty learning device creates a pre-learning model based on prior data, and creates a machine learning model by transfer learning using the created pre-learning model. In the fourth embodiment, an embodiment will be described in which transfer learning is performed using sensor data acquired by an external sensor, which cannot be acquired by a mechanical device, to create a machine learning model.

[0144] FIG. 15 is a diagram showing an example of the configuration of an uncertainty learning system 100c including an uncertainty learning device 2c according to the fourth embodiment. The uncertainty learning system 100c includes an uncertainty learning device 2c, a machine device 1, and an external sensor 7. The uncertainty learning device 2c is connected to the machine device 1 and the external sensor 7 via a network. Note that the external sensor 7 has been described in the second embodiment, so a duplicate description will be omitted. In the fourth embodiment, the mechanical device 1 is assumed to be, for example, an FA device.

[0145] The uncertainty learning device 2c according to the fourth embodiment is provided in, for example, a server. In the configuration example of the uncertainty learning device 2c according to the embodiment 4, the same components as those in the configuration example of the uncertainty learning device 2b according to the embodiment 3, which have already been explained using FIG. 11, are denoted by the same reference symbols, and duplicate explanations will be omitted. The configuration example of the uncertainty learning device 2c differs from the configuration example of the uncertainty learning device 2b of embodiment 3 in that the acquisition unit 3a includes a sensor data acquisition unit 33 and a sensor data storage unit 34 in addition to a driving result acquisition unit 31 and a driving result storage unit 32. Details of the acquisition unit 3a are similar to those of the acquisition unit 3a included in the uncertainty learning device 2a already described in the second embodiment, and therefore will not be described again. In addition, in embodiment 4, like the uncertainty learning device 2b in embodiment 3, the uncertainty learning device 2c performs "learning" to create a machine learning model, and "inference" to infer a predicted value and uncertainty using the machine learning model created by "learning".

[0146] In embodiment 4, when pre-data is output from the pre-data acquisition unit 8, the pre-processing execution unit 41 acquires the pre-data and performs pre-learning pre-processing based on the pre-data to shape pre-learning data to be used by the pre-learning unit 56 of the learning unit 5a. Furthermore, the preprocessing execution unit 41 acquires the driving-related data acquired by the driving result acquisition unit 31 from the driving result storage unit 32, and acquires the sensor data acquired by the sensor data acquisition unit 33 from the sensor data storage unit 34, and performs learning preprocessing based on the driving-related data and the sensor data to shape learning data used by the model learning unit 54 of the learning unit 5 and test data used by the evaluation unit 64 of the inference unit 6. More specifically, the preprocessing execution unit 41 adds sensor data acquired by the external sensor 7 to the explanatory variables. Details of the learning pre-processing performed by the pre-processing execution unit 41, which shapes pre-learning data based on pre-data, and details of the learning pre-processing which shapes learning data and test data based on driving-related data and sensor data, have already been explained in embodiment 2 or embodiment 3, so duplicate explanations will be omitted.

[0147] The pre-processing execution unit 41 stores the pre-learning data created by performing pre-processing during learning based on the pre-data in the learning data storage unit 42, together with data indicating that the learning data is learning data based on the pre-data. Furthermore, when the preprocessing execution unit 41 creates learning data by performing learning preprocessing based on driving-related data, the preprocessing execution unit 41 adds data indicating that the learning data is learning data based on driving-related data to the created learning data, and stores the data in the learning data storage unit 42. Furthermore, the preprocessing execution unit 41 stores the test data created by performing learning preprocessing in the test data storage unit 43.

[0148] In addition, details of the inference preprocessing performed by the preprocessing execution unit 41 in the fourth embodiment are similar to the details of the inference preprocessing explained in the second embodiment, so that a duplicated explanation will be omitted. In the inference preprocessing, the preprocessing execution unit 41 does not need advance data. The pre-processing execution unit 41 outputs the model input data created by performing pre-processing during inference to the prediction unit 62.

[0149] The model learning unit 54 of the learning unit 5a reads the pre-learning model created by the pre-learning unit 56, which has been stored in an internal buffer or the like, calculates a loss function using the weight γ of the NCP Loss set by the outlier detection unit 53 based on the learning data including explanatory variables based on sensor data, and creates a machine learning model by transfer learning the machine learning model. Details of the pre-learning unit 56 have been described in the third embodiment, and therefore a duplicated description will be omitted. Details of the transfer learning by the model learning unit 54 have been described in the third embodiment, and therefore a duplicated description will be omitted. The model learning unit 54 creates one machine learning model based on the learning data created by the pre-processing execution unit 41 based on the driving-related data and the sensor data and one pre-learning model created by the pre-learning unit 56.

[0150] Note that this is just one example. For example, the pre-learning unit 56 may create a pre-learning model for each content of the sensor data, and the model learning unit 54 may create a machine learning model by transfer learning the pre-learning model for each content of the sensor data. For example, when the pre-data acquisition unit 8 can acquire, as pre-data, simulation data having the same content as the sensor data acquired by the sensor data acquisition unit 33 from the external sensor 7, the pre-learning unit 56 may create a pre-learning model for each content of the sensor data, and the model learning unit 54 may create a machine learning model by transfer learning the pre-learning model for each content of the sensor data. In this case, for example, the preprocessing execution unit 41 creates pre-learning data grouped based on data (simulation data) that is included in the pre-data and has the same content as the sensor data in the learning preprocessing. Hereinafter, the simulation data that is included in the pre-data and has the same content as the sensor data is also referred to as "pre-data for model classification." The pre-processing execution unit 41 links the created pre-learning data to the pre-data for model classification. Furthermore, in the pre-processing during learning, the pre-processing execution unit 41 creates learning data and test data that are grouped based on the contents of the sensor data. The pre-processing execution unit 41 associates the sensor data with the created learning data and test data, respectively.

[0151] The pre-learning unit 56 creates a pre-learning model for each of the pre-learning data grouped by the pre-learning data for model classification. The pre-learning unit 56 outputs the created pre-learning model to the model learning unit 54 in association with the pre-learning data for model classification linked to the pre-learning data from which the pre-learning model was created.

[0152] The model learning unit 54 reads in a pre-learning model corresponding to the contents of the sensor data linked to the learning data acquired from the learning data acquisition unit 51 as a pre-learning model to be used in transfer learning, calculates a loss function using the read pre-learning model and the weight γ of the NCP Loss set by the outlier detection unit 53, and transfer learns the machine learning model. The model learning unit 54 links the sensor data to the created machine learning model and stores it in the model storage unit 55. As described above, the pre-data acquisition unit 8 outputs the pre-learning model to the model learning unit 54 in association with the pre-data for model classification linked to the pre-learning data used to create the pre-learning model. Therefore, based on the pre-data for model classification associated with the pre-learning model, the model learning unit 54 can identify the pre-learning model corresponding to the content of the sensor data linked to the learning data.

[0153] In the inference unit 6, the model reading unit 61 reads a machine learning model corresponding to the test data grouped based on the contents of the sensor data. The evaluation unit 64 of the inference unit 6 uses the test data acquired by the test data acquisition unit 63 to evaluate the machine learning model corresponding to the sensor data linked to the test data. The prediction unit 62 of the inference unit 6 inputs the model input data created by the preprocessing execution unit 41 in the inference preprocessing into a machine learning model corresponding to the sensor data linked to the model input data to obtain a predicted value and uncertainty, thereby inferring the predicted value and uncertainty. When a machine learning model is created for each type of sensor data, the preprocessing execution unit 41 creates model input data for each content of the sensor data in the inference preprocessing, links the created model input data with the sensor data, and outputs them to the prediction unit 62.

[0154] Also in the fourth embodiment, similarly to the third embodiment, the outlier detection unit 53 may use the pre-learning data for learning the outlier detection method.

[0155] The operation of the uncertainty learning device 2c according to the fourth embodiment will be described. First, the operation during learning of the uncertainty learning device 2c according to the fourth embodiment will be described. FIG. 16 is a flowchart for explaining the operation of the uncertainty learning device 2c according to the fourth embodiment. The operation of the uncertainty learning device 2c shown in FIG. 16 is an operation when the learning unit 5a creates one machine learning model in the uncertainty learning device 2c. The uncertainty learning device 2c executes the operation during learning as shown in the flowchart of FIG. 16 based on, for example, an instruction from a user. For example, the user operates an input device (not shown) to input an instruction to start the operation. When the control unit (not shown) of the uncertainty learning device 2a receives the instruction to start the operation, the control unit (not shown) causes the driving result acquisition unit 31, the sensor data acquisition unit 33, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the pre-learning unit 56, the model reading unit 61, the test data acquisition unit 63, the evaluation unit 64, and the pre-data acquisition unit 8 to start their operations. For example, the user may input the instruction to start the operation by inputting driving-related data. The uncertainty learning device 2c repeats the operation during learning as shown in the flowchart of FIG. 16 until, for example, the machine learning model is evaluated to a certain extent or the control unit receives an instruction to end the operation from the user. The specific contents of the processes of step ST101 to step ST105 and step ST3a in FIG. 16 are similar to the specific contents of the processes of step ST101 to step ST105 and step ST3a in FIG. 13, which have been described in the third embodiment, respectively, and therefore the duplicated explanations will be omitted. The specific contents of the processes of step ST1a, step ST1b to step ST2a, and step ST4 in FIG. 16 are similar to the specific contents of the processes of step ST1a, step ST1b to step ST2a, and step ST4 in FIG. 9, which have been described in the second embodiment, respectively, and therefore the duplicated explanations will be omitted. The process of step ST3a in FIG. 16 in the uncertainty learning device 2c is, in detail, a process as shown in the flowchart in FIG. 14. The operation of the uncertainty learning device 2c shown in the flowchart in FIG. 14, more specifically, the operation of the model learning unit 54, has been described in the third embodiment, and therefore the duplicated explanations will be omitted.

[0156] For example, when the learning unit 5a, more specifically the model learning unit 54 of the learning unit 5a, creates a machine learning model for each content of sensor data, the preprocessing execution unit 41 creates data with the same content as the sensor data included in the pre-data, in other words, pre-learning data grouped based on the pre-data for model classification, in the learning preprocessing in step ST104. Also, the preprocessing execution unit 41 creates learning data and test data grouped based on the content of the sensor data, in the learning preprocessing in step ST2a. In step ST105, the pre-learning unit 56 creates a pre-learning model for each group of pre-learning data. The pre-learning unit 56 outputs the created pre-learning model to the model learning unit 54 in association with pre-data for model classification included in the pre-learning data from which the pre-learning model was created. In step ST3a, more specifically, in step ST17a of FIG. 14, the model learning unit 54 loads a pre-learning model corresponding to the sensor data linked to the learning data acquired from the learning data acquisition unit 51 as a pre-learning model to be used for transfer learning, calculates a loss function using the loaded pre-learning model and the weight γ of the NCP Loss set by the outlier detection unit 53, and transfer learns the machine learning model. In step ST4, the model reading unit 61 of the inference unit 6 reads in a machine learning model corresponding to the sensor data, and the evaluation unit 64 uses the test data acquired by the test data acquisition unit 63 to evaluate the machine learning model corresponding to the contents of the sensor data linked to the test data.

[0157] The operation during inference of the uncertainty learning device 2c in embodiment 4 is similar to the operation during inference of the uncertainty learning device 2a in embodiment 2 described using the flowchart of Figure 10 in embodiment 2, so duplicated explanations will be omitted.

[0158] In this way, the uncertainty learning device 2c acquires pre-data based on simulation data regarding the operating results obtained by simulating the operation of the mechanical equipment 1, or operating-related data regarding the past operating results of the mechanical equipment 1, and learns a pre-learning model based on pre-learning data created based on the pre-data. The uncertainty learning device 2c acquires sensor data obtained by an external sensor 7 provided independently of the mechanical device 1, and acquires learning data created based on the driving-related data obtained from the mechanical device 1 and the sensor data. Then, the uncertainty learning device 2 calculates a loss function weighted based on the outlier score based on the learning data and the noise-added learning data, and creates a machine learning model by transfer learning the pre-learning model. The uncertainty learning device 2c can provide a machine learning model with improved accuracy in inferring uncertainty by creating a machine learning model that can recognize differences in driving results, in other words, differences in driving-related data that arise due to differences in the conditions when the driving-related data was obtained.In addition, by utilizing past driving-related data obtained in advance or simulation data obtained from a simulator to create a pre-learning model for the machine learning model, even if the amount of driving-related data obtained from the machine 1 that serves as the source of learning data when creating the machine learning model is small, it is possible to successfully infer predicted values ​​and uncertainty, and provide a highly accurate machine learning model.

[0159] Furthermore, the uncertainty learning device 2c may classify the pre-data into groups corresponding to data with the same content as the sensor data included in the pre-data, create grouped pre-learning data, and create a pre-learning model for each grouped pre-learning data.The uncertainty learning device 2c may calculate a loss function weighted based on the outlier score based on the learning data created based on the operation-related data obtained from the machine device 1 and the sensor data acquired from the external sensor 7, and the noise-added learning data, and create a machine learning model by transfer learning the pre-learning model corresponding to the sensor data. This enables the uncertainty learning device 2c to select a machine learning model appropriate for transfer learning, and to provide a machine learning model with improved uncertainty inference accuracy.

[0160] In the above fourth embodiment, the uncertainty learning device 2c includes the acquisition unit 3a, the preprocessing unit 4, the inference unit 6, and the advance data acquisition unit 8, but this is merely an example. The uncertainty learning device 2c is required to have at least a learning unit 5a, and for example, the acquisition unit 3a, the pre-processing unit 4, the inference unit 6, and the pre-data acquisition unit 8 may be provided outside the uncertainty learning device 2c at a location that can be referenced by the uncertainty learning device 2c. When the uncertainty learning device 2c is configured not to include the acquisition unit 3a, the preprocessing unit 4, the inference unit 6, and the advance data acquisition unit 8, the processes of steps ST101 to ST105, ST1a, ST1b to ST2a, and ST4 can be omitted from the operation of the uncertainty learning device 2c described using the flowchart of Fig. 16. Also, the uncertainty learning device 2a can omit the operation during inference described using the flowchart of Fig. 10.

[0161] In addition, in the above fourth embodiment, the uncertainty learning device 2c is provided in the server, but this is merely an example. For example, the uncertainty learning device 2c may be provided in the machine device 1. Also, for example, in the uncertainty learning device 2c, some or all of the driving result acquisition unit 31, the sensor data acquisition unit 33, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the pre-learning unit 56, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, or the pre-data acquisition unit 8 may be provided in an external device of the server.

[0162] In the above fourth embodiment, the machine 1 is an FA device, but this is merely an example. For example, the machine 1 can be a control device that performs automatic driving control of a moving object, or a medical device used in a medical field, or any other device that solves various tasks using a machine learning model.

[0163] The hardware configuration of the uncertainty learning device 2c according to the fourth embodiment is the configuration shown in FIG. 7A and FIG. 7B in the first embodiment, and therefore is not shown in the drawings. In the fourth embodiment, the functions of the driving result acquisition unit 31, the sensor data acquisition unit 33, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the pre-learning unit 56, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, the pre-data acquisition unit 8, and a control unit (not shown) are realized by the processing circuit 1001. That is, the uncertainty learning device 2c is provided with the processing circuit 1001 for controlling the creation of a machine learning model that creates a pre-learning model based on the pre-data, and performs transfer learning so that the extrapolated data has high uncertainty and the data close to the learning data has low uncertainty by using a weight γ set based on the pre-learning model and the outlier score, thereby enabling more accurate inference of uncertainty and recognizing differences in the driving-related data caused by differences in the conditions when the driving-related data was obtained. The processing circuit 1001 may be dedicated hardware as shown in FIG. 7A, or may be a processor 1004 executing a program stored in a memory as shown in FIG. 7B.

[0164] The processing circuit 1001 reads out and executes the programs stored in the memory 1005, thereby executing the functions of the driving result acquisition unit 31, the sensor data acquisition unit 33, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the pre-learning unit 56, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, the pre-data acquisition unit 8, and a control unit (not shown). That is, the uncertainty learning device 2c includes a memory 1005 for storing a program that, when executed by the processing circuit 1001, results in the execution of steps ST101 to ST105, ST1a, and ST1b to ST4 in FIG. 16, or steps ST10a, ST10b to ST50 in FIG. 10. In addition, the program stored in memory 1005 can also be said to cause the computer to execute the processing procedures or methods of the driving result acquisition unit 31, the sensor data acquisition unit 33, the pre-processing execution unit 41, the learning data acquisition unit 51, the noise addition unit 52, the outlier detection unit 53, the model learning unit 54, the pre-learning unit 56, the model reading unit 61, the prediction unit 62, the test data acquisition unit 63, the evaluation unit 64, the pre-data acquisition unit 8, and a control unit not shown. The driving result storage unit 32, the sensor data storage unit 34, the learning data storage unit 42, the test data storage unit 43, and the model storage unit 55 are configured, for example, with an HDD or SSD. The uncertainty learning device 2c also includes an input interface device 1002 and an output interface device 1003 that perform wired or wireless communication with devices such as the mechanical device 1.

[0165] As described above, the uncertainty learning device 2c according to the fourth embodiment includes a pre-data acquisition unit 8 that acquires pre-data based on simulation data on the operation results obtained by simulating the operation of the mechanical device 1 or operation-related data on the past operation results of the mechanical device 1, a pre-learning unit 56 that learns a pre-learning model based on pre-learning data created based on the pre-data acquired by the pre-data acquisition unit 8, and a sensor data acquisition unit 33 that acquires sensor data acquired by an external sensor 7 provided independently of the mechanical device 1, and the learning data acquisition unit 51 acquires learning data created based on the operation-related data acquired from the mechanical device 1 and the sensor data acquired by the sensor data acquisition unit 33, and the model learning unit 54 calculates a loss function weighted based on the outlier score calculated by the outlier detection unit 53 based on the learning data and the learning data after noise is added, and creates a machine learning model by transfer learning the pre-learning model learned by the pre-learning unit 56. The uncertainty learning device 2c can provide a machine learning model with improved accuracy in inferring uncertainty by creating a machine learning model that can recognize differences in driving results, in other words, differences in driving-related data that arise due to differences in the conditions when the driving-related data was obtained.In addition, by utilizing past driving-related data obtained in advance or simulation data obtained from a simulator to create a pre-learning model for the machine learning model, even if the amount of driving-related data obtained from the machine 1 that serves as the source of learning data when creating the machine learning model is small, it is possible to successfully infer predicted values ​​and uncertainty, and provide a highly accurate machine learning model.

[0166] It should be noted that the embodiments may be freely combined, or any of the components in each embodiment may be modified, or any of the components in each embodiment may be omitted.

[0167] Various aspects of the present disclosure are summarized below as appendices.

[0168] (Appendix 1) An uncertainty learning device that creates a machine learning model that receives data based on operation-related data related to an operation result of a machine, and outputs a predicted value corresponding to the operation-related data and an uncertainty of the predicted value, a learning data acquisition unit that acquires learning data created based on the driving-related data obtained from the machine; a noise adding unit that adds noise to the learning data acquired by the learning data acquisition unit to create noise-added learning data; an outlier detection unit that calculates an outlier score from the learning data acquired by the learning data acquisition unit and the noise-added learning data created by the noise adding unit; a model learning unit that calculates a loss function weighted based on the outlier score calculated by the outlier detection unit based on the training data and the noise-added training data, and learns the machine learning model. An uncertainty learning device comprising: (Appendix 2) a test data acquisition unit that acquires test data created based on the driving-related data obtained from the machine; An evaluation unit that infers the predicted value and the uncertainty based on the test data acquired by the test data acquisition unit and the machine learning model created by the model learning unit, and evaluates the machine learning model. 2. The uncertainty learning device of claim 1, comprising: (Appendix 3) a pre-processing execution unit that creates the learning data based on the driving-related data; The learning data acquisition unit acquires the learning data created by the preprocessing execution unit. 2. The uncertainty learning device according to claim 1. (Appendix 4) a pre-processing execution unit that creates the learning data and the test data based on the driving-related data; The learning data acquisition unit acquires the learning data created by the preprocessing execution unit, The test data acquisition unit acquires the test data created by the preprocessing execution unit. 3. The uncertainty learning device according to claim 2. (Appendix 5) The uncertainty is expressed as the variance or standard deviation, which indicates the dispersion of the data. 5. The uncertainty learning device according to claim 1, (Appendix 6) a prior data acquisition unit that acquires prior data based on simulation data obtained by simulating operation of the machine or the operation-related data related to the past operation results of the machine; A pre-learning unit that learns a pre-learning model based on pre-learning data created based on the pre-data acquired by the pre-data acquisition unit, The model learning unit calculates a loss function weighted based on the outlier score calculated by the outlier detection unit based on the training data and the noise-added training data, and creates the machine learning model by transfer learning the pre-training model trained by the pre-training unit. 6. The uncertainty learning device according to any one of claims 1 to 5, (Appendix 7) a sensor data acquisition unit that acquires sensor data acquired by an external sensor provided independently of the mechanical device; The learning data acquisition unit acquires the learning data created based on the driving-related data acquired from the machine device and the sensor data acquired by the sensor data acquisition unit. 6. The uncertainty learning device according to any one of claims 1 to 5, (Appendix 8) a prior data acquisition unit that acquires simulation data relating to the operation results obtained by simulating operation of the machine, or prior data based on the operation-related data relating to the past operation results of the machine; a pre-learning unit that learns a pre-learning model based on pre-learning data created based on the pre-data acquired by the pre-data acquisition unit; a sensor data acquisition unit that acquires sensor data acquired by an external sensor provided independently of the mechanical device; the learning data acquisition unit acquires the learning data created based on the driving-related data acquired from the machine device and the sensor data acquired by the sensor data acquisition unit; The model learning unit calculates a loss function weighted based on the outlier score calculated by the outlier detection unit based on the training data and the noise-added training data, and creates the machine learning model by transfer learning the pre-training model trained by the pre-training unit. 6. The uncertainty learning device according to any one of claims 1 to 5, (Appendix 9) The mechanical device is an FA device, and the operation-related data includes a command position, a command speed, a command acceleration, a feedback speed, a feedback acceleration, a current value, or a measured value of a deviation of a machining position. 9. The uncertainty learning device according to any one of claims 1 to 8, (Appendix 10) An uncertainty learning program for creating a machine learning model that receives data based on operation-related data related to an operation result of a machine and outputs a predicted value corresponding to the operation-related data and the uncertainty of the predicted value, Computer, a learning data acquisition unit that acquires learning data created based on the driving-related data obtained from the machine; a noise adding unit that adds noise to the learning data acquired by the learning data acquisition unit to create noise-added learning data; an outlier detection unit that calculates an outlier score from the learning data acquired by the learning data acquisition unit and the noise-added learning data created by the noise adding unit; a model learning unit that calculates a loss function weighted based on the outlier score calculated by the outlier detection unit based on the training data and the noise-added training data, and learns the machine learning model. Uncertainty learning program to function as. (Appendix 11) An uncertainty learning device according to any one of claims 1 to 9; The mechanical device and an uncertainty learning system with. [Explanation of symbols]

[0169] 1 mechanical device, 2, 2a, 2b, 2c uncertainty learning device, 3, 3a acquisition unit, 31 driving result acquisition unit, 32 driving result memory unit, 33 sensor data acquisition unit, 34 sensor data memory unit, 4 pre-processing unit, 41 pre-processing execution unit, 42 learning data memory unit, 43 test data memory unit, 5, 5a learning unit, 51 learning data acquisition unit, 52 noise addition unit, 53 outlier detection unit, 54 model learning unit, 55 model memory unit, 56 pre-learning unit, 6 inference unit, 61 model reading unit, 62 prediction unit, 63 test data acquisition unit, 64 evaluation unit, 7 external sensor, 8 pre-data acquisition unit, 100, 100a, 100b, 100c uncertainty learning system, 1001 processing circuit, 1002 input interface device, 1003 output interface device, 1004 processor, 1005 memory.

Claims

1. An uncertainty learning device that creates a machine learning model that receives data based on operation-related data related to an operation result of a machine, and outputs a predicted value corresponding to the operation-related data and an uncertainty of the predicted value, a learning data acquisition unit that acquires learning data created based on the driving-related data obtained from the machine; a noise adding unit that adds noise to the learning data acquired by the learning data acquisition unit to create noise-added learning data; an outlier detection unit that calculates an outlier score from the learning data acquired by the learning data acquisition unit and the noise-added learning data created by the noise adding unit; a model learning unit that calculates a loss function weighted based on the outlier score calculated by the outlier detection unit based on the training data and the noise-added training data, and learns the machine learning model. An uncertainty learning device comprising:

2. a test data acquisition unit that acquires test data created based on the driving-related data obtained from the machine; An evaluation unit that infers the predicted value and the uncertainty based on the test data acquired by the test data acquisition unit and the machine learning model created by the model learning unit, and evaluates the machine learning model. The uncertainty learning device according to claim 1 , comprising:

3. a pre-processing execution unit that creates the learning data based on the driving-related data; The learning data acquisition unit acquires the learning data created by the preprocessing execution unit.

2. The uncertainty learning device according to claim 1 .

4. a pre-processing execution unit that creates the learning data and the test data based on the driving-related data; The learning data acquisition unit acquires the learning data created by the preprocessing execution unit, The test data acquisition unit acquires the test data created by the preprocessing execution unit.

3. The uncertainty learning device according to claim 2.

5. The uncertainty is expressed as the variance or standard deviation, which indicates the dispersion of the data.

5. The uncertainty learning device according to claim 1, wherein the uncertainty learning device detects a difference between the uncertainty and the uncertainty.

6. a prior data acquisition unit that acquires prior data based on simulation data obtained by simulating operation of the machine or the operation-related data related to the past operation results of the machine; A pre-learning unit that learns a pre-learning model based on pre-learning data created based on the pre-data acquired by the pre-data acquisition unit, The model learning unit calculates a loss function weighted based on the outlier score calculated by the outlier detection unit based on the training data and the noise-added training data, and creates the machine learning model by transfer learning the pre-training model trained by the pre-training unit.

2. The uncertainty learning device according to claim 1 .

7. a sensor data acquisition unit that acquires sensor data acquired by an external sensor provided independently of the mechanical device; The learning data acquisition unit acquires the learning data created based on the driving-related data acquired from the machine device and the sensor data acquired by the sensor data acquisition unit.

2. The uncertainty learning device according to claim 1 .

8. a prior data acquisition unit that acquires simulation data relating to the operation results obtained by simulating operation of the machine, or prior data based on the operation-related data relating to the past operation results of the machine; a pre-learning unit that learns a pre-learning model based on pre-learning data created based on the pre-data acquired by the pre-data acquisition unit; a sensor data acquisition unit that acquires sensor data acquired by an external sensor provided independently of the mechanical device; the learning data acquisition unit acquires the learning data created based on the driving-related data acquired from the machine device and the sensor data acquired by the sensor data acquisition unit; The model learning unit calculates a loss function weighted based on the outlier score calculated by the outlier detection unit based on the training data and the noise-added training data, and creates the machine learning model by transfer learning the pre-training model trained by the pre-training unit.

2. The uncertainty learning device according to claim 1 .

9. The mechanical device is an FA device, and the operation-related data includes a command position, a command speed, a command acceleration, a feedback speed, a feedback acceleration, a current value, or a measured value of a deviation of a machining position.

2. The uncertainty learning device according to claim 1 .

10. An uncertainty learning program for creating a machine learning model that receives data based on operation-related data related to an operation result of a machine and outputs a predicted value corresponding to the operation-related data and the uncertainty of the predicted value, Computer, a learning data acquisition unit that acquires learning data created based on the driving-related data obtained from the machine; a noise adding unit that adds noise to the learning data acquired by the learning data acquisition unit to create noise-added learning data; an outlier detection unit that calculates an outlier score from the learning data acquired by the learning data acquisition unit and the noise-added learning data created by the noise adding unit; a model learning unit that calculates a loss function weighted based on the outlier score calculated by the outlier detection unit based on the training data and the noise-added training data, and learns the machine learning model. Uncertainty learning program to function as.

11. The uncertainty learning device according to claim 1 ; The mechanical device and an uncertainty learning system with.