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

Speaker 1Speaker 2

Causal Inference Theory

13:47
0:00-13:47
  1. Maria

    Today we’re looking at how statistical learning theory can help with causal inference. Machine learning is increasingly used to make decisions—in business, personalized medicine, and law, for example. But decisions often depend on causal questions: what would happen if we changed the policy, treatment, or price?

  2. Corey

    And that’s different from ordinary prediction. A predictive model learns what tends to happen under the policy that generated the data. A causal question asks what would happen under a different action. So a model can predict very accurately and still give a misleading answer about what would happen if we changed something.

  3. Maria

    The central idea is not that machine learning is unsuitable for causal problems. It can be very useful, but we often need to combine it with auxiliary models that account for bias. These auxiliary models are called nuisance models: we need to estimate them, even though they are not the main quantity we care about.

  4. Corey

    So the overall strategy brings together econometrics and semiparametric statistics, especially the idea of Neyman orthogonality, with machine learning’s tools for controlling generalization error. The aim is to express causal tasks as statistical learning problems and get guarantees for complex models, while making the final answer less sensitive to errors in the nuisance models.

  5. Maria

    Let’s begin with a pricing example. Suppose a company gives you historical prices and product demand and asks how demand changes with price. A tempting approach is to fit a model predicting demand from price. If it predicts well on held-out data, you might think you’ve learned the effect of price.

  6. Corey

    But that relationship can be confounded. Prices may rise when demand is expected to rise—for instance, both price and demand might increase around Christmas. The observed association doesn’t mean the higher price caused the higher demand; the season could be influencing both.

  7. Maria

    To address that, we need to control for confounders: variables that affect both the treatment—in this case, price—and the outcome, demand. Adding a season indicator might let us compare prices within Christmas periods and within non-Christmas periods, rather than mistaking the seasonal pattern for a price effect.

  8. Corey

    And the challenge grows when there are hundreds or thousands of possible confounders, or when their effects are nonlinear. We may need a high-dimensional model to adjust for them, even though the quantity we chiefly care about is just the causal effect of price.

  9. Maria

    That leads to double machine learning. In the continuous-treatment example, first predict the outcome using the confounders, and separately predict the treatment—price—using those same confounders. Then form residuals: the part of the outcome the first model didn’t predict, and the part of the price the second model didn’t predict.

  10. Corey

    The final step is a simple, one-dimensional regression of the outcome residual on the treatment residual. Intuitively, it asks how the remaining variation in demand relates to the remaining variation in price after accounting for the confounders. The first-stage prediction problems can use machine-learning methods.

  11. Maria

    A key result is that, with sample splitting, the nuisance models can converge relatively slowly—at a root-mean-square error rate on the order of n to the minus one-quarter—and the final treatment-effect estimate can still behave like a one-dimensional parametric estimate. In particular, the estimate can have a root-n rate and an asymptotically normal distribution, which supports hypothesis testing.

  12. Corey

    Why can slow first-stage estimates still work? Two ingredients matter. Neyman orthogonality makes the final estimation step insensitive to small first-order errors in the nuisance models, and sample splitting helps separate nuisance estimation from the final regression.

  13. Maria

    With sample splitting, you estimate the nuisance models on one part of the data and use the other part for the final step. Cross-fitting is a more data-efficient version: fit the nuisance models on one part and predict on the other, then switch the parts and combine the predictions so that all the data contribute.

  14. Corey

    The basic double-machine-learning result targets an average treatment effect, like the average change in demand from changing price. But many decisions require personalization: how does the effect vary with a customer’s or patient’s features?

  15. Maria

    For heterogeneous effects, replace the single coefficient in the final regression with a function of the features of interest, often written theta of x. Then minimize the residual-based square loss over a chosen hypothesis space. That turns the last stage into a statistical learning problem, where one can use methods suited to that space.

  16. Corey

    Different work has analyzed different spaces: a kernel Hilbert space, sparse linear functions, and random forests are examples. For these complicated models, asymptotic normality can be difficult to establish. But the results can still bound the mean squared error of the estimated effect function.

  17. Maria

    The important robustness pattern is that the error in the final causal model is bounded by an oracle error—what you would achieve if the nuisance functions were known—plus a second-order contribution from errors in those nuisance estimates. So nuisance errors matter, but their impact is reduced.

  18. Corey

    And the nuisance functions may actually be harder to learn than the effect function. For example, the confounding relationship could be dense and complicated, while the treatment effect might be a sparse linear function. Even if both involve many features, the effect model can be simpler.

  19. Maria

    A second example uses a binary treatment, such as whether a patient receives a drug. In observational data, people with certain features may be more likely to receive treatment, and those same features may predict better outcomes. If we ignore that selection, we could attribute the outcome difference to the drug instead of to the features.

  20. Corey

    One option is a direct regression: predict the outcome from treatment and the observed features, then predict each person’s outcome under treatment and under no treatment. Average the predicted difference to estimate the average treatment effect. But that requires a model that can generalize across the treated and untreated groups, which can mean extrapolating from one group to the other.

  21. Maria

    Another option is inverse propensity weighting. The propensity is the probability of receiving the treatment, given the observed features or the treatment policy. Weight each observed outcome by the inverse probability of the treatment actually received. With the correct propensity, this gives an unbiased way, in expectation, to recover the corresponding potential outcome.

  22. Corey

    If the treatment policy is known, its probabilities can be used directly. If it’s not known, we need to estimate the propensity model. But errors in that estimate can affect the treatment-effect estimate, and inverse weighting can also have high variance because it divides by a probability that may be small.

  23. Maria

    The doubly robust approach combines the direct outcome regression with an inverse-propensity correction. It starts with the outcome predicted by the regression model, then uses a weighted residual—the part the model did not explain—to correct it.

  24. Corey

    It’s called doubly robust because the resulting counterfactual-outcome estimate is unbiased if either the outcome regression is correct or the propensity model is correct. And the correction weights a residual rather than the entire outcome, which can improve efficiency compared with weighting the outcome itself.

  25. Maria

    To estimate heterogeneous effects, build these doubly robust estimates for the counterfactual outcomes, take their difference, and fit that difference as a function of the features of interest. Again, the mean squared error of the final effect model can be controlled by an oracle error plus a second-order contribution from errors in the outcome and propensity models.

  26. Corey

    That robustness is connected to Neyman orthogonality. The two ideas are not identical, but the doubly robust property can imply orthogonality. In both cases, the aim is to prevent small nuisance-model errors from changing the target estimate too much at first order.

  27. Maria

    There’s also a related task called policy learning. Instead of estimating the size of every person’s treatment effect, we may only want a rule that says treat or don’t treat based on observed features. That rule is a policy, and we want to choose one with high expected value.

  28. Corey

    Doubly robust counterfactual outcomes give us a way to estimate the value of a policy. For each person, the policy selects either the estimated outcome under treatment or the estimated outcome without treatment; average those selected outcomes across the population. Then choose a policy that maximizes this estimated value.

  29. Maria

    For policy learning, the goal is often regret: the gap between the value of the policy we learn and the value of the best policy in our chosen policy class. The cited results bound that regret by an oracle regret plus a second-order effect from errors in the nuisance estimates.

  30. Corey

    Now let’s put these examples into one framework: orthogonal statistical learning. There is a target model theta, defined as the minimizer of a population loss, and that loss also depends on nuisance functions that we do not know and must estimate.

  31. Maria

    The framework focuses on oracle excess risk: compare the population loss of our estimated target model with that of the best target model, evaluating both using the true nuisance functions. In the pricing and treatment-effect examples, good excess risk can imply good mean squared error. In policy learning, the corresponding quantity is regret.

  32. Corey

    This framing matters because statistical learning theory has many tools for bounding generalization error over different hypothesis spaces. Ordinary learning theory usually assumes the loss is known, while causal learning has an extra complication: the loss itself depends on estimated nuisance functions.

  33. Maria

    There’s another benefit to focusing on excess risk. Recovering particular model parameters can require strong identification conditions—for example, a restricted eigenvalue condition for a sparse linear model. A generalization guarantee may not need that same condition, and it can still be meaningful if the true effect model is not exactly in the chosen hypothesis space.

  34. Corey

    The proposed meta-algorithm makes the connection to ordinary learning explicit. Split the data, estimate the nuisance functions on one portion using any method with a suitable error guarantee, plug those estimates into the loss, and then use a learning method that achieves excess risk for that plug-in loss.

  35. Maria

    But plug-in excess risk is not quite the goal. We want a guarantee evaluated at the true nuisance functions. The key question is whether the difference between those two risks is controlled by a second-order effect of the nuisance-estimation errors. Neyman orthogonality is what makes that possible.

  36. Corey

    To define it, consider a small change in a nuisance function in some direction and ask how the target model’s gradient changes. A loss is Neyman orthogonal when the cross-derivative—first with respect to the target, then with respect to the nuisance—is zero at the true target and true nuisance functions.

  37. Maria

    The intuition is that small changes in the nuisance models do not substantially alter the first-order information used to estimate the target. In the residual-based square loss from double machine learning, differentiating with respect to the target gives a term involving the residualized outcome and treatment. Differentiating with respect to a nuisance leaves a residual whose expectation is zero under the true nuisance model.

  38. Corey

    Residualizing the treatment and outcome is therefore not just a convenient calculation; it helps create the orthogonality that protects the final estimate. More generally, if a loss is orthogonal, strongly convex, and satisfies suitable smoothness conditions, the oracle excess risk can be bounded by plug-in excess risk plus a second-order nuisance-error term.

  39. Maria

    For square losses with a parametric target, this explains the familiar pattern: nuisance estimates with errors around n to the minus one-quarter can still allow a root-n target rate. In the more general theorem, the precise power depends on the setup; for the square-loss case described, the nuisance contribution is fourth order in the root-mean-square error.

  40. Corey

    What if the loss is not strongly convex, as in policy learning, where the loss is linear? The framework uses a stronger condition called universal Neyman orthogonality: the cross-derivative must vanish for every target model, not only at the true target. Under the stated conditions, a second-order dependence on nuisance errors still follows, though the bound has a different power.

  41. Maria

    The broader takeaway is that machine learning helps causal analysis in two ways: it can estimate complex nuisance functions, and it can estimate heterogeneous effects or policies over rich model classes. Neyman orthogonality reduces the impact of nuisance errors and, in some settings, supports valid confidence intervals.

  42. Corey

    And phrasing causal goals as excess-risk problems lets us use advances in statistical learning theory while avoiding some stringent assumptions needed for parameter recovery. That gives us a general way to pair flexible machine learning with causal reasoning—provided we build in the right debiasing, orthogonality, and sample-splitting ideas.

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent