Training device, estimation device, training method, estimation method, program, and computer-readable non-transitory storage medium
The use of a sparse matrix mask in recurrent neural networks for physics simulators addresses inefficiencies in existing technologies by enabling high-speed, accurate simulation of physical phenomena with deterministic modeling.
Patent Information
- Application Number
- JP2021537354
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-08-05
- Filing Date
- 2020-08-05
- Publication Date
- 2024-09-19
- Estimated Expiration
- 2040-08-05
AI Technical Summary
Physics simulators require significant computational resources and time for training plant operators, and neural networks struggle with probabilistic behavior and external control simulation, leading to inefficiencies and accuracy issues.
A training device and estimation method using a recurrent neural network with a sparse matrix mask to determine connections between variables, allowing for deterministic autoregressive modeling and simulation of physical phenomena.
Enables high-speed and accurate simulation of physical events by reducing unnecessary connections and improving generalization performance, even with limited data, facilitating faster and more efficient operator training.
Smart Images

Figure 0007554194000013 
Figure 0007554194000018 
Figure 0007554194000015
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a training device, an estimation device, a training method, an estimation method, and a program. [Background technology]
[0002] Physical simulators are widely used to reproduce various accidents and other events in computers. These physical simulators reproduce physical phenomena by performing iterative calculations assuming the actual physical laws behind the phenomena, but they require a large amount of calculations. For example, when used to train plant operators, the calculation time is long, which increases the training time for the operators. In addition, it is generally difficult to calculate the derivatives of these events, making it difficult to simulate them when they are controlled from the outside.
[0003] On the other hand, when applying machine learning neural networks to such phenomena, when there is little probabilistic behavior and little data, probabilistic modeling results in low generalization performance.In addition, the reflection of external influences such as control generally does not occur instantly, making it difficult to estimate and model behavior using neural networks. [Prior art documents] [Non-patent literature]
[0004] [Non-Patent Document 1] F. Gers, "Long Short-Term Memory in Recurrent Neural Networks," 2001, [Internet], accessed July 1, 2019, http: / / www.felixgers.de / papers / phd.pdf Summary of the Invention [Problem to be solved by the invention]
[0005] The present disclosure provides a training device, an estimation device, a training method, an estimation method, a program, and a computer-readable non-transitory storage medium that realizes a highly accurate simulator through machine learning. [Means for solving the problem]
[0006] According to one embodiment, the estimation device includes one or more memories and one or more processors configured to input a time series of input variables and a latent variable that is an output of the first network to a first network to extract a latent variable in a current step, and to input the latent variable to a second network to estimate a time series state with respect to the input variable. [Brief description of the drawings]
[0007] [Figure 1] Diagram of GRU configuration. [Diagram 2] FIG. 2 is a diagram showing the functional configuration of an estimation device according to an embodiment. [Diagram 3] FIG. 2 is a block diagram showing the functions of an estimation device according to an embodiment. [Figure 4] FIG. 2 is a block diagram showing the functions of a training device according to an embodiment. [Diagram 5] 11 is a flowchart showing the processing of a training device according to an embodiment. [Figure 6] FIG. 2 is a block diagram showing the functions of a training device according to an embodiment. [Figure 7] 11 is a flowchart showing the processing of a training device according to an embodiment. [Figure 8] 11 is a flowchart showing the processing of a training device according to an embodiment. [Figure 9] FIG. 1 illustrates an example of a contracted graph according to an embodiment. [Figure 10] FIG. 1 illustrates an example of a hardware implementation according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0008] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. The drawings and the description of the embodiment are given by way of example only and are not intended to limit the present invention.
[0009] For example, in all the embodiments, a plant-related device will be described as an example, but the present invention is not limited to this, and the same method can be applied to any object in which events occur deterministically to a certain extent. The present embodiment can be applied to, for example, electric circuits, water systems, automobiles, production equipment, robots, sensor networks, smart grids, ships, airplanes, industrial machinery, and various other fields other than plants.
[0010] (First embodiment) The training object in this embodiment is a recurrent neural network (RNN), which is an autoregressive model. The training object is, as an example, a GRU (Gated Recurrent Unit) model, but is not limited thereto, and may be other configurations such as a LSTM (Long Short Term Memory).
[0011] FIG. 1 is a diagram of an autoregressive part (GRU) of an autoregressive model in a non-limiting embodiment. As shown on the right side of the figure, the boxed operations indicate neural network layers, the circled operations indicate point-wise operations, the arrows indicate vector transfers, and the h t The round and acute angles connected to x indicate vector combinations, t or h t-1 The acute and rounded corners going out from indicate a copy of the vector.
[0012] The GRU calculates the output data of its own just before (hereafter referred to as latent variables) h t-1 and the current input variable x t and the current unit's latent variable h tThe data output from the previous stage is input to the network to generate a new output, which then becomes the input for the next stage. In this way, data is input to the GRU in an autoregressive manner, and a new output is generated.
[0013] The values of each vector in the GRU can be calculated as follows:
number
number
number
number
[0014] Here, the symbol odot (dot in a circle) represents the product of vector components, and σ represents the sigmoid function. r , W z , W is a matrix that transforms data in the input variable space (input variable x) into data in the latent variable space (latent variable h of the first network), and U r , U z ,U is a matrix that transforms data in the latent variable space into data in the latent variable space.
[0015] The training targets: r , U r , W z , U z , W, and U are matrixes of parameters. The outline of the training is the same as that of general machine learning, especially deep learning, so the details will be omitted. For example, the training is performed by supervised backpropagation, but is not limited to this, and any method that can be appropriately trained may be used. In this embodiment, a network is configured based on this GRU, and a physical simulator using deterministic autoregression and random sparse matrix mask is implemented.
[0016] In this embodiment, in order to make the GRU function deterministically, the parameter matrix W r , U r , W z , U z , W, and U, and treats each parameter matrix as a sparse matrix. Hereinafter, this mask will be referred to as a sparse matrix mask. A sparse matrix mask has the same number of elements as the corresponding parameter matrix, and each element has a value of 0 or 1.
[0017] Note that applying a mask refers to the process of multiplying the parameter matrix by the corresponding sparse matrix mask for each element.
[0018] The sparse matrix mask may be designed based on the structure of a system of interest, for example, a plant. The plant structure is fixed for each plant, and the connection relationships between the elements are known. Therefore, a sparse matrix mask may be generated using these connection relationships and applied to each parameter matrix. For example, the sparse matrix mask may be generated by setting the points where directly connected elements connect components of related vectors to 1 and setting other points to 0.
[0019] On the other hand, the components of the vector and parameter matrix may become enormous in number due to various conditions in the plant. In such cases, it becomes difficult to refine the mask based on the plant structure as described above. In such cases, in order to deterministically reproduce the physical phenomenon, a sparse matrix mask may be generated randomly. For example, a sparse matrix mask may be generated using a binomial distribution. As a pseudocode using the numpy library of Python, m_wr = numpy.random.binomial(1, ratio, size=wr.shape) etc.
[0020] The random number distribution is not limited to the binomial distribution, and may be other random number distributions. For example, a sparse matrix mask may be generated by generating random numbers of a normal distribution with a determined mean and variance, and binarizing them using a certain threshold value. Similarly, the sparse matrix mask may be based on a Poisson distribution, a beta distribution, or the like. Furthermore, the sparse matrix mask may be generated based on other random number generators that are not bound by physical phenomena and that are based on a Mersenne Twister or the like, which has a higher degree of randomness.
[0021] By applying the sparse matrix mask to the parameter matrix in this manner, it is possible to restrict which element of the preceding latent variable the latent variable obtained as a result of the autoregression is based on, thereby improving the generalization performance of the autoregression. For example, the structure of the plant can be applied to the model. Also, instead of applying the sparse matrix mask, the parameter matrix itself may be defined as a sparse matrix. In other words, it is sufficient that the parameter matrix can be a sparse matrix.
[0022] Fig. 2 is a diagram showing the functional configuration of an estimation device (physical simulator) according to this embodiment. As shown in Fig. 2, the estimation device includes a first network, a second network, and a third network.
[0023] The input variables of the prediction device are, for example, time series data (time series input variables) x , which include at least one of the following: the behavior of the plant operator and noise representing uncertain factors such as weather. t For example, a data sequence of actions and noise corresponding to times 1, 2, , t, t+1, , T is input. When used as a physical simulator, at any time, for example, an action operated by a plant operator in response to an occurring event may be input as an interrupt. Note that although the explanation is given as time t, this is not limited to time and may be a step for a system that exhibits deterministic behavior.
[0024] When the time series data is a sequence of actions, it may be, for example, a time series of how much a valve of a plant is opened, or when the plant is controlled by a proportional-integral-differential controller (PID controller), it may be the set value. In addition, it may be time series data related to other actions such as data controlled by a user, voltage values at each location, etc.
[0025] In the case of a noise sequence, this may be environmental information such as temperature, air pressure, etc. Also, for example, it may be data related to lifelines, such as data on where and to what extent resources are being used, or it may be a noise sequence related to the behavior of each device in a plant. It is not limited to these, and may be a noise sequence related to a plant.
[0026] The first network is a GRU (or other autoregressive neural network) that applies a sparse matrix mask to the parameter matrix described above. For example, let us focus on the state at time t. The first network is the output h t-1 and the input variable x at time t t The input is h. The output at time t is t is output to the second network and to the first network at the next time.
[0027] The second network is, for example, a neural network with a fully connected layer, and the output of the first network is the latent variable h t When input, the state s at time t t That is, the second network is a network that acquires a quantity indicating the actual plant state from the feature quantity of the deterministic plant state output from the first network. The second network is not limited to having a fully connected layer, but may be any network that can appropriately convert the feature quantity into a state.
[0028] Here, in a general GRU, the final output s is input as regressed data, but in this embodiment, the final state is not input to the first network, and the input of the first network is simply input regressively. That is, the amount output by the first network is input to the first network, while the amount output by the second network is not input. By such processing, the estimated final state amount (for example, the state amount represented by a dense vector) is not input to the first network, and the deterministically estimated feature amount is regressed, so that it is possible to extract deterministic feature amounts over a time series.
[0029] The third network is a network that includes a fully connected layer like the second network, and converts the initial state s0 into a latent variable h0 that becomes the first input of the first network. This third network appropriately extracts features from a vector input as the initial state by, for example, a fully connected layer that includes a parameter matrix and a bias vector, and converts the vector into a latent variable h0 that becomes the input of the first network at time 1. Like the second network, the network is not limited to a fully connected layer, and may be any network that can appropriately extract a quantity that becomes the input of the first network.
[0030] The initial state is, for example, basically the same as the state quantity to be estimated, but is not limited thereto, and may include other observation values such as a temperature system grounded at each point of the plant, a flow meter of a material, etc.
[0031] 3 is a block diagram showing the functions of an estimation device including the above-mentioned networks in this embodiment. The estimation device 1 includes an input unit 100, a storage unit 102, a third network 104, a first network 106, a second network 108, and an output unit 110.
[0032] The estimation device 1 receives various input variables via the input unit 100. The input variables are, for example, data related to an initial state and time-series data of behavior and noise, as described above. The input variables may be stored in the storage unit 102 as necessary, and read out from each element when required. As another example, the input unit 100 may receive the input variables via a network or the like each time, so as to arrive in time for the required timing.
[0033] The storage unit 102 stores data, programs, and the like required for the estimation device 1. For example, in the case where the estimation device 1 executes a program to specifically realize information processing by software using hardware resources, the necessary programs and executable files may be stored in the storage unit 102. In addition, as described above, data accepted by the input unit 100 may be stored in the storage unit 102.
[0034] The third network 104 converts the initial state vector to match the input of the first network 106. The third network 104 may be configured, for example, by a neural network equipped with a fully connected layer, as described above.
[0035] The first network 106 outputs a feature quantity processed deterministically when it receives the output from the third network 104 or the output from the first network 106 itself, and the time-series input variables input from the input unit 100. The first network 106 is configured with an autoregressive neural network that receives its own output value as input.
[0036] The second network 108 converts the deterministically processed feature quantities output from the first network 106 into state quantities. As described above, the second network 108 may be configured, for example, by a neural network equipped with a fully connected layer. The second network 108 outputs a time-series state quantity via the first network 106 in response to a time-series input variable input from the input unit 100.
[0037] The output unit 110 outputs the time-series state quantities output by the second network 108. Here, the term "output" is intended to include not only output to the outside of the estimation device 1 via an interface, but also, for example, storing the time-series data in the storage unit 102.
[0038] The state quantities output by the estimation device 1, i.e., the quantities converted by the second network 108, are quantities required as a physical simulator. For example, in the case of a plant, the data include how much the voltage of a device increases, how much heat is generated in a given area, how much power is generated overall, or the yield rate at which products are manufactured. Of course, the estimation device 1 may operate as a simulator of other physical systems in which events occur deterministically.
[0039] When operating as a physical simulator, the input unit 100 may accept input as appropriate. For example, a simulated state may be output to a display or the like via the output unit 110, and an operator may simulate control by referring to the display or the like. In this case, the operator may be allowed to input a control value from the input unit 100 at any timing.
[0040] The control value input by the operator is converted into time-series data indicating an action, and is input to the estimation device 1 via the input unit 100. Furthermore, without being limited to this, when the input unit 100 accepts control from the operator, it may convert it into time-series data indicating an action and use it as an input to the first network 106. In this way, when operating as a physical simulator accepting control from outside, the estimation device 1 may accept control signals and the like from outside as time-series input variables.
[0041] Furthermore, a simulation of the system may be performed by inputting random noise as noise data. In this case, external control input is not essential, and it is possible to simulate what phenomena may occur. However, both the time series data of the action, which is the control operation, and the time series data of the noise may be input, and in this case, it is also possible to perform simulations of the physical system under various conditions.
[0042] As described above, the estimation device 1 according to this embodiment can implement a physical simulator that uses an autoregressive model. This physical simulator can simulate a physical phenomenon by simply inputting an initial state and time-series input variables and converting this data using a neural network, so that high-speed estimation of the physical phenomenon can be performed. In addition to the time cost, it is also possible to reduce the cost of memory resources for acquiring necessary feature quantities.
[0043] 4 is a block diagram showing functions of the training device 2 according to this embodiment. The training device 2 is a device that trains the estimation device 1 by machine learning, and includes an input unit 200, a storage unit 202, a mask generation unit 204, a third network 206, a first network 208, a second network 210, an error calculation unit 212, a parameter update unit 214, and an output unit 216.
[0044] The input unit 200 accepts input of data. The input data is data to be trained, and is, for example, initial state data, time-series behavior and noise data, and time-series state quantity data that is teacher data. If necessary, the input data may be stored in the storage unit 202.
[0045] The storage unit 202 stores data necessary for the training device 2. For example, data input from the input unit 200 may be stored. If the training device 2 is executed by software, programs, executable files, etc. necessary for execution, and data such as initial parameters of each network may be stored. The storage unit 202 may also store various parameters during network training.
[0046] The mask generation unit 204 generates a sparse matrix mask to be applied to the parameter matrix in the first network. As described above, the sparse matrix mask may be generated based on the target system or may be generated randomly. The mask generation unit 204 outputs the generated mask to the first network 208, which applies the mask to each parameter matrix.
[0047] The third network 206, the first network 208, and the second network 210 are the same as those described above, so details will be omitted. The initial state input from the input unit 200 is converted by the third network 206 and output to the first network 208. The first network 208 extracts deterministic features using a parameter matrix to which a sparse matrix mask is applied, based on the time-series behavior and noise data input from the input unit 200 and its own output value. The second network 210 converts the output of the first network 208 into a state quantity.
[0048] The error calculation unit 212 calculates, for example, an error between the state quantity output by the second network 210 and teacher data, and outputs the error to the parameter update unit 214. When teacher data does not exist, an error between the state quantity output by the second network 210 and appropriate reference data may be calculated.
[0049] The parameter update unit 214 updates the parameters by, for example, backpropagating the error and calculating the gradient of each parameter in each network based on the error calculated by the error calculation unit 212. The parameter update unit 214 continues updating the networks until a predetermined condition is satisfied. After the predetermined condition is satisfied, the parameter update unit 214 outputs the updated parameters, the sparse matrix mask used in training, and other information necessary for configuring the network via the output unit 216.
[0050] The output unit 216 outputs the parameters updated by the parameter update unit 214 to the inside or outside of the training device 2.
[0051] 5 is a flowchart showing the flow of processing performed by the training device 2 according to this embodiment. The processing performed by the training device 2 will be described with reference to FIG.
[0052] First, training data is received via the input unit 200 (S100).
[0053] Next, the mask generation unit 204 generates a sparse matrix mask (S102).
[0054] Next, the initial state data input from the input unit 200 is input to the third network 206, and a feature amount for the initial state data is extracted (S104).
[0055] Next, the data output from the third network 206 and the data at time 1 in the time series data of behavior and noise are input to the first network 208, and a deterministically determined feature amount is extracted (S106).
[0056] Next, the deterministically determined feature quantity output by the first network 208 is input to the second network 210, and converted into state quantity data (S108).
[0057] Next, it is determined whether or not the processing of all the time series data has been completed (S110). If the processing of the time series data has not been completed (S110: NO), the process returns to S106 to perform the processing of the next time. For example, when processing time t following time t-1, the output value of the first network 208 at time t-1 and the input variables of the behavior and noise at time t are input to the first network 208, and the output value of the first network 208 at time t is obtained. In this way, although the output of the third network 206 is used in the first S106, from the next time onwards, the output of the first network 208 is input without inputting the output of the third network 206.
[0058] On the other hand, if the processing of all the time-series data has been completed (S110: YES), the error calculation unit 212 calculates the error between the output of the second network 210 at each time and the teacher data or appropriate reference data (S112).
[0059] Next, the parameter update unit 214 updates the parameters based on the errors calculated by the error calculation unit 212 (S114). For example, the parameters of each network are updated by appropriately backpropagating the errors calculated by the error calculation unit 212.
[0060] Next, the parameter update unit 214 determines whether the training is completed (S118). The completion of the training may be determined in the same manner as in a commonly used machine learning method, for example, when the processing of a predetermined number of epochs is completed, when the error is reduced below a predetermined value by mutual validation, or when the error calculated by the error calculation unit 212 is reduced below a predetermined value.
[0061] If the training is not completed (S116: NO), the process returns to S106 and the process is repeated from the initial state using the updated parameters.
[0062] If the training is completed (S116: YES), the updated parameters and other data required for configuring each network are output to the outside or inside of the training device 2 via the output unit 216 (S118), and the process ends. Note that the output unit 216 may also output information on the sparse matrix mask.
[0063] By using the output parameters of the first network 208, the second network 210, and the third network 206, the first network 106, the second network 108, and the third network 104 of the estimation device 1 in Figure 3 can be generated, respectively.
[0064] As described above, according to this embodiment, by using a sparse matrix mask and deterministically determining features for processing, it is possible to train a network that can perform highly accurate estimation even when there is a small amount of training data.
[0065] This is believed to be due to the fact that in a physical system where the results are determined deterministically, compared to connecting all of the various variables etc. that need to be considered in a physical simulator using a fully connected layer etc., by restricting the connections between variables using a mask, unnecessary connections are eliminated.
[0066] Furthermore, as described above with respect to the estimation device 1, by applying the network generated by this training device 2 to the estimation device 1, it becomes possible to simulate physical phenomena at high speed.
[0067] Second embodiment In the above description, the speed and accuracy of training the GRU, i.e., the first network 208, is improved by generating a deterministic autoregressive model by applying the mask generated by the mask generating unit 204. In the present embodiment, the accuracy is improved by training the first network 208 to model a differential equation.
[0068] For example, most of the plant behavior can be expressed by differential equations, so modeling using differential equations allows modeling that is more in line with physical phenomena.
[0069] When x represents the plant state, etc., it can generally be expressed by the following differential equation.
number
[0070] Here, f(x) is not trivial, but it is modeled by using training data. If the initial state of x, x(0), is represented as x0, the state to be obtained can be expressed as follows.
number
[0071] In this way, if we can model f(x), we can estimate the state x(t) at any time t by calculating the integral with respect to t.
[0072] By performing integral calculations using numerical calculations, it becomes possible to estimate x(t) even if f(x) is an arbitrary function. Here, by applying f(x) to a differentiable model such as a neural network, x(t) becomes differentiable, and f(x) can be estimated from input variables using optimization techniques such as gradient descent.
[0073] To configure a network in this way, a network that models the following differential equation is configured as the first network in FIG.
number
[0074] That is, the time series data of the input variables and the output of the first network itself are input, and the feature amount at the current time is output. The output feature amount is converted to a state in the second network and output. The parameters of the first network are optimized by calculating the error between the output value of this second network and the teacher data.
[0075] Ideally, the input data is continuous data. In this embodiment, since a numerical calculation is performed for each unit time, training is performed based on input variables and states that are discretized for each unit time, for example. This discretization may be performed before the input of data, or may be performed in a training device or an estimation device after the input of data. For example, the amount between time t and time t+1 is converted to a value at time t and input. This is not limited to this, and the average value from time t to time t+1 may be calculated and used as the value at time t, or any method may be used for discretization as long as an appropriately discretized value can be used.
[0076] The first network is configured as an autoregressive neural network that outputs the integral value of the formula shown in equation (7) as a result of training, that is, that outputs the feature quantity h(t).
[0077] The configuration of the estimation device 1 is basically the same as that of the estimation device 1 shown in Fig. 3. The first network 106 of the estimation device 1 is formed by training a neural network that models a differential equation as described above. The second network 108 and the third network 104 are trained and formed as a network that converts an output from an autoregressive model into a state and a network that extracts features from an initial state, respectively, in the same manner as in the above-mentioned embodiment.
[0078] Fig. 6 is a block diagram showing the functions of the training device 2 according to this embodiment. It is basically equivalent to the training device 2 according to the first embodiment shown in Fig. 4, but includes a discretization unit 218 instead of the mask generation unit. The discretization unit 218 discretizes data as necessary and inputs it to the network. Elements other than the configuration of the first network 208 have the same functions as the elements of the first embodiment with the same reference numerals.
[0079] Fig. 7 is a flowchart showing the flow of processing of the training device 2 according to this embodiment. The parts with the same reference numerals as in Fig. 5 represent the same processing. The difference is the processing of discretizing the training data (S120) after the data is received (S100). As described above, discretizing the data makes it possible to model differential equations by numerical calculation.
[0080] As described above, according to this embodiment, by using an autoregressive neural network that models a differential equation, it becomes possible to simulate a physical phenomenon at each time. For example, the behavior of a plant can be expressed by a differential equation. By training this differential equation as a network, it is possible to perform a simulation faster than solving the differential equation by numerical calculation at each time to obtain a state, since it is only necessary to perform numerical processing via the network.
[0081] According to all the above-mentioned embodiments, it is possible to deal with cases where the number of data is small, making it difficult to generate a model and to perform a simulation. In the first embodiment, the coupling between variables can be loosely coupled deterministically, and it is possible to suppress the coupling between variables that are not very meaningful. In the second embodiment, the differential equation itself is the subject of machine learning, so that values can be extrapolated from discrete data in an amount that is insufficient for regression analysis or the like that does not rely on machine learning.
[0082] These embodiments can also be used for reinforcement learning and exploration.
[0083] For example, by performing the training of each of the above-described embodiments based on a data set output by a simulator or the like that has a certain degree of accuracy, it is possible to implement an estimation device that performs reinforcement learning and quickly reproduces the operation of the simulator.
[0084] This can also be applied to model-based reinforcement learning using a prediction model that has already been obtained. For example, reinforcement learning that can better control data predicted by a prediction model can be performed using the method described in each of the above embodiments. As another example, when a certain noise exists in a prediction model, a better control value can be searched for using a time series search method such as beam search or Monte Carlo tree search.
[0085] For example, by monitoring past and present data as input variables and inputting them into the above-mentioned estimation device, it is possible to predict the future behavior of the actual machine.
[0086] In the above-described embodiments, the estimation device 1 and the training device 2 are described as separate devices, but this is not limited thereto. For example, the device used for training as the training device 2 may itself be used to function as the estimation device 1.
[0087] (Modification) Although the above describes the application of a sparse matrix mask to a parameter matrix during training, for example, when making deterministic inference, the sparse matrix mask can also be used for other purposes.
[0088] The sparse matrix mask can be used, for example, in any time series forecasting task. For example, in demand forecasting, there are elements where the weather has a causal relationship with demand and elements where the weather does not have a causal relationship with demand, and the sparse matrix mask can be used in this respect. More specifically, a mask that is effective for elements that have a causal relationship with weather may be applied, and modeling may be performed on the elements that have this mask applied.
[0089] As another example, the sparse matrix mask may be used for a matrix representing a graph (e.g., a matrix representing an edge). As one example, this sparse matrix mask may be used for modeling in cases where connections are limited, such as in electric circuits, or when showing the connection relationships between rooms and between rooms and corridors in a building. Of course, this sparse matrix mask can also be used for modeling that can be expressed using a graph, such as a language.
[0090] As yet another example, the sparse matrix mask may be applied to a model that executes sequential calculations. In the case of sequential calculations, the processing between variables may be deterministically defined. In such a case, the sparse matrix mask may be applied to a parameter matrix. The parameter matrix may be a parameter including an operator, and the sparse matrix mask may represent the connection between variables, and the operation between variables may be defined by the sparse matrix mask and the parameter matrix. In this way, the sparse matrix mask may be applied not only to time series but also to discrete continuous quantities that are defined spatially or conceptually.
[0091] The sparse matrix mask can be applied in various cases where the relationship between variables is defined by a parameter matrix, without being limited to the above.
[0092] As described above, according to this modification, by using sparse parameters in modeling, it is possible to reduce the number of parameters for the dimensions of the latent variables, and it is possible to improve generalization performance. Similarly, it is also possible to reduce the possibility of overlearning.
[0093] Third embodiment Next, a more generalized method will be described for the sparse matrix mask described in the first embodiment. In this embodiment, a method for generating a sparse matrix mask for each parameter matrix of formulas (1) to (4) will be described.
[0094] 8 is a flowchart showing a process for generating a sparse matrix mask according to the present embodiment. As an example, an example of performing optimization in a plant will be described.
[0095] First, the mask generation unit 204 calculates a graph G in which the components of the plant are vertices and the dependencies between them are edges (S1020). The mask generation unit 204 defines the components as vertices, and generates a graph G in which, for example, if component A affects component B, an edge A → B exists.
[0096] If a plant simulator is available, this graph G can be constructed based on a simulation model of the plant. Most simulation models are described by connecting components based on their connection relationships. These connection relationships and parameter dependencies can be acquired from the simulation model, and the mask generation unit 204 can generate the graph G by using this information.
[0097] Even if there is no plant simulator, the design of the plant is generally described using drawings called P&ID (Piping and instrumentation diagram), wiring instrumentation diagram, piping instrumentation diagram, etc. The mask generation unit 204 can generate the graph G based on these drawings.
[0098] In the above example, it is possible to obtain that there is a connection relationship between components A and B, but if the direction of the dependency is unknown, it may be treated as a graph with bidirectional edges from A → B and B → A. As another example, all connected vertices may be connected by bidirectional edges, regardless of the direction of the dependency.
[0099] Next, the mask generation unit 204 generates a contracted graph (S1022). This process may be a two-stage process in which a subgraph G' is calculated and a graph G'' is generated by contracting this G'.
[0100] (First example of generating contracted graphs) First, the mask generating unit 204 calculates the shortest path between vertices corresponding to each observation variable, which does not pass through other observation variables. The condition of not passing through other observation variables is not an essential condition.
[0101] Next, the mask generation unit 204 calculates a subgraph G' consisting of only the vertices on those paths.
[0102] Then, the mask generating unit 204 contracts the graph so that a group of vertices connected without branching in the subgraph G' become the same vertex, thereby acquiring a contracted graph G''.
[0103] Through this process, the mask generation unit 204 can generate a contracted graph that can properly express the causal relationship. That is, the influence of a vertex on a path can be properly expressed, and the influence between vertices that do not have a dependency on each other can be suppressed.
[0104] (Second example of contracted graph generation) First, the dimension of the latent variable is determined. This dimension determination is performed, for example, by hyperparameter tuning, metalearning, etc. As a more specific example, training is performed while varying the hyperparameters in various ways based on the training data, and the dimension of the latent variable is determined from the hyperparameters that have provided good results.
[0105] Next, the mask generation unit 204 performs vertex clustering to obtain a number of vertex clusters corresponding to the dimension of the desired latent variable. For this clustering, a spectral clustering method may be used as an example. However, the method is not limited to this, and any method that can perform vertex clustering in accordance with the latent variable appropriately, such as K-means or Ward's method, may be used.
[0106] Then, the mask generating unit 204 acquires a contracted graph G'' by treating the vertices that belong to a cluster as the same vertex.
[0107] The first example has the advantage that no prior learning is required, while the second example has the advantage that the dimensions of the latent variables can be set.
[0108] After the contracted graph G'' is generated, the mask generation unit 204 generates the masks U, U r , U z A sparse matrix mask (second sparse matrix mask) for the (second parameter matrix) is generated (S1024).
[0109] FIG. 9 is a diagram showing an example of a contracted graph G''. A circle indicates a vertex, a number inside indicates the vertex number, and a straight line between vertices indicates an edge. The edges are shown as undirected, but as described above, they may be directed. If valid, the graph may be unidirectional according to dependency relationships, or bidirectional regardless of dependency relationships.
[0110] In the process of generating a sparse matrix mask for U etc., the mask generation unit 204 generates a mask based on this contracted graph G''. In the contracted graph G'', if the distance from the jth vertex to the ith vertex is n or less, the component in the i-th row and j-th column is set to 1, and otherwise a sparse matrix is acquired that is 0.
[0111] The following formula shows an example of a sparse matrix mask when n=1 in FIG.
number
[0112] Also, when n = 1, the distance to itself is considered to be 0, and a sparse matrix mask with diagonal elements of 1 may be used, as shown below.
number
[0113] However, if there are many components of 1 in the sparse matrix mask, there is a high possibility of overfitting. For this reason, it is desirable to set n so that the components of 1 in the sparse matrix mask are appropriate. For example, n may be 1, 2, etc. Also, if there are many components in the parameter matrix, a larger value may be used. This may be determined by considering how far away the vertices are influenced based on the dependency in the target system. Also, n may be set to a somewhat large value so as to have redundancy in the influence of the data on each other.
[0114] Returning to FIG. 8, next, the mask generation unit 204 calculates W, W r , W z A sparse matrix mask (first sparse matrix mask) for (first parameter matrix) is generated (S1026). This W etc. is a matrix that converts input variables into latent variables. This sparse matrix mask for W etc. is a mask that indicates to which vertices on G'' the vertices of graph G that belong to each vertex of contracted graph G'' have a dependency relationship.
[0115] For example, in the example of FIG. 9, each vertex of graph G that belongs to vertex 1 in contracted graph G'' depends on vertices 2 and 5 of contracted graph G'', respectively. For example, assume that vertices 1, 2, and 3 in graph G belong to vertex 1 of contracted graph G''. In this case, it can be considered that vertices 1, 2, and 3 of graph G may affect vertices 2 and 5 of contracted graph G''. The mask generation unit 204 generates a sparse matrix mask so as to pass values from the input variables to latent variables that may have such an effect.
[0116] For example, if vertices 1, 2, and 3 of graph G affect vertices 2 and 5 of contracted graph G″ as described above, the mask generation unit 204 generates the following sparse matrix mask. Note that each vertex of graph G belongs to one of the vertices of contracted graph G″.
number
[0117] For example, in equation (10), if we look at the first column corresponding to vertex 1 of graph G, since there is a dependency on vertices 2 and 5 of contracted graph G'', the components in the second and fifth rows are 1 and the other components are 0. Similarly, the components of the second and third columns are also determined. For example, the last column belongs to vertex 6 of contracted graph G''. In this case, as shown in equation (10), the components of the last column are [0 0 1 1 0 0]. T It becomes.
[0118] Similarly, the vertices of the graph G may have dependencies on the vertices of the contracted graph G'' to which they belong. In this case, the sparse matrix mask for W etc. can be expressed as in Equation (11).
number
[0119] The mask generator 204 thus generates a sparse matrix mask for W etc.
[0120] As described above, the mask generating unit 204 generates a sparse matrix mask. By generating a sparse matrix mask in this way, it is possible to appropriately generate sparse matrix masks for parameters U and the like that perform conversion between latent variables, and parameters W and the like that perform conversion from input variables to latent variables, based on the vertex dependency. By generating a sparse matrix mask in this way, it is possible to reduce the number of parameters to be optimized while appropriately applying the influence between variables that are converted from parameters. As in each of the above-mentioned embodiments, it is possible to execute it as a random number, but by generating a mask based on the dependency as in this embodiment, it is possible to realize faster and more accurate training.
[0121] Furthermore, when generating the contracted graph G'', a subgraph G' may be generated as in the first example. By generating a subgraph in this manner, it is possible to reduce the influence via parameters from components that are considered to have no effect on the prediction target, compared to the case where the configuration of a plant or the like is used as is.
[0122] In addition, by contracting the graph, the dimension of the latent variable can be adjusted. In particular, by using clustering, this dimension adjustment can be performed. In addition, it is also possible to generate a model that takes into account the influence between elements that are directly connected as well as indirectly connected. Furthermore, even when the influence between elements can be transmitted within one unit time, according to this embodiment, the model can be appropriately optimized. Even when there is no influence between elements within one unit time, it is possible to give a range to the correspondence between the components of the latent variable and the components, and as a result, the accuracy can be improved by converting the latent variables to have a range in training.
[0123] Although the above describes an example of GRU, as described in the above embodiment, similar processing can be performed using LSTM, RNN, etc. In this case, the mask generation unit 204 appropriately generates a sparse matrix mask for each parameter.
[0124] Instead of using a graph to find the connectivity as described above, other methods such as Granger causality and Graphical Lasso can be used.
[0125] In all aspects of the first to third embodiments, the third network in FIG. 2 may be deleted, and a latent variable h0 serving as the first input may be obtained using a past state instead of the initial state. For example, a latent variable h0 serving as the first input to an autoregressive network as shown in FIG. 2 may be obtained using a past state sequence s[-n], s[-n + 1], . . . , s[-1], s[0]. This network may also be a model using a sparse matrix mask. For example, a method of generating a sparse matrix mask as described in the third embodiment is effective.
[0126] As described above, according to the aspects of the present disclosure, in addition to having the features of each of the above-mentioned embodiments, the cost of creating a model is lower than that of a model (white box model) in which the dynamics of each element constituting a plant and the dynamics of the entire plant are described as a physical model or the like and a simulation is performed. In addition, compared to a model (black box model) in which a model that makes predictions by machine learning only from data without providing these at all is trained, training is possible from a small amount of data, and data efficiency can be improved. In addition, by reflecting the physical configuration, it is possible to train a model that is less prone to overlearning and is resistant to extrapolation.
[0127] In this way, by executing more accurate predictions, it is possible to perform safer or more economical control, operation, etc. Furthermore, since the accuracy can be improved without requiring detailed modeling, the man-hours for modeling can be reduced and it is also possible to easily deploy the system to various facilities. Furthermore, since it is possible to realize training using reduced data, it is possible to easily deploy the system even in cases where there is little accumulated history data, where no simulator exists, or where a simulator exists but is slow, etc.
[0128] Each function of the estimation device 1 and the training device 2 in the above-mentioned embodiments may be realized by an analog circuit, a digital circuit, or a mixed circuit of an analog circuit and a digital circuit. Furthermore, the estimation device 1 and the training device 2 may include a control circuit that controls each function. Each of these circuits may be implemented by an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or the like.
[0129] In all of the above descriptions, the estimation device 1 and the training device 2 may be partially or entirely configured with hardware, or may be configured with information processing of software (programs) executed by a CPU or the like. In the case of being configured with information processing of software, the estimation device 1, the training device 2, and software that realizes at least some of their functions may be stored in a storage medium such as a flexible disk or a CD-ROM, and the software may be read into a computer to execute the information processing of the software. The software may also be downloaded via a communication network. In this way, the computer can be the device of the above embodiment. In this way, the information processing by the software may be specifically realized using hardware resources. Furthermore, the software may be implemented in a circuit such as an ASIC or an FPGA, so that the information processing that was supposed to be executed by the software may be executed by hardware. Generation of a model and processing using the generated model may be performed using an accelerator such as a GPU, for example.
[0130] The type of storage medium that stores the software is not particularly limited. The storage medium is not limited to a removable medium such as a magnetic disk or optical disk, but may be a fixed storage medium such as a hard disk or memory. The storage medium may be provided inside the computer or outside the computer.
[0131] 10 is a block diagram showing an example of a hardware configuration in one embodiment. The estimation device 1 and the training device 2 can be realized as a computer 7 including a processor 71, a main storage device 72, an auxiliary storage device 73, a network interface 74, and a device interface 75, which are connected via a bus 76.
[0132] Although the computer 7 in Fig. 10 includes one of each component, it may include multiple of the same component. Also, although one computer 7 is shown in Fig. 10, the software may be installed in multiple computers, and each of the multiple computers may execute the same or different parts of the processing of the software. In this case, it may be a form of distributed computing in which each computer executes processing by communicating via a network interface 74 or the like.
[0133] Various calculations of the estimation device 1 and the training device 2 may be executed in parallel using one or more processors (for example, accelerators such as GPUs) or multiple computers via a network. Moreover, various calculations may be distributed to multiple computing cores in a processor and executed in parallel. Moreover, a part or all of the processes, means, etc. of the present disclosure may be executed or functioned by at least one of a processing circuit and a storage device provided on a cloud that can communicate with a computer 7 via a network. In this way, a form of parallel computing by one or more computers may be used.
[0134] The processor 71 may be an electronic circuit (processing circuit, processing circuitry) including a control device and an arithmetic device of a computer. The processor 71 may be a CPU or GPU with no limit on the number of cores, or may be a semiconductor device including a dedicated processing circuit. The processor 71 can perform arithmetic processing based on data and programs input from each device in the internal configuration of the computer 7, and output the arithmetic result and a control signal to each device. The processor 71 may control each component constituting the computer 7 by executing an OS (Operating System) of the computer 7, an application, etc. In other words, the estimation device 1 and the training device 2, and each hardware configuration thereof may be realized by one or more processors 71. Here, the processing circuit may refer to one or more electric circuits arranged on one chip, or may refer to one or more electric circuits arranged on two or more chips or devices. When multiple electronic circuits are used, each electronic circuit may communicate with each other by wire or wirelessly.
[0135] The main storage device 72 is a storage device that stores instructions executed by the processor 71 and various data, and information stored in the main storage device 72 is read by the processor 71. The auxiliary storage device 73 is a storage device other than the main storage device 72. These storage devices refer to any electronic components capable of storing electronic information, and may be memories or storages. In addition, the memory may be a volatile memory or a non-volatile memory, and either may be used. The memory for storing various data in the estimation device 1 and the training device 2 may be realized by the main storage device 72 or the auxiliary storage device 73. For example, the storage units 102 and 202 may be implemented in the main storage device 72 or the auxiliary storage device 73. As another example, when the computer 7 includes an accelerator, the storage units 102 and 202 may be implemented in a memory included in the accelerator.
[0136] Moreover, a plurality of processors may be physically or electrically connected to one memory (storage device), or a single processor may be physically or electrically connected. A plurality of memories (storage devices) may be physically or electrically connected to one processor. When the hardware in one embodiment is composed of at least one memory (storage device) and a plurality of processors connected to this memory (storage device), a configuration may be included in which at least one processor among the plurality of processors is physically or electrically connected to at least one memory (storage device). This configuration may also be realized by memories (storage devices) and processors included in a plurality of computers. Furthermore, a configuration in which the memory (storage device) is integrated with the processor (for example, a cache memory including an L1 cache and an L2 cache) may be included, in which case a memory controller that controls access to these memories (storage devices) may further be included.
[0137] The network interface 74 is an interface for connecting to the communication network 8 wirelessly or by wire. The network interface 74 may be one that complies with existing communication standards. The network interface 74 may exchange information with an external device 9A that is connected for communication via the communication network 8.
[0138] The external device 9A includes, for example, a camera, a motion capture device, an output destination device, an external sensor, an input source device, etc. The external device 9A may include an external memory (storage device), for example, a network storage, etc. The external device 9A may also be a device having some of the functions of the components of the estimation device 1 and the training device 2. The computer 7 may receive some or all of the processing results of the estimation device 1 and the training device 2 via a communication network 8 like a cloud service, or may transmit them to the outside of the computer 7.
[0139] The device interface 75 is an interface such as a Universal Serial Bus (USB) that directly connects to the external device 9B. The external device 9B may be an external storage medium or a storage device. The storage units 102 and 202 may be realized by the external device 9B.
[0140] The external device 9B may be an output device. The output device may be, for example, a display device for displaying an image, or a device for outputting sound or the like. Examples of the output device include, but are not limited to, an LCD (Liquid Crystal Display), a CRT (Cathode Ray Tube), a PDP (Plasma Display Panel), a speaker, and the like.
[0141] The external device 9B may be an input device. The input device includes devices such as a keyboard, a mouse, and a touch panel, and provides information input by these devices to the computer 7. A signal from the input device is output to the processor 71.
[0142] In this specification, the expression "at least one of a, b, and c" or "at least one of a, b, or c" (including similar expressions) includes any combination of a, b, c, ab, ac, bc, and abc. It also covers combinations with multiple instances of any element, such as aa, abb, and aabbcc. It also covers combinations that further include d, such as abcd, that is, combinations in which elements other than a, b, and / or c are added.
[0143] In this specification, unless otherwise specified, the expression "based on data" (including similar expressions) includes cases where various data themselves are used as input, and cases where various data that have been processed in some way (for example, data with noise added, data normalized, intermediate representations of various data, etc.) are used as input.
[0144] Although the embodiments of the present disclosure have been described above in detail, the present disclosure is not limited to the above-mentioned individual embodiments. Various additions, modifications, replacements, partial deletions, etc. are possible within the scope of the conceptual idea and intent of the present invention derived from the contents defined in the claims and their equivalents. For example, the numerical values used in the explanations in all the above-mentioned embodiments are shown as examples and are not limited to these. [Explanation of symbols]
[0145] 1: Estimation device, 100: input unit, 102: storage unit, 104: third network, 106: first network, 108: second network, 110: output section, 2: Training equipment, 200: input unit, 202: storage unit, 204: mask generation unit, 206: third network, 208: first network, 210: second network, 212: error calculation unit, 214: parameter update unit, 216: output unit, 218: discretization unit
Claims
1. one or more memories; one or more processors; The one or more processors: inputting input variables and features that are outputs of the first network into a first network to extract features; The extracted feature amount is input to a second network, and a state for the input variable is estimated. It is configured as follows: extracting the feature quantity using a parameter matrix of the first network to which a sparse matrix mask generated based on a structure of a system of interest has been applied; Estimation device.
2. The sparse matrix mask is a matrix whose elements are determined based on a connection relationship of the elements constituting the system. The estimation device according to claim 1 .
3. one or more memories; one or more processors; The one or more processors: inputting input variables indicating time-series data representing behavior and features output from the first network into a first network, and extracting the features; The extracted feature amount is input to a second network, and a state for the input variable is estimated. It is configured as follows: extracting the feature quantity using a parameter matrix of the first network to which a sparse matrix mask, which is generated by randomly determining elements, has been applied; Estimation device.
4. the sparse matrix mask has the same dimensions as the parameter matrix of the first network; The estimation device according to any one of claims 1 to 3.
5. one or more memories; one or more processors; The one or more processors: inputting input variables and features that are outputs of the first network into a first network to extract features; The extracted feature amount is input to a second network to estimate a state for the input variable; a sparse matrix mask is applied to the parameter matrix of the first network; the parameter matrix includes a first parameter matrix for converting the input variables into the feature quantities, and a second parameter matrix for converting the feature quantities into the feature quantities, the sparse matrix mask comprises a first sparse matrix mask applied to the first parameter matrix and a second sparse matrix mask applied to the second parameter matrix; The one or more processors: Computing a graph corresponding to each element of the input variables; Computing a reduced graph by reducing the graph; generating the first sparse matrix mask and the second sparse matrix mask using a dimension of the contracted graph as a dimension of the feature quantity; Estimation device.
6. The one or more processors: generating the first sparse matrix mask by setting an element that connects a vertex of the graph corresponding to each element of the input variable with a vertex of the contracted graph that exists within a predetermined distance from a vertex of the contracted graph to which the vertex of the graph corresponding to the element belongs to as 1, and setting other elements as 0; The estimation device according to claim 5 .
7. The one or more processors: generating the second sparse matrix mask by setting elements connecting vertices of the contracted graph that exist within a predetermined distance from each vertex of the contracted graph to 1 and setting other elements to 0; The estimation device according to claim 5 .
8. The sparse matrix mask is a matrix whose elements are determined based on a causal relationship with weather. The estimation device according to claim 1 or 2.
9. The one or more processors: inputting an initial state into a third network and extracting a feature quantity of the initial state; inputting the initial state feature quantity into the first network; The estimation device according to any one of claims 1 to 8.
10. one or more memories; one or more processors; The one or more processors: inputting input variables and an output of the first network into a first network to extract features; The extracted feature quantity is input to a second network to obtain a state quantity; training the first network and the second network based on the state quantity; extracting the feature quantity using a parameter matrix of the first network to which a sparse matrix mask generated based on a structure of a system of interest has been applied; training equipment.
11. The sparse matrix mask is a matrix whose elements are determined based on a connection relationship of the elements constituting the system.
11. A training device according to claim 10.
12. one or more memories; one or more processors; The one or more processors: inputting input variables indicating time-series data representing behavior and an output of the first network into a first network to extract features; The extracted feature quantity is input to a second network to obtain a state quantity; training the first network and the second network based on the state quantity; It is configured as follows: extracting the feature quantity using a parameter matrix of the first network to which a sparse matrix mask, which is generated by randomly determining elements, has been applied; training equipment.
13. The one or more processors: inputting an initial state into a third network and extracting a feature quantity of the initial state; inputting the initial state feature quantity into the first network; A training device according to any one of claims 10 to 12.
14. one or more processors, inputting input variables and an output of the first network into a first network to extract features; inputting the extracted feature amount into a second network to estimate a state for the input variable; extracting the feature quantity using a parameter matrix of the first network to which a sparse matrix mask generated based on a structure of a system of interest has been applied; Estimation method.
15. one or more processors, inputting input variables and an output of the first network into a first network to extract features; The extracted feature quantity is input to a second network to obtain a state quantity; training the first network and the second network based on the state quantity; Prepare for this. extracting the feature quantity using a parameter matrix of the first network to which a sparse matrix mask generated based on a structure of a system of interest has been applied; Training method.
16. 16. A method of generating the first and second networks using the training method of claim 15.
17. On one or more computers, A means for extracting features by inputting input variables and an output of the first network to a first network; inputting the feature amount into a second network, and making the second network function as a means for estimating a state with respect to the input variable; A program, extracting the feature quantity using a parameter matrix of the first network to which a sparse matrix mask generated based on a structure of a system of interest has been applied; program.
18. On one or more computers, A means for extracting features by inputting input variables and an output of the first network to a first network; A means for inputting the extracted feature quantity into a second network to obtain a state quantity; a means for training the first network and the second network based on the state quantity; A program, extracting the feature quantity using a parameter matrix of the first network to which a sparse matrix mask generated based on a structure of a system of interest has been applied; program.
19. one or more memories; one or more processors; The one or more processors: The first parameter matrix converts the input variables of the current step into feature dimensions, Transforming the feature quantity from the previous step by a second parameter matrix; outputting the feature quantity of the current step based on the transformation of the first parameter matrix and the transformation of the second parameter matrix; An estimation device, comprising: the first parameter matrix is a matrix to which a first sparse matrix mask is applied, the first sparse matrix mask representing a connection between each element of the input variables and each element of the feature quantities; the second parameter matrix is a matrix to which a second sparse matrix mask is applied, the second sparse matrix mask representing connections between the elements of the feature quantities; The first sparse matrix mask is a matrix whose elements are determined based on the system of interest. Estimation device.
20. one or more memories; one or more processors; The one or more processors: The first parameter matrix converts the input variables of the current step into feature dimensions, Transforming the feature quantity from the previous step by a second parameter matrix; outputting the feature amount of the current step based on the transformation of the first parameter matrix and the transformation of the second parameter matrix; training the first parameter matrix and the second parameter matrix based on the output; 1. A training device comprising: the first parameter matrix is a matrix to which a first sparse matrix mask is applied, the first sparse matrix mask representing a connection between each element of the input variables and each element of the feature quantities; the second parameter matrix is a matrix to which a second sparse matrix mask is applied, the second sparse matrix mask representing connections between the elements of the feature quantities; The first sparse matrix mask is a matrix whose elements are determined based on the structure of a system of interest. training equipment.
Citation Information
Patent Citations
Compression method of deep neural networks
US20190050734A1
System and method for compact and efficient sparse neural networks
US20190108436A1
