Introduction
Causal Mediation Analysis (CMA) is a fundamental tool in causal inference used to decompose the total effect of a treatment into direct and mediated components. Understanding these mechanisms is crucial in fields ranging from medicine to social science. However, traditional CMA methods often struggle when mediators are high-dimensional or not directly observable. This paper introduces IMAVAE (Identifiable Mediation Analysis with Variational Autoencoder), a framework designed to address these challenges by leveraging identifiable latent variable models.
Problem Formulation
In many real-world scenarios, the true mediator $Z$ is a latent variable that drives an outcome $Y$ but is only observed through high-dimensional proxies $X$. For instance, in neuroscience, the effect of a drug on behavior might be mediated by complex neural states that are only indirectly captured via high-dimensional imaging or electrophysiological data. Existing linear models and standard deep learning approaches often fail to handle these "hidden" high-dimensional mediators or ignore the confounding variables that complicate causal estimation.
The IMAVAE Framework
IMAVAE combines causal structural assumptions with the identifiable VAE (iVAE) architecture. The core innovation lies in the use of auxiliary variables—such as the treatment $T$ and covariates $W$—to condition the latent prior. This conditioning ensures that the learned latent space is identifiable, meaning it uniquely recovers the true underlying distribution of the mediator up to simple linear transformations. This disentanglement is essential for calculating counterfactuals, such as determining what an outcome would be if a treated individual had the mediator profile of a control subject.
The model is trained by optimizing a joint objective function that includes:
- Evidence Lower Bound (ELBO): Ensures the latent space accurately represents the data distribution.
- Reconstruction Loss: Ensures the latent mediator $Z$ can accurately recreate the observed high-dimensional features $X$.
- Prediction Loss: Ensures $Z$ and the treatment $T$ can accurately predict the final outcome $Y$.
Experimental Evaluation
The framework was validated across three distinct types of data: a synthetic environment with a 2D latent mediator, a semi-synthetic electrophysiological dataset from mouse brain recordings (616 dimensions), and the classic Jobs II social science dataset.
On the high-dimensional mouse brain data, IMAVAE significantly outperformed traditional linear Structural Equation Models (SEMs) and other baseline methods. In estimating the Average Causal Mediation Effect (ACME), IMAVAE's error was approximately 5x to 25x lower than competing approaches. Results on the Jobs II dataset further demonstrated the model's robustness even in scenarios where mediators are directly observed, proving that IMAVAE generalizes well to standard causal inference tasks.
Conclusion
IMAVAE represents a significant advancement in causal mediation analysis, particularly for complex, high-dimensional systems where the underlying mechanisms are hidden. While the model currently assumes "sequential ignorability"—the absence of unobserved confounders between the mediator and outcome—future work may explore using high-dimensional proxies to account for hidden confounding, potentially relaxing this requirement. Additionally, exploring more complex non-linear predictors for the outcome could further enhance performance in highly non-linear biological or social systems.
Summary updated