Posterior marginalization accelerates Bayesian inference for dynamical systems

Elba Raimúndez, Michael Fedders, Jan HasenauerbioRxiv 2022 · DOI

Abstract

Bayesian inference is an important method in the life and natural sciences for learning from data. It provides information about parameter uncertainties, and thereby the reliability of models and their predictions. Yet, generating representative samples from the Bayesian posterior distribution is often computationally challenging. Here, we present an approach that lowers the computational complexity of sample generation for problems with scaling, offset and noise parameters. The proposed method is based on the marginalization of the posterior distribution, which reduces the dimensionality of the sampling problem. We provide analytical results for a broad class of problems and show that the method is suitable for a large number of applications. Subsequently, we demonstrate the benefit of the approach for various application examples from the field of systems biology. We report a substantial improvement up to 50 times in the effective sample size per unit of time, in particular when applied to multi-modal posterior problems. As the scheme is broadly applicable, it will facilitate Bayesian inference in different research fields.

Introduction

In systems biology and other fields utilizing dynamical models, researchers often rely on Ordinary Differential Equations (ODEs) to describe biological processes. To calibrate these models, unknown parameters such as reaction rates must be estimated from experimental data. However, experimental data is rarely a direct observation of the system; it is typically subject to measurement processes involving scaling factors, offsets, and random noise.

In standard Bayesian inference, these "observation parameters" are treated as additional dimensions in the parameter space. This inflation of dimensionality makes Markov chain Monte Carlo (MCMC) sampling—the primary tool for uncertainty quantification—computationally expensive and often prone to poor convergence in complex, high-dimensional landscapes.

Methods: The Marginalization Approach

The authors propose a marginalization-based approach to circumvent the dimensionality bottleneck. Instead of sampling biological parameters ($\theta$) and observation parameters ($s, b, \sigma^2$) simultaneously, the observation parameters are analytically "integrated out" of the posterior distribution.

Comparison of standard and marginalization-based Bayesian inference workflows. Panel A shows the conceptual reduction in dimensionality through marginalization. Panel B details the standard joint sampling approach. Panel C outlines the proposed two-step marginalization approach, where biological parameters are sampled first, followed by conditional sampling of observation parameters.

Workflow

  1. Analytical Integration: By utilizing specific conjugate priors (such as the Normal-Inverse-Gamma distribution), the authors derived closed-form expressions for the marginal likelihood. This allows the impact of scaling and noise to be calculated directly rather than estimated through sampling.
  2. Step 1 (Sampling): MCMC is performed only on the lower-dimensional space of biological parameters ($\theta$).
  3. Step 2 (Conditional Sampling): If the values of the observation parameters are required, they can be sampled post-hoc using simple, pre-derived conditional formulas.

The researchers provided analytical solutions for ten common scenarios, including additive/multiplicative Gaussian noise and outlier-robust Laplace noise.

Key Insights and Results

The method was benchmarked across five models ranging from simple toy systems to large-scale signaling pathways (e.g., a Gastric cancer model with 57 parameters).

  • Efficiency Gains: The approach yielded a massive speedup, with the Effective Sample Size (ESS) per unit of time increasing by up to 50x in certain models. Evaluating the analytical marginal likelihood was found to be five orders of magnitude faster than numerical integration.
  • Landscape Reshaping: Beyond simple dimensionality reduction, marginalization alters the posterior landscape. In multi-modal problems, it effectively lowers the "energy barriers" between different solutions, allowing the sampler to jump between modes up to four orders of magnitude more frequently than standard methods.
  • Enabling Large-Scale Inference: For the complex Gastric cancer model, standard joint sampling failed to converge after 150 hours. In contrast, the marginalization approach achieved reproducible, converged results within a practical timeframe.

Limitations and Future Directions

While powerful, the method currently relies on the use of conjugate priors to maintain analytical tractability. Researchers requiring highly non-standard priors may still need to resort to numerical integration. Additionally, the current derivations assume independent measurement noise. Future work aims to extend these analytical solutions to correlated noise structures and to derive gradients for use with advanced samplers like Hamiltonian Monte Carlo (HMC).

Summary updated

Abstract

Abstract Bayesian inference is an important method in the life and natural sciences for learning from data. It provides information about parameter uncertainties, and thereby the reliability of models and their predictions. Yet, generating representative samples from the Bayesian posterior distribution is often computationally challenging. Here, we present an approach that lowers the computational complexity of sample generation for problems with scaling, offset and noise parameters. The proposed method is based on the marginalization of the posterior distribution, which reduces the dimensionality of the sampling problem. We provide analytical results for a broad class of problems and show that the method is suitable for a large number of applications. Subsequently, we demonstrate the benefit of the approach for various application examples from the field of systems biology. We report a substantial improvement up to 50 times in the effective sample size per unit of time, in particular when applied to multi-modal posterior problems. As the scheme is broadly applicable, it will facilitate Bayesian inference in different research fields.
BibTeX
@misc{raimundez2022posterior,
  author = {Elba Raimúndez and Michael Fedders and Jan Hasenauer},
  title = {{Posterior marginalization accelerates Bayesian inference for dynamical systems}},
  year = {2022},
  doi = {10.1101/2022.12.02.518841},
  howpublished = {bioRxiv},
}
Figure