Abstract
Uncovering causal mediation effects is of significant value to practitioners who aim to isolate treatment effects from potential mediator effects. We propose a double machine learning (DML) algorithm for mediation analysis that supports continuous treatments. To estimate the target mediated response curve, our method employs a kernel-based doubly robust moment function for which we prove asymptotic Neyman orthogonality. This allows us to obtain an asymptotic normality with nonparametric convergence rate while allowing for nonparametric or parametric estimation of the nuisance parameters. Subsequently, we derive an optimal bandwidth strategy along with a procedure to estimate asymptotic confidence intervals. Finally, to illustrate the benefits of our method, we provide a numerical evaluation of our approach on a simulation along with an application on medical real-world data to analyze the effect of glycemic control on cognitive functions.
The Challenge of Mediation Analysis
In causal inference, researchers often seek to understand the mechanisms through which a treatment influences an outcome. This is the core of mediation analysis, which decomposes a total effect into a direct effect (the path from treatment $T$ to outcome $Y$) and an indirect effect (the path through a mediator $M$).
While methods for binary treatments are well-established, many real-world scenarios involve continuous treatments, such as drug dosages or exposure levels. Estimating these effects nonparametrically is challenging because "nuisance parameters"—like treatment density or expected outcomes—are difficult to estimate precisely. Even minor errors in these estimates can lead to significant bias in the final causal effect.
Proposed Methodology: Double Machine Learning (DML)
To address these challenges, we introduce a novel Double Debiased Machine Learning (DML) framework for mediation analysis with continuous treatments. Our approach relies on two primary pillars:
- Neyman Orthogonality: We derive a specific "moment function" that is insensitive to small errors in nuisance parameter estimates. This "debiasing" property ensures that the final estimator converges at a fast rate, even when using flexible machine learning models (e.g., Random Forests or Neural Networks) for the nuisance parameters.
- Cross-Fitting: To prevent overfitting, the data is split into $L$ folds. Nuisance models are trained on one subset and used to predict scores on the remaining data, ensuring the independence of the estimation process.
Key Innovations
- Kernel Smoothing: We use kernel functions to localize estimation around specific treatment values, effectively handling the continuous nature of the treatment.
- Bayes Transformation: To avoid the "curse of dimensionality" when dealing with high-dimensional mediators (e.g., brain imaging data), we employ a mathematical transformation that bypasses the direct estimation of mediator densities.
- Optimal Bandwidth Selection: We provide an Asymptotic Mean Squared Error (AMSE) strategy to find the optimal balance between bias and variance in the kernel smoothing process.
Performance and Results
We evaluated our DML framework using both synthetic simulations and real-world medical data from the UK Biobank.
Simulation Results
In head-to-head comparisons with standard methods like Ordinary Least Squares (OLS), Inverse Probability Weighting (IPW), and Kernel Mean Embedding (KME), the DML approach demonstrated superior performance.
As shown in the figure above, DML consistently achieves lower bias across various sample sizes. For instance, at a sample size of $n=1000$, DML's bias was approximately four times lower than that of OLS for the direct effect. Furthermore, DML avoids the "exploding weights" problem often encountered with IPW when treatment overlap is low.
Real-World Application: UK Biobank
We applied our method to a dataset of approximately 30,000 participants from the UK Biobank to investigate whether the effect of glycemic control (HbA1c levels) on cognitive function is mediated by brain structure. While the study found no statistically significant mediated effect through the specific brain features analyzed, the DML framework provided more stable confidence intervals and statistical rigor compared to traditional weighting methods, corroborating recent findings in the field.
Conclusion and Future Work
Our DML framework provides a robust, scalable solution for mediation analysis with continuous treatments and high-dimensional mediators. While the method currently excels with low-dimensional treatments, future research will explore scaling to high-dimensional treatment variables and integrating Targeted Maximum Likelihood Estimation (TMLE) to further enhance finite-sample performance.
Summary updated