Tracking treatment effect heterogeneity in evolving environments

Tian Qin, Long-Fei Li, Tian-Zuo Wang, Zhi-Hua ZhouMachine Learning 2024

Abstract

Heterogeneous treatment effect (HTE) estimation plays a crucial role in developing personalized treatment plans across various applications. Conventional approaches assume that the observed data are independent and identically distributed (i.i.d.). In some real applications, however, the assumption does not hold: the environment may evolve, which leads to variations in HTE over time. To enable HTE estimation in evolving environments, we introduce and formulate the online HTE estimation problem. We propose an online ensemble-based HTE estimation method called ETHOS, which is capable of adapting to unknown evolving environments by ensembling the outputs of multiple base estimators that track environmental changes at different scales. Theoretical analysis reveals that ETHOS achieves an optimal expected dynamic regret $O(\sqrt{T(1+P_T)})$, where $T$ denotes the number of observed examples and $P_T$ characterizes the intensity of environment changes. The achieved dynamic regret ensures that our method consistently approaches the optimal online estimators as long as the evolution of the environment is moderate. We conducted extensive experiments on three common benchmark datasets with various environment evolving mechanisms. The results validate the theoretical analysis and the effectiveness of our proposed method.

Introduction

Estimating Heterogeneous Treatment Effects (HTE) is the cornerstone of personalized medicine and targeted marketing. It seeks to answer the counterfactual question: "How much will a specific individual benefit from a specific intervention?" However, the "Fundamental Problem of Causal Inference" is that we never observe the counterfactual—we only see the outcome for the treatment actually received.

Most existing HTE estimation methods rely on the assumption that data is independent and identically distributed (i.i.d.). In practice, environments are often non-stationary. For instance, a vaccine's effectiveness may wane as new variants emerge, or consumer preferences in a recommender system may shift seasonally. These shifts can manifest as changes in the underlying relationship between features and outcomes, variations in treatment assignment policies (propensity scores), or shifts in the population distribution. Traditional "batch" methods struggle to adapt to these continuous, non-stationary changes.

The ETHOS Framework

We introduce ETHOS (tracking Evolving Treatment effect Heterogeneity with Online enSemble), a method designed to track HTE in real-time with theoretical optimality. ETHOS addresses the challenges of evolving environments through two primary mechanisms: a surrogate loss function and an online ensemble strategy.

Surrogate Loss for Online HTE

Because counterfactuals are unobservable, we cannot directly calculate the estimation error. ETHOS utilizes a surrogate loss function based on an unbiased estimator of the treatment effect: $$\hat{\tau}_t = \frac{w_t y_t}{p_t}$$ where $w_t$ is the treatment indicator, $y_t$ is the observed outcome, and $p_t$ is the propensity score. This formulation allows us to construct a convex loss function that can be minimized using online gradient descent, effectively minimizing the true (unobservable) loss in expectation.

Online Ensemble Strategy

A key challenge in non-stationary environments is determining the optimal "speed" of learning. If the environment changes slowly, a small learning rate is preferable for stability; if it changes abruptly, a large learning rate is needed for rapid adaptation. ETHOS maintains an ensemble of $O(\log T)$ base estimators, each operating with a different learning rate.

The update procedure for a base estimator within the ETHOS framework, utilizing online gradient descent on the surrogate loss.

A meta-estimator then aggregates these outputs using an exponential weighting scheme. This allows the model to dynamically shift weight toward the most effective learning rates for the current pace of environmental evolution. Notably, this approach is memory-efficient, requiring only $O(\log T)$ storage.

Theoretical Guarantees

ETHOS is theoretically grounded, achieving an optimal expected dynamic regret of $O(\sqrt{T(1 + P_T)})$. Here, $P_T$ represents the "path length," a metric quantifying the cumulative change in the environment over time. This result implies that ETHOS performs as well as an "oracle" that possesses prior knowledge of the environmental shifts, provided the evolution is moderate.

Experimental Evaluation

We evaluated ETHOS using three semi-synthetic benchmarks: IHDP (home visits for children), Twins (birth weight outcomes), and Jobs (employment training). To simulate non-stationarity, we introduced two evolving mechanisms:

  • Switching: Sudden, discrete changes in the environment.
  • Linear: Gradual, continuous environmental drift.

ETHOS was compared against state-of-the-art HTE baselines, including Causal Forests, BART, and TARNet, which were adapted for online settings using sliding windows.

Key Results

  • Superior Performance: ETHOS consistently achieved lower cumulative loss (Squared PEHE) across nearly all experimental configurations.
  • Rapid Adaptation: In "Switching" scenarios, ETHOS demonstrated a significantly faster ability to "catch up" to new optimal estimators compared to traditional models.
  • Empirical Regret: Experimental plots confirmed that average regret decreases toward zero as more data is processed, validating our theoretical bounds.

Conclusion and Future Work

ETHOS provides a robust, theoretically sound framework for tracking treatment effect heterogeneity in real-time. While highly effective, the current implementation assumes a linear hypothesis space (or fixed non-linear mappings). Future research could extend this to non-convex models, such as deep neural networks that update internal representations online, and explore scenarios involving evolving latent confounders where the "strong ignorability" assumption may be violated.

Summary updated

BibTeX
@article{qin2024tracking,
  author = {Tian Qin and Long-Fei Li and Tian-Zuo Wang and Zhi-Hua Zhou},
  title = {{Tracking treatment effect heterogeneity in evolving environments}},
  journal = {Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=kApB7RNXvK},
}
Figure