Fitting Bayesian stable isotope mixing models in under a second with prior-data fitted networks
Andrew C. Parnell, Richard Inger, Brice X. Semmens, Eric J. Ward, Andrew L. Jackson, Brian C. Stock
Abstract
Bayesian mixing models, most widely through the MixSIAR software, are the standard way to estimate diet and source proportions from stable isotopes and other biotracers. MixSIAR fits each model by Markov chain Monte Carlo (MCMC), which takes minutes to hours and often fails to converge at standard run lengths. We present MixSIARPFN, which replaces MixSIAR's MCMC with prior-data fitted networks: transformer networks trained once on millions of datasets simulated from MixSIAR's own model and priors. For a new dataset, they return the posterior distribution of every diet proportion and model parameter in a single pass. The networks cover MixSIAR's model class, and an R package keeps MixSIAR's input files and function calls. On 400 simulated datasets with known diets, held out from all development, MixSIARPFN was 3% to 4% less accurate than MCMC on average for MixSIAR's usual error structures, and its 95% intervals contained the true diet as often (96% to 97% of the time). Each fit took under a second on one processor core, over 3,000 times faster than MixSIAR. When simulated data broke MixSIAR's assumptions, MixSIARPFN lost accuracy no faster than MCMC, except with heavy-tailed or skewed errors in one design (up to 13% less accurate). It matched MixSIAR closely on five of MixSIAR's nine real examples. It differed more on the geese and wolves examples, but MixSIAR's own model fits these data poorly, and changing MixSIAR's error structure moved its answer as much as switching to MixSIARPFN. A sensitivity analysis of 3,600 fits took an hour instead of about half a year. MixSIARPFN makes Bayesian mixing models practical where MCMC is not, so that users can fit every candidate model, analyse many datasets and test sensitivity to discrimination factors and priors. We recommend confirming the final model with MCMC where the data fit the model poorly or conclusions rest on small differences.
Create a lesson
Metadata
- Categories
- stat.AP, cs.LG, stat.ML
- Comments
- 38 pages, 9 figures, Supporting Information included. R package: https://github.com/andrewcparnell/MixSIARPFN
Related papers
Bayesian Data Integration and Model Updating in Probabilistic Digital Twins
Shared title terminologystat.APDafydd Cotoarbă, Antonis Mavritsakis, Timo Schweckendiek et al.
Bayesian Spatio-temporal Modeling of Multi-Site Wastewater Surveillance Data
Shared title terminologystat.APK. Ken Peng, Chengqian Xian, Charmaine B. Dean et al.
When Do Sports Leagues Stop Being Competitive? Bayesian Detection of Competitive-Balance Eras from Match-Level Data
Shared title terminologystat.APXinran Li, Maoran Xu, Guanyu Hu
Where should we meet? Ad hoc selection of emergency staging areas with open data
Shared title terminologystat.APMoritz Schneider, Gustav Leinen, Alexander Fekete et al.
B-Fair - A Bayesian spatial individual fairness framework
Shared title terminologystat.APGandhi Jafta, Inger Fabris-Rotelli, Emma Ruttkamp-Bloem et al.
Shooting for Fit: Risk-Averse Stochastic Roster Construction from Bayesian Shot-Pattern Models
Shared title terminologystat.APYue Yu, Cong Zhang, David Crandall et al.