Debiased Counterfactual Generation via Flow Matching from Observations

Hugh Dance, Johnny Xi, Peter Orbanz, Benjamin Bloem-ReddyNeurIPS 2026

TL;DR

When estimating how an entire population’s outcomes would change under an intervention, standard generative models try to sculpt that hypothetical world out of pure random noise. Instead, this paper introduces deconfounding flows, which start directly from observed data and learn only the minimal mathematical "edits" needed to strip away confounding bias. It turns generation-from-scratch into a much simpler, statistically robust editing problem—whether you are predicting economic outcomes or debiasing image datasets.

What Problem Does This Paper Address?

Causal inference often focuses on averages—like how a job training program shifts average income. Frequently, though, we want the entire counterfactual distribution: what happens to the tails, quantiles, or even high-dimensional outputs like images? For instance, if we generate portraits of women from a dataset where women are disproportionately blonde, a naive model inherits that spurious correlation. How do we sample from a "counterfactual" distribution where sex is fixed, but hair color reflects the broader population?

Existing state-of-the-art methods treat this counterfactual distribution as a standalone target, training generative models (like normalizing flows) to map generic Gaussian noise to the target distribution. Because Gaussian noise is smooth, unimodal, and light-tailed, forcing it to morph into real-world data with heavy tails, disconnected clusters, or intricate image geometries is notoriously difficult—and ignores the rich structure already sitting in our observed data.

Methods

Instead of starting from Gaussian noise, the authors propose Deconfounding Flow Matching (DecFM). The core idea is to use flow matching—a standard generative technique that learns a velocity field to push points smoothly from a source to a target distribution—to transport the observed conditional distribution (e.g., observed outcomes for treated individuals) directly to the counterfactual distribution.

Making this statistically rigorous requires two key innovations:

  • A Novel Debiased Estimator: Because we never observe the true counterfactual target, we can't run standard flow matching. Causal inference usually bridges this gap using doubly robust estimators built on Efficient Influence Functions (EIFs), which stay accurate even if auxiliary models (like propensity scores) are slightly off. Here, because the flow's starting distribution is also estimated from the data, standard math breaks down. The authors derive a brand-new EIF correction from scratch and use V-process theory to prove their estimator remains doubly robust and asymptotically efficient.
  • High-Dimensional Optimal Transport (DecFM-EOT): In higher dimensions (like images), standard flow matching pairs source and target points independently, creating tangled paths. The authors extend DecFM using minibatch Entropic Optimal Transport (via Sinkhorn's algorithm) to target minimal-energy, straight-line trajectories.

Datasets

No brand-new raw benchmarks are introduced, though the authors construct custom confounded regimes from standard datasets to test geometric and high-dimensional performance:

  • Synthetic 1D Geometries: Custom Gaussian, heavy-tailed Inverse-Gamma, and split-support Uniform mixtures.
  • Classic Causal Benchmarks: TWINS, 401(k), and ACIC 2019 (real covariates/treatments paired with synthetic outcome mechanisms), plus 10 ACIC 2016 challenge datasets with ground-truth potential outcomes.
  • ColorMNIST: Digit images (1 and 6) where foreground red-blue color acts as a tunable confounder.
  • CelebA: Subsampled (~20,000 portraits) to induce a strong spurious correlation between Sex and HairColor.

Key Insights and Ideas

  • Observational and counterfactual worlds are mathematical cousins: Both distributions are mixtures of the exact same conditional building blocks, differing only in how covariates are weighted. Under standard causal assumptions, the authors prove they share the exact same support and tail behavior. Flowing between them completely sidesteps the topological nightmares of stretching Gaussian noise into heavy tails or split supports.
Comparison of optimal transport maps from observational data versus Gaussian noise across heavy-tailed, split-support, and manifold geometries.
  • Weak confounding means near-identity flows: The optimal transport distance between observed and counterfactual outcomes is directly bounded by confounding strength. If confounding is mild, the flow barely has to move anything—a near-zero velocity field is vastly easier to learn than generating complex data from scratch.
  • Generation becomes structured editing: Any feature independent of the confounder (like facial pose when confounding only affects hair color) already has the right distribution in the observed data. DecFM naturally preserves invariant structure while editing only the biased attributes.
CelebA samples before and after applying the deconfounding flow, rebalancing hair color while preserving facial identity and pose.

Key Results

  • Handling Tricky Geometries: On 1D synthetic tasks, replacing a Gaussian base with an observational base cut Wasserstein-1 ($W_1$) error from $1.04$ to $0.71$ on heavy-tailed data, and halved it ($0.08$ to $0.04$) on split-support data.
  • Causal Benchmarks: Across ACIC, 401(k), and TWINS, DecFM matched or beat all competing debiased estimators. On the ACIC 2016 challenge, it achieved the lowest $W_1$ error ($0.35 \pm 0.15$), outperforming Gaussian-base flow matching (DoubleGen at $0.62 \pm 0.24$).
  • Image Debiasing: On ColorMNIST, DecFM consistently beat Gaussian flow matching in Sliced Wasserstein-2 (SW2) distance, accurately rebalancing digit colors without warping digit shapes. On CelebA, starting from observed female images already beat trained Gaussian flows ($0.066$ vs. $0.126$ SW2), and applying DecFM-EOT cut the remaining error nearly in half ($0.032$ SW2) via clean, targeted hair-color edits.

Limitations and Future Work

  • Standard Causal Caveats: DecFM still relies on foundational—and untestable—causal assumptions: no unobserved confounders and strict positivity (overlap). Note also that generated images represent population-level counterfactual distributions, not identified unit-level counterfactuals for specific individuals.
  • Theory Gap for Optimal Transport: Asymptotic efficiency guarantees currently cover only the independent-coupling estimator (DecFM-I), not the extra approximation error introduced by minibatch Optimal Transport (DecFM-EOT).
  • Extreme Regimes & Future Directions: When covariate overlap is very weak or outcomes vary wildly, the observational distribution becomes a less helpful anchor. Future work could build diagnostics for these regimes and extend deconfounding flows to alternative causal setups, such as the front-door criterion.

Summary updated

Abstract

Estimating the full counterfactual distribution under an intervention is central to treatment risk assessment and counterfactual generation tasks. Existing approaches model the counterfactual distribution as a standalone generative target, without exploiting its relationship to the observational data. In this work, we show that under standard assumptions, observational distributions and marginal counterfactual distributions over outcomes are tightly linked: they have identical support and tail behavior, remain statistically close under weak confounding, and share any outcome features which are invariant to confounders. These properties motivate learning counterfactual distributions not from scratch, but via a *deconfounding flow* from the observational distribution. We formulate this problem via flow-matching and derive a semiparametrically efficient estimator based on a novel efficient influence function correction. We subsequently extend our estimator to target minimal-energy flows in high-dimensions, which we show can be especially simple targets between observational and counterfactual distributions. In experiments, deconfounding flows outperform existing debiased counterfactual distribution estimators, while also mitigating known failure modes of flow-based methods.
BibTeX
@inproceedings{dance2026debiased,
  author = {Hugh Dance and Johnny Xi and Peter Orbanz and Benjamin Bloem-Reddy},
  title = {{Debiased Counterfactual Generation via Flow Matching from Observations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=t2qgnOp8Wx},
}

Loading related content...

Figure