{"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/autoregressive-flow-based-causal-discovery","title":"Autoregressive flow-based causal discovery and inference","arxiv_id":"2007.09390","date":"2020-07-18","proceeding":null,"authors":["Ricardo Pio Monti","Ilyes Khemakhem","Aapo Hyvarinen"],"abstract":"We posit that autoregressive flow models are well-suited to performing a range of causal inference tasks - ranging from causal discovery to making interventional and counterfactual predictions. In particular, we exploit the fact that autoregressive architectures define an ordering over variables, analogous to a causal ordering, in order to propose a single flow architecture to perform all three aforementioned tasks. We first leverage the fact that flow models estimate normalized log-densities of data to derive a bivariate measure of causal direction based on likelihood ratios. Whilst traditional measures of causal direction often require restrictive assumptions on the nature of causal relationships (e.g., linearity),the flexibility of flow models allows for arbitrary causal dependencies. Our approach compares favourably against alternative methods on synthetic data as well as on the Cause-Effect Pairs bench-mark dataset. Subsequently, we demonstrate that the invertible nature of flows naturally allows for direct evaluation of both interventional and counterfactual predictions, which require marginalization and conditioning over latent variables respectively. We present examples over synthetic data where autoregressive flows, when trained under the correct causal ordering, are able to make accurate interventional and counterfactual predictions","url_abs":"https://arxiv.org/abs/2007.09390v2","url_pdf":"https://arxiv.org/pdf/2007.09390v2.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":"autoregressive-flow-based-causal-discovery","repo_url":"https://github.com/piomonti/AffineFlowCausalInf","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"autoregressive-flow-based-causal-discovery","repo_url":"https://github.com/piomonti/carefl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"causal-discovery","task_name":"Causal Discovery"},{"task_slug":"causal-inference","task_name":"Causal Inference"},{"task_slug":null,"task_name":"counterfactual"}],"methods":[{"method_slug":"causal-inference","method_name":"Causal inference"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2007.09390","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2007.09390"}},"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/piomonti/AffineFlowCausalInf","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/piomonti/carefl","reach":null}],"summary":{"ran":10,"ran_draft_wrong":1,"unverified":4},"by_repo_kind":{"listed":{"samples":15,"ran":11,"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":"b793bc8bea09122a","entry":"ARMLP","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b793bc8bea09122a"}},{"code_sha256_prefix":"ee35a766a467c7ab","entry":"AffineCL","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ee35a766a467c7ab"}},{"code_sha256_prefix":"da6d3d9a336b2a9c","entry":"CustomSyntheticDatasetDensity","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.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":"da6d3d9a336b2a9c"}},{"code_sha256_prefix":"03e61cb03e4a473b","entry":"MADE","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"03e61cb03e4a473b"}},{"code_sha256_prefix":"49de88957949ca25","entry":"MAF","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"49de88957949ca25"}},{"code_sha256_prefix":"756d26a591b1b7cf","entry":"MLP1layer","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"756d26a591b1b7cf"}},{"code_sha256_prefix":"2eefac96b1b3db97","entry":"MLP4","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2eefac96b1b3db97"}},{"code_sha256_prefix":"ed7abf1170b542ee","entry":"MaskedLinear","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ed7abf1170b542ee"}},{"code_sha256_prefix":"003866981408459c","entry":"NormalizingFlow","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"003866981408459c"}},{"code_sha256_prefix":"332907cc3fc9bc91","entry":"NormalizingFlowModel","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"332907cc3fc9bc91"}},{"code_sha256_prefix":"af7c19b8eaf6e4a4","entry":"unconstrained_RQS","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.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":"af7c19b8eaf6e4a4"}},{"code_sha256_prefix":"c201e2ca52b456ff","entry":"CAREFL","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.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":"c201e2ca52b456ff"}},{"code_sha256_prefix":"87c69bdae0f2ca05","entry":"NSF_AR","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.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":"87c69bdae0f2ca05"}},{"code_sha256_prefix":"db027a8f670e12d3","entry":"RQS","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.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":"db027a8f670e12d3"}},{"code_sha256_prefix":"e85d747983c4f5d8","entry":"searchsorted","repo":"piomonti/carefl","repo_kind":"listed","path":"models/carefl.py","file_url":"https://github.com/piomonti/carefl/blob/HEAD/models/carefl.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":"e85d747983c4f5d8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}