{"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/amortized-inference-for-causal-structure","title":"Amortized Inference for Causal Structure Learning","arxiv_id":"2205.12934","date":"2022-05-25","proceeding":null,"authors":["Lars Lorch","Scott Sussex","Jonas Rothfuss","Andreas Krause","Bernhard Schölkopf"],"abstract":"Inferring causal structure poses a combinatorial search problem that typically involves evaluating structures with a score or independence test. The resulting search is costly, and designing suitable scores or tests that capture prior knowledge is difficult. In this work, we propose to amortize causal structure learning. Rather than searching over structures, we train a variational inference model to directly predict the causal structure from observational or interventional data. This allows our inference model to acquire domain-specific inductive biases for causal discovery solely from data generated by a simulator, bypassing both the hand-engineering of suitable score functions and the search over graphs. The architecture of our inference model emulates permutation invariances that are crucial for statistical efficiency in structure learning, which facilitates generalization to significantly larger problem instances than seen during training. On synthetic data and semisynthetic gene expression data, our models exhibit robust generalization capabilities when subject to substantial distribution shifts and significantly outperform existing algorithms, especially in the challenging genomics domain. Our code and models are publicly available at: https://github.com/larslorch/avici.","url_abs":"https://arxiv.org/abs/2205.12934v4","url_pdf":"https://arxiv.org/pdf/2205.12934v4.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":"amortized-inference-for-causal-structure","repo_url":"https://github.com/larslorch/avici","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":null}],"tasks":[{"task_slug":"causal-discovery","task_name":"Causal Discovery"},{"task_slug":"inductive-bias","task_name":"Inductive Bias"},{"task_slug":"variational-inference","task_name":"Variational Inference"}],"methods":[{"method_slug":"variational-inference","method_name":"Variational Inference"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2205.12934","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.12934"}},"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/larslorch/avici","reach":null}],"summary":{"ran":1,"ran_honours":3,"ran_draft_wrong":4,"ran_fixture":2},"by_repo_kind":{"official":{"samples":10,"ran":10,"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":"0e130cba73756b6d","entry":"InferenceModel","repo":"larslorch/avici","repo_kind":"official","path":"avici/model.py","file_url":"https://github.com/larslorch/avici/blob/HEAD/avici/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0e130cba73756b6d"}},{"code_sha256_prefix":"776f8b0d66bb5b01","entry":"_jax_cpm_shift_scale","repo":"larslorch/avici","repo_kind":"official","path":"avici/model.py","file_url":"https://github.com/larslorch/avici/blob/HEAD/avici/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"776f8b0d66bb5b01"}},{"code_sha256_prefix":"a8e2ecc798861c78","entry":"_jax_cpm_standardizer","repo":"larslorch/avici","repo_kind":"official","path":"avici/model.py","file_url":"https://github.com/larslorch/avici/blob/HEAD/avici/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a8e2ecc798861c78"}},{"code_sha256_prefix":"e37be173faa6071d","entry":"_jax_standardize_count","repo":"larslorch/avici","repo_kind":"official","path":"avici/model.py","file_url":"https://github.com/larslorch/avici/blob/HEAD/avici/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e37be173faa6071d"}},{"code_sha256_prefix":"c5b2c0fcb84df84f","entry":"_jax_standardize_default","repo":"larslorch/avici","repo_kind":"official","path":"avici/model.py","file_url":"https://github.com/larslorch/avici/blob/HEAD/avici/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c5b2c0fcb84df84f"}},{"code_sha256_prefix":"f014427d8a9afcdb","entry":"jax_get_train_x","repo":"larslorch/avici","repo_kind":"official","path":"avici/model.py","file_url":"https://github.com/larslorch/avici/blob/HEAD/avici/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f014427d8a9afcdb"}},{"code_sha256_prefix":"d20f8e1765623650","entry":"jax_get_x","repo":"larslorch/avici","repo_kind":"official","path":"avici/model.py","file_url":"https://github.com/larslorch/avici/blob/HEAD/avici/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d20f8e1765623650"}},{"code_sha256_prefix":"8b9cad48608a865a","entry":"jax_standardize_data","repo":"larslorch/avici","repo_kind":"official","path":"avici/model.py","file_url":"https://github.com/larslorch/avici/blob/HEAD/avici/model.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":"8b9cad48608a865a"}},{"code_sha256_prefix":"fee04e78e53cb7c4","entry":"jax_standardize_x","repo":"larslorch/avici","repo_kind":"official","path":"avici/model.py","file_url":"https://github.com/larslorch/avici/blob/HEAD/avici/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fee04e78e53cb7c4"}},{"code_sha256_prefix":"b37ffef9bf2f19ff","entry":"set_diagonal","repo":"larslorch/avici","repo_kind":"official","path":"avici/model.py","file_url":"https://github.com/larslorch/avici/blob/HEAD/avici/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b37ffef9bf2f19ff"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}