Papers › Deep Structural Causal Models for Tractable Counterfactual Inference

Deep Structural Causal Models for Tractable Counterfactual Inference

11 Jun 2020NeurIPS 2020 12arXiv:2006.06485archive 2025-07-28

Nick Pawlowski, Daniel C. Castro, Ben Glocker

We formulate a general framework for building structural causal models (SCMs) with deep learning components. The proposed approach employs normalising flows and variational inference to enable tractable inference of exogenous noise variables - a crucial step for counterfactual inference that is missing from existing deep causal learning methods. Our framework is validated on a synthetic dataset built on MNIST as well as on a real-world medical dataset of brain MRI scans. Our experimental results indicate that we can successfully train deep SCMs that are capable of all three levels of Pearl's ladder of causation: association, intervention, and counterfactuals, giving rise to a powerful new approach for answering causal questions in imaging applications and beyond. The code for all our experiments is available at https://github.com/biomedia-mira/deepscm.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2006.06485")

Code

Syntology Ran 12 of 20 code samples harvested from 3 repositories linked to this paper; 8 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 2 ran · fixture could not drive it; 8 ran with no contract checked.

By repository: official repository: 10 samples from 1 repository, 5 ran; community (archive-listed): 10 samples from 2 repositories, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

biomedia-mira/deepscm officialmentioned in papermentioned on GitHubpytorch report
biomedia-mira/causal-gen mentioned on GitHubpytorch report
rongguangw/flow-scm mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

20 samples harvested; 12 ran; 1 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
2ran · fixture could not drive it
8ran
8unverified

Licence: 3 of the 20 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

ActNorm biomedia-mira/deepscm/deepscm/experiments/morphomnist/nf/conditional_flow_sem.py official repository ran · metamorphic tier: deterministic MIT (permissive) · f68de70f80950eeb · report
BaseSEM biomedia-mira/deepscm/deepscm/experiments/morphomnist/nf/conditional_flow_sem.py official repository ran · metamorphic tier: deterministic MIT (permissive) · e8590010c32109d2 · report
BasicFlowConvNet biomedia-mira/deepscm/deepscm/experiments/morphomnist/nf/conditional_flow_sem.py official repository ran · metamorphic tier: deterministic MIT (permissive) · 94342d5b16f1ca84 · report
ConditionalAffineTransform biomedia-mira/deepscm/deepscm/experiments/morphomnist/nf/conditional_flow_sem.py official repository ran · metamorphic tier: deterministic MIT (permissive) · a8205893b4e93a15 · report
SqueezeTransform biomedia-mira/deepscm/deepscm/experiments/morphomnist/nf/conditional_flow_sem.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 50e3c28ae2e23efd · report
BaseFlowSEM biomedia-mira/deepscm/deepscm/experiments/morphomnist/nf/conditional_flow_sem.py official repository unverified MIT (permissive) · 201e09ee2d9716ee · report
ConditionalFlowSEM biomedia-mira/deepscm/deepscm/experiments/morphomnist/nf/conditional_flow_sem.py official repository unverified MIT (permissive) · 536c07328829a20b · report
ReshapeTransform biomedia-mira/deepscm/deepscm/experiments/morphomnist/nf/conditional_flow_sem.py official repository unverified MIT (permissive) · 7eb735aaea9726cd · report
TransposeTransform biomedia-mira/deepscm/deepscm/experiments/morphomnist/nf/conditional_flow_sem.py official repository unverified MIT (permissive) · 546c4140e5db7144 · report
weights_init biomedia-mira/deepscm/deepscm/experiments/morphomnist/nf/conditional_flow_sem.py official repository unverified MIT (permissive) · 82b9f1b46a36f4f4 · report
ConditionalAffineTransform rongguangw/flow-scm/models/nfs.py community (archive-listed) ran · metamorphic tier: deterministic licence not identified · pointer only · 2e4cf3c6eda70520 · report
ConditionalSCM rongguangw/flow-scm/models/nfs.py community (archive-listed) ran licence not identified · pointer only · c1848ecedee520df · report
DSCM biomedia-mira/causal-gen/src/pgm/dscm.py community (archive-listed) ran MIT (permissive) · bf6be067c32aa776 · report
conditional_spline_autoregressive rongguangw/flow-scm/models/nfs.py community (archive-listed) ran · fixture could not drive it licence not identified · pointer only · 9a75d6db9c391bc1 · report
get_attr_max_min biomedia-mira/causal-gen/src/pgm/dscm.py community (archive-listed) ran · honoured contract fingerprinted MIT (permissive) · a4d7c4fb6e70eb53 · report
ukbb_preprocess biomedia-mira/causal-gen/src/pgm/dscm.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 0db6a51b39341f69 · report
vae_preprocess biomedia-mira/causal-gen/src/pgm/dscm.py community (archive-listed) ran · fixture could not drive it MIT (permissive) · 7f3c7862828e87cf · report
Hparams biomedia-mira/causal-gen/src/pgm/dscm.py community (archive-listed) unverified MIT (permissive) · 2a36741ebd1f5acd · report
TraceStorage_ELBO biomedia-mira/causal-gen/src/pgm/dscm.py community (archive-listed) unverified MIT (permissive) · e9dec58a402e8b3f · report
check_nan biomedia-mira/causal-gen/src/pgm/dscm.py community (archive-listed) unverified MIT (permissive) · 72901075b1db0ad0 · report

Tasks

Counterfactual InferenceNormalising FlowsVariational Inference

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections