{"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/detecting-hidden-confounding-in-observational","title":"Detecting hidden confounding in observational data using multiple environments","arxiv_id":"2205.13935","date":"2022-05-27","proceeding":"NeurIPS 2023 11","authors":["Rickard K. A. Karlsson","Jesse H. Krijthe"],"abstract":"A common assumption in causal inference from observational data is that there is no hidden confounding. Yet it is, in general, impossible to verify this assumption from a single dataset. Under the assumption of independent causal mechanisms underlying the data-generating process, we demonstrate a way to detect unobserved confounders when having multiple observational datasets coming from different environments. We present a theory for testable conditional independencies that are only absent when there is hidden confounding and examine cases where we violate its assumptions: degenerate & dependent mechanisms, and faithfulness violations. Additionally, we propose a procedure to test these independencies and study its empirical finite-sample behavior using simulation studies and semi-synthetic data based on a real-world dataset. In most cases, the proposed procedure correctly predicts the presence of hidden confounding, particularly when the confounding bias is large.","url_abs":"https://arxiv.org/abs/2205.13935v4","url_pdf":"https://arxiv.org/pdf/2205.13935v4.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":"detecting-hidden-confounding-in-observational","repo_url":"https://github.com/rickardkarl/detect-hidden-confounding","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[{"task_slug":"causal-inference","task_name":"Causal Inference"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2205.13935","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.13935"}},"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/rickardkarl/detect-hidden-confounding","reach":null}],"summary":{"ran_draft_wrong":3,"ran_honours":1,"unverified":4},"by_repo_kind":{"official":{"samples":8,"ran":4,"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":"72d54d052e82249d","entry":"calibrate_tci_gamma_approximation","repo":"rickardkarl/detect-hidden-confounding","repo_kind":"official","path":"algorithm/kernel/kcit.py","file_url":"https://github.com/rickardkarl/detect-hidden-confounding/blob/HEAD/algorithm/kernel/kcit.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":"72d54d052e82249d"}},{"code_sha256_prefix":"a271df6d824a6ade","entry":"compute_mat_tilde_W","repo":"rickardkarl/detect-hidden-confounding","repo_kind":"official","path":"algorithm/kernel/kcit.py","file_url":"https://github.com/rickardkarl/detect-hidden-confounding/blob/HEAD/algorithm/kernel/kcit.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":"a271df6d824a6ade"}},{"code_sha256_prefix":"8ca076ec5a1ec815","entry":"compute_tci","repo":"rickardkarl/detect-hidden-confounding","repo_kind":"official","path":"algorithm/kernel/kcit.py","file_url":"https://github.com/rickardkarl/detect-hidden-confounding/blob/HEAD/algorithm/kernel/kcit.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":"8ca076ec5a1ec815"}},{"code_sha256_prefix":"f3c04d2bd7699458","entry":"perform_monte_carlo_kcit","repo":"rickardkarl/detect-hidden-confounding","repo_kind":"official","path":"algorithm/kernel/kcit.py","file_url":"https://github.com/rickardkarl/detect-hidden-confounding/blob/HEAD/algorithm/kernel/kcit.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":"f3c04d2bd7699458"}},{"code_sha256_prefix":"6815723451ef4e08","entry":"ImplementedKCITSchemes","repo":"rickardkarl/detect-hidden-confounding","repo_kind":"official","path":"algorithm/kernel/kcit.py","file_url":"https://github.com/rickardkarl/detect-hidden-confounding/blob/HEAD/algorithm/kernel/kcit.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":"6815723451ef4e08"}},{"code_sha256_prefix":"4e3d817c425c8f6b","entry":"KCITTestingSchemeNotImplemented","repo":"rickardkarl/detect-hidden-confounding","repo_kind":"official","path":"algorithm/kernel/kcit.py","file_url":"https://github.com/rickardkarl/detect-hidden-confounding/blob/HEAD/algorithm/kernel/kcit.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":"4e3d817c425c8f6b"}},{"code_sha256_prefix":"1bf4b3478fe2c576","entry":"perform_gamma_approximation_kcit","repo":"rickardkarl/detect-hidden-confounding","repo_kind":"official","path":"algorithm/kernel/kcit.py","file_url":"https://github.com/rickardkarl/detect-hidden-confounding/blob/HEAD/algorithm/kernel/kcit.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":"1bf4b3478fe2c576"}},{"code_sha256_prefix":"6e88c5ad1f9f482e","entry":"perform_kcit","repo":"rickardkarl/detect-hidden-confounding","repo_kind":"official","path":"algorithm/kernel/kcit.py","file_url":"https://github.com/rickardkarl/detect-hidden-confounding/blob/HEAD/algorithm/kernel/kcit.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":"6e88c5ad1f9f482e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}