Preprints
https://doi.org/10.5194/egusphere-2026-6173
https://doi.org/10.5194/egusphere-2026-6173
12 Oct 2026
 | 12 Oct 2026
Status: this preprint is open for discussion and under review for Hydrology and Earth System Sciences (HESS).

Technical note: MixSIAPy – Bayesian stable isotope mixing models in Python with multi-backend inference and formula-based compositional regression

Jing Yang, Heng Dai, Ming Ye, Su Cheng, Yonghua Zhao, and Hui Qian

Abstract. Bayesian stable isotope mixing models quantify source contributions, but environmental studies increasingly require testing how multiple interacting drivers alter entire source compositions. The widely used R package MixSIAR restricts covariate structures, while post hoc regression of estimated proportions neither propagates posterior uncertainty nor preserves compositional dependence. Its reliance on a separately installed JAGS engine also constrains direct evaluation of gradient based samplers and accelerator-aware computation. We here introduce MixSIAPy, an open-source Python framework addressing these statistical and computational limitations while retaining established MixSIAR model structures. Its principal methodological contribution is formula-based compositional regression embedded directly in the mixing-model likelihood. Multiple categorical and numerical predictors and their interactions act jointly on source compositions in isometric log-ratio coordinates, with regression, grouping, source, and error parameters estimated in one posterior. A single PyMC model can be fitted through four interchangeable No-U-Turn Sampler backends, enabling CPU sampling and optional GPU execution. A shared engine supports scripted, local graphical, and hosted web workflows with reproducible outputs. Across 20 paired benchmarks, 19 converged in both implementations and showed close posterior correspondence; MixSIAPy reached an acceptable posterior faster in 13 cases. Backend performance was model dependent, and GPUs became advantageous only for some models at high chain parallelism. In an additional crop-water-uptake case study, the model identified a biomass associated shift from shallow to middle soil water in linseed, whereas broader effects remained uncertain. MixSIAPy thus enables interacting environmental controls to be tested within source-partitioning models instead of through separate analyses of uncertain estimated proportions.

Competing interests: At least one of the (co-)authors is a member of the editorial board of Hydrology and Earth System Sciences.

Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors. Views expressed in the text are those of the authors and do not necessarily reflect the views of the publisher.
Share
Jing Yang, Heng Dai, Ming Ye, Su Cheng, Yonghua Zhao, and Hui Qian

Status: open (until 23 Nov 2026)

Comment types: AC – author | RC – referee | CC – community | EC – editor | CEC – chief editor | : Report abuse
Jing Yang, Heng Dai, Ming Ye, Su Cheng, Yonghua Zhao, and Hui Qian
Jing Yang, Heng Dai, Ming Ye, Su Cheng, Yonghua Zhao, and Hui Qian
Metrics will be available soon.
Latest update: 12 Oct 2026
Download
Short summary
Scientists use stable isotopes to estimate where water, food, or pollutants come from, but existing tools can struggle with several interacting environmental drivers. We developed MixSIAPy, accessible Python package that tests these effects within one model and works through code or graphical user interfaces. Comparisons with an established tool produced closely matching results, and a crop-water-uptake study revealed a biomass-related shift in plant water uptake between soil layers.
Share