Abstract
Answering counterfactual queries has important applications such as explainability, robustness, and fairness but is challenging when the causal variables are unobserved and the observations are non-linear mixtures of these latent variables, such as pixels in images. One approach is to recover the latent Structural Causal Model (SCM), which may be infeasible in practice due to requiring strong assumptions, e.g., linearity of the causal mechanisms or perfect atomic interventions. Meanwhile, more practical ML-based approaches using naive domain translation models to generate counterfactual samples lack theoretical grounding and may construct invalid counterfactuals. In this work, we strive to strike a balance between practicality and theoretical guarantees by analyzing a specific type of causal query called domain counterfactuals, which hypothesizes what a sample would have looked like if it had been generated in a different domain (or environment). We show that recovering the latent SCM is unnecessary for estimating domain counterfactuals, thereby sidestepping some of the theoretic challenges. By assuming invertibility and sparsity of intervention, we prove domain counterfactual estimation error can be bounded by a data fit term and intervention sparsity term. Building upon our theoretical results, we develop a theoretically grounded practical algorithm that simplifies the modeling process to generative model estimation under autoregressive and shared parameter constraints that enforce intervention sparsity. Finally, we show an improvement in counterfactual estimation over baseline methods through extensive simulated and image-based experiments.
Introduction
Predicting how a specific data point—such as a medical image—would appear if generated in a different environment is a core challenge in causal inference known as a domain counterfactual (DCF) query. For instance, one might ask: "What would this brain scan from Hospital A look like if it were taken at Hospital B?"
Solving this is difficult because causal factors (anatomy, scanner noise) are latent and mixed non-linearly into high-dimensional pixels. Traditional Causal Representation Learning (CRL) often hits an "identifiability trap," requiring strict assumptions like atomic interventions that rarely hold in practice. Conversely, standard machine learning domain translation often "hallucinates" changes, failing to preserve the identity of the sample. This work proposes a middle ground: providing theoretical guarantees for counterfactuals without requiring full model recovery.
Theoretical Framework and Methods
The authors introduce Invertible Latent Domain (ILD) models, built on three key pillars:
- Counterfactual Equivalence: They prove that multiple latent models can produce identical counterfactuals. Thus, finding the true ground-truth model is unnecessary; we only need one in the same equivalence class.
- Sparse Mechanism Shift (SMS) Hypothesis: The model assumes that moving between domains involves changes to only a small subset of latent causal mechanisms.
- Canonical ILD Models: A major theoretical contribution is the proof that any ILD model with $k$ intervened variables can be mathematically transformed into a "canonical" form where only the last $k$ variables are intervened. This collapses the search space from a combinatorial problem to a single architectural constraint.
The ILD-Can Algorithm
Based on these insights, the ILD-Can algorithm uses Normalizing Flows or VAEs to enforce an autoregressive structure. Most parameters are shared across domains, while only the "canonical" last $k$ variables are permitted to vary, ensuring intervention sparsity.
Experimental Evaluation
The method was evaluated on synthetic data (non-linear SCMs) and several image benchmarks, including Rotated MNIST, Colored Rotated MNIST (CRMNIST), 3D Shapes, and Causal3DIdent. These benchmarks test the model's ability to change specific domain factors (like rotation or object shape) while preserving others (like color or background).
Key Results and Insights
- Query-Specific Estimation: The results demonstrate that full model identifiability is not a prerequisite for counterfactual accuracy. By focusing on the DCF query, the researchers bypass the most restrictive CRL assumptions.
- Sparsity as a Bound: Theoretical error bounds show that DCF estimation error is controlled by data fit and intervention sparsity.
- Superior Preservation: In image experiments, ILD-Can significantly outperformed "dense" models. On the 3D Shapes dataset, ILD-Can successfully modified object shapes while keeping colors and backgrounds identical, whereas dense models often introduced random changes.
Quantitatively, on CRMNIST, ILD-Can achieved a Reversibility score of ~85% (vs. ~62% for dense baselines) and a Preservation score of ~73% (vs. ~60%).
Conclusion and Future Work
While ILD-Can shows significant promise, challenges remain. Sparse models can be harder to optimize due to complex loss landscapes, and the theory currently relies on the invertibility of the latent-to-pixel mapping. Additionally, the current implementation requires a user-provided estimate for the sparsity level $k$. Future research may focus on automatically learning this sparsity level during the training process.
Summary updated