Double Normalizing Flows: Flexible Bayesian Gaussian Process ODEs Learning

Jian Xu, Shian Du, Junmei Yang, Xinghao Ding, John W. Paisley, Delu Zeng · OpenReview

Abstract

Recently, Gaussian processes have been used to model the vector field of continuous dynamical systems, referred to as GPODEs, which are characterized by a probabilistic ODE equation. Bayesian inference for these models has been extensively studied and applied in tasks such as time series prediction. However, the use of standard GPs with basic kernels like squared exponential kernels has been common in GPODE research, limiting the model's ability to represent complex scenarios. To address this limitation, we introduce normalizing flows to reparameterize the ODE vector field, resulting in a data-driven prior distribution, thereby increasing flexibility and expressive power. We develop a data-driven variational learning algorithm that utilizes analytically tractable probability density functions of normalizing flows, enabling simultaneous learning and inference of unknown continuous dynamics. Additionally, we also apply normalizing flows to the posterior inference of GP ODEs to resolve the issue of strong mean-field assumptions in posterior inference. By applying normalizing flows in both these ways, our model improves accuracy and uncertainty estimates for Bayesian Gaussian Process ODEs. We validate the effectiveness of our approach on simulated dynamical systems and real-world human motion data, including time series prediction and missing data recovery tasks. Experimental results show that our proposed method effectively captures model uncertainty while improving accuracy.

Introduction: The Bottlenecks of GP-ODEs

Modeling continuous-time dynamical systems—where a state $x$ evolves according to $dx/dt = f(x)$—is a cornerstone of physics and engineering. Gaussian Process ODEs (GP-ODEs) are a popular Bayesian approach to this, where the unknown vector field $f$ is treated as a Gaussian Process.

However, traditional GP-ODEs face two major bottlenecks:

  1. Prior Rigidity: They typically rely on standard kernels (like Squared Exponential), which struggle to represent complex, non-stationary, or multi-modal vector fields.
  2. Posterior Simplification: To keep math tractable, researchers often use "mean-field" Gaussian approximations for the posterior. This assumes different dimensions of the system are independent in the posterior, which is rarely true for coupled dynamical systems.

The authors aim to break these bottlenecks to better model real-world data, like human motion, where dynamics are intricate and uncertainty is non-Gaussian.

Methodology: The "Double" Flow Approach

The "Double" in the title refers to two distinct applications of Normalizing Flows—a technique that transforms simple probability distributions into complex ones through a sequence of invertible mappings.

The GP-DNF framework: True vector field vs. learned field and posterior samples.
  1. Flow #1 (The Prior): Instead of a standard GP, the authors define the vector field as a GP transformed by a normalizing flow ($G_K \circ f$). This "warps" the GP, allowing it to represent much more expressive, data-driven prior distributions while remaining a valid stochastic process.
  2. Flow #2 (The Posterior): During inference, the authors use a second normalizing flow to parameterize the variational distribution of the "inducing variables" (sparse points used to represent the GP). This allows the model to capture complex dependencies and non-Gaussian shapes in the posterior distribution that a standard Gaussian approximation would miss.

The model is trained by optimizing the Evidence Lower Bound (ELBO) using stochastic gradient descent, combining Variational Sparse GPs (SVGP) with numerical ODE solvers.

Key Insights: Expressivity and Calibration

The "Double" approach is more than the sum of its parts. Flow #1 makes the model capable of learning complex dynamics, while Flow #2 ensures the model can represent its uncertainty about those dynamics accurately. By warping the GP prior, the model effectively learns a non-stationary kernel tailored to the specific dataset, moving away from the "one-size-fits-all" approach of basic RBF kernels.

Detailed posterior samples illustrating the model's ability to capture complex trajectory distributions and vector field uncertainty.

A key finding is the improvement in Uncertainty Calibration. Standard GP-ODEs often underestimate their own error. By using flows in the posterior, GP-DNF produces confidence intervals that contain the true data points much more reliably (81% vs 60% in tests).

Evaluation and Results

The authors evaluated their approach on three main benchmarks:

  • Van der Pol (VDP) Oscillator: A classic 2D nonlinear dynamical system. GP-DNF achieved a Mean Squared Error (MSE) of 0.03, compared to 0.10 for Latent SDE and 0.13 for standard GP-ODE.
  • FitzHugh-Nagumo (FHN) Oscillator: Used to test "missing data recovery". The model successfully "filled in the gaps" where data was missing, outperforming all other methods in both MSE and MNLL.
  • CMU Human Motion Capture (MoCap): Real-world high-dimensional data projected into a 5D latent space. GP-DNF consistently achieved the lowest Mean Negative Log Likelihood (MNLL), indicating a superior fit to the underlying probability distribution.

Conclusion

While powerful, the GP-DNF framework involves a trade-off in computational cost and requires careful hyperparameter tuning. However, the gains in accuracy and uncertainty quantification make it a robust choice for modeling complex dynamical systems. Future research could explore more efficient flow architectures to scale the framework for larger engineering applications.

Summary updated

BibTeX
@misc{xu2023double,
  author = {Jian Xu and Shian Du and Junmei Yang and Xinghao Ding and John W. Paisley and Delu Zeng},
  title = {{Double Normalizing Flows: Flexible Bayesian Gaussian Process ODEs Learning}},
  year = {2023},
  eprint = {2309.09222},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.09222},
}
Figure