Abstract
Causal mediation analysis (CMA) is a critical tool for decomposing the total effect of a treatment into direct and indirect pathways. However, the presence of unmeasured confounders often biases these estimates. This paper introduces DMAVAE (Disentangled Mediation Analysis Variational AutoEncoder), a deep learning framework that addresses latent confounding by disentangling hidden factors into distinct components. By moving beyond the restrictive assumption of sequential ignorability and adopting a "piecemeal deconfounding" approach, DMAVAE provides more robust and precise estimates of Natural Direct Effects (NDE) and Natural Indirect Effects (NIE) in complex observational data.
Introduction
In causal inference, understanding the mechanism through which a treatment ($T$) influences an outcome ($Y$) is often as important as measuring the effect itself. Causal mediation analysis facilitates this by identifying a mediator ($M$) that lies on the causal path between $T$ and $Y$. The goal is to quantify the Natural Direct Effect (the path $T \to Y$) and the Natural Indirect Effect (the path $T \to M \to Y$).
A significant hurdle in this analysis is the presence of latent confounding—unmeasured variables that simultaneously influence the treatment, mediator, and outcome, creating spurious correlations. While recent deep generative models have attempted to infer these hidden factors from proxy data ($X$), they typically treat all latent confounders as a single, monolithic entity. This simplification often fails to capture the nuanced structure of real-world causal relationships, leading to biased results.
Methodology
Disentangled Representations
DMAVAE leverages the architecture of Variational AutoEncoders (VAEs) to map observed proxy attributes into a structured latent space. Unlike previous models that learn a single latent vector, DMAVAE disentangles the latent space into three distinct components based on their specific roles in the causal chain:
- $Z_{TM}$: Latent confounders affecting the Treatment and the Mediator.
- $Z_{TY}$: Latent confounders affecting the Treatment and the Outcome.
- $Z_{MY}$: Latent confounders affecting the Mediator and the Outcome.
By mirroring the physical structure of the causal paths within the model's architecture, DMAVAE can more accurately isolate the influence of different confounding factors.
Piecemeal Deconfounding
Traditional mediation analysis relies on the "sequential ignorability" assumption, which requires that there are no unmeasured confounders for any of the causal relationships in the graph. DMAVAE relaxes this by adopting piecemeal deconfounding. This approach allows different sets of latent variables to deconfound different segments of the causal graph, making the model more applicable to real-world scenarios where a single set of variables may not account for all confounding.
Auxiliary Predictors and Loss Functions
To ensure that the learned latent representations ($Z_{TM}, Z_{TY}, Z_{MY}$) truly capture the intended causal relationships, the framework incorporates auxiliary predictors. These tasks force the latent variables to be predictive of $T$, $M$, and $Y$ in specific combinations, ensuring the disentanglement is grounded in the observed data.
Experimental Evaluation
Synthetic Benchmarks
The authors evaluated DMAVAE against synthetic datasets with known ground-truth causal effects. These tests demonstrated that DMAVAE consistently achieves lower estimation bias than existing methods. For a sample size of 10,000, DMAVAE’s bias for the Natural Direct Effect (NDE) was approximately 1.5%, significantly outperforming the previous state-of-the-art model, CMAVAE (5.2%), and traditional Linear Structural Equation Models (LSEM), which exceeded 7% bias.
Real-World Application: UCI Adult Dataset
The model was applied to the UCI Adult dataset (48,842 records) to investigate gender discrimination in income. In this context, gender was the treatment ($T$), income the outcome ($Y$), and occupation the mediator ($M$). Various personal and economic attributes served as proxies ($X$).
The analysis revealed a significant Natural Direct Effect of gender on income (NDE = 0.804), while the Natural Indirect Effect through occupation was negligible (NIE = 0.002). This suggests that the income gap in this dataset is primarily driven by direct factors rather than indirect pathways such as occupational choice.
Discussion and Conclusion
Key Insights
The success of DMAVAE underscores that granularity in latent representation matters. By explicitly modeling the structure of confounding, the framework achieves higher precision and better generalization than "black box" latent models. Furthermore, by relaxing strict mathematical assumptions through piecemeal deconfounding, the authors provide a more viable path for applying causal mediation analysis to messy, observational data.
Limitations and Future Directions
The effectiveness of DMAVAE is contingent upon the quality of the proxy attributes ($X$). If these proxies lack sufficient information to reconstruct the latent confounders, the disentanglement process will be compromised. Future research will focus on applying this framework to more complex policy evaluation scenarios and exploring causal structures involving multiple, interacting mediators.
Summary updated