We propose sequential transport (ST), a distributional framework for mediation analysis that combines optimal transport (OT) with a mediator directed acyclic graph (DAG). Instead of relying on cross-world counterfactual assumptions, ST constructs unit-level mediator counterfactuals by minimally transporting each mediator, either marginally or conditionally, toward its distribution under an alternative treatment while preserving the causal dependencies encoded by the DAG. For numerical mediators, ST uses monotone (conditional) OT maps based on conditional CDF/quantile estimators; for categorical mediators, it extends naturally via simplex-based transport. We establish consistency of the estimated transport maps and of the induced unit-level decompositions into mutatis mutandis direct and indirect effects under standard regularity and support conditions. When the treatment is randomized or ignorable (possibly conditional on covariates), these decompositions admit a causal interpretation; otherwise, they provide a principled distributional attribution of differences between groups aligned with the mediator structure. Gaussian examples show that ST recovers classical mediation formulas, while additional simulations confirm good performance in nonlinear and mixed-type settings. An application to the COMPAS dataset illustrates how ST yields deterministic, DAG-consistent counterfactual mediators and a fine-grained mediator-level attribution of disparities.
Figures & tables
Figure 1: DAG for the simulated data.
Figure 2: Estimation (200 replicated samples, n=600 ) of average indirect effect δˉ , average direct effect ζˉ and average total causal effect τˉ .
Figure 3: Simplified DAG for the COMPAS dataset.
Figure 4: Individual mutatis mutandis effects (distributional decomposition) for the COMPAS dataset estimated with counterfactual-based methods using Fairadapt (FPT-RF), optimal transport (OT), penalized OT (SKH), and sequential transport (ST) according to the causal graph of Figure 3 .
Metric
CM
FPT
NF
OT
SKH
ST
δˉ
-0.09
0.00
-0.06
-0.06
0.04
-0.06
ζˉ
0.00
-0.03
0.00
-0.03
-0.04
-0.02
τˉ
-0.09
-0.03
-0.06
-0.09
0.00
-0.08
Table 1: Estimated average causal effects for COMPAS , based on causal mediation analysis with LSEM using mediation package (CM), with counterfactual-transport-based-methods: optimal transport (OT), penalized OT (SKH), sequential transport (ST) and fairadapt (FPT) according to the DAG of Figure 3 , and using normalizing flows (NF).
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Untreated units (green dots), treated Units (yellow dots), and transported units (blue triangles) under optimal transport (OT), entropic regularization with Sinkhorn algorithm (SKH) and sequential transport: ST(1) (transporting X1 first and then X1→X2 ) and ST(2) (transporting X2 first and then X2→X1 ). Lines indicate the transport mappings.
Figure 6: Estimated τi for the two untreated units (black squares), xi1=(−1.5,−1.4) (left) and xi2=(−2.4,−3.8) (right), using different transport methods. Green dots: untreated; yellow dots: treated.
Metric
i
OT
OT-M
SKH
ST(1)
ST(2)
δi
1
1.3
0.4
0.5
-0.4
1.4
2
4.2
4.1
1.0
1.1
3.9
ζi
1
2.7
3.2
3.2
3.7
3.5
2
4.5
7.7
3.4
3.3
7.6
τi
1
4.0
3.5
3.7
3.3
4.9
2
8.8
11.8
4.4
4.4
11.9
Appendix
Table 2: Estimated individual causal effects for two units, xi1=(−1.5,−1.4) and xi2=(−2.4,−3.8) , based on counterfactuals build using optimal transport (OT), OT-Based matching (OT-M), penalized OT (SKH), and two sequential appoaches X1→X2 (ST(1)) and X2→X1 (ST(2)).
Figure 7: Individual causal effects for the Gaussian toy example estimated with counterfactual-based methods using optimal transport (OT), penalized OT (SKH), and two sequential approaches X1→X2 (ST(1)) and X2→X1 (ST(2)). The red dashed line depicts theoretical expectations.
Figure 8: Example of simulated data for the toy example of section D.1 for various distances between the means of the Gaussian distributions in groups 0 and 1.
Figure 9: Estimation error of the average causal effects ( δˉ , ζˉ , τˉ ) across 200 replicated samples ( n=500 ), in the Gaussian case with two mediators (toy example of section D.1 ), for increasing values Of α .
Figure 10: Estimation error of the average causal effects ( δˉ , ζˉ , τˉ ) across 200 replicated samples ( n=500 ), in the Gaussian case with two mediators (toy example of section D.1 ), for increasing proportion of untreated.
Mediation analysis has traditionally focused on outcome-level summary contrasts, such as mean effects, which may obscure substantial distributional changes induced by complex and nonlinear causal mechanisms. We propose Distributional Causal Mediation Analysis (DCMA), a generative learning framework for identifying and estimating treatment effects on entire outcome distributions transmitted through multiple mediators. DCMA learns conditional generative models for the mediators and the outcome, recovering the relevant conditional distributions from observational data. Leveraging the identification formulas, it reconstructs interventional outcome distributions via Monte Carlo forward simulation by noise resampling, enabling the capture of both classical summary effects and rich distributional contrasts such as energy distance and the Wasserstein distance. Analytical error bounds are derived to decompose how estimation errors in the learned conditional models propagate to the reconstructed interventional outcome distributions. The empirical effectiveness of DCMA is demonstrated through numerical experiments and real-world data applications.
Jinlun Zhang, Haoneng Huang, Zishu Zhan +1
State Key Laboratory of Multi-organ Injury Prevention and Treatment, Department of Biostatistics, Guangdong Provincial Key Laboratory of Tropical Disease Research, School of Public Health, Southern Medical University, Guangzhou, China
We propose a two-stage estimator for structural mediation parameters that combines deep representation learning with G-estimation under the "no essential heterogeneity" (NEH) assumption. We call the method UNIT. In the first stage,TARNet estimates the heterogeneous effect of a randomized treatment on a mediator by learning a shared covariate representation across treatment arms.The resulting conditional average treatment effect (CATE) estimate provides a plug-in approximation to the heterogeneity-dependent component of the weight function entering the G-estimating equation of Zheng and Zhou (2015), which identifies the structural parameters even in the presence of unmeasured mediator-outcome confounding. We show that more accurate first-stage representation learning can yield a more informative plug-in weight and thereby improve the precision of the structural parameter estimator. In simulations with non-Gaussian covariates and nonlinear mediator effects, TARNet weights reduce the Stage-2 standard error of the mediation coefficient by a factor of 1.45 to 1.51 (median across replications, n≥2000) relative to the classical approach, at no cost to bias or coverage.
Causal mediation analysis decomposes a treatment effect into indirect pathways through mediators and direct pathways not operating through them. Modern biomedical studies often involve high-dimensional covariates and mediators that are noisy proxies for lower-dimensional latent biological processes. Existing methods typically rely on sparsity, linear factor models, or ignore the connection among variables in the learned representations, which can be restrictive when measurements are nonlinear and covariate and mediator factors are structurally dependent. We propose MediEncoder, a representation-learning framework for nonlinear high-dimensional mediation analysis. MediEncoder jointly learns low-dimensional covariate and mediator representations using a coupled encoder-decoder architecture with a cross-factor network that links treatment and covariate representations to mediator representations. The learned features are then used in a cross-fitted efficient influence function-based estimator of natural direct and indirect effects. The resulting estimator is multiply robust and asymptotically normal under suitable regularity conditions. Simulations show that MediEncoder improves estimation accuracy over competing dimension-reduction approaches, and an application to Alzheimer's Disease Neuroimaging Initiative data illustrates its utility in high-dimensional biomedical causal mediation analysis.
Shi Bo, Debarghya Mukherjee, AmirEmad Ghassami
Department of Mathematics and Statistics, Boston University