Manuscript Offprint

arXiv:2610.30220

When Reconstruction Is Not Enough: Doubly Robust Counterfactual and Interventional Mediation Analysis with Learned Multimodal Representations

Cong Cao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Learned representations of high-dimensional multimodal health records are increasingly used to adjust for confounding, yet they are usually trained to reconstruct the data rather than to preserve the information that causal identification requires. We study two families of estimands: counterfactual outcomes under alternative treatments, including phenotype-specific effects and patient-level counterfactual risk profiles of the kind digital twins provide, and interventional direct and indirect effects under exposure-induced intermediate confounding. We give conditions under which a representation preserves identification and show that interventional mediation is more demanding than counterfactual comparison. We prove that no training objective that depends only on the covariates, whether reconstruction, contrastive, or physics-informed, can certify that a representation is sufficient, and in a linear structural model we show that a representation can lose an arbitrarily small share of reconstruction accuracy yet induce arbitrarily large bias. We decompose the error of cross-fitted doubly robust estimators into a first-order representation bias, which neither double robustness nor cross-fitting removes, and a second-order remainder of nuisance-estimation errors, so coverage deteriorates as the sample size grows when the representation is insufficient. We propose a workflow combining modality-specific variational autoencoders trained outside the estimation sample, cross-fitted doubly robust and one-step estimators, locked phenotypes, select-then-confirm pathway analysis, portable representations for external replication, and diagnostics for representation insufficiency, exposure leakage, and sensitivity. In simulations, a representation that discarded a rare confounder gave interventional indirect-effect intervals with 2% coverage at n = 3,000 when the confounder was moderately strong, reconstruction loss did not identify the problem, and a simple predictive diagnostic flagged it in 100% of replicates.

Keywords: causal inference; interventional effects; intermediate confounding; mediation analysis; representation learning; variational autoencoder; insufficient representations; counterfactual prediction; double machine learning; physics-informed learning; digital twins

1 Introduction

Electronic health records, biobanks, and participant surveys now describe patients through many data types at once: diagnoses, medications, laboratory values, vital signs, social and behavioral measures, and genomes. Causal questions asked of these data, such as whether a treatment works better for some patients than for others, or how much of an exposure's effect on a later outcome runs through an early intermediate change, require adjustment for confounding by many of these characteristics simultaneously. A common strategy is to compress the multimodal record into a low-dimensional representation, for example with modality-specific variational autoencoders (VAEs) (Kingma and Welling, 2014), and to use that representation as the adjustment set in downstream causal analyses (Cao and Ma, 2026b,a). The appeal is practical: nuisance models with thousands of sparse, correlated, and partly missing features are hard to fit, whereas a handful of learned dimensions is easy to work with.

The difficulty is that a VAE is trained to reconstruct its inputs. Nothing in that objective requires the representation to retain the information that identifies a causal effect, namely information about how the exposure was assigned, how intermediate variables respond, and how the outcome is generated. A variable can matter greatly for confounding while contributing little to reconstruction, for instance a rare diagnosis among hundreds of codes. More generally, good predictive performance does not by itself yield valid causal estimates (Westreich et al., 2020; Naimi et al., 2023). In related settings we found that learned components that predict or reconstruct well can still yield poor causal answers: low nuisance-function prediction error did not identify the better causal estimator (Cao, 2026b); learned exposure mappings with near-identical predictive accuracy implied different spillover effects (Cao, 2026a); and different representation-learning objectives recovered different latent structures from the same data (Cao et al., 2026). For conditional average treatment effects, Melnychuk et al. (2024) showed that low-dimensional representations can induce confounding bias and derived bounds for it.

Mediation analysis is more demanding still. When an exposure affects a confounder of the mediator–outcome relation, natural direct and indirect effects are not identified, and interventional effects are used instead (VanderWeele et al., 2014; Vansteelandt and Daniel, 2017). Their identifying functional involves the exposure mechanism, the distribution of the intermediate confounder, the mediator distribution, and the outcome regression, and efficient estimators combine all of them (Díaz et al., 2021, 2024; Benkeser and Ran, 2021). A representation must preserve the information needed by every one of these nuisance functions. Interventional effects also depend on the covariates used to define the random draw of the mediator, so an insufficient representation changes the target itself, not only the estimate.

Representation learning for treatment effects is well developed (Shalit et al., 2017; Louizos et al., 2017; Shi et al., 2019), and recent work characterizes which information in a learned representation suffices for efficient adjustment (Christgau and Hansen, 2024). Deep-learning approaches to mediation include debiased semiparametric estimators (Xu et al., 2022), VAE-based models with hidden confounders (Cheng et al., 2022), VAEs for multi-dimensional and indirectly observed mediators

(Jiang et al., 2023), and joint representations of covariates and mediators within cross-fitted estimators of natural effects (Bo et al., 2026). These approaches either target natural effects or assume that the learned representation is sufficient. To our knowledge, the consequences of representation insufficiency for interventional effects under intermediate confounding, and practical diagnostics for it, have not been studied.

This paper makes six contributions. First, we give sufficiency conditions under which a learned representation preserves identification of counterfactual means and of interventional effects, and we show that the interventional conditions are strictly more demanding (Section 3.1). Second, we prove that no training objective that depends only on the covariates, including reconstruction, contrastive, and physics-informed objectives, can certify sufficiency (Section 3.1), and, for a linear structural model, we derive the bias of interventional indirect effects induced by an insufficient representation and show that no function of reconstruction error bounds it (Section 3.2). Third, we decompose the error of cross-fitted doubly robust estimators that use a learned representation into a first-order representation bias and a second-order remainder, and we show that coverage deteriorates with sample size when the representation is insufficient (Section 3.3). Fourth, we describe a workflow that applies one representation to counterfactual treatment comparisons, locked phenotypes, interventional mediation, select-then-confirm pathway analysis, and portable external replication, including time-indexed multimodal records with a pre-exposure window (Section 4). Fifth, we propose diagnostics for representation insufficiency, exposure leakage, and representation sensitivity, together with a rule for choosing the representation by nuisance loss rather than reconstruction loss (Section 5). Finally, we evaluate these methods in a simulation study with a tunable information-loss mechanism (Sections 6 and 7).

References (37)