diff --git a/joss.05702/10.21105.joss.05702.crossref.xml b/joss.05702/10.21105.joss.05702.crossref.xml new file mode 100644 index 0000000000..0d39cbcd7e --- /dev/null +++ b/joss.05702/10.21105.joss.05702.crossref.xml @@ -0,0 +1,655 @@ + + + + 20230922T033927-b00a71b076355f7f9368b35a7971c9c2c7983f77 + 20230922033927 + + JOSS Admin + admin@theoj.org + + The Open Journal + + + + + Journal of Open Source Software + JOSS + 2475-9066 + + 10.21105/joss + https://joss.theoj.org + + + + + 09 + 2023 + + + 8 + + 89 + + + + BayesFlow: Amortized Bayesian Workflows With Neural +Networks + + + + Stefan T. + Radev + https://orcid.org/0000-0002-6702-9559 + + + Marvin + Schmitt + https://orcid.org/0000-0003-1293-820X + + + Lukas + Schumacher + https://orcid.org/0000-0003-1512-8288 + + + Lasse + Elsemüller + https://orcid.org/0000-0003-0368-720X + + + Valentin + Pratz + https://orcid.org/0000-0001-8371-3417 + + + Yannik + Schälte + https://orcid.org/0000-0003-1293-820X + + + Ullrich + Köthe + https://orcid.org/0000-0001-6036-1287 + + + Paul-Christian + Bürkner + https://orcid.org/0000-0001-5765-8995 + + + + 09 + 22 + 2023 + + + 5702 + + + 10.21105/joss.05702 + + + http://creativecommons.org/licenses/by/4.0/ + http://creativecommons.org/licenses/by/4.0/ + http://creativecommons.org/licenses/by/4.0/ + + + + Software archive + 10.5281/zenodo.8346393 + + + GitHub review issue + https://github.com/openjournals/joss-reviews/issues/5702 + + + + 10.21105/joss.05702 + https://joss.theoj.org/papers/10.21105/joss.05702 + + + https://joss.theoj.org/papers/10.21105/joss.05702.pdf + + + + + + TensorFlow: A system for large-scale machine +learning + Abadi + Osdi + 2016 + 16 + 2016 + Abadi, M., Barham, P., Chen, J., +Chen, Z., Davis, A., Dean, J., Devin, M., Ghemawat, S., Irving, G., +Isard, M., & others. (2016). TensorFlow: A system for large-scale +machine learning. Osdi, 16(2016), 265–283. + + + ABCpy: A high-performance computing +perspective to approximate Bayesian computation + Dutta + Journal of Statistical +Software + 7 + 100 + 10.18637/jss.v100.i07 + 2021 + Dutta, R., Schoengens, M., +Pacchiardi, L., Ummadisingu, A., Widmer, N., Künzli, P., Onnela, J.-P., +& Mira, A. (2021). ABCpy: A high-performance computing perspective +to approximate Bayesian computation. Journal of Statistical Software, +100(7), 1–38. +https://doi.org/10.18637/jss.v100.i07 + + + Measuring QCD splittings with invertible +networks + Bieringer + SciPost Physics + 6 + 10 + 10.21468/SciPostPhys.10.6.126 + 2021 + Bieringer, S., Butter, A., Heimel, +T., Höche, S., Köthe, U., Plehn, T., & Radev, S. T. (2021). +Measuring QCD splittings with invertible networks. SciPost Physics, +10(6), 126. +https://doi.org/10.21468/SciPostPhys.10.6.126 + + + Flexible and efficient simulation-based +inference for models of decision-making + Boelts + Elife + 11 + 2022 + Boelts, J., Lueckmann, J.-M., Gao, +R., & Macke, J. H. (2022). Flexible and efficient simulation-based +inference for models of decision-making. Elife, 11, +e77220. + + + Some models are useful, but how do we know +which ones? Towards a unified Bayesian model taxonomy + Bürkner + arXiv preprint + 2022 + Bürkner, P.-C., Scholz, M., & +Radev, S. T. (2022). Some models are useful, but how do we know which +ones? Towards a unified Bayesian model taxonomy. arXiv +Preprint. + + + A Bayesian brain model of adaptive behavior: +An application to the wisconsin card sorting task + D’Alessandro + PeerJ + 8 + 2020 + D’Alessandro, M., Radev, S. T., Voss, +A., & Lombardi, L. (2020). A Bayesian brain model of adaptive +behavior: An application to the wisconsin card sorting task. PeerJ, 8, +e10316. + + + TensorFlow distributions + Dillon + 2017 + Dillon, J. V., Langmore, I., Tran, +D., Brevdo, E., Vasudevan, S., Moore, D., Patton, B., Alemi, A., +Hoffman, M., & Saurous, R. A. (2017). TensorFlow distributions. +https://arxiv.org/abs/1711.10604 + + + A deep learning method for comparing Bayesian +hierarchical models + Elsemüller + arXiv preprint +arXiv:2301.11873 + 2023 + Elsemüller, L., Schnuerch, M., +Bürkner, P.-C., & Radev, S. T. (2023). A deep learning method for +comparing Bayesian hierarchical models. arXiv Preprint +arXiv:2301.11873. + + + Bayesian workflow + Gelman + arXiv preprint + 2020 + Gelman, A., Vehtari, A., Simpson, D., +Margossian, C. C., Carpenter, B., Yao, Y., Kennedy, L., Gabry, J., +Bürkner, P.-C., & Modrák, M. (2020). Bayesian workflow. arXiv +Preprint. + + + A general integrative neurocognitive modeling +framework to jointly describe EEG and decision-making on single +trials + Ghaderi-Kangavari + 10.1007/s42113-023-00167-4 + 2022 + Ghaderi-Kangavari, A., Rad, J. A., +& Nunez, M. D. (2022). A general integrative neurocognitive modeling +framework to jointly describe EEG and decision-making on single trials. +https://doi.org/10.1007/s42113-023-00167-4 + + + Automatic posterior transformation for +likelihood-free inference + Greenberg + International Conference on Machine +Learning + 97 + 2019 + Greenberg, D., Nonnenmacher, M., +& Macke, J. (2019). Automatic posterior transformation for +likelihood-free inference. International Conference on Machine Learning, +97, 2404–2414. + + + Towards reliable parameter extraction in MEMS +final module testing using Bayesian inference + Heringhaus + Sensors + 14 + 22 + 10.3390/s22145408 + 2022 + Heringhaus, M. E., Zhang, Y., +Zimmermann, A., & Mikelsons, L. (2022). Towards reliable parameter +extraction in MEMS final module testing using Bayesian inference. +Sensors, 22(14), 5408. +https://doi.org/10.3390/s22145408 + + + ELFI: Engine for likelihood-free +inference + Lintusaari + Journal of Machine Learning +Research + 16 + 19 + 2018 + Lintusaari, J., Vuollekoski, H., +Kangasrääsiö, A., Skytén, K., Järvenpää, M., Marttinen, P., Gutmann, M. +U., Vehtari, A., Corander, J., & Kaski, S. (2018). ELFI: Engine for +likelihood-free inference. Journal of Machine Learning Research, 19(16), +1–7. http://jmlr.org/papers/v19/17-374.html + + + Truncated marginal neural ratio +estimation + Miller + Advances in Neural Information Processing +Systems + 34 + 2021 + Miller, B. K., Cole, A., Forré, P., +Louppe, G., & Weniger, C. (2021). Truncated marginal neural ratio +estimation. Advances in Neural Information Processing Systems, 34, +129–143. + + + Amortized inference with user +simulations + Moon + Proceedings of the 2023 CHI Conference on +Human Factors in Computing Systems + 2023 + Moon, H.-S., Oulasvirta, A., & +Lee, B. (2023). Amortized inference with user simulations. Proceedings +of the 2023 CHI Conference on Human Factors in Computing Systems, +1–20. + + + Model updating of wind turbine blade cross +sections with invertible neural networks + Noever-Castelos + Wind Energy + 3 + 25 + 2022 + Noever-Castelos, P., Ardizzone, L., +& Balzani, C. (2022). Model updating of wind turbine blade cross +sections with invertible neural networks. Wind Energy, 25(3), +573–599. + + + Normalizing flows for probabilistic modeling +and inference + Papamakarios + Journal of Machine Learning +Research + 1 + 22 + 2021 + Papamakarios, G., Nalisnick, E., +Rezende, D. J., Mohamed, S., & Lakshminarayanan, B. (2021). +Normalizing flows for probabilistic modeling and inference. Journal of +Machine Learning Research, 22(1). + + + Sequential neural likelihood: Fast +likelihood-free inference with autoregressive flows + Papamakarios + The 22nd International Conference on +Artificial Intelligence and Statistics + 2019 + Papamakarios, G., Sterratt, D., & +Murray, I. (2019). Sequential neural likelihood: Fast likelihood-free +inference with autoregressive flows. The 22nd International Conference +on Artificial Intelligence and Statistics, +837–848. + + + Amortized Bayesian model comparison with +evidential deep learning + Radev + arXiv preprint + 10.1109/TNNLS.2021.3124052 + 2020 + Radev, S. T., D’Alessandro, M., +Mertens, U. K., Voss, A., Köthe, U., & Bürkner, P.-C. (2020). +Amortized Bayesian model comparison with evidential deep learning. arXiv +Preprint. +https://doi.org/10.1109/TNNLS.2021.3124052 + + + OutbreakFlow: Model-based Bayesian inference +of disease outbreak dynamics with invertible neural networks and its +application to the COVID-19 pandemics in Germany + Radev + PLoS computational biology + 10 + 17 + 10.1371/journal.pcbi.1009472 + 2021 + Radev, S. T., Graw, F., Chen, S., +Mutters, N. T., Eichel, V. M., Bärnighausen, T., & Köthe, U. (2021). +OutbreakFlow: Model-based Bayesian inference of disease outbreak +dynamics with invertible neural networks and its application to the +COVID-19 pandemics in Germany. PLoS Computational Biology, 17(10), +e1009472. +https://doi.org/10.1371/journal.pcbi.1009472 + + + BayesFlow: Learning complex stochastic models +with invertible neural networks + Radev + IEEE Transactions on Neural Networks and +Learning Systems + 10.1109/TNNLS.2020.3042395 + 2020 + Radev, S. T., Mertens, U. K., Voss, +A., Ardizzone, L., & Köthe, U. (2020). BayesFlow: Learning complex +stochastic models with invertible neural networks. IEEE Transactions on +Neural Networks and Learning Systems. +https://doi.org/10.1109/TNNLS.2020.3042395 + + + JANA: Jointly amortized neural approximation +of complex Bayesian models + Radev + arXiv preprint +arXiv:2302.09125 + 2023 + Radev, S. T., Schmitt, M., Pratz, V., +Picchini, U., Köthe, U., & Bürkner, P.-C. (2023). JANA: Jointly +amortized neural approximation of complex Bayesian models. arXiv +Preprint arXiv:2302.09125. + + + Graphical test for discrete uniformity and +its applications in goodness-of-fit evaluation and multiple sample +comparison + Säilynoja + Statistics and Computing + 2 + 32 + 10.1007/s11222-022-10090-6 + 2022 + Säilynoja, T., Bürkner, P.-C., & +Vehtari, A. (2022). Graphical test for discrete uniformity and its +applications in goodness-of-fit evaluation and multiple sample +comparison. Statistics and Computing, 32(2), 32. +https://doi.org/10.1007/s11222-022-10090-6 + + + Probabilistic programming in python using +PyMC3 + Salvatier + PeerJ Computer Science + 2 + 10.7717/peerj-cs.55 + 2016 + Salvatier, J., Wiecki, T. V., & +Fonnesbeck, C. (2016). Probabilistic programming in python using PyMC3. +PeerJ Computer Science, 2, e55. +https://doi.org/10.7717/peerj-cs.55 + + + Toward a principled Bayesian workflow in +cognitive science. + Schad + Psychological methods + 1 + 26 + 2021 + Schad, D. J., Betancourt, M., & +Vasishth, S. (2021). Toward a principled Bayesian workflow in cognitive +science. Psychological Methods, 26(1), 103. + + + pyABC: Efficient and robust easy-to-use +approximate Bayesian computation + Schälte + Journal of Open Source +Software + 74 + 7 + 10.21105/joss.04304 + 2022 + Schälte, Y., Klinger, E., Alamoudi, +E., & Hasenauer, J. (2022). pyABC: Efficient and robust easy-to-use +approximate Bayesian computation. Journal of Open Source Software, +7(74), 4304. https://doi.org/10.21105/joss.04304 + + + Detecting model misspecification in amortized +Bayesian inference with neural networks + Schmitt + 45th German Conference on Pattern Recognition +(GCPR) + 2023 + Schmitt, M., Bürkner, P.-C., Köthe, +U., & Radev, S. T. (2023). Detecting model misspecification in +amortized Bayesian inference with neural networks. 45th German +Conference on Pattern Recognition (GCPR). + + + Meta-uncertainty in Bayesian model +comparison + Schmitt + arXiv preprint +arXiv:2210.07278 + 2022 + Schmitt, M., Radev, S. T., & +Bürkner, P.-C. (2022). Meta-uncertainty in Bayesian model comparison. +arXiv Preprint arXiv:2210.07278. + + + Estimation of agent-based models using +Bayesian deep learning approach of BayesFlow + Shiono + Journal of Economic Dynamics and +Control + 125 + 10.1016/j.jedc.2021.104082 + 2021 + Shiono, T. (2021). Estimation of +agent-based models using Bayesian deep learning approach of BayesFlow. +Journal of Economic Dynamics and Control, 125, 104082. +https://doi.org/10.1016/j.jedc.2021.104082 + + + Reliable amortized variational inference with +physics-based latent distribution correction + Siahkoohi + Geophysics + 3 + 88 + 10.1190/geo2022-0472.1 + 2023 + Siahkoohi, A., Rizzuti, G., Orozco, +R., & Herrmann, F. J. (2023). Reliable amortized variational +inference with physics-based latent distribution correction. Geophysics, +88(3), R297–R322. +https://doi.org/10.1190/geo2022-0472.1 + + + How to ask twenty questions and win: Machine +learning tools for assessing preferences from small samples of +willingness-to-pay prices + Sokratous + Journal of Choice Modelling + 48 + 10.1016/j.jocm.2023.100418 + 2023 + Sokratous, K., Fitch, A. K., & +Kvam, P. D. (2023). How to ask twenty questions and win: Machine +learning tools for assessing preferences from small samples of +willingness-to-pay prices. Journal of Choice Modelling, 48, 100418. +https://doi.org/10.1016/j.jocm.2023.100418 + + + Validating Bayesian inference algorithms with +simulation-based calibration + Talts + arXiv preprint + 2018 + Talts, S., Betancourt, M., Simpson, +D., Vehtari, A., & Gelman, A. (2018). Validating Bayesian inference +algorithms with simulation-based calibration. arXiv +Preprint. + + + Inverse design under uncertainty using +conditional normalizing flows + Tsilifis + AIAA Scitech 2022 Forum + 10.2514/6.2022-0631 + 2022 + Tsilifis, P., Ghosh, S., & +Andreoli, V. (2022). Inverse design under uncertainty using conditional +normalizing flows. AIAA Scitech 2022 Forum, 0631. +https://doi.org/10.2514/6.2022-0631 + + + Attention is all you need + Vaswani + Advances in neural information processing +systems + 30 + 2017 + Vaswani, A., Shazeer, N., Parmar, N., +Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., & Polosukhin, I. +(2017). Attention is all you need. Advances in Neural Information +Processing Systems, 30. + + + Variational inference of fractional Brownian +motion with linear computational complexity + Verdier + Physical Review E + 5 + 106 + 10.1103/PhysRevE.106.055311 + 2022 + Verdier, H., Laurent, F., Cassé, A., +Vestergaard, C. L., & Masson, J.-B. (2022). Variational inference of +fractional Brownian motion with linear computational complexity. +Physical Review E, 106(5), 055311. +https://doi.org/10.1103/PhysRevE.106.055311 + + + Mental speed is high until age 60 as revealed +by analysis of over a million participants + Krause + Nature Human Behaviour + 5 + 6 + 10.1038/s41562-021-01282-7 + 2022 + Krause, M. von, Radev, S. T., & +Voss, A. (2022). Mental speed is high until age 60 as revealed by +analysis of over a million participants. Nature Human Behaviour, 6(5), +700–708. +https://doi.org/10.1038/s41562-021-01282-7 + + + Jumping to conclusion? A Lévy flight model of +decision making + Wieschen + The Quantitative Methods for +Psychology + 2 + 16 + 10.20982/tqmp.16.2.p120 + 2020 + Wieschen, E. M., Voss, A., & +Radev, S. (2020). Jumping to conclusion? A Lévy flight model of decision +making. The Quantitative Methods for Psychology, 16(2), 120–132. +https://doi.org/10.20982/tqmp.16.2.p120 + + + Probabilistic damage detection using a new +likelihood-free Bayesian inference method + Zeng + Journal of Civil Structural Health +Monitoring + 2-3 + 13 + 10.1007/s13349-022-00638-5 + 2023 + Zeng, J., Todd, M. D., & Hu, Z. +(2023). Probabilistic damage detection using a new likelihood-free +Bayesian inference method. Journal of Civil Structural Health +Monitoring, 13(2-3), 319–341. +https://doi.org/10.1007/s13349-022-00638-5 + + + Neural superstatistics for Bayesian +estimation of dynamic cognitive models + Schumacher + Scientific Reports + 1 + 13 + 10.1038/s41598-023-40278-3 + 2045-2322 + 2023 + Schumacher, L., Bürkner, P.-C., Voss, +A., Köthe, U., & Radev, S. T. (2023). Neural superstatistics for +Bayesian estimation of dynamic cognitive models. Scientific Reports, +13(1), 13778. +https://doi.org/10.1038/s41598-023-40278-3 + + + + + + diff --git a/joss.05702/10.21105.joss.05702.jats b/joss.05702/10.21105.joss.05702.jats new file mode 100644 index 0000000000..10b05b78fa --- /dev/null +++ b/joss.05702/10.21105.joss.05702.jats @@ -0,0 +1,1105 @@ + + +
+ + + + +Journal of Open Source Software +JOSS + +2475-9066 + +Open Journals + + + +5702 +10.21105/joss.05702 + +BayesFlow: Amortized Bayesian Workflows With Neural +Networks + + + +https://orcid.org/0000-0002-6702-9559 + +Radev +Stefan T. + + +* + + +https://orcid.org/0000-0003-1293-820X + +Schmitt +Marvin + + + + +https://orcid.org/0000-0003-1512-8288 + +Schumacher +Lukas + + + + +https://orcid.org/0000-0003-0368-720X + +Elsemüller +Lasse + + + + +https://orcid.org/0000-0001-8371-3417 + +Pratz +Valentin + + + + +https://orcid.org/0000-0003-1293-820X + +Schälte +Yannik + + + + +https://orcid.org/0000-0001-6036-1287 + +Köthe +Ullrich + + + + +https://orcid.org/0000-0001-5765-8995 + +Bürkner +Paul-Christian + + + + + + +Cluster of Excellence STRUCTURES, Heidelberg University, +Germany + + + + +Cluster of Excellence SimTech, University of Stuttgart, +Germany + + + + +Institute for Psychology, Heidelberg University, +Germany + + + + +Visual Learning Lab, Heidelberg University, +Germany + + + + +Life and Medical Sciences Institute, University of Bonn, +Germany + + + + +Department of Statistics, TU Dortmund University, +Germany + + + + +* E-mail: + + +22 +6 +2023 + +8 +89 +5702 + +Authors of papers retain copyright and release the +work under a Creative Commons Attribution 4.0 International License (CC +BY 4.0) +2022 +The article authors + +Authors of papers retain copyright and release the work under +a Creative Commons Attribution 4.0 International License (CC BY +4.0) + + + +simulation-based inference +likelihood-free inference +Bayesian inference +amortized Bayesian inference +Python + + + + + + Summary +

Modern Bayesian inference involves a mixture of computational + techniques for estimating, validating, and drawing conclusions from + probabilistic models as part of principled workflows for data analysis + (Bürkner + et al., 2022; + Gelman + et al., 2020; + Schad + et al., 2021). Typical problems in Bayesian workflows are the + approximation of intractable posterior distributions for diverse model + types and the comparison of competing models of the same process in + terms of their complexity and predictive performance. However, despite + their theoretical appeal and utility, the practical execution of + Bayesian workflows is often limited by computational bottlenecks: + Obtaining even a single posterior may already take a long time, such + that repeated estimation for the purpose of model validation or + calibration becomes completely infeasible.

+

BayesFlow provides a framework for + simulation-based training of established neural + network architectures, such as transformers + (Vaswani + et al., 2017) and normalizing flows + (Papamakarios + et al., 2021), for amortized data compression + and inference. Amortized Bayesian inference (ABI), as + implemented in BayesFlow, enables users to + train custom neural networks on model simulations and re-use these + networks for any subsequent application of the models. Since the + trained networks can perform inference almost instantaneously + (typically well below one second), the upfront neural network training + is quickly amortized. For instance, amortized inference allows us to + test a model’s ability to recover its parameters + (Schad + et al., 2021) or assess its simulation-based calibration + (Säilynoja + et al., 2022; + Talts + et al., 2018) for different data set sizes in a matter of + seconds, even though this may require the estimation of thousands of + posterior distributions. BayesFlow offers a + user-friendly API, which encapsulates the details of neural network + architectures and training procedures that are less relevant for the + practitioner and provides robust default implementations that work + well across many applications. At the same time, + BayesFlow implements a modular software + architecture, allowing machine learning scientists to modify every + component of the pipeline for custom applications as well as research + at the frontier of Bayesian inference.

+ +

BayesFlow defines a formal + workflow for data generation, neural approximation, and model + criticism.

+ +
+
+ + Statement of Need +

BayesFlow embodies functionality that is + specifically designed for building and validating amortized Bayesian + workflows with the help of neural networks. + [fig:figure1] + outlines a typical workflow in the context of amortized posterior and + likelihood estimation. A simulator coupled with a prior defines a + generative Bayesian model. The generative model may depend on various + (optional) context variates like varying numbers of observations, + design matrices, or positional encodings. The generative scope of the + model and the range of context variables determine the scope + of amortization, that is, over which types of data the neural + approximator can be applied without re-training. The neural + approximators interact with model outputs (parameters, data) and + context variates through a configurator. The configurator is + responsible for carrying out transformations (e.g., input + normalization, double-to-float conversion, etc.) that are not part of + the model but may facilitate neural network training and + convergence.

+

[fig:figure1] + also illustrates an example configuration of four neural networks: 1) + a summary network to compress simulation outcomes (individual data + points, sets, or time series) into informative embeddings; 2) a + posterior network to learn an amortized approximate posterior; and 3) + another summary network to compress simulation inputs (parameters) + into informative embeddings; and 4) a likelihood network to learn an + amortized approximate likelihood. + [fig:figure1] + depicts the standalone and joint capabilities of the networks when + applied in isolation or in tandem. The input conditions for the + posterior and likelihood networks are partitioned by the configurator: + Complex (“summary”) conditions are processed by the respective summary + network into embeddings, while very simple (“direct”) conditions can + bypass the summary network and flow straight into the neural + approximator.

+

Currently, the software features four key capabilities for + enhancing Bayesian workflows, which have been described in the + referenced works:

+ + +

Amortized posterior estimation: Train a generative + network to efficiently infer full posteriors (i.e., solve the + inverse problem) for all existing and future data compatible with + a simulation model + (Radev, + Mertens, et al., 2020).

+
+ +

Amortized likelihood estimation: Train a + generative network to efficiently emulate a simulation model + (i.e., solve the forward problem) for all possible parameter + configurations or interact with external probabilistic programs + (Boelts + et al., 2022; + Radev + et al., 2023).

+
+ +

Amortized model comparison: Train a neural + classifier to recognize the “best” model in a set of competing + candidates + (Elsemüller + et al., 2023; + Radev, + D’Alessandro, et al., 2020; + Schmitt + et al., 2022) or combine amortized posterior and likelihood + estimation to compute Bayesian evidence and out-of-sample + predictive performance + (Radev + et al., 2023).

+
+ +

Model misspecification detection: Ensure that the + resulting posteriors are faithful approximations of the otherwise + intractable target posterior, even when simulations do not + perfectly represent reality + (Radev + et al., 2023; + Schmitt + et al., 2023).

+
+
+

BayesFlow has been used for amortized + Bayesian inference in various areas of applied research, such as + epidemiology + (Radev + et al., 2021), cognitive modeling + (Krause + et al., 2022; + Schumacher + et al., 2023; + Sokratous + et al., 2023; + Wieschen + et al., 2020), computational psychiatry + (D’Alessandro + et al., 2020), neuroscience + (Ghaderi-Kangavari + et al., 2022), particle physics + (Bieringer + et al., 2021), agent-based econometrics models + (Shiono, + 2021), seismic imaging + (Siahkoohi + et al., 2023), user behavior + (Moon + et al., 2023), structural health monitoring + (Zeng + et al., 2023), aerospace + (Tsilifis + et al., 2022) and wind turbine design + (Noever-Castelos + et al., 2022), micro-electro-mechanical systems testing + (Heringhaus + et al., 2022), and fractional Brownian motion + (Verdier + et al., 2022).

+

The software is built on top of TensorFlow + (Abadi + et al., 2016) and thereby enables off-the-shelf support for GPU + and TPU acceleration. Furthermore, it can seamlessly interact with + TensorFlow Probability + (Dillon + et al., 2017) for flexible latent distributions and a variety + of joint priors.

+
+ + Related Software +

When a non-amortized inference procedure does not create a + computational bottleneck, approximate Bayesian computation (ABC) might + be an appropriate tool. This is the case if a single data set needs to + be analyzed, if an infrastructure for parallel computing is readily + available, or if repeated re-fits of a model (e.g., cross-validation) + are not desired. A variety of mature Python packages for ABC exist, + such as PyMC + (Salvatier + et al., 2016), pyABC + (Schälte + et al., 2022), ABCpy + (Dutta + et al., 2021), or ELFI + (Lintusaari + et al., 2018). In contrast to these packages, + BayesFlow focuses on amortized inference, but + can also interact with ABC samplers (e.g., use BayesFlow to learn + informative summary statistics for an ABC analysis).

+

When it comes to simulation-based inference with neural networks, + the sbi toolkit enables both likelihood and + posterior estimation using different inference algorithms, such as + Neural Posterior Estimation + (Papamakarios + et al., 2021), Sequential Neural Posterior Estimation + (Greenberg + et al., 2019) and Sequential Neural Likelihood Estimation + (Papamakarios + et al., 2019). BayesFlow and + sbi can be viewed as complementary toolkits, + where sbi implements a variety of different + approximators for standard modeling scenarios, while + BayesFlow focuses on amortized workflows with + user-friendly default settings and optional customization. The + Swyft library focuses on Bayesian parameter + inference in physics and astronomy. Swyft uses + a specific type of simulation-based neural inference technique, + namely, Truncated Marginal Neural Ratio Estimation + (Miller + et al., 2021). This method improves on standard Markov chain + Monte Carlo (MCMC) methods for ABC by learning the + likelihood-to-evidence ratio with neural density estimators. Finally, + the Lampe library provides implementations for + a subset of the methods for posterior estimation in the + sbi library, aiming to expose all components + (e.g., network architectures, optimizers) in order to provide a + customizable interface for creating neural approximators. All of these + libraries are built on top of PyTorch.

+
+ + Availability, Development, and Documentation +

BayesFlow is available through PyPI via + pip install bayesflow, the development version + is available via GitHub. GitHub Actions manage continuous integration + through automated code testing and documentation. The documentation is + hosted at + www.bayesflow.org. + Currently, BayesFlow features seven tutorial + notebooks. These notebooks showcase different aspects of the software, + ranging from toy examples to applied modeling scenarios, and + illustrating both posterior estimation and model comparison + workflows.

+
+ + Acknowledgments +

We thank Ulf Mertens, Marco D’Alessandro, René Bucchia, The-Gia Leo + Nguyen, Jonas Arruda, Lea Zimmermann, and Leonhard Volz for + contributing to the GitHub repository. STR was funded by the Deutsche + Forschungsgemeinschaft (DFG, German Research Foundation) under + Germany’s Excellence Strategy - EXC-2181 - 390900948 (the Heidelberg + Cluster of Excellence STRUCTURES), MS and PCB were supported by the + Cyber Valley Research Fund (grant number: CyVy-RF-2021-16) and the DFG + EXC-2075 - 390740016 (the Stuttgart Cluster of Excellence SimTech). LS + and LE were supported by a grant from the DFG (GRK 2277) to the + research training group Statistical Modeling in Psychology (SMiP). YS + acknowledges support from the Joachim Herz Foundation. UK was + supported by the Informatics for Life initiative funded by the Klaus + Tschira Foundation. YS and UK were supported by the EMUNE project + (“Invertierbare Neuronale Netze für ein verbessertes Verständnis von + Infektionskrankheiten”, BMBF, 031L0293A-D).

+
+ + + + + + + AbadiMartín + BarhamPaul + ChenJianmin + ChenZhifeng + DavisAndy + DeanJeffrey + DevinMatthieu + GhemawatSanjay + IrvingGeoffrey + IsardMichael + others + + TensorFlow: A system for large-scale machine learning + Osdi + Savannah, GA, USA + 2016 + 16 + 2016 + 265 + 283 + + + + + + DuttaRitabrata + SchoengensMarcel + PacchiardiLorenzo + UmmadisinguAvinash + WidmerNicole + KünzliPierre + OnnelaJukka-Pekka + MiraAntonietta + + ABCpy: A high-performance computing perspective to approximate Bayesian computation + Journal of Statistical Software + 2021 + 100 + 7 + 10.18637/jss.v100.i07 + 1 + 38 + + + + + + BieringerSebastian + ButterAnja + HeimelTheo + HöcheStefan + KötheUllrich + PlehnTilman + RadevStefan T + + Measuring QCD splittings with invertible networks + SciPost Physics + 2021 + 10 + 6 + 10.21468/SciPostPhys.10.6.126 + 126 + + + + + + + BoeltsJan + LueckmannJan-Matthis + GaoRichard + MackeJakob H + + Flexible and efficient simulation-based inference for models of decision-making + Elife + eLife Sciences Publications Limited + 2022 + 11 + e77220 + + + + + + + BürknerPaul-Christian + ScholzMaximilian + RadevStefan T. + + Some models are useful, but how do we know which ones? Towards a unified Bayesian model taxonomy + arXiv preprint + 2022 + + + + + + D’AlessandroMarco + RadevStefan T + VossAndreas + LombardiLuigi + + A Bayesian brain model of adaptive behavior: An application to the wisconsin card sorting task + PeerJ + PeerJ Inc. + 2020 + 8 + e10316 + + + + + + + DillonJoshua V. + LangmoreIan + TranDustin + BrevdoEugene + VasudevanSrinivas + MooreDave + PattonBrian + AlemiAlex + HoffmanMatt + SaurousRif A. + + TensorFlow distributions + 2017 + https://arxiv.org/abs/1711.10604 + + + + + + ElsemüllerLasse + SchnuerchMartin + BürknerPaul-Christian + RadevStefan T + + A deep learning method for comparing Bayesian hierarchical models + arXiv preprint arXiv:2301.11873 + 2023 + + + + + + GelmanAndrew + VehtariAki + SimpsonDaniel + MargossianCharles C + CarpenterBob + YaoYuling + KennedyLauren + GabryJonah + BürknerPaul-Christian + ModrákMartin + + Bayesian workflow + arXiv preprint + 2020 + + + + + + Ghaderi-KangavariAmin + RadJamal Amani + NunezMichael D + + A general integrative neurocognitive modeling framework to jointly describe EEG and decision-making on single trials + PsyArXiv + 2022 + 10.1007/s42113-023-00167-4 + + + + + + GreenbergDavid + NonnenmacherMarcel + MackeJakob + + Automatic posterior transformation for likelihood-free inference + International Conference on Machine Learning + 2019 + 97 + 2404 + 2414 + + + + + + HeringhausMonika E + ZhangYi + ZimmermannAndré + MikelsonsLars + + Towards reliable parameter extraction in MEMS final module testing using Bayesian inference + Sensors + MDPI + 2022 + 22 + 14 + 10.3390/s22145408 + 5408 + + + + + + + LintusaariJarno + VuollekoskiHenri + KangasrääsiöAntti + SkyténKusti + JärvenpääMarko + MarttinenPekka + GutmannMichael U. + VehtariAki + CoranderJukka + KaskiSamuel + + ELFI: Engine for likelihood-free inference + Journal of Machine Learning Research + 2018 + 19 + 16 + http://jmlr.org/papers/v19/17-374.html + 1 + 7 + + + + + + MillerBenjamin K + ColeAlex + ForréPatrick + LouppeGilles + WenigerChristoph + + Truncated marginal neural ratio estimation + Advances in Neural Information Processing Systems + 2021 + 34 + 129 + 143 + + + + + + MoonHee-Seung + OulasvirtaAntti + LeeByungjoo + + Amortized inference with user simulations + Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems + 2023 + 1 + 20 + + + + + + Noever-CastelosPablo + ArdizzoneLynton + BalzaniClaudio + + Model updating of wind turbine blade cross sections with invertible neural networks + Wind Energy + Wiley Online Library + 2022 + 25 + 3 + 573 + 599 + + + + + + PapamakariosGeorge + NalisnickEric + RezendeDanilo Jimenez + MohamedShakir + LakshminarayananBalaji + + Normalizing flows for probabilistic modeling and inference + Journal of Machine Learning Research + JMLR.org + 2021 + 22 + 1 + + + + + + PapamakariosGeorge + SterrattDavid + MurrayIain + + Sequential neural likelihood: Fast likelihood-free inference with autoregressive flows + The 22nd International Conference on Artificial Intelligence and Statistics + PMLR + 2019 + 837 + 848 + + + + + + RadevStefan T + D’AlessandroMarco + MertensUlf K + VossAndreas + KötheUllrich + BürknerPaul-Christian + + Amortized Bayesian model comparison with evidential deep learning + arXiv preprint + 2020 + 10.1109/TNNLS.2021.3124052 + + + + + + RadevStefan T + GrawFrederik + ChenSimiao + MuttersNico T + EichelVanessa M + BärnighausenTill + KötheUllrich + + OutbreakFlow: Model-based Bayesian inference of disease outbreak dynamics with invertible neural networks and its application to the COVID-19 pandemics in Germany + PLoS computational biology + Public Library of Science San Francisco, CA USA + 2021 + 17 + 10 + 10.1371/journal.pcbi.1009472 + e1009472 + + + + + + + RadevStefan T + MertensUlf K + VossA + ArdizzoneL + KötheU + + BayesFlow: Learning complex stochastic models with invertible neural networks + IEEE Transactions on Neural Networks and Learning Systems + 2020 + 10.1109/TNNLS.2020.3042395 + + + + + + RadevStefan T + SchmittMarvin + PratzValentin + PicchiniUmberto + KötheUllrich + BürknerPaul-Christian + + JANA: Jointly amortized neural approximation of complex Bayesian models + arXiv preprint arXiv:2302.09125 + 2023 + + + + + + SäilynojaTeemu + BürknerPaul-Christian + VehtariAki + + Graphical test for discrete uniformity and its applications in goodness-of-fit evaluation and multiple sample comparison + Statistics and Computing + Springer + 2022 + 32 + 2 + 10.1007/s11222-022-10090-6 + 32 + + + + + + + SalvatierJohn + WieckiThomas V. + FonnesbeckChristopher + + Probabilistic programming in python using PyMC3 + PeerJ Computer Science + PeerJ + 2016 + 2 + 10.7717/peerj-cs.55 + e55 + + + + + + + SchadDaniel J + BetancourtMichael + VasishthShravan + + Toward a principled Bayesian workflow in cognitive science. + Psychological methods + American Psychological Association + 2021 + 26 + 1 + 103 + + + + + + + SchälteYannik + KlingerEmmanuel + AlamoudiEmad + HasenauerJan + + pyABC: Efficient and robust easy-to-use approximate Bayesian computation + Journal of Open Source Software + The Open Journal + 2022 + 7 + 74 + 10.21105/joss.04304 + 4304 + + + + + + + SchmittMarvin + BürknerPaul-Christian + KötheUllrich + RadevStefan T. + + Detecting model misspecification in amortized Bayesian inference with neural networks + 45th German Conference on Pattern Recognition (GCPR) + 2023 + + + + + + SchmittMarvin + RadevStefan T + BürknerPaul-Christian + + Meta-uncertainty in Bayesian model comparison + arXiv preprint arXiv:2210.07278 + 2022 + + + + + + ShionoTakashi + + Estimation of agent-based models using Bayesian deep learning approach of BayesFlow + Journal of Economic Dynamics and Control + Elsevier + 2021 + 125 + 10.1016/j.jedc.2021.104082 + 104082 + + + + + + + SiahkoohiAli + RizzutiGabrio + OrozcoRafael + HerrmannFelix J + + Reliable amortized variational inference with physics-based latent distribution correction + Geophysics + Society of Exploration Geophysicists + 2023 + 88 + 3 + 10.1190/geo2022-0472.1 + R297 + R322 + + + + + + SokratousKonstantina + FitchAnderson K + KvamPeter D + + How to ask twenty questions and win: Machine learning tools for assessing preferences from small samples of willingness-to-pay prices + Journal of Choice Modelling + Elsevier + 2023 + 48 + 10.1016/j.jocm.2023.100418 + 100418 + + + + + + + TaltsSean + BetancourtMichael + SimpsonDaniel + VehtariAki + GelmanAndrew + + Validating Bayesian inference algorithms with simulation-based calibration + arXiv preprint + 2018 + + + + + + TsilifisPanagiotis + GhoshSayan + AndreoliValeria + + Inverse design under uncertainty using conditional normalizing flows + AIAA Scitech 2022 Forum + 2022 + 10.2514/6.2022-0631 + 0631 + + + + + + + VaswaniAshish + ShazeerNoam + ParmarNiki + UszkoreitJakob + JonesLlion + GomezAidan N + KaiserŁukasz + PolosukhinIllia + + Attention is all you need + Advances in neural information processing systems + 2017 + 30 + + + + + + VerdierHippolyte + LaurentFrançois + CasséAlhassan + VestergaardChristian L + MassonJean-Baptiste + + Variational inference of fractional Brownian motion with linear computational complexity + Physical Review E + APS + 2022 + 106 + 5 + 10.1103/PhysRevE.106.055311 + 055311 + + + + + + + KrauseMischa von + RadevStefan T + VossAndreas + + Mental speed is high until age 60 as revealed by analysis of over a million participants + Nature Human Behaviour + Nature Publishing Group + 2022 + 6 + 5 + 10.1038/s41562-021-01282-7 + 700 + 708 + + + + + + WieschenEva Marie + VossAndreas + RadevStefan + + Jumping to conclusion? A Lévy flight model of decision making + The Quantitative Methods for Psychology + 2020 + 16 + 2 + 10.20982/tqmp.16.2.p120 + 120 + 132 + + + + + + ZengJice + ToddMichael D + HuZhen + + Probabilistic damage detection using a new likelihood-free Bayesian inference method + Journal of Civil Structural Health Monitoring + Springer + 2023 + 13 + 2-3 + 10.1007/s13349-022-00638-5 + 319 + 341 + + + + + + SchumacherLukas + BürknerPaul-Christian + VossAndreas + KötheUllrich + RadevStefan T + + Neural superstatistics for Bayesian estimation of dynamic cognitive models + Scientific Reports + Nature Publishing Group + 20230823 + 13 + 1 + 2045-2322 + 10.1038/s41598-023-40278-3 + 13778 + + + + + +
diff --git a/joss.05702/10.21105.joss.05702.pdf b/joss.05702/10.21105.joss.05702.pdf new file mode 100644 index 0000000000..9f0de608ff Binary files /dev/null and b/joss.05702/10.21105.joss.05702.pdf differ diff --git a/joss.05702/media/bayesflow_software_figure1.pdf b/joss.05702/media/bayesflow_software_figure1.pdf new file mode 100644 index 0000000000..24476671df Binary files /dev/null and b/joss.05702/media/bayesflow_software_figure1.pdf differ