Papers › Counterfactual Generative Modeling with Variational Causal Inference

Counterfactual Generative Modeling with Variational Causal Inference

16 Oct 2024arXiv:2410.12730archive 2025-07-28

Yulun Wu, Louie McConnell, Claudia Iriondo

Estimating an individual's counterfactual outcomes under interventions is a challenging task for traditional causal inference and supervised learning approaches when the outcome is high-dimensional (e.g. gene expressions, facial images) and covariates are relatively limited. In this case, to predict one's outcomes under counterfactual treatments, it is crucial to leverage individual information contained in the observed outcome in addition to the covariates. Prior works using variational inference in counterfactual generative modeling have been focusing on neural adaptations and model variants within the conditional variational autoencoder formulation, which we argue is fundamentally ill-suited to the notion of counterfactual in causal inference. In this work, we present a novel variational Bayesian causal inference framework and its theoretical backings to properly handle counterfactual generative modeling tasks, through which we are able to conduct counterfactual supervision end-to-end during training without any counterfactual samples, and encourage disentangled exogenous noise abduction that aids the correct identification of causal effect in counterfactual generations. In experiments, we demonstrate the advantage of our framework compared to state-of-the-art models in counterfactual generative modeling on multiple benchmarks.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 13 code samples harvested from 1 repository linked to this paper: 11 ran (of which 3 constructed an object rather than computing a result; 8 with no instrument failure: 5 honoured, 0 violated, 3 with no contract checked; 3 where Syntology's instrument failed) · 2 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 13 samples from 1 repository, 11 ran (8 with no instrument failure; 3 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

yulun-rayn/variational-causal-inference officialmentioned in papermentioned on GitHubpytorchSyntology: 13 samples, 11 ran (3 instrument-failed) · 2 unverified 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

13 samples harvested: 11 ran (of which 3 constructed an object rather than computing a result; 8 with no instrument failure: 5 honoured, 0 violated, 3 with no contract checked; 3 where Syntology's instrument failed) · 2 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

5ran · honoured contract
3ran · our draft was wrong
3ran
2unverified

Licence: 0 of the 13 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 yulun-rayn/variational-causal-inference. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

yulun-rayn/variational-causal-inference official repository 13 samples, 11 ran (3 instrument-failed) · 2 unverified
Bernoulli in 7 papers vci/model/model.py ran · metamorphic tier: deterministic MIT (permissive) · dea1f055e5384287 · report fixture: returned Bernoulli · level recorded 2026-09-22
MLP in 375 papers vci/model/model.py ran · metamorphic tier: deterministic MIT (permissive) · 7fa7a62d632952f9 · report fixture: returned MLP · level recorded 2026-09-22
NegativeBinomial vci/model/model.py ran · metamorphic tier: deterministic MIT (permissive) · 6bc335fb08d066b1 · report fixture: returned NegativeBinomial · level recorded 2026-09-22
convert_counts_logits_to_mean_disp vci/model/model.py ran · honoured contract fingerprinted MIT (permissive) · 50ae298ea49aeb9b · report fixture: signature total_count:Tensor/2/float, logits:Tensor/2/float · returned tuple · level recorded 2026-09-22
kldiv_normal vci/model/model.py ran · honoured contract fingerprinted MIT (permissive) · c234099c90995b3b · report fixture: signature mu1:Tensor/2/float, sigma1:Tensor/2/float, mu2:Tensor/2/float, sigma2:Tensor/2/float · returned Tensor · level recorded 2026-09-22
logprob_bernoulli_logits vci/model/model.py ran · honoured contract fingerprinted MIT (permissive) · a7f751433500aa08 · report fixture: signature x:Tensor/2/float, logit:Tensor/2/float, weight:Tensor/2/float · returned Tensor · level recorded 2026-09-22
logprob_nb_positive vci/model/model.py ran · our draft was wrong MIT (permissive) · eeacddf00a076b9a · report fixture: signature x:Tensor/2/float, mu:Tensor/2/float, theta:Tensor/2/float, weight:Tensor/2/float, eps:float/0/float, log_fn:callable/0/?, lgamma_fn:callable/0/? · returned Tensor · level recorded 2026-09-22
logprob_normal vci/model/model.py ran · honoured contract fingerprinted MIT (permissive) · 69c7f5318d875117 · report fixture: signature x:Tensor/2/float, loc:Tensor/2/float, scale:Tensor/0/float, weight:Tensor/2/float, eps:float/0/float · returned Tensor · level recorded 2026-09-22
logprob_zinb_positive vci/model/model.py ran · our draft was wrong fingerprinted MIT (permissive) · 4d8120cda0df491d · report fixture: signature x:Tensor/2/float, mu:Tensor/2/float, theta:Tensor/2/float, pi:Tensor/2/float, weight:Tensor/1/float, eps:float/0/float · returned Tensor · level recorded 2026-09-22
lr_lambda_exp vci/model/model.py ran · our draft was wrong MIT (permissive) · 9abff7722bb4361f · report fixture: signature decay_epochs:int/0/int, decay_rate:float/0/float · returned function · level recorded 2026-09-22
total_grad_norm_ vci/model/model.py ran · honoured contract MIT (permissive) · 2cf0050d33254c6d · report fixture: signature parameters:list/1/Tensor, norm_type:float/0/float, error_if_nonfinite:bool/0/bool · returned Tensor · level recorded 2026-09-22
VCI vci/model/model.py unverified MIT (permissive) · c11d2cfe40bff9c5 · report
ZeroInflatedNegativeBinomial vci/model/model.py unverified MIT (permissive) · 2dad2f97235b041d · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for variational Bayesian causal inference framework (graph method: variational Bayesian causal inference framework). 13 bricks; individually on a fixture: 11 ran (of which 3 constructed an object rather than computing a result; 8 with no instrument failure: 5 honoured, 0 violated, 3 with no contract checked; 3 where Syntology's instrument failed) · 2 unverified. The assembly has not been run end-to-end.

  1. VCI entry · level 0 · unverified · c11d2cfe40bff9c5
  2. Bernoulli model · level 1 · ran · dea1f055e5384287
  3. MLP helper · level 1 · ran · 7fa7a62d632952f9
  4. NegativeBinomial model · level 1 · ran · 6bc335fb08d066b1
  5. ZeroInflatedNegativeBinomial model · level 0 · unverified · 2dad2f97235b041d
  6. kldiv_normal loss · level 1 · ran · honoured contract · c234099c90995b3b
  7. logprob_bernoulli_logits loss · level 1 · ran · honoured contract · a7f751433500aa08
  8. logprob_nb_positive loss · level 1 · ran · our draft was wrong · eeacddf00a076b9a
  9. logprob_normal loss · level 1 · ran · honoured contract · 69c7f5318d875117
  10. logprob_zinb_positive loss · level 1 · ran · our draft was wrong · 4d8120cda0df491d
  11. lr_lambda_exp helper · level 1 · ran · our draft was wrong · 9abff7722bb4361f
  12. total_grad_norm_ helper · level 1 · ran · honoured contract · 2cf0050d33254c6d
  13. convert_counts_logits_to_mean_disp helper · level 1 · ran · honoured contract · 50ae298ea49aeb9b

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2410.12730") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Causal InferenceDisentanglementVariational 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.

Methods

Causal inferenceVariational Inference

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