{"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/robust-neural-posterior-estimation-and","title":"Robust Neural Posterior Estimation and Statistical Model Criticism","arxiv_id":"2210.06564","date":"2022-10-12","proceeding":null,"authors":["Daniel Ward","Patrick Cannon","Mark Beaumont","Matteo Fasiolo","Sebastian M Schmon"],"abstract":"Computer simulations have proven a valuable tool for understanding complex phenomena across the sciences. However, the utility of simulators for modelling and forecasting purposes is often restricted by low data quality, as well as practical limits to model fidelity. In order to circumvent these difficulties, we argue that modellers must treat simulators as idealistic representations of the true data generating process, and consequently should thoughtfully consider the risk of model misspecification. In this work we revisit neural posterior estimation (NPE), a class of algorithms that enable black-box parameter inference in simulation models, and consider the implication of a simulation-to-reality gap. While recent works have demonstrated reliable performance of these methods, the analyses have been performed using synthetic data generated by the simulator model itself, and have therefore only addressed the well-specified case. In this paper, we find that the presence of misspecification, in contrast, leads to unreliable inference when NPE is used naively. As a remedy we argue that principled scientific inquiry with simulators should incorporate a model criticism component, to facilitate interpretable identification of misspecification and a robust inference component, to fit 'wrong but useful' models. We propose robust neural posterior estimation (RNPE), an extension of NPE to simultaneously achieve both these aims, through explicitly modelling the discrepancies between simulations and the observed data. We assess the approach on a range of artificially misspecified examples, and find RNPE performs well across the tasks, whereas naively using NPE leads to misleading and erratic posteriors.","url_abs":"https://arxiv.org/abs/2210.06564v1","url_pdf":"https://arxiv.org/pdf/2210.06564v1.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":[],"tasks":[{"task_slug":"model","task_name":"model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.06564","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.06564"}},"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":"deterministic:regex_extraction","url":"https://github.com/danielward27/rnpe","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/danielward27/flowjax","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":10},"by_repo_kind":{"found_in_text":{"samples":10,"ran":0,"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":"bc7da1b56f0084fe","entry":"arraylike_to_array","repo":"danielward27/flowjax","repo_kind":"found_in_text","path":"flowjax/utils.py","file_url":"https://github.com/danielward27/flowjax/blob/HEAD/flowjax/utils.py","link_basis":"harvester_set","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":"bc7da1b56f0084fe"}},{"code_sha256_prefix":"ca34b754581d6b60","entry":"block_diag_mask","repo":"danielward27/flowjax","repo_kind":"found_in_text","path":"flowjax/masks.py","file_url":"https://github.com/danielward27/flowjax/blob/HEAD/flowjax/masks.py","link_basis":"harvester_set","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":"ca34b754581d6b60"}},{"code_sha256_prefix":"c313bf672bf53b58","entry":"block_tril_mask","repo":"danielward27/flowjax","repo_kind":"found_in_text","path":"flowjax/masks.py","file_url":"https://github.com/danielward27/flowjax/blob/HEAD/flowjax/masks.py","link_basis":"harvester_set","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":"c313bf672bf53b58"}},{"code_sha256_prefix":"247bf759a4548654","entry":"get_ravelled_pytree_constructor","repo":"danielward27/flowjax","repo_kind":"found_in_text","path":"flowjax/utils.py","file_url":"https://github.com/danielward27/flowjax/blob/HEAD/flowjax/utils.py","link_basis":"harvester_set","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":"247bf759a4548654"}},{"code_sha256_prefix":"efa300dd757575bc","entry":"logmatmulexp","repo":"danielward27/flowjax","repo_kind":"found_in_text","path":"flowjax/bijections/block_autoregressive_network.py","file_url":"https://github.com/danielward27/flowjax/blob/HEAD/flowjax/bijections/block_autoregressive_network.py","link_basis":"harvester_set","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":"efa300dd757575bc"}},{"code_sha256_prefix":"cff21ac0e654efbe","entry":"max_steps_while_loop","repo":"danielward27/flowjax","repo_kind":"found_in_text","path":"flowjax/root_finding.py","file_url":"https://github.com/danielward27/flowjax/blob/HEAD/flowjax/root_finding.py","link_basis":"harvester_set","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":"cff21ac0e654efbe"}},{"code_sha256_prefix":"4f28e523944baf36","entry":"merge_cond_shapes","repo":"danielward27/flowjax","repo_kind":"found_in_text","path":"flowjax/utils.py","file_url":"https://github.com/danielward27/flowjax/blob/HEAD/flowjax/utils.py","link_basis":"harvester_set","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":"4f28e523944baf36"}},{"code_sha256_prefix":"3022a15994813faa","entry":"rank_based_mask","repo":"danielward27/flowjax","repo_kind":"found_in_text","path":"flowjax/masks.py","file_url":"https://github.com/danielward27/flowjax/blob/HEAD/flowjax/masks.py","link_basis":"harvester_set","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":"3022a15994813faa"}},{"code_sha256_prefix":"9036420ab972300b","entry":"root_finder_to_inverter","repo":"danielward27/flowjax","repo_kind":"found_in_text","path":"flowjax/root_finding.py","file_url":"https://github.com/danielward27/flowjax/blob/HEAD/flowjax/root_finding.py","link_basis":"harvester_set","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":"9036420ab972300b"}},{"code_sha256_prefix":"f54515af38e6b7d9","entry":"two_moons","repo":"danielward27/flowjax","repo_kind":"found_in_text","path":"flowjax/tasks.py","file_url":"https://github.com/danielward27/flowjax/blob/HEAD/flowjax/tasks.py","link_basis":"harvester_set","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":"f54515af38e6b7d9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}