1. Home
  2. Explore
  3. Statistics
  4. Causal Inference Theory

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Causal Inference Theory

Statistical Learning Theory for Causal Inference

Prediction and causal decision-making

Machine learning is increasingly used to guide decisions, such as setting prices, selecting medical treatments, or making legal recommendations. Many such decisions require answering causal or counterfactual questions: what would happen if the current treatment or policy were changed?

A predictive model typically estimates what will happen if the data-generating process continues as it did in the observed data. A causal analysis instead asks what would happen under a different intervention. These questions are not generally answered by the same model.

For example, a model that predicts demand from price may fit historical data very accurately without revealing what would happen if the price were deliberately changed. Price and demand may both be affected by other variables, such as season or customer characteristics. A predictive relationship between price and demand can therefore reflect confounding rather than the causal effect of price.

Machine learning can still be valuable in causal analysis. The central strategy is to use flexible predictive methods to estimate auxiliary quantities, then combine them in a way that corrects the resulting causal estimate. These auxiliary quantities are called nuisance models: they are needed to estimate the causal target, but are not themselves the primary object of interest.

Two ideas make this strategy possible:

  • Neyman orthogonality, from semiparametric statistics, reduces how much errors in nuisance models affect the target estimate.

  • Generalization and excess-risk bounds, from statistical learning theory, can be used to study complex causal models, including models of heterogeneous effects and treatment policies.


Confounding and the limits of prediction

Confounders

A confounder is a variable that affects both the treatment decision and the outcome. If it is not accounted for, an association between treatment and outcome may be mistaken for a causal effect.

For instance, a company might raise prices during a high-demand season. Demand may also rise because of the season itself. A regression of demand on price alone could then suggest that higher prices increase demand, even if the true effect of price is negative.

A causal analysis must control for relevant confounders: variables that influenced the treatment or pricing decision and also affect the outcome.

Why high-dimensional confounding creates a statistical problem

Let TTT denote a treatment, such as a price, and let XXX denote observed confounders. A simplified model might express the outcome as a treatment effect plus a confounding component:

Y=θT+q(X)+ε,Y = \theta T + q(X) + \varepsilon,Y=θT+q(X)+ε,

where:

  • YYY is the outcome;

  • θ\thetaθ is the causal effect of interest;

  • q(X)q(X)q(X) captures how the confounders affect the outcome;

  • ε\varepsilonε is unexplained variation.

The nuisance function q(X)q(X)q(X) may be difficult to estimate, especially when XXX is high-dimensional or its effect is nonlinear. Yet the main goal may be to estimate only the scalar θ\thetaθ, not to recover qqq accurately.

This motivates a key question: Can the causal target be estimated accurately even when the nuisance models are learned slowly? Double machine learning and orthogonal statistical learning address this question.


Continuous treatments: double machine learning

Residualizing both outcome and treatment

Suppose the treatment TTT is continuous, as with price. A useful approach is to estimate two nuisance functions:

  • q(X)q(X)q(X), the predictable part of the outcome given the confounders;

  • p(X)p(X)p(X), the predictable part of the treatment given the confounders.

The method proceeds in two stages.

  1. Predict YYY from XXX, obtaining an estimate q^(X)\hat q(X)q^​(X).

  2. Predict TTT from XXX, obtaining an estimate p^(X)\hat p(X)p^​(X).

  3. Form residuals:

    • Y−q^(X)Y-\hat q(X)Y−q^​(X), the part of the outcome not predicted by the confounders;

    • T−p^(X)T-\hat p(X)T−p^​(X), the part of the treatment not predicted by the confounders.

  4. Estimate the causal effect by regressing the outcome residual on the treatment residual.

The final estimate can be expressed as minimizing the residualized squared loss:

θ^=arg⁡min⁡θ1n∑i=1n[Yi−q^(Xi)−θ(Ti−p^(Xi))]2.\hat\theta = \arg\min_{\theta} \frac{1}{n} \sum_{i=1}^{n} \left[ Y_i-\hat q(X_i) - \theta\bigl(T_i-\hat p(X_i)\bigr) \right]^2.θ^=argminθ​n1​∑i=1n​[Yi​−q^​(Xi​)−θ(Ti​−p^​(Xi​))]2.

The treatment residual isolates the part of treatment variation not explained by the observed confounders. The outcome residual removes the part of the outcome associated with those confounders. Their relationship is therefore more informative about the causal effect than the raw relationship between TTT and YYY.

The nuisance regressions are ordinary prediction problems, so they can use flexible machine-learning methods. Their purpose is not to provide the final causal answer, but to support the residualized target estimate.

Sample splitting and cross-fitting

The nuisance models should not generally be estimated and evaluated on the same observations in the final step. Sample splitting addresses this issue:

  1. Divide the data into separate parts.

  2. Fit the nuisance models on one part.

  3. Use their predictions on another part to construct the residualized loss and estimate the target.

This helps prevent dependence between the fitted nuisance models and the observations used in the final estimation step. It also makes it easier to apply statistical-learning guarantees that assume independent evaluation data.

Cross-fitting uses the data more efficiently. The data are divided into folds; nuisance models are fitted on all but one fold and used to predict the held-out fold. This is repeated so that each observation receives a prediction from a model that was not trained on that observation. The resulting predictions are combined in the final causal estimation.

Why slow nuisance estimates can still yield a fast target estimate

The nuisance models need not be estimated at a parametric rate. Under appropriate regularity conditions, their root-mean-square errors may be as slow as approximately n−1/4n^{-1/4}n−1/4 while the estimate of the scalar causal effect still achieves a root-nnn rate, meaning an error on the order of n−1/2n^{-1/2}n−1/2.

The reason is that the residualized estimating equation is Neyman orthogonal: small errors in the nuisance functions have little first-order effect on the target estimate. The nuisance errors enter mainly through higher-order terms.

Under suitable conditions, the final estimate can also be asymptotically normal. This supports confidence intervals and hypothesis tests for the average causal effect, even though the nuisance functions were estimated using flexible, potentially high-dimensional methods.


Heterogeneous treatment effects

From an average effect to a conditional effect

An average treatment effect describes how a treatment changes outcomes on average. Many decisions require more detail: how does the treatment effect vary with a person’s or product’s characteristics?

A heterogeneous treatment effect is a function such as θ(X)\theta(X)θ(X) that describes how the effect depends on features XXX. For example, a medical treatment may work better for some patient groups than for others.

The residualized approach can be extended by replacing the constant treatment effect θ\thetaθ with a function θ(X)\theta(X)θ(X) and minimizing over a class of candidate functions:

θ^=arg⁡min⁡θ∈H1n∑i=1n[Yi−q^(Xi)−θ(Xi)(Ti−p^(Xi))]2,\hat\theta = \arg\min_{\theta\in\mathcal{H}} \frac{1}{n} \sum_{i=1}^{n} \left[ Y_i-\hat q(X_i) - \theta(X_i)\bigl(T_i-\hat p(X_i)\bigr) \right]^2,θ^=argminθ∈H​n1​∑i=1n​[Yi​−q^​(Xi​)−θ(Xi​)(Ti​−p^​(Xi​))]2,

where H\mathcal{H}H is a chosen hypothesis class, such as a class of linear models, kernel functions, or trees.

The features used to control for confounding need not be identical to the features used to model heterogeneity. For example, a large set of variables may be needed to adjust for confounding, while a smaller set may be used to describe how treatment effects vary.

Oracle error and nuisance error

A useful way to evaluate a heterogeneous-effect model is to compare it with the best model in the chosen class that could have been obtained if the nuisance functions were known. This best-in-class benchmark is called an oracle.

Under suitable conditions, the error of the learned treatment-effect function can be bounded by:

  • the error that would have been achieved by the oracle model; and

  • a higher-order contribution from errors in estimating the nuisance functions.

This gives robustness to imperfect nuisance estimates. The final model can still perform well even if the nuisance functions are harder to learn than the treatment-effect function itself.

The result does not require the chosen hypothesis class to contain the true treatment-effect function. Instead, the guarantee can compare the estimate to the best available function in that class. This is one reason excess-risk analysis is useful when models are misspecified.


Binary treatments: direct regression, weighting, and doubly robust estimation

Suppose treatment is binary, with T=1T=1T=1 indicating treatment and T=0T=0T=0 indicating no treatment. Let Y(1)Y(1)Y(1) and Y(0)Y(0)Y(0) denote the outcomes that would be observed under treatment and control, respectively. For any individual, only one of these outcomes is observed; the other is counterfactual.

Direct regression

A direct regression method estimates the conditional outcome model

mt(X)=E[Y∣T=t,X],m_t(X)=\mathbb{E}[Y\mid T=t,X],mt​(X)=E[Y∣T=t,X],

for each treatment level ttt. It then estimates the average treatment effect by averaging predicted differences:

E[m1(X)−m0(X)].\mathbb{E}\bigl[m_1(X)-m_0(X)\bigr].E[m1​(X)−m0​(X)].

This method can be model-heavy. It estimates outcome relationships across treatment groups and may need to use a fitted model to predict outcomes in a group where some individuals were not observed. That involves extrapolation or domain adaptation, and performance can suffer if the outcome model is inaccurate.

Inverse propensity weighting

The propensity score is the probability of receiving treatment given observed features:

e(X)=P(T=1∣X).e(X)=\mathbb{P}(T=1\mid X).e(X)=P(T=1∣X).

For a general treatment level ttt, define pt(X)=P(T=t∣X)p_t(X)=\mathbb{P}(T=t\mid X)pt​(X)=P(T=t∣X). Weighting observed outcomes by the inverse probability of the treatment actually received allows them to represent counterfactual outcomes at the population level. For example, a treated observation receives a weight proportional to 1/e(X)1/e(X)1/e(X), while a control observation receives a weight proportional to 1/(1−e(X))1/(1-e(X))1/(1−e(X)).

This approach can be unbiased when the propensity model is correct and the relevant treatment probabilities are positive. However, it has two important limitations:

  • If the propensity score must be estimated, errors in that estimate can directly affect the causal estimate.

  • Very small treatment probabilities create large weights and high variance.

Doubly robust estimation

A doubly robust estimator combines an outcome regression with inverse propensity weighting. For treatment level ttt, define the adjusted outcome:

Y~(t)=m^t(X)+1{T=t}p^t(X)(Y−m^t(X)),\tilde Y(t) = \hat m_t(X) + \frac{\mathbf{1}\{T=t\}}{\hat p_t(X)} \bigl(Y-\hat m_t(X)\bigr),Y~(t)=m^t​(X)+p^​t​(X)1{T=t}​(Y−m^t​(X)),

where m^t(X)\hat m_t(X)m^t​(X) estimates the outcome under treatment level ttt, and p^t(X)\hat p_t(X)p^​t​(X) estimates the probability of receiving that treatment.

The adjusted outcome starts with the outcome-regression prediction and adds a weighted residual correction. For binary treatment, an estimate of the average treatment effect is the average of the difference between the two adjusted outcomes:

ATE^=1n∑i=1n(Y~i(1)−Y~i(0)).\widehat{\mathrm{ATE}} = \frac{1}{n} \sum_{i=1}^{n} \bigl(\tilde Y_i(1)-\tilde Y_i(0)\bigr).ATE=n1​∑i=1n​(Y~i​(1)−Y~i​(0)).

The estimator is called doubly robust because it can remain unbiased if either the outcome model or the propensity model is correct, under the necessary identification and regularity assumptions.

The residual correction also helps control variance. It weights the difference between the observed outcome and the regression prediction, rather than weighting the entire outcome. If the outcome model is informative, this residual may be much smaller than the outcome itself.

Doubly robust estimation of heterogeneous effects

The difference between the adjusted outcomes provides a pseudo-outcome for the treatment effect:

τ~=Y~(1)−Y~(0).\tilde\tau = \tilde Y(1)-\tilde Y(0).τ~=Y~(1)−Y~(0).

A heterogeneous-effect function can be estimated by regressing this pseudo-outcome on features XXX, or more generally by minimizing squared loss over a hypothesis class:

θ^=arg⁡min⁡θ∈H1n∑i=1n[τ~i−θ(Xi)]2.\hat\theta = \arg\min_{\theta\in\mathcal{H}} \frac{1}{n} \sum_{i=1}^{n} \bigl[\tilde\tau_i-\theta(X_i)\bigr]^2.θ^=argminθ∈H​n1​∑i=1n​[τ~i​−θ(Xi​)]2.

Under appropriate conditions, the resulting model’s error has an oracle component plus a higher-order contribution from errors in the propensity and outcome models. The robustness of the pseudo-outcome is closely connected to Neyman orthogonality: nuisance estimation errors have limited first-order influence on the final target.


Learning treatment policies

Estimating the full treatment-effect function is not always necessary. A decision-maker may only need to determine whether to treat each individual.

A treatment policy is a function π(X)\pi(X)π(X) that maps features to a treatment decision. For a binary policy, π(X)=1\pi(X)=1π(X)=1 means treat and π(X)=0\pi(X)=0π(X)=0 means do not treat.

The value of a policy is its expected outcome in the population:

V(π)=E[π(X)Y(1)+(1−π(X))Y(0)].V(\pi) = \mathbb{E}\bigl[ \pi(X)Y(1) + (1-\pi(X))Y(0) \bigr].V(π)=E[π(X)Y(1)+(1−π(X))Y(0)].

A policy-learning method seeks a policy with high value within a chosen policy class. Using doubly robust adjusted outcomes, the population objective can be approximated using observed data:

V^(π)=1n∑i=1n[π(Xi)Y~i(1)+(1−π(Xi))Y~i(0)].\hat V(\pi) = \frac{1}{n} \sum_{i=1}^{n} \left[ \pi(X_i)\tilde Y_i(1) + \bigl(1-\pi(X_i)\bigr)\tilde Y_i(0) \right].V^(π)=n1​∑i=1n​[π(Xi​)Y~i​(1)+(1−π(Xi​))Y~i​(0)].

The method directly optimizes decisions rather than first requiring an accurate estimate of every individual’s treatment effect. This can be advantageous when the practical goal is to choose a treatment, not to produce a detailed effect prediction.

The regret of a learned policy measures the gap between its value and the value of the best policy in the chosen class. Under suitable conditions, this regret is bounded by the best achievable policy-class regret plus a higher-order contribution from nuisance-model estimation errors.


Orthogonal statistical learning

Target models and nuisance models

The examples can be expressed in a common framework. A target model θ\thetaθ minimizes a population loss that depends both on θ\thetaθ and on unknown nuisance functions ggg:

θ∗=arg⁡min⁡θ∈ΘL(θ;g∗),\theta^* = \arg\min_{\theta\in\Theta} L(\theta;g^*),θ∗=argminθ∈Θ​L(θ;g∗),

where g∗g^*g∗ denotes the true nuisance functions.

The target is not simply to estimate each nuisance function accurately. Instead, the goal is to find an estimate θ^\hat\thetaθ^ with small oracle excess risk:

L(θ^;g∗)−L(θ∗;g∗).L(\hat\theta;g^*)-L(\theta^*;g^*).L(θ^;g∗)−L(θ∗;g∗).

This compares the learned target model with the best target model under the true nuisance functions.

Oracle excess risk connects the general framework to the objectives used in causal analysis:

  • With a squared loss and suitable curvature, small excess risk can imply small mean squared error for a treatment-effect model.

  • For policy learning, excess risk corresponds to regret relative to the best policy in the class.

A plug-in learning strategy

A general procedure is:

  1. Split or cross-fit the data.

  2. Estimate the nuisance functions, obtaining g^\hat gg^​.

  3. Substitute g^\hat gg^​ into the loss.

  4. Use a statistical-learning method to find a model with small excess risk for the resulting plug-in loss.

Once g^\hat gg^​ is fixed using separate observations, the final stage resembles a standard statistical-learning problem. Existing generalization bounds can then be applied to the chosen hypothesis class.

The remaining challenge is to relate performance under the estimated nuisances to performance under the true nuisances. Orthogonality provides the needed protection against nuisance error.

Neyman orthogonality

The loss is Neyman orthogonal when small changes in the nuisance functions do not change, to first order, the gradient information used to estimate the target.

Informally, if the nuisance functions are perturbed slightly around their true values, the target’s first-order optimization condition remains nearly unchanged. In directional-derivative terms, the cross derivative between the target direction and a nuisance direction is zero at the true target and true nuisance functions.

This condition explains why residualization and doubly robust corrections are useful. They are designed so that errors in nuisance estimates cancel or enter only at higher order.

Strong convexity and excess-risk bounds

When the loss is strongly convex in the target, as squared losses often are, excess risk controls distance from the optimal target. Under suitable smoothness conditions, the true-nuisance excess risk can be bounded by:

  • the excess risk achieved in the plug-in problem using g^\hat gg^​; and

  • a second-order term involving nuisance-estimation errors.

The exact form and rate of this remainder depend on the loss and on how nuisance error is measured. In many settings, the key property is that nuisance errors affect the target through products or other second-order quantities rather than through a first-order error.

This structure explains how a target estimate can converge quickly even when the nuisance models converge more slowly. For a scalar target, it can support root-nnn estimation and asymptotic inference under suitable conditions. For complex target classes, it yields excess-risk or mean-square-error guarantees.

Universal orthogonality and policy learning

Some objectives, such as policy-value objectives, are linear rather than strongly convex. In these settings, the analysis can use a stronger condition called universal Neyman orthogonality: the relevant cross-derivative condition holds for every candidate target model, not only at the true target.

Under this stronger condition, robustness to nuisance-estimation error can still be established. The resulting rate depends on the structure of the target problem and its learning guarantees.

Why excess risk is a useful target

Focusing on excess risk has two advantages.

  • It enables generalization analysis. Many modern results in statistical learning theory bound excess risk over complex hypothesis classes. These tools can be applied to causal models when their estimation problem is written as a learning problem.

  • It can avoid stronger identification assumptions. Recovering every parameter in a model, such as all coefficients in a sparse linear effect model, may require restrictive conditions. A risk guarantee can instead compare the result with the best model in a class, including when the true function is not itself in that class.


Main principles

  • Predictive accuracy alone does not establish a causal relationship; treatment assignment and confounding must be addressed.

  • Flexible machine-learning methods can estimate nuisance functions, even when the primary goal is a causal effect or policy.

  • Residualization and doubly robust corrections construct target losses that are less sensitive to nuisance-model errors.

  • Sample splitting and cross-fitting help separate nuisance estimation from target estimation and support the use of standard learning-theory guarantees.

  • Neyman orthogonality is the central mechanism that makes nuisance errors affect causal targets primarily through higher-order terms.

  • Causal problems can often be formulated as excess-risk or regret problems, allowing statistical-learning methods to handle heterogeneous effects and complex policies.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent