Supplementary code to replicate key experiments from our
paper.
The code trains Bayesian polynomial chaos surrogates (PCE/aPC, fitted in Stan via CmdStanPy) and uses them for amortized Bayesian inference with normalizing flows (BayesFlow, JAX backend). It covers standard surrogate-based ABI (SABI) and the uncertainty-aware variant (UA-SABI), which propagates surrogate uncertainty. ABI on the true model and Stan-based MCMC (point-estimate surrogate, expected-posterior surrogate, true model) serve as references. Three case studies are included:
- Analytical toy model (log-sin): full method comparison plus runtime study, no external data needed
- CO₂ storage benchmark (3 parameters): method comparison plus runtime study, based on the data of Köppel et al. (2017), DOI: 10.5281/zenodo.933827
- Microbially induced calcite precipitation (MICP, 4 parameters): method comparison including inference on real CT measurements, based on the model of Hommel et al. (2015), DOI: 10.1002/2014WR016503
Each experiment is defined by a JSON config in configs/. Running python main.py --config (Python 3.11) trains the surrogate, performs ABI or MCMC, and saves posterior draws, calibration diagnostics and plots to results//. The paper figures are created with the notebooks in notebooks/. For CO₂ and MICP, the simulation data must be placed in data/CO2_Response/ and data/MICP/full_complexity_model/. (2026-01-16)