{"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/a-meta-learning-approach-to-bayesian-causal","title":"A Meta-Learning Approach to Bayesian Causal Discovery","arxiv_id":"2412.16577","date":"2024-12-21","proceeding":null,"authors":["Anish Dhir","Matthew Ashman","James Requeima","Mark van der Wilk"],"abstract":"Discovering a unique causal structure is difficult due to both inherent identifiability issues, and the consequences of finite data. As such, uncertainty over causal structures, such as those obtained from a Bayesian posterior, are often necessary for downstream tasks. Finding an accurate approximation to this posterior is challenging, due to the large number of possible causal graphs, as well as the difficulty in the subproblem of finding posteriors over the functional relationships of the causal edges. Recent works have used meta-learning to view the problem of estimating the maximum a-posteriori causal graph as supervised learning. Yet, these methods are limited when estimating the full posterior as they fail to encode key properties of the posterior, such as correlation between edges and permutation equivariance with respect to nodes. Further, these methods also cannot reliably sample from the posterior over causal structures. To address these limitations, we propose a Bayesian meta learning model that allows for sampling causal structures from the posterior and encodes these key properties. We compare our meta-Bayesian causal discovery against existing Bayesian causal discovery methods, demonstrating the advantages of directly learning a posterior over causal structure.","url_abs":"https://arxiv.org/abs/2412.16577v3","url_pdf":"https://arxiv.org/pdf/2412.16577v3.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":"a-meta-learning-approach-to-bayesian-causal","repo_url":"https://github.com/Anish144/CausalStructureNeuralProcess","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"causal-discovery","task_name":"Causal Discovery"},{"task_slug":"meta-learning","task_name":"Meta-Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2412.16577","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2412.16577"}},"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/Anish144/CausalStructureNeuralProcess","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"unverified":15},"by_repo_kind":{"listed":{"samples":15,"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":1,"samples":[{"code_sha256_prefix":"19ee4683eda506c6","entry":"list_of_strings","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"19ee4683eda506c6"}},{"code_sha256_prefix":"75176516afeedbb4","entry":"balance_for_auc","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/utils/metrics.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/utils/metrics.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":"75176516afeedbb4"}},{"code_sha256_prefix":"1a65e10e8d0a485b","entry":"batch","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/utils/helpers.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/utils/helpers.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":"1a65e10e8d0a485b"}},{"code_sha256_prefix":"1fcb0240ade1eb3c","entry":"build_mlp","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/models/causaltransformercomponents.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/models/causaltransformercomponents.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":"1fcb0240ade1eb3c"}},{"code_sha256_prefix":"1731dc78c5f9c460","entry":"calculate_auc","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/utils/metrics.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/utils/metrics.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":"1731dc78c5f9c460"}},{"code_sha256_prefix":"e48a440c91fe3bdf","entry":"compress_batch_dimensions","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/utils/helpers.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/utils/helpers.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":"e48a440c91fe3bdf"}},{"code_sha256_prefix":"480302d65d118255","entry":"cyclicity","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/utils/metrics.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/utils/metrics.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":"480302d65d118255"}},{"code_sha256_prefix":"a67185539f352f49","entry":"generate_random_dag","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/datasets/causal_graph_generator.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/datasets/causal_graph_generator.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":"a67185539f352f49"}},{"code_sha256_prefix":"0090b66ac20f2e33","entry":"generate_synthetic_dag","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/datasets/causal_graph_generator.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/datasets/causal_graph_generator.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":"0090b66ac20f2e33"}},{"code_sha256_prefix":"d3aec780435dd02f","entry":"get_random_indices","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/utils/datautils.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/utils/datautils.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":"d3aec780435dd02f"}},{"code_sha256_prefix":"3715f9dedbfce722","entry":"retun_default_args","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/utils/args.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/utils/args.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":"3715f9dedbfce722"}},{"code_sha256_prefix":"34228451461107e8","entry":"sample_lengthscale","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/utils/gplvm_utils.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/utils/gplvm_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":"34228451461107e8"}},{"code_sha256_prefix":"d54d06358c0f7c9a","entry":"sample_variance","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/utils/gplvm_utils.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/utils/gplvm_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":"d54d06358c0f7c9a"}},{"code_sha256_prefix":"e6fcc8b735c0a08c","entry":"transformer_classifier_split_withpadding","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/utils/datautils.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/utils/datautils.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":"e6fcc8b735c0a08c"}},{"code_sha256_prefix":"b531baf3d12f98f3","entry":"turn_bivariate_causal_graph_to_label","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/utils/datautils.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/utils/datautils.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":"b531baf3d12f98f3"}},{"code_sha256_prefix":"26c82df107366b6e","entry":"with_first_last","repo":"Anish144/CausalStructureNeuralProcess","repo_kind":"listed","path":"ml2_meta_causal_discovery/utils/helpers.py","file_url":"https://github.com/Anish144/CausalStructureNeuralProcess/blob/HEAD/ml2_meta_causal_discovery/utils/helpers.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":"26c82df107366b6e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}