Papers › Deep Counterfactual Estimation with Categorical Background Variables

Deep Counterfactual Estimation with Categorical Background Variables

11 Oct 2022arXiv:2210.05811archive 2025-07-28

Edward De Brouwer

Referred to as the third rung of the causal inference ladder, counterfactual queries typically ask the "What if ?" question retrospectively. The standard approach to estimate counterfactuals resides in using a structural equation model that accurately reflects the underlying data generating process. However, such models are seldom available in practice and one usually wishes to infer them from observational data alone. Unfortunately, the correct structural equation model is in general not identifiable from the observed factual distribution. Nevertheless, in this work, we show that under the assumption that the main latent contributors to the treatment responses are categorical, the counterfactuals can be still reliably predicted. Building upon this assumption, we introduce CounterFactual Query Prediction (CFQP), a novel method to infer counterfactuals from continuous observations when the background variables are categorical. We show that our method significantly outperforms previously available deep-learning-based counterfactual methods, both theoretically and empirically on time series and image data. Our code is available at https://github.com/edebrouwer/cfqp.

PaperPDFCodeCode 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="2210.05811")

Code

Syntology Ran 12 of 14 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 2 ran · honoured contract; 10 ran with no contract checked.

By repository: official repository: 14 samples from 1 repository, 12 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

edebrouwer/cfqp officialmentioned in paperpytorch 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

14 samples harvested; 12 ran; 2 honoured the contract we drafted; 2 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.

2ran · honoured contract
10ran
2unverified

Licence: 0 of the 14 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 edebrouwer/cfqp. “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.

ConcatELU edebrouwer/cfqp/condgen/models/deepscm.py official repository ran · metamorphic tier: invariant fingerprinted MIT (permissive) · b6fde1347f3c0487 · report
ConditionalEmbedder edebrouwer/cfqp/condgen/models/deepscm.py official repository ran MIT (permissive) · 6c70686f770acba9 · report
CouplingLayer edebrouwer/cfqp/condgen/models/deepscm.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 376c28f71c667cda · report
Dense edebrouwer/cfqp/condgen/models/deepscm.py official repository ran · metamorphic tier: invariant MIT (permissive) · 94d4f204a05beb0f · report
Dequantization edebrouwer/cfqp/condgen/models/deepscm.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · fed58d977eb2e982 · report
GatedConv edebrouwer/cfqp/condgen/models/deepscm.py official repository ran · metamorphic tier: invariant fingerprinted MIT (permissive) · 38028e8d1730adef · report
ImageEmbedder edebrouwer/cfqp/condgen/models/deepscm.py official repository ran · metamorphic tier: invariant MIT (permissive) · 9223e49f435dc017 · report
LayerNormChannels edebrouwer/cfqp/condgen/models/deepscm.py official repository ran · metamorphic tier: invariant fingerprinted MIT (permissive) · 4c64baabf9213ee9 · report
SplitFlow edebrouwer/cfqp/condgen/models/deepscm.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 401b5c674fd422f5 · report
SqueezeFlow edebrouwer/cfqp/condgen/models/deepscm.py official repository ran · metamorphic tier: deterministic fingerprinted MIT (permissive) · 2fd221c99150b1ac · report
create_channel_mask edebrouwer/cfqp/condgen/models/deepscm.py official repository ran · honoured contract fingerprinted MIT (permissive) · b7eb9187d2bf923b · report
create_checkerboard_mask edebrouwer/cfqp/condgen/models/deepscm.py official repository ran · honoured contract fingerprinted MIT (permissive) · 60a6d4fde58fae8f · report
DeepSCM edebrouwer/cfqp/condgen/models/deepscm.py official repository unverified MIT (permissive) · 61ed57e4cf40e7ed · report
GatedConvNet edebrouwer/cfqp/condgen/models/deepscm.py official repository unverified MIT (permissive) · b63ac09163dbabc2 · report

Tasks

Causal InferenceTime SeriesTime Series Analysis

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

Counterfactuals

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