Method for estimating model uncertainty by means of neural network and architecture of neural network
By introducing hyperparameter T and adopting the "Softmax aggregation" method, the shortcomings of Bayesian context aggregation in parameter efficiency and prediction performance are solved, and more efficient potential observation weighted sum model training is achieved.
Patent Information
- Application Number
- CN202380050470.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-06-29
- Filing Date
- 2023-06-14
- Publication Date
- 2025-02-14
AI Technical Summary
Existing Bayesian context aggregation methods have shortcomings in predictive performance and parameter efficiency, especially when weighting potential observations, requiring additional encoder networks, resulting in an increase in the number of parameters.
The introduction of hyperparameter T (Softmax temperature) is used to achieve uneven weighting of potential observations. The "Softmax polymerization" method is used to replace traditional polymerization methods, such as mean polymerization, maximum polymerization or Bayesian polymerization, simplifying the Bayesian polymerization process. .
The prediction performance of Bayesian context aggregation is maintained or improved, while reducing the number of parameters to be learned and improving parameter efficiency.
Smart Images

Figure BDA0005214063580000022 
Figure BDA0005214063580000031 
Figure BDA0005214063580000054
Abstract
Description
Technical Field
[0001] The present disclosure relates to a method for estimating uncertainty with the aid of a neural network and to an architecture of a neural network. Background Art
[0002] In technical systems, in particular safety-critical technical systems, models can be used to predict uncertainties, for example with the aid of neural networks, in particular models for active learning, reinforcement learning or extrapolation.
[0003] Recently, neural procedures have been increasingly used for predictions with model uncertainty. Neural procedures are essentially a family of neural network-based architectures that create probabilistic predictions for regression problems. They automatically learn inductive biases that are tailored to classes of target functions with a common structure, such as quadratic functions or dynamic models of specific physical systems with variable parameters. Neural procedures are trained using the so-called multi-task training approach, where one function corresponds to one task. The resulting model provides accurate predictions for unknown target functions based on only a small number of contextual observations.
[0004] In order to input context observations into the architecture, a so-called aggregation mechanism is used. This mechanism enables each context tuple, i.e., input-output pair (x, y), to be derived from the objective function through an encoder network, which maps each context tuple to a potential observation r. Subsequently, all potential observations are aggregated by a contraction operation. Traditionally, neural processes use mean aggregation, i.e., the aggregation mechanism takes the average of all potential observations. In addition, it is also known to use Bayesian context aggregation (English: Bayesian Context Aggregation) in neural processes. Unlike mean aggregation, in which a uniform weight 1 / N (where N is the size of the context set) is assigned to all potential observations, Bayesian context aggregation enables weighting of potential observations according to a learned measure of the ambiguity of the task. This is important because different context tuples contain different amounts of information about the identity of the objective function. If the context tuple is located in an area of the xy space with high task ambiguity, i.e., it may be generated by multiple functions in the base function class, the amount of information conveyed by the context tuple is small. Therefore, the weight of the corresponding latent observation in the aggregated set must also be low; and conversely, the weight must also be high when the amount of information is high. In Bayesian context aggregation, the weighting related to task ambiguity is achieved by adding a second encoder network. The second encoder network learns to quantify the task ambiguity of each context tuple by the variance of the latent observations. The encoder output then modulates the weight of the corresponding latent observation according to the Bayesian observation model. Experimental results show in principle that Bayesian context aggregation improves the predictive performance of neural processes compared to traditional mean aggregation. Summary of the invention
[0005] The task of the present disclosure is to provide a method and an architecture that can at least maintain or improve the predictive performance and advantages of Bayesian context aggregation (such as uneven weighting of potential observations in the aggregation) and is more parameter efficient than Bayesian context aggregation.
[0006] This object is achieved with a method according to the described embodiments.
[0007] One embodiment relates to a computer-implemented method for estimating uncertainty in a model by means of a neural network, in particular a neural process, wherein the model models a technical system and / or a system behavior of a technical system, wherein in one step, based on a number N of potential observations r n (where n = 1, ..., N) to determine model uncertainty As the variance of the underlying Gaussian distribution and determine the mean μ of the underlying Gaussian distribution z , where the model uncertainty and mean μ z According to the potential observation r n and hyperparameters T, and in another step by the variance and mean μ z Parameterize the underlying Gaussian distribution. Note that this model was created based on measurements of technical systems.
[0008] The introduction of a hyperparameter T (also called Softmax-Temperatur) enables uneven weighting of latent observations without the need for a second encoder network. The use of an additional trainable hyperparameter enables so-called "Softmax aggregation", which can replace traditional aggregation methods such as mean aggregation, maximum aggregation, or Bayesian aggregation in neural process-based architectures.
[0009] By means of the “Softmax-aggregation” described in accordance with the present disclosure, the Bayesian aggregation described above is greatly simplified in that the “Softmax-aggregation” specifies the variance of the underlying observations as follows With potential observation r n Fixed correlation:
[0010]
[0011] This means that no separate encoder network is required to compute Thus, the number of parameters to be learned is reduced. n Variance The fixed dependence on the hyperparameter T can be used in the known Bayesian aggregation equation. The resulting equation then forms the "Softmax aggregation" equation:
[0012]
[0013] According to one embodiment, the potential observation r n By applying the context data to x n ,y n With the help of the neural encoder network, it is mapped to the corresponding potential observation r n Then, according to the equation described, and μ z , and use these parameters to parameterize the latent Gaussian distribution.
[0014] It can be specified that the hyperparameter T is generated by means of a neural encoder network to map the context data to x n ,y n .
[0015] It may be advantageous, for example, that the hyperparameters T are learned together with the parameters of the neural encoder network to map the context data to x n ,y n , such as learning in a common learning method.
[0016] According to a further specific embodiment, it is provided that the hyperparameter T is determined independently by hyperparameter optimization.
[0017] According to another embodiment, it is provided that the variance of the output of the model, ie the output variance, is determined by means of a neural decoder network based on the underlying Gaussian distribution, in particular based on the input position x and based on the underlying sample z derived from the Gaussian distribution. Therefore, the neural decoder network can compute a prediction for the target variable y at position x based on a sample z from the latent Gaussian distribution.
[0018] According to another embodiment, it is provided that the mean μ of the output of the model is determined by means of a further neural decoder network based on the underlying Gaussian distribution, in particular based on the input position x and based on the underlying sample z derived from the Gaussian distribution. y . Mean μ y , especially in combination with the output variance, provides an estimate of the target variable y.
[0019] Further embodiments relate to the architecture of a neural network, in particular a neural process, wherein the neural network is designed to carry out the steps of the method for estimating uncertainty in a model according to the described embodiments, wherein the model models a technical system and / or a system behavior of a technical system.
[0020] According to one embodiment, the neural network comprises at least one neural encoder network and / or at least one neural decoder network, wherein the neural encoder network is trained to generate a neural network based on context data. n ,y n Generate potential observations r n , and / or wherein the neural decoder network is trained to determine the variance of the output of the model based on the underlying Gaussian distribution, i.e., the output variance and / or the mean μ of the model's output y .
[0021] Further embodiments relate to a device comprising a neural network, in particular a neural process, having an architecture according to the above-described embodiments, wherein the device is designed to carry out the steps of the method according to the described embodiments.
[0022] Further embodiments relate to the use of a method according to the described embodiments and / or a neural network, in particular a neural process, having an architecture according to the described embodiments for determining deviations, in particular inadmissible deviations, of a system behavior of a technical system from a standard value range. It should be noted that, depending on the determined deviation, the technical system can switch to a safe operating mode or output a warning.
[0023] When determining deviations in a technical system, an artificial neural network is used, which is fed with input and output data of the technical device in a learning phase. By comparing with the input and output data of the technical system, corresponding links are established in the artificial neural network and the neural network is trained to the system behavior of the technical system.
[0024] In the prediction phase following the learning phase, the system behavior of the technical system can be reliably predicted with the aid of the neural network. For this purpose, in the prediction phase, the input data of the technical system are fed to the neural network and output comparison data are calculated in the neural network, which are compared with the output data of the technical system. If the difference between the output data of the technical system (which are preferably detected as measured values) and the output comparison data of the neural network deviates in this comparison and the deviation exceeds a limit value, the system behavior of the technical system deviates inadmissibly from the standard value range. Appropriate measures can then be taken, such as generating or storing a warning signal or deactivating some functions of the technical system (degradation of the technical device). If necessary, in the event of an inadmissible deviation, a switch to an alternative technical device may be possible.
[0025] With the aid of the above-described method, real technical systems can be continuously monitored. In the learning phase, the neural network is fed with enough information about the technical system on its input side and its output side so that the technical system can be mapped and simulated in the neural network with sufficient accuracy. This makes it possible to monitor the technical system and predict deterioration of the system behavior in the subsequent prediction phase. In this way, in particular, the remaining service life of the technical system can be predicted. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Further features, application possibilities and advantages of the invention can be gathered from the following description of exemplary embodiments of the invention, which are illustrated in the figures of the drawings. All described or illustrated features, either individually or in any combination, constitute the subject matter of the invention, regardless of their incorporation or reference back in the claims and regardless of their expression or illustration in the description or drawings. In the drawings:
[0027] Figure 1 schematically illustrates a method for estimating uncertainty according to an embodiment;
[0028] Figure 2 The architecture of a neural process according to an embodiment is shown. DETAILED DESCRIPTION
[0029] A computer-implemented method for estimating uncertainty in a model using a neural network, in particular a neural process, is described below with reference to the accompanying drawings, wherein the model models a technical system and / or a system behavior of a technical system.
[0030] The method 100 comprises step 110, wherein in step 110 based on a number N of potential observations r n (where n = 1, ..., N), determine the model uncertainty as the variance of the underlying Gaussian distribution and the mean μ of the underlying Gaussian distribution z , where the model uncertainty and mean μ z According to the potential observation r n And the hyperparameter T is determined.
[0031] Variance of the underlying observations With potential observation r n The dependency on the hyperparameter T is specified here as follows:
[0032]
[0033] Potential observation r n Variance The fixed dependence on the hyperparameter T can be used in the known Bayesian aggregation equation:
[0034]
[0035] The resulting equation then forms the "Softmax aggregation" equation:
[0036]
[0037] In the resulting equation, the premise is that μ z,0 = 0 and σ z,0 →∞.
[0038] The use of an additional trainable hyperparameter T enables so-called "Softmax aggregation", which can replace conventional aggregation methods in neural process-based architectures, such as mean aggregation, maximum aggregation or Bayesian aggregation. It can be advantageous here that "Softmax aggregation" combines conventional mean aggregation and maximum aggregation: mean aggregation is restored in the limit T→∞, and maximum aggregation is restored in the limit T→0.
[0039] The method further comprises step 120, wherein in step 120, the variance and mean μ z Parameterize the latent Gaussian distribution.
[0040] According to one embodiment, the potential observation r n By applying the context data to x n ,y n With the help of the neural encoder network, it is mapped to the corresponding potential observation r n is generated, see step 130. Then, according to the equation described, and μ z , see step 110 , and use these parameters to parameterize the potential Gaussian distribution, see step 120 .
[0041] The hyperparameters are determined, for example, in a training and / or optimization method prior to method 100, see step 140. It can be provided that the hyperparameters T are generated by means of a neural encoder network to map the context data to x n ,y n For example, it may be advantageous to learn the hyperparameters T together with the parameters of the neural encoder network to map the context data to x n ,y n , for example in a common learning method. According to another embodiment, it is provided that the hyperparameter T is determined independently by hyperparameter optimization.
[0042] According to another embodiment, it is provided that the variance of the output of the model, ie the output variance , is determined by means of a neural decoder network based on the underlying Gaussian distribution, in particular based on the input position x and based on the underlying sample z derived from the Gaussian distribution. See step 150. The neural decoder network can thus compute a prediction for the target variable y at position x based on a sample z from the underlying Gaussian distribution.
[0043] According to another embodiment, it is provided that the mean μ of the output of the model is determined based on the underlying Gaussian distribution, in particular based on the input position x and based on the underlying sample z derived from the Gaussian distribution, by means of a further neural decoder network. y , see step 150. Mean μ y , especially in combination with the output variance, provides an estimate of the target variable y.
[0044] Figure 2 The architecture of a neural network 200 , in particular a neural process, is shown, wherein the neural network 200 is designed to carry out the steps of a method 100 according to the described embodiment for estimating uncertainties in a model, wherein the model models a technical system and / or a system behavior of a technical system.
[0045] according to Figure 2 , the neural network 200 includes a neural encoder network 210. The neural encoder network 210 is trained to n ,y n Mapped to the corresponding potential observation r n To generate potential observations r n .
[0046] according to Figure 2 , the neural network 200 includes a first neural decoder network 220, wherein the first neural decoder network 220 is trained to determine the variance of the output of the model according to the input position x and the potential sample z, that is, the output variance
[0047] according to Figure 2 , the neural network 200 includes another neural decoder network 230, wherein the other neural decoder network 230 is trained to determine the mean μ of the output based on the input position x and the potential sample z y . Mean μ y , especially in combination with the output variance, provides an estimate of the target variable y.
[0048] Further embodiments relate to the use of a method 100 according to the described embodiment and / or a neural network 200 (in particular a neural process) having an architecture according to the described embodiment for determining deviations, in particular inadmissible deviations, from a standard value range for a system behavior of a technical system.
[0049] When determining deviations in technical systems, artificial neural networks are used, which are fed with input and output data from the technical system in a learning phase. By comparing the input and output data with the technical system, corresponding links are established in the artificial neural network and the neural network is trained to the system behavior of the technical system.
[0050] The multiple training data sets used in the learning phase may include input parameters measured at the technical system and / or calculated for the technical system. The multiple training data sets may contain information related to the operating state of the technical system. Additionally or alternatively, the multiple training data sets may contain information related to the environment of the technical system. In some examples, the multiple training data sets may contain sensor data. A computer-implemented machine learning system may be trained for a certain technical system to process data (e.g., sensor data) generated in the technical system and / or in its environment, and calculate one or more output parameters related to the monitoring and / or control of the technical system. This may occur during the design of the technical system. In this case, the computer-implemented machine learning system may be used to calculate the corresponding output parameters based on the input parameters. The obtained data may then be supplied to the monitoring and / or control device of the technical system. In other examples, the computer-implemented machine learning system may be used in the operation of the technical system to perform monitoring and / or control tasks.
[0051] In the prediction phase following the learning phase, the system behavior of the technical system can be reliably predicted with the aid of the neural network. To this end, in the prediction phase, the input data of the technical system are fed to the neural network and output comparison data are calculated in the neural network, which are compared with the output data of the technical system. If the difference between the output data of the technical system (which are preferably detected as measured values) and the output comparison data of the neural network deviate in the comparison and the deviation exceeds a limit value, the system behavior of the technical system deviates inadmissibly from the normal value range. Appropriate measures can then be taken, such as generating or storing a warning signal or deactivating partial functions of the technical system (degradation of the technical device). If necessary, in the case of inadmissible deviations, a switch to an alternative technical device can be made.
[0052] With the aid of the method described above, real technical systems can be continuously monitored. In the learning phase, the neural network is fed with enough information about the technical system on its input side as well as on its output side so that the technical system can be mapped and simulated in the neural network with sufficient accuracy. This allows the technical system to be monitored in the subsequent prediction phase and a deterioration in the system behavior to be predicted. In this way, in particular the remaining service life of the technical system can be predicted.
[0053] Specific application forms involve, for example, applications in different technical devices and systems. For example, a computer-implemented machine learning system can be used for controlling and / or monitoring a device.
[0054] The first example relates to the design of a technical device or a technical system. In this context, the training data set may contain measurement data and / or synthetic data and / or software data that are important for the operational state of the technical device or the technical system. The input or output data may be state parameters of the technical device or the technical system and / or control parameters of the technical device or the technical system. In one example, generating a computer-implemented probabilistic machine learning system (e.g., a probabilistic regressor or classifier) may include transforming an input vector of one dimension Output vector mapped to the second dimension Here, the input vector may, for example, represent an element of a time series of at least one measured input state parameter of the device. The output vector may represent at least one estimated output state parameter of the device, which is predicted according to the generated posterior predictive distribution. In one example, the technical device may be a machine, such as an engine (e.g., an internal combustion engine, an electric motor, or a hybrid engine). In other examples, the technical device may be a fuel cell. In one example, the measured input state parameter of the device may include a rotational speed, a temperature, or a mass flow. In other examples, the measured input state parameter of the device may include a combination of these. In one example, the estimated output state parameter of the device may include a torque, an efficiency, or a pressure ratio. In other examples, the estimated output state parameter of the device may include a combination of these.
[0055] Different input and output variables may have complex nonlinear dependencies in technical devices during operation. In one example, with the aid of a computer-implemented machine learning system of the present disclosure, parameterized modeling of a characteristic diagram of a device (e.g., an internal combustion engine, an electric motor, a hybrid engine, or a fuel cell) may be performed. The modeled characteristic diagram according to the method of the present invention is particularly capable of quickly and accurately providing the correct relationship between different state variables of the device in operation. The characteristic diagram modeled in this way may be used, for example, during operation of the device (e.g., an engine) to monitor and / or control the engine (e.g., in an engine control device). In one example, a characteristic diagram may indicate how the dynamic behavior (e.g., energy consumption) of a machine (e.g., an engine) depends on different state variables of the machine (e.g., speed, temperature, mass flow, torque, efficiency, and pressure ratio).
[0056] The computer-implemented machine learning system can be used for classification of time series, in particular classification of image data (i.e. the technical device is an image classifier). The image data can be, for example, camera data (e.g. generated by corresponding sensors), lidar data, radar data, ultrasound data or thermal image data. In some examples, the computer-implemented machine learning system can be designed for monitoring devices (e.g. for manufacturing processes and / or quality assurance) or medical imaging systems (e.g. for the discovery of diagnostic data), or used in these devices.
[0057] In other examples (or additionally), a computer-implemented machine learning system may be designed or used to monitor the operating state and / or environment of an at least partially autonomous robot. The at least partially autonomous robot may be an autonomous vehicle (or other at least partially autonomous mobile or transport vehicle). In other examples, the at least partially autonomous robot may be an industrial robot. For example, by using data from position and / or speed and / or torque sensors, in particular data from a robot arm, an accurate probabilistic estimate of the position and / or speed, in particular of the robot arm, may be determined with the aid of the regression method. In other examples, the technical device may be a machine or a group of machines (e.g. an industrial facility). For example, the operating state of a machine tool may be monitored. In these examples, the output data y may contain information about the operating state and / or environment of the respective technical device.
[0058] In other examples, the system to be monitored may be a communication network. In some examples, the network may be a telecommunications network (e.g., a 5G network). In these examples, the input data x may include load data in a network node, and the output data y may include information about resource allocation (e.g., channels, bandwidth in a network channel, or other resources). In other examples, a network failure may be identified.
[0059] In other examples (or additionally), the computer-implemented machine learning system may be designed or used to control (or regulate) a technical device. The technical device may in turn be one of the devices discussed above (or below) (e.g., at least partially autonomous robots or machines). In these examples, the output data y may include control parameters of the corresponding technical system.
[0060] In yet other examples (or additionally), the computer-implemented machine learning system can be designed or used to filter the signal. In some cases, the signal can be an audio signal or a video signal. In these examples, the output data y can include the filtered signal.
[0061] The method for generating and applying a computer-implemented machine learning system of the present disclosure may be performed on a computer-implemented system. The computer-implemented system may include at least one processor, at least one memory (which may contain a program that, when executed, may perform the method of the present disclosure), and at least one interface for input and output. The computer-implemented system may be a stand-alone system, or a distributed system that communicates via a network (e.g., the Internet).
[0062] The present disclosure also relates to a computer-implemented machine learning system generated using the method of the present disclosure. The present disclosure also relates to a computer program, which is designed to perform all steps of the method of the present disclosure. In addition, the present disclosure also relates to a machine-readable storage medium (e.g., an optical storage medium or a solid-state memory, such as a flash memory), on which a computer program is stored, which is designed to perform all steps of the method of the present disclosure.
Claims
1. A computer-implemented method (100) for estimating uncertainty in a model by means of a neural network (200, 300), in particular a neural process, wherein the model models a technical system and / or a system behavior of the technical system, wherein in a step (110) based on a number N of potential observations (r n ), where n = 1, ..., N, determines the model uncertainty as the variance of the underlying Gaussian distribution, and determine the mean of the underlying Gaussian distribution (μ z ), where the model uncertainty and the mean (μ z ) According to the potential observation (r n ) and hyperparameters (T), and in another step (120), by the variance and the mean (μ z ) parameterizes the latent Gaussian distribution.
2. The method (100) according to claim 1, wherein the potential observation (r n ) by pairing the context data with (x n ,y n ) is mapped to the corresponding potential observation (r n ) comes up.
3. The method (100) according to claim 2, wherein the hyperparameter (T) is generated by means of the neural encoder network (210) to map the context data pair (x n ,y n ).
4. The method (100) according to any one of claims 1 to 3, wherein the hyperparameter (T) is learned together with the parameters of the neural encoder network (210) to map the context data pairs (x n ,y n ).
5. The method (100) according to claim 1 or 2, wherein the hyperparameter (T) is independently determined by hyperparameter optimization.
6. A method (100) according to any one of the preceding claims, wherein the variance of the output of the model, i.e. the output variance, is determined based on the potential Gaussian distribution, in particular based on the input position (x) and based on the potential samples (z) derived from the Gaussian distribution, with the aid of a first neural decoder network (220).
7. The method (100) according to any of the preceding claims, wherein the mean (μ ) of the output of the model is determined based on a potential Gaussian distribution, in particular based on the input positions (x) and based on potential samples (z) derived from the Gaussian distribution, by means of a further neural decoder network (230). y ).
8. A neural network (200), in particular an architecture of a neural process, wherein the neural network (200) is designed to perform the steps of the method (100) according to any one of claims 1 to 7 to estimate uncertainties in a model, wherein the model models a technical system and / or a system behavior of the technical system.
9. The architecture of claim 8, wherein the neural network (200) comprises at least one neural encoder network (210) and / or at least one neural decoder network (220, 230), wherein the neural encoder network (210) is trained to generate a neural network for the context data pair (x n ,y n ) generates potential observations (r n ), and / or wherein the neural decoder network (220, 230) is trained to determine the variance of the output of the model based on the underlying Gaussian distribution, i.e., the output variance and / or the mean μ of the output of the model y .
10. A device comprising a neural network (200), in particular a neural process, having an architecture according to any one of claims 7 to 9, wherein the device is designed to perform the steps of the method (100) according to any one of claims 1 to 6.
11. Use of a method according to any one of claims 1 to 6 and / or a neural network (200), in particular a neural process, having an architecture according to any one of claims 8 to 9, for determining deviations, in particular inadmissible deviations, of system behavior of a technical system from a standard value range.