{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/all-in-one-simulation-based-inference","title":"All-in-one simulation-based inference","arxiv_id":"2404.09636","date":"2024-04-15","proceeding":null,"authors":["Manuel Gloeckler","Michael Deistler","Christian Weilbach","Frank Wood","Jakob H. Macke"],"abstract":"Amortized Bayesian inference trains neural networks to solve stochastic inference problems using model simulations, thereby making it possible to rapidly perform Bayesian inference for any newly observed data. However, current simulation-based amortized inference methods are simulation-hungry and inflexible: They require the specification of a fixed parametric prior, simulator, and inference tasks ahead of time. Here, we present a new amortized inference method -- the Simformer -- which overcomes these limitations. By training a probabilistic diffusion model with transformer architectures, the Simformer outperforms current state-of-the-art amortized inference approaches on benchmark tasks and is substantially more flexible: It can be applied to models with function-valued parameters, it can handle inference scenarios with missing or unstructured data, and it can sample arbitrary conditionals of the joint distribution of parameters and data, including both posterior and likelihood. We showcase the performance and flexibility of the Simformer on simulators from ecology, epidemiology, and neuroscience, and demonstrate that it opens up new possibilities and application domains for amortized Bayesian inference on simulation-based models.","url_abs":"https://arxiv.org/abs/2404.09636v3","url_pdf":"https://arxiv.org/pdf/2404.09636v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"all-in-one-simulation-based-inference","repo_url":"https://github.com/mackelab/simformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":null}],"tasks":[{"task_slug":"all","task_name":"All"},{"task_slug":"bayesian-inference","task_name":"Bayesian Inference"},{"task_slug":"epidemiology","task_name":"Epidemiology"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2404.09636","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.09636"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mackelab/simformer","reach":null}],"summary":{"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"official":{"samples":3,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"797bed1a27b2f742","entry":"get_z_score_fn","repo":"mackelab/simformer","repo_kind":"official","path":"src/scoresbibm/scoresbibm/methods/score_transformer.py","file_url":"https://github.com/mackelab/simformer/blob/HEAD/src/scoresbibm/scoresbibm/methods/score_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"797bed1a27b2f742"}},{"code_sha256_prefix":"1dac9240e05c7111","entry":"mean_std_per_node_id","repo":"mackelab/simformer","repo_kind":"official","path":"src/scoresbibm/scoresbibm/methods/score_transformer.py","file_url":"https://github.com/mackelab/simformer/blob/HEAD/src/scoresbibm/scoresbibm/methods/score_transformer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1dac9240e05c7111"}},{"code_sha256_prefix":"d845fd3072656a34","entry":"run_train_transformer_model","repo":"mackelab/simformer","repo_kind":"official","path":"src/scoresbibm/scoresbibm/methods/score_transformer.py","file_url":"https://github.com/mackelab/simformer/blob/HEAD/src/scoresbibm/scoresbibm/methods/score_transformer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d845fd3072656a34"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}