Validating Causal Inference Models via Influence Functions

Ahmed M. Alaa, Mihaela van der SchaarICML 2019

Evaluating machine learning models typically relies on cross-validation: hiding ground-truth labels, making predictions, and measuring the error. However, in causal inference, this standard practice breaks down due to the "fundamental problem of causal inference"—we only ever observe one outcome (the factual) while the alternative (the counterfactual) remains forever hidden.

Without ground-truth labels for causal effects, practitioners struggle to determine which modern machine learning model—such as Generative Adversarial Networks (GANs), Causal Forests, or Gaussian Processes—works best for their specific dataset. This paper introduces a novel, data-driven procedure for validating causal inference models without needing access to unobservable counterfactual data. By leveraging influence functions, the authors develop a "plug-in and correct" approach that accurately estimates a model's error, enabling reliable model selection in observational studies.

The Challenge of Causal Model Selection

In causal inference, the primary goal is often to estimate the Conditional Average Treatment Effect (CATE)—the difference between what happens if a patient receives a treatment versus if they do not. Because we cannot observe both outcomes simultaneously, we cannot directly compute standard loss metrics like the Precision of Estimating Heterogeneous Effects (PEHE).

The proposed model validation pipeline for selecting the best causal inference model from a set of candidates.

Historically, this lack of validation has forced practitioners to rely on simple heuristics or inherently interpretable "white-box" models, even if more complex models might yield more accurate treatment effect estimates. The authors propose a pipeline that takes observational data, evaluates multiple candidate models, and reliably selects the best performer.

The "Plug-in and Correct" Method

To solve the validation problem, the authors propose a two-step procedure based on influence functions, a concept borrowed from robust statistics. Influence functions measure the functional derivative of a loss function, allowing us to understand how sensitive a model's error is to small perturbations in the underlying data distribution.

The two-step validation procedure approximates the true loss by adding an influence function-based bias correction to a plug-in estimate.
  1. Step 1: Plug-in Estimation. First, the authors "synthesize" a proximal dataset using a plug-in model (e.g., XGBoost) to estimate nuisance parameters, such as the probability of treatment and expected outcomes. They then calculate the candidate model's loss (PEHE) on this synthesized data. However, because this estimate is based on a synthetic version of reality, it is inherently biased.
  2. Step 2: Unplugged Validation. To correct this bias, the authors use influence functions to perform a Taylor-like expansion of the loss functional. This step "unplugs" the bias by calculating a correction term based on the data distribution's sensitivity.

Mathematically, this two-step process is equivalent to a single iteration of Fisher scoring (a variant of Newton’s method) used to find a Maximum Likelihood Estimate. The procedure essentially searches for the "most likely" error of the model given the observed data.

Key Insights and Theoretical Guarantees

  • Influence Functions as Derivatives: By treating the loss of a causal model as a functional of the data distribution, influence functions act as derivatives. This allows the approximation of the true loss even without counterfactual labels.
  • Efficiency and Consistency: The authors prove that their estimator is $\sqrt{n}$-consistent and "efficient." This means it achieves the lowest possible variance (the Cramer-Rao lower bound) among similar estimators.
  • No Generative Model Needed: A surprising and highly practical finding is that the influence function for the PEHE loss does not depend on the distribution of the input features ($X$). Consequently, practitioners do not need to build complex generative models for high-dimensional input data.
  • Robustness: The procedure is remarkably robust to the choice of the initial "plug-in" model. Even if the synthetic model isn't perfect, the influence function correction significantly improves the final error estimate.

Experimental Results

The method was rigorously evaluated on 77 benchmark datasets from the 2016 Atlantic Causal Inference Competition (ACIC). These datasets use real-world features from the Collaborative Perinatal Project (4,802 subjects, 55 features) but simulate outcomes and treatment assignments using complex, non-linear functions to provide a ground truth for evaluation.

  • Superior Model Selection: The influence function-based approach correctly identified the best-performing causal model in 72% of the datasets. This significantly outperformed common heuristics like Factual validation (53%), Inverse Probability of Treatment Weighting (IPTW) (54%), and simple Plug-in validation (65%).
  • Significant Performance Gains: By automatically selecting the best model for each dataset using this method, the authors achieved a 47% reduction in PEHE error compared to simply picking the single best-performing model on average and applying it universally.
  • Approaching the Theoretical Ceiling: The approach comes remarkably close to "Supervised" validation (which has an 84% win rate)—the theoretical ceiling where the model is actually allowed to see the hidden counterfactual labels.

Limitations and Future Directions

While highly effective, the approach has a few notable boundaries. The paper primarily focuses on first-order influence functions. Although the authors provide a recursive algorithm for higher-order terms, first-order corrections were usually sufficient in their experiments; exploring when higher-order terms become critical remains an open question.

Additionally, for the theoretical guarantees to hold, the initial plug-in model must be "minimax optimal" (e.g., using powerful learners like Random Forests or XGBoost). If the plug-in model is extremely poor, the validation could fail. Finally, calculating influence functions for massive datasets or highly complex loss functionals can be computationally intensive, though the authors' recursive finite-difference algorithm helps mitigate this burden.

Summary updated

BibTeX
@inproceedings{alaa2019validating,
  author = {Ahmed M. Alaa and Mihaela van der Schaar},
  title = {{Validating Causal Inference Models via Influence Functions}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
}
Figure