Sequential Kernel Embedding for Mediated and Time-Varying Dose Response Curves

Rahul Singh, Liyuan Xu, Arthur GrettonarXiv 2021

TL;DR

This paper introduces sequential kernel embedding, a novel machine learning framework that simplifies the estimation of complex, time-varying causal effects with continuous treatments. By transforming intricate sequential integrals into a series of simple, closed-form kernel ridge regressions, the method elegantly handles nonlinear treatment-confounder feedback loops without relying on restrictive parametric assumptions or problematic density estimations.

What Problem Does This Paper Address?

In causal inference, understanding long-term impacts requires analyzing time-varying treatments (e.g., tracking how medical dosages or job training hours over multiple years affect an outcome) and mediation analysis (determining how much of an effect passes through an intermediate mechanism).

The core challenge lies in treatment-confounder feedback. For example, a student's class hours in year one might reduce their drug use in year two, which in turn influences how many class hours they take in year two. When treatments, mediators, and confounders are continuous variables, mathematically untangling this feedback loop using traditional tools (like Robins' g-formula or Pearl's mediation formula) is notoriously difficult.

To make estimation tractable, existing methods typically resort to severe compromises:

  1. Restricting treatments to simple binary choices (yes/no).
  2. Forcing rigid linear or parametric assumptions that fail to capture real-world complexities.
  3. Relying on high-dimensional density estimation, which quickly succumbs to the curse of dimensionality.

This paper bridges the gap by providing a flexible, fully nonparametric approach capable of handling continuous variables in general spaces while maintaining strong theoretical guarantees.

Methods

The authors' key innovation is sequential kernel embedding, which maps complex conditional distributions into a Reproducing Kernel Hilbert Space (RKHS).

  • The "Aha" Moment: In standard square-integrable function spaces ($L^2$), the formulas used to calculate continuous time-varying effects are mathematically unbounded, making estimation unstable. The authors prove that by moving to an RKHS, boundedness is restored. This guarantees that the sequential distributions can be cleanly represented as kernel embeddings.
  • Decoupling the Integral: This embedding allows the authors to "decouple" the highly dependent terms inside the sequential integrals of the g-formula.
  • Closed-Form Solutions: Instead of performing computationally expensive numerical integrations or multi-level sample splitting, the final algorithms collapse into stacked kernel ridge regressions. The resulting estimators have simple, explicit closed-form matrix solutions that can be computed efficiently using standard numerical packages.

The framework provides nonasymptotic uniform rates (sup-norm guarantees), meaning the accuracy bounds hold firmly across all possible treatment values, a feature highly desirable for policymakers evaluating specific dosage levels.

Datasets

The paper evaluates its approach using both simulated data and a prominent real-world social program dataset:

  • Synthetic Designs: Nonparametric, highly nonlinear simulation designs where covariates are scaled up to high dimensions ($X \in \mathbb{R}^{100}$) to rigorously test the estimator against the curse of dimensionality.
  • US Job Corps Data: The authors utilize data from the National Job Corps Study. Crucially, they cleaned and compiled multiple rounds of follow-up surveys to build a multi-year longitudinal dataset. The authors have shared this cleaned dataset publicly to serve as a new open benchmark for time-varying causal inference.

Key Insights and Ideas

  • Double Spectral Robustness: For discrete treatment applications, the authors uncover a unique property they call "double spectral robustness." Similar to the double sparsity property in Lasso, they show a theoretical trade-off where some kernels in the sequential chain can have a high effective dimension (less smooth) as long as other kernels have a sufficiently low effective dimension (smoother).
  • Direct vs. Indirect Effects: When analyzing how job training prevents arrests, the framework allows both the baseline treatment and the mediator to vary continuously. This revealed that the mechanism behind crime reduction is fundamentally different from what standard economic models assume.

Key Results

Simulation Performance

In high-dimensional, nonlinear settings ($n = 5000$), the proposed RKHS estimator significantly outperformed state-of-the-art alternatives, including standard Inverse Propensity Weighting (IPW) and Structural Nested Mean Models (SNMM), achieving lower out-of-sample Mean Square Error (MSE) with high statistical significance ($p < 10^{-3}$).

US Job Corps Case Study

Applying their estimator to the cleaned Job Corps benchmark yielded two major policy insights:

  1. The Arrest Mechanism: Job training reduces the number of individual arrests, but this effect is direct. The indirect effect—mediated through the proportion of weeks a person is employed—was essentially zero. This suggests that job training centers curb arrests through social mechanisms, mentorship, or behavioral changes rather than simply by keeping individuals busy at a job.
  2. Optimizing Class Hours: When looking at time-varying employment benefits, the maximum counterfactual employment rate (64%, up from a 56% baseline) is achieved with a relatively brief intervention: 480 to 1280 class hours in year one, coupled with minimal to no training (0 to 480 hours) in year two. Piling on heavy class hours in the second year proved entirely unproductive for long-term employment gains, pointing toward a highly cost-effective strategy for public program design.
                  Year Two Class Hours
                  ≤ 10³ Hours    > 10³ Hours
                ┌──────────────┬──────────────┐
   > 10³ Hours  │    41.5%     │    44.5%     │
                │  (S.E. 0.75) │  (S.E. 0.70) │
Year One        ├──────────────┼──────────────┤
Class Hours     │    53.9%     │    56.6%     │
   ≤ 10³ Hours  │  (S.E. 1.00) │  (S.E. 0.95) │
                └──────────────┴──────────────┘
Table: Semiparametric time-varying effect of job training on 
fourth-year employment probability (discretized grid from paper).

Limitations and Future Work

  • Short Time Horizons: The method is primarily designed and theoretically optimized for short horizons (e.g., $T=2$ or $T=3$). For very long horizons, recursively estimating the sequential embeddings requires stacking $T-1$ kernel ridge regressions, which could lead to an accumulation of estimation errors over time.
  • Dynamic Programming: The authors note that an exciting next step is integrating these sequential kernel embeddings directly into reinforcement learning and dynamic programming frameworks to automatically calculate optimal dynamic treatment policies over time.

Summary updated

BibTeX
@misc{singh2021sequential,
  author = {Rahul Singh and Liyuan Xu and Arthur Gretton},
  title = {{Sequential Kernel Embedding for Mediated and Time-Varying Dose Response Curves}},
  year = {2021},
  eprint = {2111.03950},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.03950},
}
Figure