Bayesian identification of nonseparable Hamiltonians with multiplicative noise using deep learning and reduced-order modeling
Abstract
This paper presents a structure-preserving Bayesian approach for learning nonseparable Hamiltonian systems using stochastic dynamic models allowing for statistically-dependent, vector-valued additive and multiplicative measurement noise. The approach is comprised of three main facets. First, we derive a Gaussian filter for a statistically-dependent, vector-valued, additive and multiplicative noise model that is needed to evaluate the likelihood within the Bayesian posterior. Second, we develop a novel algorithm for cost-effective application of Bayesian system identification to high-dimensional systems. Third, we demonstrate how structure-preserving methods can be incorporated into the proposed framework, using nonseparable Hamiltonians as an illustrative system class. We assess the method’s performance based on the forecasting accuracy of a model estimated from single-trajectory data. We compare the Bayesian method to a state-of-the-art machine learning method on a canonical nonseparable Hamiltonian model and a chaotic double pendulum model with small, noisy training datasets. The results show that using the Bayesian posterior as a training objective can yield upwards of 724 times improvement in Hamiltonian mean squared error using training data with up to 10% multiplicative noise compared to a standard training objective. Lastly, we demonstrate the utility of the novel algorithm for parameter estimation of a 64-dimensional model of the spatially-discretized nonlinear Schrödinger equation with data corrupted by up to 20% multiplicative noise.
keywords:
Bayesian system identification , physics-informed machine learning , multiplicative noise , high-dimensional systems , nonseparable Hamiltonian systems, deep learning[1]organization=Department of Aerospace Engineering, University of Michigan, city=Ann Arbor, postcode=MI 48109, country=USA
[2]organization=Department of Mechanical and Aerospace Engineering, University of California San Diego, city=San Diego, postcode=CA 92161, country=USA
A Gaussian filter is derived for general additive and multiplicative noise models
An algorithm is introduced for Bayesian estimation of high-dimensional Hamiltonians
Probabilistic modeling is shown to improve a deep system ID method on noisy data
Bayesian parameter estimation is successfully performed on a 64-dimensional system
1 Introduction
System identification (ID) plays a key role in many engineering and scientific frameworks such as model predictive control, system forecasting, and dynamical analysis. Creating a system ID algorithm includes careful selection of a class of candidate models and of an objective function to optimize. The success of system ID strongly depends on how efficiently this pair of model class and objective utilizes available information to guide estimation. Data from the system are most commonly used as sources of information, but prior knowledge on the system physics can also be considered within the estimation procedure.
Incorporating physical knowledge into system ID has been demonstrated through a variety of methodologies [1]. In one direction, physically-inconsistent models can be penalized through the addition of physics-based terms in the objective function. This approach is adopted by the widely-used physics-informed neural networks [2, 3] and has also been applied to various applications such as improving molecular dynamics simulation [4] and lake temperature modeling [5]. In another direction, physics are explicitly encoded into the model parameterization. This approach has led to various neural network architectures for learning conservative systems based on Hamiltonian [6, 7, 8] and Lagrangian [9, 10, 11, 12] mechanics. Other examples of this approach include preservation of symmetry groups in convolutional neural networks [13] and enforcement of boundary conditions in boundary value problems [14]. Compared to traditional machine learning approaches, these methods have all shown significant improvements in estimation accuracy.
In addition to incorporating physical knowledge through models, data must be utilized to encourage consistency with the real world. Proper design of a learning objective is crucial to ensure information in the data is being extracted properly. The most common objectives take the form of a summation of vector norms of the differences between the data and estimated outputs, but alternative forms can be derived through probabilistic modeling. Notably, the modeling of model, measurement, and parameter uncertainties within a Bayesian framework in [15] led to an objective (the negative log posterior) that has been shown to yield more accurate estimates over many widely-used objectives [16]. To further improve information extraction capabilities, this method can be combined with structure-preserving parameterization techniques [15, 17]. However, evaluation of this posterior relies on probabilistic filtering and is computationally challenging. Two challenges arise: (i) filtering can be costly if the noise models are non-additive, and (ii) filtering tends to not scale well with the state and measurement dimensions.
The challenge of non-additive noise arises when the sensor noise is dependent on the signal. The most common form of this is multiplicative noise. As an example, a distance-measuring sensor contains noise that increases roughly linearly with its distance from the target [18]. To address multiplicative noise, a Kalman filter was first derived in 1971 by [19]. Since then, a number of other filters have been developed for various multiplicative noise models such as Gaussian mixtures [20, 21], non-stationary noise [22, 4, 20], and deterministic uncertainties [23, 24]. Each of these filters, however, makes the assumption that the noise from each sensor is independent and identically distributed (i.i.d.). If sensors measure along the same axis, e.g., distance and velocity sensors or redundant sensors, their measurements, and therefore noises, will be correlated and not independent. And for sensors that have been manufactured differently, it is unlikely that their noise models will be identically distributed. Therefore, a more general filtering algorithm for multiplicative noises is needed.
The high-dimensional problem setting poses challenges for not only the Bayesian approach, but also many other system ID methods. Most nonlinear system ID algorithms require thousands of evaluations of a forward model (or data points) for training, which can quickly become prohibitive for large-scale dynamical models. This issue is often addressed through reduced-order modeling in which a low-dimensional approximation, known as a reduced-order model (ROM), of the high-dimensional dynamics is estimated. To identify the ROM, many approaches begin by estimating a low-dimensional subspace for the reduced-order state vector followed by system ID in the reduced-order space. In the time domain, common approaches for the subspace identification task include linear methods such as the proper orthogonal decomposition [25] and the reduced basis method [26, 27], and nonlinear methods such as autoencoders [28, 29] and polynomial manifolds [30, 31]. These methods, however, are trained using full-field simulation data from full-order models (FOMs) that realistically are often incorrect, partially unknown, or uncertain. As a result, the accuracy of the ROMs is limited by the accuracy of the FOMs. To improve past this limit requires using experimental data collected directly from the system of interest. Since these data are often noisy, training with them introduces additional error into the subspace approximation. For a system ID method to handle this added error, careful modeling of uncertainty will be key.
In this work, we introduce methodologies to address the challenges of Bayesian system ID for multiplicative noise and high-dimensional systems. Then we demonstrate how these methodologies can be combined with structure-preserving methods, using nonseparable Hamiltonian systems as an example class of systems. Lastly, we apply the methodologies to estimate a dynamics model from single-trajectory data and evaluate the model’s quality based on its forecasting accuracy. We choose nonseparable Hamiltonian systems for several reasons. Hamiltonian systems can demonstrate complex nonlinear behavior while possessing an underlying highly-structured geometry. These systems possess interesting physical properties that are important to preserve including conservation of the Hamiltonian, reversibility, and symplecticity. Nonseparable Hamiltonians, specifically, are of interest because they arise in diverse fields such as multibody dynamics and control in robotics [32], the Kozai-Lidov mechanism in astrophysics [33], particle accelerators in physics [34], 3D vortex dynamics in fluid mechanics [35], and the nonlinear Schrödinger equation in quantum mechanics [36].
In a previous work [17], we also considered Bayesian system ID of nonseparable Hamiltonian systems with multiplicative measurement noise. There are three major distinctions between that work and the present one. The first is that in the past work, we considered only a polynomial Hamiltonian with a polynomial model parameterization. The current work uses a more expressive deep neural network parameterization and considers a non-polynomial Hamiltonian example. Second, we previously used an additive noise model and trained on data with multiplicative noise to demonstrate robustness to model misspecification, but here we adapt the model and algorithm toward multiplicative noise. The third and most significant difference in this work is that we develop an original algorithm for efficient estimation of high-dimensional nonseparable Hamiltonian systems. These novel additions to the structure-preserving Bayesian learning framework of [17] are stated more specifically as follows:
-
1.
derivation of a Gaussian filter for a statistically-dependent, vector-valued, additive and multiplicative noise model and analysis of the added computational complexity compared to a filter for only additive noise in Section 4.1,
- 2.
-
3.
numerical experimentation showing that the proposed likelihood-based objective outperforms the original objective of a state-of-the-art machine learning method when training with sparse data with multiplicative uniform noise with respect to both state and Hamiltonian error in Sections 6.3 and 6.4. These results include upwards of 724 times improvement in Hamiltonian mean squared error when training with data corrupted by up to 10% multiplicative noise,
- 4.
The rest of this paper is structured as follows. Section 2 provides notation and the probabilistic formulation of the system ID problem. Section 3 gives a background discussion on algorithmic design choices for the Bayesian method. Section 4 introduces a filter for a general additive and multiplicative noise model and reviews structure-preserving techniques for nonseparable Hamiltonian systems. Section 5 presents a novel algorithm for efficient and structure-preserving estimation of high-dimensional Hamiltonians. Section 6 applies the proposed Bayesian algorithm to two low-dimensional (one polynomial and one non-polynomial) nonseparable Hamiltonian systems. Then, the novel algorithm for estimating high-dimensional Hamiltonians is applied to a spatial discretization of the nonlinear Schrödinger equation. Finally, Section 7 provides concluding remarks and future research directions.
2 Problem statement
In this section, we define notation and formulate the system ID problem.
2.1 Notation
The space of real numbers is denoted by and the set of positive integers by . Vectors are written in lowercase, non-italic, bold font, e.g., , and matrices in uppercase, non-italic, bold font, e.g., . The transpose is denoted by the ⊤ symbol. If a vector varies in space and/or time, it is spatially indexed as and/or temporally indexed as for discrete space and time .
Let be a probability triple where is a sample space, is a -algebra, and is a probability measure. Random variables are denoted in lowercase, italic, bold font, e.g., , and their realizations are denoted as their non-italic counterparts, e.g., . We assume that for a continuous random variable , the probability measure admits a probability density function (pdf) . A -dimensional uniform distribution with lower and upper bounds is denoted as . A normal distribution with mean and covariance is denoted as . If , then follows a half-normal distribution denoted as .
The symbol represents element-wise multiplication. The operation is defined when the dimensions of the operands match or when the operands are a matrix and a vector with length equal to the number of matrix columns. In the latter case, multiplies the th column of the matrix by the th element of the vector. This operator has the useful property that for the Gaussian random vector and a constant vector of the same length.
2.2 Probabilistic problem formulation
In this section, we describe a probabilistic problem formulation for Bayesian system ID for arbitrary noise models. We model the states and the outputs for as discrete-time stochastic processes indexed by . The dynamics are modeled as a hidden Markov model (HMM)
(1a) | ||||
(1b) |
where is the state-transition function and the measurement function. These functions are parameterized by the random variable , whose realizations we denote with , and both operators are functions of to represent that their outputs are random variables. The system is therefore characterized by the sequences of transitional pdfs and conditional output pdfs induced by and , respectively.
We seek to represent the posterior distribution characterizing the uncertainty in system parameters given a collection of measurements . Bayes’ rule expresses the posterior in a computable form via the likelihood , the prior , and a normalizing constant known as the evidence according to
(2) |
The HMM, however, has the additional collection of uncertain variables about which we do not intend to make inferences. These uncertain states are marginalized out of the inference problem within the likelihood as . At first, this marginalization appears to require a costly -dimensional integration. However, the recursive structure of the HMM can be exploited to break the high-dimensional integral into integrals of the more manageable dimension by the decomposition
(3) |
Each term in this product can be efficiently computed using recursion, as shown in Algorithm 1 from [37, Th. 12.3].
3 Algorithmic design choices
While Algorithm 1 is general enough to be applicable to any system that can be modeled in the general HMM form of Eq. (1), this flexibility requires design choices addressing two primary challenges: (i) the computational expense of filtering and (ii) how to encode prior knowledge into the parameterizations of and .
The first challenge of computational expense arises because the integrals in Algorithm 1 do not, in general, admit closed form solutions. The user’s choice in evaluation method will determine the accuracy of the marginal likelihood evaluation and overall computational complexity. The design choices to address the second challenge include selecting the coordinate system, system dimensions, and model fidelities within and . These choices often involve a tradeoff between accuracy and computational expense. For the best accuracy and generalizability of the learned model, prior information on the system should inform the model parameterization as much as possible. We now describe these choices and our contributions in more detail.
3.1 Sources of computational expense
Integral evaluation methods within filtering can be divided into two classes: those that estimate the exact integral and those that estimate an approximation of the integral. Estimation of the exact integral is typically performed using sequential Monte Carlo algorithms such as particle filtering [38]. The efficiency of this approach, however, is strongly dependent on the ability to draw uncorrelated samples from the appropriate distributions, which is, in general, nontrivial. When the efficiency of Monte Carlo sampling is prohibitive, approximations are used instead. The most common class of approximation methods for these integrals is Gaussian filtering. These methods approximate the marginal pdf as Gaussian, which requires tracking only the first two moments of all other pdfs in Algorithm 1. Tracking the mean and covariance of the prediction pdf and output pdf can be achieved through linearization using Taylor series expansion or through Gaussian integration. These techniques are possible because the prediction and output pdfs are defined in terms of available functions, in this case and . There is no such function, however, for the update pdf . The mean and covariance of this pdf are instead approximated with the Kalman update, which delivers the minimum mean squared error (MMSE) estimate of these quantities.
3.1.1 Process and measurement model forms
If more is known about the forms of and , linearization and Gaussian integration can sometimes be replaced by closed form solutions. To this end, it is useful to separate the dynamics and output functions into deterministic and stochastic components. Let and represent deterministic dynamics and measurement functions, respectively. The stochastic components are usually further divided according to how they enter into the model. The two main approaches for modeling these components are as additive or multiplicative noise. If both of these types of noise are present, the model is written as
(4a) | ||||
(4b) |
where and are discrete-time stochastic processes.
The most common noise model is additive noise. One benefit of an additive noise model is that the first two moments of the noise terms can be estimated separately from those of the dynamics and observation functions, reducing complexity. Then the total mean and covariance for either or is simply the sum of these separate estimates. For linear systems, this allows for the means and covariances of and to be evaluated analytically with the Kalman filter when the first two moments of the noise terms are known. Moreover, if the system is linear and the noise terms are Gaussian, then the prediction, output, and update pdfs in Algorithm 1 are all Gaussian, and the Kalman filter is exact.
Although additive Gaussian noise is a suitable choice for many problems, recent works on learning Hamiltonians [39, 40] have begun considering multiplicative uniform noise. As with any other noise model, Gaussian filtering can be used to approximate Algorithm 1 for multiplicative uniform noise, but it is preferable to compute as much of each integral in closed form as possible for the sake of complexity. By using knowledge of the noise model, the general Gaussian filtering procedure can be adapted to replace a portion of the approximations with an exact and computationally efficient evaluation. In Section 4.1, we introduce such a filtering procedure for multiplicative noise and analyze its computational expense.
3.1.2 Dimensionality
Although using Gaussian filtering for integral evaluation is significantly more efficient than Monte Carlo sampling, it tends to not scale well with the state and measurement dimensions. For example, the Kalman filter has a computational complexity of , which can make optimization and sampling schemes infeasible for even moderate dimensions. Since in most real-world systems, , the state dimension tends to be the limiting dimension. Therefore, one solution is to use reduced-order modeling to reduce the state dimension to and perform estimation in this -dimensional subspace. In Section 5, we present a method for learning high-dimensional systems efficiently using Algorithm 1 and reduced-order modeling. If this approach is used, it is critical that the ROM still preserve the geometric structure of the FOM. Structure-preservation can be achieved by encoding prior physics knowledge into the parameterization of the dynamics model . We discuss such an approach in the following section.
3.2 Incorporation of prior knowledge
Here we consider the choice of model parameterization with a focus on embedding geometric structure into the model. The benefits of physics-informed parameterization are that it leads to models that generalize better beyond the training data and reduces the number of data required for training. There are two main ways to enforce the system physics within the dynamics model . First, the parameterization of should be designed to only admit models whose dynamics possess the same physical structure of the system. Second, the model dynamics should be evaluated in such a way that the resulting flow preserves the structure of the dynamics. Since this work considers specialization of methods to nonseparable Hamiltonian systems, we briefly review aspects of the Hamiltonian structure that will inform the proposed parameterization method.
Finite-dimensional canonical Hamiltonian systems are defined by a scalar function , known as the Hamiltonian, of the canonical position and momentum , both in . For these systems, the state is defined as such that . The governing equations of the system, known as Hamilton’s equations, are derived from this function
(5) |
Many Hamiltonian systems of interest to engineers and scientists (e.g., [32, 34, 35, 33, 36]) are not additively separable with respect to functions of the position and momentum. Such Hamiltonian systems are said to be nonseparable. Unlike the separable Hamiltonian systems which can be written as with a kinetic energy function and a potential energy function , Eq. (5) cannot be further simplified for nonseparable Hamiltonians. A distinctive feature of Hamilton’s equations is that they possess physically meaningful geometric properties that can be described in the form of symplecticity, invariants of motion, and energy conservation. We discuss how these properties can be embedded in the estimation procedure in Section 4.2.
4 Methodology
In this section, we present solutions to the problems of computational expense and prior knowledge incorporation. In Section 4.1, we derive a Gaussian filter for a statistically-dependent, vector-valued, additive and multiplicative noise model, and we analyze its computational expense relative to a Gaussian filter for the more widely-used additive noise model. Then in Section 4.2, we add the additional capability of physics-informed estimation to the algorithm by embedding geometric structure within the dynamics propagator , and we tailor the approach specifically toward nonseparable Hamiltonian systems.
4.1 Filtering with multiplicative noise
In this section, we extend the filter for multiplicative scalar noise from [19] to models with statistically-dependent, vector-valued noise. Consider the HMM with additive and multiplicative noise in Eq. (4). Let the vector-valued multiplicative noise terms and each be i.i.d. with means and and covariances and , respectively. Similarly, let the additive noise terms and also be i.i.d. with zero means and covariances and , respectively. Since we are interested in Gaussian filtering, the higher order moments of these noise terms are not needed.
Recall from Section 3.1 that the goal of Gaussian filtering within Algorithm 1 is to compute (approximations of) the means and covariances of the distributions , , and . Many of these evaluations require statistics of a function output that can be computed in closed form if the function is linear or approximated with Gaussian approximation if the function is nonlinear. To represent these function outputs, we denote as and as . The following equations outline the filtering procedure with line numbers denoting where each group of equations are evaluated within Algorithm 1. The mean and covariance of with respect to (line 6):
(6) | ||||
(7) |
The mean and covariance of with respect to and the covariance between and with respect to (line 3):
(8) | ||||
(9) | ||||
(10) |
The mean and covariance of with respect to (line 5):
(11) | ||||
(12) | ||||
(13) |
These last three equations represent the linear MMSE estimator with gain matrix . Therefore, and are only approximations unless and are jointly Gaussian. Also notice that and are required when multiplicative noise is present. Again, these could be computed with linearization or Gaussian integration, but for computational efficiency, we assume that the function outputs are Gaussian. This assumption allows Eq. (7) to be computed in the following form:
(14) |
A similar form can be used to compute Eq. (9).
In a past work [15], we analyzed the computational complexity of the filtering procedure for additive noise models and found it to be on the order . Here, we analyze the increase in computational complexity of this filtering procedure when multiplicative noise is present in addition to additive noise. Because we assumed that the noise is stationary, the outer products and need only be evaluated once. All other operations scale linearly with the number of data . The added computational cost is summarized in Table 1. The order of the added expense is , so the additional computation required when multiplicative noise is added to the model does not affect the order of complexity of the overall algorithm.
4.2 Embedding symplectic structure
Next we describe a parameterization strategy for embedding symplectic structure within the learning process that is shown graphically in Fig. 1. The main idea behind this strategy is that rather than parameterizing the time derivatives or the propagator directly, we parameterize the Hamiltonian . From this Hamiltonian, the time derivatives are derived from Hamilton’s equations and then integrated with a symplectic integrator. This process ensures that the estimated model will be Hamiltonian and also that its flow will be symplectic. This approach has shown utility in various other works [41, 17, 7, 42].
From the parameterized Hamiltonian, the continuous-time dynamics are given by Hamilton’s equations (5). However, the HMM (4) that we are using is formulated in discrete time. To resolve this discrepancy, we require a propagator that can map the state forward in time using the estimated time derivatives without violating the physical properties mentioned in Section 3.2. For this purpose, we utilize a recently-developed explicit symplectic integrator for nonseparable Hamiltonian systems [43] that we refer to as “Tao’s integrator” throughout the paper. We briefly describe the integration method here.
Consider an arbitrary Hamiltonian and fictitious position and momentum vectors and corresponding to and . Next, define the augmented Hamiltonian
(15) |
where and correspond to two copies of the original nonseparable Hamiltonian system with mixed-up positions and momenta; is an artificial constraint; and is a constant that controls the binding of the two copies. Unlike the original Hamiltonian , the extended Hamiltonian is amenable to explicit symplectic integration.
From , a propagator is derived using a second-order explicit symplectic method based on Strang splitting
(16) |
where and are the time- flow of and . Each flow is evaluated with explicit symplectic Euler substeps, so the result of the composition is an explicit and symplectic propagator as desired.
5 Structure-preserving dimension reduction for high-dimensional systems
In this section, we discuss the approach of probabilistically learning low-dimensional dynamics of high-dimensional systems, including how to preserve Hamiltonian structure throughout the dimension-reduction process. This approach is divided into three steps. The first step in Section 5.1 is defining a structure-preserving propagator in the reduced-dimensional state space, the second step in Section 5.2 is deriving a low-dimensional observation function that determines a reduced-dimensional observation space, and the final step in Section 5.3 is deriving and evaluating a likelihood in this low-dimensional space. This revised process for high-dimensional Hamiltonians is graphically illustrated in Fig. 2.
5.1 Reduced-dimension dynamics
Reducing the dimension of a dynamical system hinges upon a key hypothesis: that the system of interest is a high-dimensional realization of underlying low-dimensional dynamics. Under this assumption, it is theoretically possible to estimate dynamics with a considerably lower state dimension than the ambient dimension without any loss of accuracy. Estimating the hypothesized low-dimensional dynamics involves two primary components. The first is identifying a low-dimensional subspace on which a significant portion of the state evolution is contained. The other component is estimating a dynamical model whose state evolves within this low-dimensional space. Here we first describe linear dimension reduction for dynamical systems and then expound on alterations that can be made to preserve symplectic structure.
5.1.1 Linear dimension reduction
In this work, we consider linear projections. Let and be projection matrices that project onto complementary subspaces with . Denoting the components of the state that lie in and as and , the state can be written as
(17) |
where and are the low-dimensional representations of and .
Once the subspace has been identified, the next step is to learn low-dimensional dynamics of the form
(18) |
where is the low-dimensional dynamics propagator and represents the model uncertainty of . Since the form of uncertainty in the model is unknown, we select the additive model for simplicity. We use as the uncertain state vector and therefore model it as a random vector. The state is omitted from this model as a result of the earlier hypothesis that the dynamics are largely confined to a low-dimensional manifold, in this case . With these dynamics, predictions of the high-dimensional state can be made using , where denotes compositions of the low-dimensional propagator.
5.1.2 Hamiltonian case
Now we seek to extend this methodology to learn low-dimensional Hamiltonian models arising from discretizations of infinite-dimensional Hamiltonian systems. For this work, we focus on infinite-dimensional canonical Hamiltonian systems with Hamiltonian functionals of the form
(19) |
where is the spatial variable and is the partial derivative of with respect to . The function contains quadratic terms, and contains spatially-local nonlinear terms.
To preserve the symplectic structure of the Hamiltonian system, we require that the symplecticity of the Hamiltonian flow is preserved in the reduced-dimensional space. This can be achieved by using the cotangent lift algorithm to find a projection matrix that is symplectic. We briefly describe the cotangent lift algorithm here, but more details can be found in A. Let be a collection of full-field data collected from the system at times . We define the snapshot matrices
(20) |
Then we compute a linear symplectic basis
(21) |
where is based on the leading left singular vectors of the extended snapshot matrix .
Next, we propose a parameterization of that preserves the low-dimensional Hamiltonian structure. We define the low-dimensional position and momentum as
(22) |
Based on the Hamiltonian form of Eq. (19), we use the parameterization
(23) |
where defines the nonlinear terms, and and are symmetric matrices defining the quadratic terms. We have partitioned the parameter vector into components pertaining to the quadratic and nonlinear terms of the Hamiltonian to distinguish between them. Following Hamilton’s equations (5), the governing equations for this low-dimensional Hamiltonian system are
(24) |
Numerically integrating these equations with Tao’s integrator as in Section 4.2 yields a structure-preserving propagator . With the Hamiltonian operator inference method H-OpInf [44], can be determined in a straightforward fashion, leaving only to be estimated. More details on this approach will be given in Section 5.3.
5.2 Reduced-dimension observations
Now that the state dimension has been reduced, we require an observation function defined over this reduced-dimensional state. Furthermore, if the observations themselves are high-dimensional, the high computational complexity of Gaussian filtering may require reduction of the observations in addition to the states. We describe this approach in the setting of identity observation operators for simplicity of presentation.
To formulate the measurement function in terms of , we first decompose the full-dimensional measurements in terms of and . Assuming that the measurement function in the observation model (4b) is the identity, we have
(25) |
The next step is to transform into a low-dimensional form. A natural choice for this step is to project onto the subspace spanned by the low-dimensional dynamics to produce the low-dimensional measurements . This induces the low-dimensional measurement model
(26) |
which produces a collection of low-dimensional data . This gives rise to a modified posterior distribution . In general, this distribution is only an approximation of the original distribution , but it can be computed much more efficiently than the original, as we will show in Section 5.3.
In the case of only additive noise, the additive form of the measurement model is preserved
(27) |
where
(28) |
can be treated as a non-stationary additive noise term with unknown mean and covariance. This form allows for Gaussian filtering through simple application of the Kalman filter. In the general form of Eq. (26), however, the noise can no longer be modeled by an additive and multiplicative model, and Eqs. (8) and (9) for evaluating the mean and covariance of can not be applied to . Instead, the first two moments of are given as
(29a) | ||||
(29b) |
Due to the presence of the unknown term, these moments are not computable. However, can be assumed to be small due to the initial hypothesis that is mostly contained in . By neglecting , Eq. (29) becomes
(30a) | ||||
(30b) |
where the uncertainty due to in (29b) has been absorbed into an estimated stationary additive term in (30b). In this simplified form, both moments can be computed straightforwardly with a standard filtering procedure.
5.3 Reduced-dimension likelihood evaluation
Lastly, we require a method for evaluating the likelihood of the low-dimensional Hamiltonian (23). With the symmetry constraints on and , the dimension of is . This dimension grows polynomially with , and even for , this scaling can be cumbersome for nonlinear optimization methods. Fortunately, H-OpInf [44] provides a method for estimating with linear optimization when is available. This procedure is described in more detail in B. By treating as a deterministic function of defined through the H-OpInf procedure, the posterior can be simplified as follows
(32) |
where takes the value 1 if is computed from with H-OpInf and 0 otherwise. Therefore, we only need a method for evaluating the likelihood . The pdf can be evaluated by applying Algorithm 1 to the HMM from (1) with dynamics from (18) and measurements from (26). The full procedure for this evaluation is given in Algorithm 2 and illustrated in Fig. 2.
6 Numerical experiments
In this section, we study the numerical performance of the proposed Bayesian system ID approach for three Hamiltonian models with increasing levels of complexity. In Section 6.1, we describe an existing method whose model parameterization we implement within the proposed Bayesian approach for comparison. Then in Section 6.2, we give an overview of training considerations that are used throughout each numerical experiment. The final three sections contain the numerical examples. Each experiment and its distinct contribution beyond the authors’ previous work [17] is outlined as follows. In Section 6.3 we consider a polynomial nonseparable Hamiltonian system from [43] to demonstrate the advantages of the proposed Bayesian approach compared to a state-of-the-art neural network-based method when the data are sparse and/or noisy. In Section 6.4 we consider the double pendulum system to show the effectiveness of the proposed approach for non-polynomial, nonseparable Hamiltonian models in the chaotic regime. Finally, in Section 6.5 we consider high-dimensional data with multiplicative noise from the nonlinear Schrödinger equation and employ the novel Algorithm 2 for learning a high-dimensional Hamiltonian model.
6.1 Parameterization using deep neural networks
The Bayesian approach presented in this paper is flexible enough that it can be paired with any arbitrary parameterization of the dynamics propagator . Here, we choose a recently-developed neural network architecture for learning nonseparable Hamiltonian systems known as the nonseparable symplectic neural network (NSSNN) [40] as our parameterization. This approach parameterizes the Hamiltonian using a neural network, evaluates Hamilton’s equations using auto-differentiation, and integrates the equations with Tao’s integrator, see Section 4.2. In Sections 6.3 and 6.4, we parameterize using the NSSNN and compare the performance of this neural network when it is trained with the negative log posterior as its objective against when it is trained with the objective recommended in its original paper [40]. The goal of these experiments is to investigate the effect of each objective on the quality of the estimated model when the training set consists of sparse and noisy data.
Here we briefly describe the NSSNN architecture and training procedure from [40]. The neural network parameterizing the Hamiltonian is composed of six linear layers with sigmoid activation functions following all but the last layer. The training data is a set of input-output pairs. The inputs are a collection of measurements at times , and the outputs are measurements at times for . For each , the input and output are collected from the same trajectory and are separated by a time length of . Since the integrator returns both the physical , and fictitious , position and momentum, as described in Section 4.2, the loss function contains a term corresponding to each of these variables. An loss is used since it was empirically shown by [40] to yield better results:
(33) |
where the hat denotes an estimated value. In the NSSNN training procedure, the weights of each layer are initialized with Xavier initialization, and the Adam optimizer [45] is used to minimize the loss. The optimizer’s hyperparameters (the learning rate and beta values , ) are problem-dependent and will be reported within each numerical experiment’s subsection. Aside from the loss function, we follow the same procedure for training the NSSNN with the negative log posterior. The NSSNN and training procedure are implemented in PyTorch [46] for its auto-differentiation capabilities.
6.2 Training considerations
In each of these experiments, we consider only single-trajectory training data. To generate the data, we run a numerical solver with a fine timestep to achieve high numerical accuracy. The training data are then subsampled from this solution using an interval . During training, the models use the larger timestep for prediction, which helps in improving the computational efficiency at the expense of larger numerical error. Once training is complete, the estimated models are tested by simulating with the fine timestep . Using a smaller timestep during testing ensures that the learned models have captured the continuous dynamics of the system and not only a discrete mapping at a single timestep [47].
For each of these experiments, we place an improper uniform prior, i.e., constant probability density, on the dynamics’ model parameters for the sake of direct comparison with the non-Bayesian method. We do, however, place weakly informative half-normal priors on the process noise variance parameters to enforce positivity and yield better convergence. The output model and the measurement noise variance are assumed to be known and are therefore fixed unless stated otherwise.
6.3 Tao’s example
The first system that we consider is a one-degree-of-freedom system used in [43] with the Hamiltonian
(34) |
For this experiment, we seek to assess the performances of the negative log posterior and the objective for training the NSSNN as the training data become fewer and noisier.
6.3.1 Data generation and training
We generate a collection of datasets of varying noise level and size for training. To generate the training data, we use Tao’s integrator with initial condition and timesteps and . The number of data points in each dataset takes the values corresponding to training intervals of length . The period for this system is approximately 3.26, so at this , the dataset timespans range from slightly under a single period to just over three periods. Then, we corrupt the datasets with multiplicative noise for . The mean and variance of this noise are and . The final collection of datasets includes every combination for a total 88 datasets.
To train the NSSNN, we use an initial learning rate of 0.05 and beta values and . Each model is trained for 400 epochs with the learning rate multiplied by 0.8 every 20 epochs. Following the approach presented in the original NSSNN paper [40], a batch size of 512 is used with the objective whenever applicable. For the negative log posterior, the process noise variance is parameterized as . The scalar optimization parameter is initialized at a value of , and a learning rate of and beta values are used for optimization. To encourage small values, the prior is placed on the random variable . The positivity constraint is enforced by setting the value of to be 0.9 times its previous value whenever the optimizer places below zero. When , we set for positive definiteness.
6.3.2 Time-domain prediction
Once training is completed on data points, each model is simulated starting at for twice the training timespan until using timestep . The accuracy of the model is then assessed by computing the mean squared error (MSE) defined as
(35) |
The results of the training can vary due to the randomness in the initialization of the NSSNN parameters, in the mini-batching procedure, and in the measurement noise. Sometimes, the optimizer can even get stuck at poor model estimates that yield very high MSE. To mitigate the effect of these outliers, we train 20 models at each pair and then compare the two methods using the median and minimum MSEs. Each of these 20 rounds of training has different realizations of initial parameters, mini-batches, and measurement noise. We use these particular statistics to quantify two distinct characteristics of the training objectives. The minimum MSE represents the best accuracy that an objective could potentially achieve either through fortuitous initialization and batching or through a more sophisticated optimization methodology. The median MSE, on the other hand, represents the minimum accuracy a user can expect to achieve roughly 50% of the time using the standard Adam optimizer with a reasonable amount of hyperparameter tuning. Together, these two statistics give a more complete picture of each objective’s performance.
The of the median and minimum MSEs are presented as heatmaps in Figs. 3(a) and 3(b), respectively. These heatmaps show the effects of varying the number of training data and the level of noise in the data on estimation performance. In this and all future figures, the label denotes the MAP estimate. We observe that using the negative log posterior to train the NSSNN results in lower median and minimum MSE at nearly every pair. The primary exception is the minimum MSE in the noise column in which the posterior yields lower MSE at only roughly half of the values. As noise is added, however, the MSE of models trained with the loss increases much more steeply compared to the MSE of models trained with the posterior. These results demonstrate that the posterior is much more robust to noise than the loss. Additionally, the lower median MSE of the posterior in the low noise case shown in Fig. 3(b) reflects the fact that the posterior can more reliably find low MSE model estimates, especially when a smaller number of data are available.
To visualize how the model behavior varies with the noise and number of data, we plot the estimated trajectories of models corresponding to the four corners of the heatmaps. The estimated output of the median and minimum MSE models are shown in Figs. 4 and 5, respectively. The vertical pink line corresponds to the time at which the MSE evaluation ends. Visually, the estimates produced with the negative log posterior can accurately reconstruct the phase manifold in all eight of the figures. The most noticeable inaccuracy produced by the posterior is the oscillation frequency of its median MSE estimates when the noise is high. However, the minimum MSE estimates do not have this issue.
The objective leads to poor results in two main areas: identifying good models with high noise data and reliable optimization with a low number of data. In the high noise case, both the median and minimum MSE estimates produced by the objective construct qualitatively poor estimates of the phase manifold. In the low number of data case, the minimum MSE estimate matches the true output closely when there is no noise. In this same case, however, the median MSE estimate produces a flat line in the time domain. This substantial difference in the median and minimum MSE estimates suggests that although the objective is able to produce good estimates with a small number of data, optimization is challenging and can require multiple attempts.
6.3.3 Phase-space prediction
In Fig. 4(b), we noted that the posterior estimate appears to qualitatively match the true output closely in phase space but produces large errors in the time domain. One way to quantitatively assess how closely the estimates match the system behavior in phase space is by looking at the MSE of the Hamiltonian, defined as
(36) |
where is the Hamiltonian function (34). This metric measures the closeness of an estimate’s energy level to the true system energy. Since some of the median MSE estimates, such as those in Fig. 4(c), remain close to the initial point, we only asses the minimum MSE estimates with this metric. The values of the mean squared Hamiltonian deviation for the minimum MSE estimates are shown as heatmaps in Fig. 6. This figure shows a clear trend of the Hamiltonian deviation growing both as noise increases and as the number of data decreases in both objectives’ estimates. The estimates produced by the objective outperform those produced by the posterior at almost all values when the data are noiseless — the notable exception being when the number of data is smallest.
Although Fig. 6 shows that the estimate has a lower Hamiltonian MSE when than the MAP estimate, Fig. 3 showed that the MAP estimate yielded generally lower MSE in the time domain for median performance and comparable MSE in the worst-case performance. Moreover the phase-space plots of Fig. 5 also indicate improved performance of the MAP estimate across noise cases. Looking at the magnitudes of the Hamiltonian MSE values in Fig. 6, the difference in errors between the MAP and estimates at is relatively small, approximately . When , however, we observe a sharp increase in the Hamiltonian MSE from the estimates. In contrast, the MSE values of the MAP estimates increase gradually as increases, demonstrating greater robustness to noise.
These slight differences that we observe between the time-domain MSE and Hamiltonian MSE heatmaps arise as a result of the fundamental differences in the two error metrics. While the trajectory-based metric (35) computes the pointwise squared Euclidean distance between two flows parameterized by time, the energy-based metric (36) computes the distance between a flow and a specific energy value. Because the energy-based metric compares the flow to a time-invariant quantity, it cannot by itself properly assess the quality of the dynamics, nor does it gauge or reflect the proper phase-space behavior and level sets. This can lead to problems if, for example, the estimated model possesses a stationary point that coincides with the Hamiltonian level surface. If this stationary point is the initial condition, the flow would yield zero MSE in the energy-based metric while yielding high MSE in the trajectory-based metric. As mentioned earlier, this was the case for some of the median MSE estimates. Although this metric alone is not sufficient to gauge the accuracy of dynamics, it can be valuable when used in conjunction with other metrics for its simplicity and physically-meaningful interpretation. For example, if the energy of a system is known to be constant, the energy-based metric quantifies the physical plausibility of a given model by measuring the average squared change in energy of its flow.
6.3.4 Conclusions
We conclude that if the data are noiseless, the objective is the better option for this example because it gives time-domain MSE comparable to the negative log posterior at a lower computational cost. When the number of data is low, however, the negative log posterior is potentially more cost-efficient since it appears to require fewer training restarts than the objective based on the median results. For data that are noisy, the negative log posterior is the clear choice. Although the cost is higher, the negative log posterior produces significantly more accurate estimates when the data have as little as 1% noise.
6.4 Double pendulum
The next system that we consider is the double pendulum, which has the Hamiltonian
(37) |
where , , and and are two masses connected by rigid rods of lengths and . This Hamiltonian is more complex than the previous example, and the behavior displayed by the double pendulum is chaotic in certain regions of the phase space. These two aspects make the system challenging to learn and allow us to test the limits of the NSSNN and the two objective functions.
6.4.1 Data generation and training
For this experiment, we set and , and we use an initial condition of , placing the dynamics in the chaotic regime. Then, we collect measurements of the full state using timesteps and and corrupt these data with multiplicative noise . The training procedure uses 1,000 epochs with an initial learning rate of 0.05 that is multiplied by 0.8 every 50 epochs. To learn the process noise covariance, we use the parameterization . The learning rate for the optimization parameter equals the parameter value and is also multiplied by 0.8 every 50 epochs. Any remaining aspects of the training follow the procedure described in the previous example.
6.4.2 Time-domain prediction
First, we examine the time-domain estimates of the learned models, plotted in Fig. 7. Since the double pendulum is a chaotic system, prediction errors grow exponentially fast, making long-term prediction difficult. As a result, the time-domain MSE (35) does not tend to give a reliable quantification of an estimate’s accuracy. For chaotic systems, it is often more important to (i) know when the estimate is no longer reliable and (ii) capture the qualitative behavior of the system.
To address the first concern, uncertainty quantification can be used. The typical approach to quantifying uncertainty in neural network models is by approximating the posterior distribution over the network parameters [48], but computational approximation of this distribution is often costly. Fortunately, the proposed Bayesian offers a measure of uncertainty that circumvents this challenging approximation. By including the process noise during evaluation of the model, a stochastic simulation is produced whose realizations can be used to construct a probability distribution of the estimated output. Samples from this stochastic simulation are shown alongside the deterministic simulation, referred to as the “nominal MAP estimate,” in Fig. 8. We observe that the spread of samples begins to grow as the MAP estimate begins to deviate from the truth. This suggests that the process noise can give a reliable estimate of how the uncertainty in an estimated model changes over time. Notably, the commonly-used deterministic model approaches have no such resource for assessing the reliability of their estimates.
6.4.3 Phase-space prediction
To address the second concern of assessing qualitative behavior, we compare the accuracy of the two estimates in phase space. Specifically, we quantify this accuracy by evaluating the absolute Hamiltonian error . Fig. 9(a) shows the estimates in phase space. The color of the line denotes the value of the absolute Hamiltonian error at that point. The absolute Hamiltonian error is also plotted over time for reference in Fig. 9(b) with a pink line separating the training and testing time periods. We see that both qualitatively and quantitatively, the MAP estimate is much closer to the true Hamiltonian. Fig. 9(b) shows that the error of the estimate is sometimes lower than that of the MAP estimate, but it occasionally spikes to magnitudes that are several times larger than the MAP estimate error. Such behavior is typically indicative of overfitting. Additionally, the spikes become more frequent as time goes on, reflecting the poor potential for long-term forecasting that was also observed in the previous example in Section 6.3.3. In contrast, the absolute Hamiltonian error of the MAP estimate is lower on average and does not display sudden spikes. We hypothesize that this preferable behavior can be attributed to the inherent regularization in the marginal likelihood that penalizes large output covariances [16].
6.4.4 Conclusions
On this example, the negative log posterior was better able to capture the underlying Hamiltonian manifold of the chaotic double pendulum in terms of both Hamiltonian error and visual inspection in phase space compared to the objective. Additionally, the Bayesian system ID framework was shown to provide a reliable method of uncertainty quantification of the output forecasts without the expense of quantifying uncertainty in the neural network parameters.
6.5 Nonlinear Schrödinger equation
The nonlinear Schrödinger equation (NLSE) is a partial differential equation (PDE) that is used for modeling nonlinear waves in plasma physics [49], nonlinear optics [50], quantum mechanics [51], and oceanography [52]. This equation exhibits a rich variety of dynamical phenomena due to the combined action of dispersion and nonlinearity on a narrow-banded field envelope. The one-dimensional parametric NLSE considered here is a particularly suitable model for optical experiments realized with single-mode fibers, see [53] for more details.
We consider the parametric nonlinear Schrödinger equation with a cubic nonlinearity
(38) |
where is a complex-valued function and is the imaginary unit. This parametric nonlinear PDE can be recast as a canonical Hamiltonian PDE by writing the complex-valued wave function in terms of its real and imaginary parts as
with the space-time continuous Hamiltonian
(39) |
where the parameter determines the influence of the non-quadratic terms. In addition to Hamiltonian conservation, this system also conserves mass invariant and momentum invariant defined as
(40) |
6.5.1 Data generation and training
For the learning problem, we consider a gray-box setting where we assume knowledge about the form of the Hamiltonian (39) at the PDE level, but the parameter is uncertain. To differentiate from the true parameter , we denote the uncertain parameter as . We then estimate the MAP value of using Algorithm 2 to yield a FOM based on the estimated parameter. To assess the quality of this model, we study the relative error of the estimated states and the model’s ability to conserve the system Hamiltonian, mass, and momentum.
For this study, we first generate high-dimensional data by numerically solving (38) with true parameter . To discretize the PDE in space, we use a spatial domain , where , with periodic boundary conditions and initial conditions of and . The spatial discretization uses equally spaced grid points for a total state dimension of . We approximate a solution to this discretized PDE using Tao’s integrator with a fine timestep of . Then we collect data over 20s at a timestep of for a total data. After generating the data, we add 20% multiplicative uniform noise . As a means of visualizing how noisy these data are, we consider the system’s wave function . Among other reasons, the wave function is notable because its square modulus can be interpreted as the probability density of the system. This quantity is plotted using the clean solution in Fig. 10(a) and the noisy data in Fig. 10(b).
Next, we project the data onto a low-dimensional subspace so that we can estimate in a reduced setting. For this projection step, we compute a symplectic basis V of the form (21) with reduced dimension using the cotangent lift algorithm described in Section 5.1.2. As discussed in Section 5.2, the multiplicative noise form is not preserved under this dimension-reducing transformation. Therefore, we use the approximate given by Eq. (31) as the observation model for this experiment.
To train the model, we seek to estimate the parameter and the diagonal elements of and for a total of 33 parameters. Since PyTorch does not have a Lyapunov solver needed for H-OpInf, we use the solver from the scipy package, which breaks the computational graph required for auto-differentiation with respect to . As an alternative method of differentiation, we approximate using forward finite difference with a step size of . Then, we optimize using gradient descent with a step size of . We parameterize the covariance matrices as and . The variance parameters are optimized using the same procedure as before with a learning rate of 0.5 that is multiplied by 0.8 every 10 epochs. The priors over and are and , respectively. We initialize optimization variables at 0, at , and at . For this experiment, we use 50 epochs.
The optimization result is used to initialize MCMC. The sampling algorithm that we use is a delayed rejection adaptive Metropolis [54] within Gibbs procedure, where the parameter groups , , and are sampled sequentially. To ensure convergence, we draw samples, and discard the first as burn-in. Fig. 11(a) shows the marginal posterior distribution of with the mean value of 1.955 indicated by the dark blue line. The average squared error of these samples with respect to the true value is . We also plot the Markov chain of in Fig. 11(b) to show that the chain is well-mixed.
6.5.2 Relative state error
We next use these samples to simulate the system over time. To help decorrelate the samples, we only use every 10th sample for a total 1,000 samples. For a given initial condition in the high-dimensional setting, we simulate the learned FOMs until 40s to assess the model performance outside the training period. The performance metric that we consider is the relative state error defined as
(41) |
where and are the true and estimated extended snapshot matrices, respectively. The relative state errors over the training and testing periods are shown in Fig. 12. The dark blue line denotes the relative state error yielded by the sample average. Almost all of the samples of the relative state error over the training period are below 10%. The error of the testing period is larger due to the fact that errors tend to grow over time in dynamical models. These plots show that we are able to make good predictions over the short-term with errors that grow gradually as the simulation time increases.
6.5.3 Conservation of invariants
We also assess the structure-preserving nature of this model by computing the absolute errors in Hamiltonian, mass, and momentum. The spatially-discretized forms of these invariants from Eqs. (39) and (40) are defined as
(42) | ||||
(43) | ||||
(44) |
where , , and is defined similarly. The posterior of the absolute errors of the Hamiltonian , the mass , and the momentum are plotted in Fig. 13. The FOM based on the estimated parameter value exhibits bounded error behavior outside the training data regime for all three conserved quantities, demonstrating that this method is capable of preserving underlying physics.
6.5.4 Varying the reduced dimension
Lastly, we study the parameter estimation accuracy of the proposed reduced-dimensional learning approach for different reduced dimensions. Since we have randomness in the measurement noise and the Adam optimizer, we draw 20 realizations of data and train on each for every reduced dimension value from to . The optimization uses the same procedure described earlier in this section. Box and whisker plots of the squared parameter errors are shown in Fig. 14. The error is naturally quite high for but decreases and levels off at , which indicates that the first three modes based on the SVD of the extended snapshot matrix are relatively clean. For , we observe modes with low values of signal-to-noise ratios which leads to a marginal increase in the estimation error. The shapes of these modes for a single noise realization are shown in Fig. 15.
6.5.5 Conclusions
This example showed that Algorithm 2 was effective at estimating a parameter from a 64-dimensional system in a reduced 8-dimensional subspace with 20% multiplicative measurement noise. Since the computational cost of the likelihood evaluation scales cubically with state dimension , reducing the state dimension by a factor of eight results in evaluation that is roughly 512 times cheaper compared to evaluation with the full state dimension. Furthermore, it was shown that the reduced dimension could be as small as while still achieving comparable parameter estimation accuracy as , suggesting potential savings of up to 9,709 times. Additionally, the posterior FOM was shown to share important physical structure to the underlying system, as shown by its conservation of mass, momentum, and Hamiltonian over time.
7 Conclusions
In this work, we presented a structure-preserving Bayesian framework for learning deep neural network parameterizations of nonseparable Hamiltonian systems from noisy data. This framework uses Gaussian filtering to compute a likelihood based on a stochastic dynamics model that allows for the effects of model and measurement uncertainty to be accounted for differently. Unlike past works which only considered additive Gaussian noise models, we showed that the algorithm can be tailored to other noise models and provided a filter for multiplicative noise as an example. The numerical experiments for low-dimensional systems demonstrated that the proposed Bayesian framework is data-efficient and robust to noise in the data, whereas the standard machine learning approach breaks down in the presence of noisy data. Moreover, the Bayesian framework outperformed the NSSNN, a state-of-the-art machine learning approach, when training on data with multiplicative uniform noise, demonstrating that the Gaussian filtering approach is not overly restrictive for non-Gaussian measurement noise.
We also proposed a novel algorithm for the identification of high-dimensional Hamiltonians that allows for cost-efficient parameter estimation through filtering in a low-dimensional symplectic subspace. Using prior knowledge about the underlying physics, this algorithm was effective in parameter estimation of a nonlinear Schrödinger equation within mean squared error, even with data corrupted by 20% multiplicative uniform noise. The full-order models based on this parameter estimate provided accurate and stable predictions, while also preserving the system Hamiltonian and other invariants of motion. Future work on this topic will explore estimation using partial observations, including improving low-dimensional projections derived from partially unknown/uncertain full-order models.
CRediT authorship contribution statement
Nicholas Galioto: Conceptualization, Methodology, Investigation, Software, Formal analysis, Writing - original draft, Visualization. Harsh Sharma: Conceptualization, Methodology, Software, Writing - review & editing. Boris Kramer: Conceptualization, Validation, Resources, Writing: Review & Editing, Funding Acquisition. Alex Arkady Gorodetsky: Conceptualization, Methodology, Resources, Writing: Review & Editing, Funding Acquisition, Supervision
Declaration of competing interest
Alex Gorodetsky reports a relationship with Geminus AI that includes: employment and equity or stocks. Boris Kramer reports a relationship with ASML Holding US that includes: consulting or advisory. The other authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Data availability
Data will be made available upon request.
Acknowledgments
A.A. Gorodetsky and N. Galioto were funded by the AFOSR Computational Mathematics Program (P.M. Fariba Fahroo) under award FA9550-19-1-0013. B. Kramer and H. Sharma were in part financially supported by the Ministry of Trade, Industry and Energy (MOTIE) and the Korea Institute for Advancement of Technology (KIAT) through the International Cooperative R&D program (No. P0019804, Digital twin based intelligent unmanned facility inspection solutions) and the Applied and Computational Analysis Program of the Office of Naval Research under award N000142212624.
Appendix A Cotangent lift algorithm
In projection-based model reduction, the semi-discrete model is projected onto a low-dimensional subspace. The key idea in structure-preserving model reduction is to preserve the underlying geometric structure during the projection. Since the FOM is a Hamiltonian system with underlying symplectic structure, the projection step is treated as the symplectic inverse of a symplectic lift from the low-dimensional subspace to the state space, see [55]. A symplectic lift is defined by where is a symplectic matrix, i.e., a matrix that satisfies
(45) |
The symplectic inverse of a symplectic matrix is defined by
(46) |
and the symplectic projection can be written as . Proper symplectic decomposition (PSD) [55] is a method to find a symplectic projection matrix that simultaneously minimizes the projection error in a least-squares sense, i.e.,
(47) |
where is the snapshot data matrix, and is the Frobenius norm. Since solving Eq. (47) to obtain the symplectic basis matrix is computationally expensive, the authors in [55] outlined three efficient algorithms for finding approximated optimal solution for the symplectic matrix . These algorithms (cotangent lift, complex SVD, and a nonlinear programming approach) search for a near-optimal solution over different subsets of , the set of all symplectic matrices. The cotangent lift algorithm computes the SVD of the extended snapshot matrix to obtain a POD basis matrix and then constructs the symplectic basis matrix with . Compared to the complex SVD and the nonlinear programming approach, the cotangent lift algorithm is more easily implemented in the offline stage as it only requires the SVD of the extended snapshot matrix . Moreover, the diagonal nature of ensures that the interpretability of and is retained in the reduced setting.
Appendix B Hamiltonian operator inference
In this section, we describe how to estimate the terms and in the quadratic portion of the Hamiltonian (23) using the approach of H-OpInf [44]. First, assume we have an initial estimate of defining the nonlinear terms . Then, define the nonlinear forcings and as
(48) | ||||
(49) |
Utilizing the explicit forms of and , form the nonlinear forcing snapshot matrices
(50) |
Next, project the trajectory (20) and nonlinear (50) snapshot matrices onto the symplectic subspace using the projection matrix (21) found with the cotangent lift [55]
(51) |
Additionally, compute the reduced time-derivative data and from the reduced state trajectory data and using a finite difference scheme. Then, organize the time-derivatives into snapshot matrices
Lastly, infer the reduced operators and by solving the following constrained operator inference problem
(52) |
where denotes the Frobenius norm. The symmetric constraints on the reduced operators and ensure that the ROMs learned via H-OpInf are Hamiltonian. By introducing the terms and , the above inference problem (52) can be reformulated as the Lyapunov equations
(53) |
which can be solved with off-the-shelf Lyapunov solvers.
The constrained operator inference problem in Eq. (52) enforces structure preservation at the reduced level to learn nonintrusive Hamiltonian ROMs that conserve the reduced Hamiltonian function (23). The authors in [44] have shown that the reduced Hamiltonian function can be interpreted as a perturbation of the FOM Hamiltonian , i.e. . Consequently, the H-OpInf ROM yields approximate FOM trajectories, i.e. and , that track the FOM solution trajectories accurately while also conserving a perturbed FOM Hamiltonian which yields bounded FOM energy error.
References
- [1] G. E. Karniadakis, I. G. Kevrekidis, L. Lu, P. Perdikaris, S. Wang, L. Yang, Physics-informed machine learning, Nature Reviews Physics 3 (6) (2021) 422–440.
- [2] M. Raissi, P. Perdikaris, G. Karniadakis, Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations, Journal of Computational Physics 378 (2019) 686–707. doi:https://doi.org/10.1016/j.jcp.2018.10.045.
- [3] K. Linka, A. Schäfer, X. Meng, Z. Zou, G. E. Karniadakis, E. Kuhl, Bayesian physics informed neural networks for real-world nonlinear dynamical systems, Computer Methods in Applied Mechanics and Engineering 402 (2022) 115346.
- [4] L. Zhang, X.-D. Zhang, An optimal filtering algorithm for systems with multiplicative/additive noises, IEEE Signal Processing Letters 14 (7) (2007) 469–472.
- [5] A. Daw, R. Q. Thomas, C. C. Carey, J. S. Read, A. P. Appling, A. Karpatne, Physics-guided architecture (PGA) of neural networks for quantifying uncertainty in lake temperature modeling, in: Proceedings of the 2020 SIAM International Conference on Data Mining (SDM), 2020, pp. 532–540. doi:10.1137/1.9781611976236.60.
- [6] S. Greydanus, M. Dzamba, J. Yosinski, Hamiltonian neural networks, Advances in Neural Information Processing Systems 32 (2019).
- [7] Z. Chen, J. Zhang, M. Arjovsky, L. Bottou, Symplectic recurrent neural networks, in: International Conference on Learning Representations, 2020.
- [8] P. Jin, Z. Zhang, A. Zhu, Y. Tang, G. E. Karniadakis, SympNets: Intrinsic structure-preserving symplectic networks for identifying Hamiltonian systems, Neural Networks 132 (2020) 166–179.
- [9] S. Saemundsson, A. Terenin, K. Hofmann, M. Deisenroth, Variational integrator networks for physically structured embeddings, in: International Conference on Artificial Intelligence and Statistics, PMLR, 2020, pp. 3078–3087.
- [10] M. Cranmer, S. Greydanus, S. Hoyer, P. Battaglia, D. Spergel, S. Ho, Lagrangian neural networks, in: ICLR 2020 Workshop on Integration of Deep Neural Models and Differential Equations, 2019.
- [11] M. Lutter, C. Ritter, J. Peters, Deep Lagrangian networks: Using physics as model prior for deep learning, in: International Conference on Learning Representations, 2019.
- [12] M. A. Roehrl, T. A. Runkler, V. Brandtstetter, M. Tokic, S. Obermayer, Modeling system dynamics with physics-informed neural networks based on Lagrangian mechanics, IFAC-PapersOnLine 53 (2) (2020) 9195–9200, 21st IFAC World Congress. doi:https://doi.org/10.1016/j.ifacol.2020.12.2182.
- [13] S. Mallat, Understanding deep convolutional networks, Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences 374 (2065) (2016) 20150203.
- [14] H. Sheng, C. Yang, PFNN: A penalty-free neural network method for solving a class of second-order boundary-value problems on complex geometries, Journal of Computational Physics 428 (2021) 110085. doi:https://doi.org/10.1016/j.jcp.2020.110085.
- [15] N. Galioto, A. A. Gorodetsky, Bayesian system ID: Optimal management of parameter, model, and measurement uncertainty, Nonlinear Dynamics 102 (1) (2020) 241–267.
- [16] N. Galioto, A. A. Gorodetsky, Likelihood-based generalization of markov parameter estimation and multiple shooting objectives in system identification, Physica D: Nonlinear Phenomena 462 (2024) 134146.
- [17] H. Sharma, N. Galioto, A. A. Gorodetsky, B. Kramer, Bayesian identification of nonseparable Hamiltonian systems using stochastic dynamic models, in: 2022 IEEE 61st Conference on Decision and Control (CDC), IEEE, 2022, pp. 6742–6749.
- [18] T. M. Hamill, J. S. Whitaker, C. Snyder, Distance-dependent filtering of background error covariance estimates in an ensemble Kalman filter, Monthly Weather Review 129 (11) (2001) 2776–2790.
- [19] P. Rajasekaran, N. Satyanarayana, M. Srinath, Optimum linear estimation of stochastic signals in the presence of multiplicative noise, IEEE Transactions on Aerospace and Electronic Systems AES-7 (3) (1971) 462–468.
- [20] W. Liu, Optimal filtering for discrete-time linear systems with time-correlated multiplicative measurement noises, IEEE Transactions on Automatic Control 61 (7) (2015) 1972–1978.
- [21] F. Wang, V. Balakrishnan, Robust Kalman filters for linear time-varying systems with stochastic parametric uncertainties, IEEE Transactions on Signal Processing 50 (4) (2002) 803–813.
- [22] B. Chow, W. Birkemeier, A new recursive filter for systems with multiplicative noise, IEEE Transactions on Information Theory 36 (6) (1990) 1430–1435. doi:10.1109/18.59939.
- [23] F. Yang, Z. Wang, Y. Hung, Robust Kalman filtering for discrete time-varying uncertain systems with multiplicative noises, IEEE Transactions on Automatic Control 47 (7) (2002) 1179–1183. doi:10.1109/TAC.2002.800668.
- [24] X. Kai, L. Liangdong, L. Yiwu, Robust extended Kalman filtering for nonlinear systems with multiplicative noises, Optimal Control Applications and Methods 32 (1) (2011) 47–63.
- [25] G. Berkooz, P. Holmes, J. L. Lumley, The proper orthogonal decomposition in the analysis of turbulent flows, Annual review of fluid mechanics 25 (1) (1993) 539–575.
- [26] G. Rozza, D. B. P. Huynh, A. T. Patera, Reduced basis approximation and a posteriori error estimation for affinely parametrized elliptic coercive partial differential equations: Application to transport and continuum mechanics, Archives of Computational Methods in Engineering 15 (3) (2008) 229–275.
- [27] M. Guo, J. S. Hesthaven, Data-driven reduced order modeling for time-dependent problems, Computer methods in applied mechanics and engineering 345 (2019) 75–99.
- [28] Y. Kim, Y. Choi, D. Widemann, T. Zohdi, A fast and accurate physics-informed neural network reduced order model with shallow masked autoencoder, Journal of Computational Physics 451 (2022) 110841. doi:https://doi.org/10.1016/j.jcp.2021.110841.
- [29] K. Lee, K. T. Carlberg, Model reduction of dynamical systems on nonlinear manifolds using deep convolutional autoencoders, Journal of Computational Physics 404 (2020) 108973. doi:https://doi.org/10.1016/j.jcp.2019.108973.
- [30] H. Sharma, H. Mu, P. Buchfink, R. Geelen, S. Glas, B. Kramer, Symplectic model reduction of Hamiltonian systems using data-driven quadratic manifolds, Computer Methods in Applied Mechanics and Engineering 417 (2023) 116402. doi:https://doi.org/10.1016/j.cma.2023.116402.
- [31] R. Geelen, S. Wright, K. Willcox, Operator inference for non-intrusive model reduction with quadratic manifolds, Computer Methods in Applied Mechanics and Engineering 403 (2023) 115717.
- [32] D. Serra, F. Ruggiero, A. Donaire, L. R. Buonocore, V. Lippiello, B. Siciliano, Control of nonprehensile planar rolling manipulation: A passivity-based approach, IEEE Transactions on Robotics 35 (2) (2019) 317–329.
- [33] G. Li, S. Naoz, M. Holman, A. Loeb, Chaos in the test particle eccentric Kozai–Lidov mechanism, The Astrophysical Journal 791 (2) (2014) 86.
- [34] E. Forest, Geometric integration for particle accelerators, Journal of Physics A: Mathematical and General 39 (19) (2006) 5321.
- [35] R. Salmon, Hamiltonian fluid mechanics, Annual Review of Fluid Mechanics 20 (1) (1988) 225–256.
- [36] J. Colliander, M. Keel, G. Staffilani, H. Takaoka, T. Tao, Transfer of energy to high frequencies in the cubic defocusing nonlinear Schrödinger equation, Inventiones Mathematicae 181 (1) (2010) 39–113.
- [37] S. Särkkä, Bayesian filtering and smoothing, Cambridge University Press, 2013.
- [38] C. Andrieu, A. Doucet, R. Holenstein, Particle Markov chain Monte Carlo methods, Journal of the Royal Statistical Society Series B: Statistical Methodology 72 (3) (2010) 269–342.
- [39] K. Wu, T. Qin, D. Xiu, Structure-preserving method for reconstructing unknown Hamiltonian systems from trajectory data, SIAM Journal on Scientific Computing 42 (6) (2020) A3704–A3729.
- [40] S. Xiong, Y. Tong, X. He, S. Yang, C. Yang, B. Zhu, Nonseparable symplectic neural networks, in: International Conference on Learning Representations, 2021.
- [41] N. Galioto, A. A. Gorodetsky, Bayesian identification of Hamiltonian dynamics from symplectic data, in: 2020 59th IEEE Conference on Decision and Control (CDC), IEEE, 2020, pp. 1190–1195.
- [42] M. David, F. Méhats, Symplectic learning for Hamiltonian neural networks, Journal of Computational Physics 494 (2023) 112495. doi:https://doi.org/10.1016/j.jcp.2023.112495.
- [43] M. Tao, Explicit symplectic approximation of nonseparable Hamiltonians: Algorithm and long time performance, Physical Review E 94 (4) (2016) 043303.
- [44] H. Sharma, Z. Wang, B. Kramer, Hamiltonian operator inference: Physics-preserving learning of reduced-order models for canonical Hamiltonian systems, Physica D: Nonlinear Phenomena 431 (2022) 133122.
- [45] D. P. Kingma, J. Ba, Adam: A method for stochastic optimization, in: International Conference on Learning Representations, 2015.
- [46] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. Kopf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang, J. Bai, S. Chintala, PyTorch: An imperative style, high-performance deep learning library, in: H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, R. Garnett (Eds.), Advances in Neural Information Processing Systems, Vol. 32, Curran Associates, Inc., 2019.
- [47] A. S. Krishnapriyan, A. F. Queiruga, N. B. Erichson, M. W. Mahoney, Learning continuous models for continuous physics, Communications Physics 6 (1) (2023) 319.
- [48] A. Olivier, M. D. Shields, L. Graham-Brady, Bayesian neural networks for uncertainty quantification in data-driven materials modeling, Computer methods in applied mechanics and engineering 386 (2021) 114079.
- [49] Z.-Z. Lan, B.-L. Guo, Nonlinear waves behaviors for a coupled generalized nonlinear Schrödinger–Boussinesq system in a homogeneous magnetized plasma, Nonlinear Dynamics 100 (2020) 3771–3784.
- [50] Z. Yan, Generalized method and its application in the higher-order nonlinear Schrödinger equation in nonlinear optical fibres, Chaos, Solitons & Fractals 16 (5) (2003) 759–766.
- [51] V. N. Serkin, A. Hasegawa, Exactly integrable nonlinear Schrodinger equation models with varying dispersion, nonlinearity and gain: Application for soliton dispersion, IEEE Journal of selected topics in Quantum Electronics 8 (3) (2002) 418–431.
- [52] N. Akhmediev, A. Ankiewicz, J. M. Soto-Crespo, Rogue waves and rational solutions of the nonlinear Schrödinger equation, Physical Review E 80 (2) (2009) 026601.
- [53] F. Copie, S. Randoux, P. Suret, The physics of the one-dimensional nonlinear Schrödinger equation in fiber optics: Rogue waves, modulation instability and self-focusing phenomena, Reviews in Physics 5 (2020) 100037.
- [54] H. Haario, M. Laine, A. Mira, E. Saksman, DRAM: Efficient adaptive MCMC, Statistics and computing 16 (2006) 339–354.
- [55] L. Peng, K. Mohseni, Symplectic model reduction of Hamiltonian systems, SIAM Journal on Scientific Computing 38 (1) (2016) A1–A27.