Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Lecture 11. Causal ML, Policy Learning, And External Validity

Learning Objectives

By the end of this lecture, students should be able to:

  1. explain when treatment-effect heterogeneity is itself the research object and when it is an input into a decision rule;

  2. define individualized treatment effects, conditional average treatment effects, subgroup effects, policy rules, policy value, and regret;

  3. distinguish prediction, causal effect estimation, and policy learning in applied-economics language;

  4. explain empirical welfare maximization and policy learning as methods for choosing among feasible assignment rules;

  5. use uplift and targeting logic without confusing high predicted outcomes with high treatment effects;

  6. diagnose how external validity, transportability, and distribution shift change the interpretation of heterogeneous treatment effects;

  7. evaluate fairness, feasibility, budget, capacity, legal, and implementation constraints before recommending a targeting rule;

  8. identify which common ML algorithms are useful for nuisance prediction, measurement, heterogeneity, or policy choice, and state their applied caveats.

Opening Orientation

Lecture 10 asked how flexible methods can estimate causal effects when controls, nuisance functions, and heterogeneity are high-dimensional. Lecture 11 asks what applied researchers do after they have estimated heterogeneity. The central question is: when can heterogeneous treatment effects support a policy rule, and when should they remain descriptive evidence about mechanisms, populations, or external validity?

The distinction matters because a conditional average treatment effect is not a policy. A CATE says how treatment effects vary with covariates under an identifying design. A policy rule says who should receive treatment under a welfare objective, capacity constraint, budget, information set, and implementation environment. Moving from the first object to the second adds economics.

The paper spine reflects that shift. Wager and Athey, and Athey, Tibshirani, and Wager, supply credible tools for estimating heterogeneity Wager & Athey, 2018Athey et al., 2019. Kitagawa and Tetenov frame treatment choice as empirical welfare maximization Kitagawa & Tetenov, 2018. Athey and Wager show how policy learning can be done with observational data under appropriate causal assumptions Athey & Wager, 2021. Bansak and coauthors give a concrete assignment application, while Allcott, Vivalt, and Dehejia, Pop-Eleches, and Samii make the portability problem visible Bansak et al., 2018Allcott, 2015Vivalt, 2020Dehejia et al., 2021.

Core Points

Bridge

Lecture 10 separated causal parameters from nuisance prediction. Its core discipline was: estimate outcome and treatment nuisance functions flexibly, use orthogonalization and sample splitting to protect the target effect, and treat CATEs as causal objects only under a credible design.

Lecture 11 keeps those tools but changes the target. The object is no longer only an ATE or CATE. It may be a rule, a value, a regret bound, a targeting frontier, or a portability claim. That shift changes what has to be reported. The researcher must still defend identification and overlap, but now also has to defend the policy class, welfare criterion, budget constraint, fairness constraint, source-to-target comparison, and implementation environment.

Theory-to-applied bridge

Method ideaTheoretical objectTypical applied questionExample paper
CATE estimationτ(x)\tau(x)For whom does treatment work?Wager & Athey, 2018
Policy learningπ(x),V(π),R(π)\pi(x), V(\pi), R(\pi)Which rule should assign treatment?Kitagawa & Tetenov, 2018
Honest forests / GRFFlexible heterogeneity with valid asymptoticsCan we discover stable treatment heterogeneity?Athey et al., 2019
Policy learning with observational dataValue of rules under confounding controlCan a targeting rule be learned without an RCT?Athey & Wager, 2021
Algorithmic assignmentConstrained targeting / placementHow should scarce slots be allocated?Bansak et al., 2018
External validity / transportabilitySource-to-target mappingWill a rule learned here work elsewhere?Allcott, 2015Vivalt, 2020Dehejia et al., 2021

Field Core

A. Three Objects: Prediction, Effects, And Decisions

Machine learning enters applied economics through at least three distinct objects.

Prediction. A prediction rule estimates an outcome, label, risk, or score:

m^(x)≈E[Y∣X=x].\widehat m(x) \approx \mathbb E[Y \mid X=x].

This is useful for measurement, risk classification, imputation, or triage. It is not a causal effect unless the research design supplies a counterfactual interpretation.

Causal effect estimation. A treatment-effect estimator compares potential outcomes:

τ(x)=E[Y(1)−Y(0)∣X=x].\tau(x) = \mathbb E\left[Y(1)-Y(0)\mid X=x\right].

This is the conditional average treatment effect. It answers: for units with covariates X=xX=x, how much does treatment change the outcome relative to non-treatment?

Decision rules. A policy maps observables into treatment assignment:

π(x)∈{0,1}.\pi(x)\in\{0,1\}.

It answers: given evidence, constraints, and a welfare objective, who should be assigned to treatment?

The three objects can use similar algorithms, but they are not interchangeable. A worker with high predicted employment absent treatment may have a low treatment effect. A worker with low predicted earnings may or may not gain from training. A policy rule should target gains net of costs and constraints, not predicted levels alone.

B. IATEs, CATEs, And Subgroup Effects

The most individual object is the individualized treatment effect:

τi=Yi(1)−Yi(0).\tau_i = Y_i(1)-Y_i(0).

For a single person, τi\tau_i is usually not point-identified because only one potential outcome is observed. Researchers therefore estimate average objects. The CATE in (2) averages over units with covariates X=xX=x. A subgroup effect averages over a policy-relevant group GG:

τG=E[Y(1)−Y(0)∣X∈G].\tau_G = \mathbb E\left[Y(1)-Y(0)\mid X\in G\right].

Heterogeneity is itself the object of interest when the paper asks about incidence, mechanisms, or theory. Examples include whether a youth employment program helps high-risk applicants more than low-risk applicants, whether a wage subsidy has larger effects in thinner labor markets, or whether a job-search intervention changes outcomes more for workers with weaker networks.

Policy learning becomes the object when the paper asks how scarce treatment slots should be assigned. In that case, the subgroup effect is not enough. The researcher needs to know whether a rule improves welfare relative to alternatives, whether the rule can be implemented, and whether it remains credible outside the sample used to learn it.

C. CATE Versus Policy Rule

In the simplest textbook case, if treatment is costless, capacity is unlimited, outcomes are valued equally, and CATEs are known, the optimal rule is:

π∗(x)=1{τ(x)≥0}.\pi^*(x) = \mathbf 1\{\tau(x)\ge 0\}.

Applied settings rarely look like that. Treatment may be costly; slots may be scarce; policy makers may care about distributional weights; assignment may be constrained by law, administrative information, or political feasibility; take-up may be imperfect; and treatment may change behavior in ways not captured by the original experiment or observational design.

A more realistic statement is:

π∗∈arg⁡max⁡π∈ΠV(π),\pi^* \in \arg\max_{\pi\in\Pi} V(\pi),

where Π\Pi is the feasible policy class. This class might contain simple score thresholds, shallow trees, site-level rules, or budget-constrained assignment rules. The policy class is an economic and institutional choice, not only a statistical tuning parameter.

D. Policy Value And Regret

The value of a policy rule is the expected outcome under the treatment assignment induced by the rule:

V(π)=E[Y(π(X))].V(\pi) = \mathbb E\left[Y(\pi(X))\right].

For a binary treatment, this can be written as:

V(π)=E[π(X)Y(1)+(1−π(X))Y(0)].V(\pi) = \mathbb E\left[ \pi(X)Y(1) + \left(1-\pi(X)\right)Y(0) \right].

If treatment has cost c(X)c(X) or if the outcome should be net of resource use, the relevant value becomes:

Vnet(π)=E[π(X)(Y(1)−c(X))+(1−π(X))Y(0)].V^{net}(\pi) = \mathbb E\left[ \pi(X)\left(Y(1)-c(X)\right) + \left(1-\pi(X)\right)Y(0) \right].

Regret compares a candidate rule to the best rule in the policy class:

R(π)=V(π∗)−V(π).R(\pi) = V(\pi^*)-V(\pi).

This is the core shift from effect estimation to decision analysis. A CATE estimate may be unbiased and still yield a poor policy if it is too noisy, optimized in sample, unconstrained, or applied where support is weak. Conversely, a simple rule can have low regret if it captures most decision-relevant heterogeneity while remaining stable and implementable.

E. Empirical Welfare Maximization And Policy Learning

Empirical welfare maximization asks the researcher to choose the rule in Π\Pi with the highest estimated value:

π^∈arg⁡max⁡π∈ΠV^(π).\widehat\pi \in \arg\max_{\pi\in\Pi} \widehat V(\pi).

Kitagawa and Tetenov make this treatment-choice problem explicit: the target is not a coefficient but a rule that performs well by a welfare criterion Kitagawa & Tetenov, 2018. Athey and Wager extend policy learning to observational data by combining causal identification, orthogonal scores, and policy-value estimation Athey & Wager, 2021.

The practical questions are concrete:

A policy tree is one interpretable example of Π\Pi. It might assign a training program based on baseline unemployment duration and prior earnings. A score-threshold rule is another. A highly flexible model that assigns everyone idiosyncratically may look better in sample but be harder to validate, explain, or deploy.

F. Uplift And Targeting Logic

Targeting logic should be based on treatment effects or net treatment effects, not on predicted outcome levels. In marketing and policy settings this is often called uplift: prioritize units for whom treatment changes the outcome most.

For a job-training program, ranking applicants by predicted employment under treatment,

E[Y(1)∣X=x],\mathbb E[Y(1)\mid X=x],

does not answer the targeting question. The policy question is closer to ranking by:

E[Y(1)−Y(0)−c(X)∣X=x].\mathbb E[Y(1)-Y(0)-c(X)\mid X=x].

This distinction is central in labor applications. A program may be most effective for applicants with weak baseline prospects, even though their predicted treated outcome remains below the outcome of advantaged applicants. Or it may be wasteful to target high-risk applicants if treatment effects are small, support is weak, or implementation costs are high.

Subgroup discovery can help, but it should be handled as evidence generation rather than as a final rule. Discovered subgroups need hold-out validation, standard errors or uncertainty intervals, support checks, and a statement of whether the dimension was theory-driven or exploratory.

G. Doubly Robust Scores For Policy Value

Lecture 10’s orthogonalization logic reappears in policy learning. Under unconfoundedness and overlap, define:

μd(x)=E[Y∣D=d,X=x],e(x)=Pr⁡(D=1∣X=x).\mu_d(x) = \mathbb E[Y\mid D=d,X=x], \qquad e(x) = \Pr(D=1\mid X=x).

A doubly robust score for policy value is:

Γi(π)=π(Xi)[μ^1(Xi)+Die^(Xi)(Yi−μ^1(Xi))]+(1−π(Xi))[μ^0(Xi)+1−Di1−e^(Xi)(Yi−μ^0(Xi))].\Gamma_i(\pi) = \pi(X_i) \left[ \widehat\mu_1(X_i) + \frac{D_i}{\widehat e(X_i)} \left(Y_i-\widehat\mu_1(X_i)\right) \right] + \left(1-\pi(X_i)\right) \left[ \widehat\mu_0(X_i) + \frac{1-D_i}{1-\widehat e(X_i)} \left(Y_i-\widehat\mu_0(X_i)\right) \right].

Then:

V^DR(π)=1n∑i=1nΓi(π).\widehat V_{DR}(\pi) = \frac{1}{n} \sum_{i=1}^{n} \Gamma_i(\pi).

This score is useful because it connects policy learning back to the Lecture 10 architecture: nuisance functions can be estimated flexibly, sample splitting can reduce overfitting, and policy value can be evaluated on held-out observations. But the score still relies on the causal design. It does not remove unobserved confounding, poor overlap, bad timing, or weak source-to-target comparability.

H. External Validity, Transportability, And Distribution Shift

When effects vary, external validity becomes a first-order concern. Suppose a rule is learned in source population SS but is considered for target population TT. The target value is:

VT(π)=ET[Y(π(X))].V_T(\pi) = \mathbb E_T\left[Y(\pi(X))\right].

Even if VS(π)V_S(\pi) is high, VT(π)V_T(\pi) can be low because the target population has different covariates, different treatment effects conditional on covariates, different implementation quality, different prices, different take-up, or different constraints.

A simple target-weighting idea writes:

ET[h(X)]=ES[ω(X)h(X)],ω(X)=fT(X)fS(X).\mathbb E_T[h(X)] = \mathbb E_S\left[\omega(X)h(X)\right], \qquad \omega(X) = \frac{f_T(X)}{f_S(X)}.

For policy value, this suggests:

VT(π)≈ES[ω(X){μ0(X)+π(X)τ(X)}].V_T(\pi) \approx \mathbb E_S\left[ \omega(X) \left\{\mu_0(X)+\pi(X)\tau(X)\right\} \right].

The approximation is fragile. It requires observed state variables rich enough to describe the source-target difference, common support where fS(X)>0f_S(X)>0 whenever fT(X)>0f_T(X)>0, and stable potential-outcome functions after conditioning on XX. Those are substantive assumptions. Allcott’s site-selection argument, Vivalt’s evidence on generalizing impact evaluations, and Dehejia, Pop-Eleches, and Samii’s local-to-global framework all push students to treat external validity as a design problem rather than an afterthought Allcott, 2015Vivalt, 2020Dehejia et al., 2021.

I. Fairness, Feasibility, And Implementation Constraints

A policy rule can be statistically attractive and still be a bad recommendation. Applied economists should ask:

Bansak and coauthors’ refugee-assignment application is a useful anchor because it makes algorithmic assignment concrete: the object is not merely a prediction score, but an assignment rule with institutional constraints and outcomes that matter for integration Bansak et al., 2018. That kind of application should train students to ask where the data come from, which outcomes are optimized, who bears costs, and whether the assignment rule is legitimate.

J. ML Section Summary

The point of this lecture is not to teach every machine-learning algorithm. The point is to know where common algorithms belong in applied work and where they do not.

ML algorithm quick guide

Algorithm familyBest suited forStrengthsMain caveats in applied economics
Lasso / Elastic NetHigh-dimensional controls, sparse measurement, baseline predictionStable shrinkage, useful for variable selection and nuisance predictionSelection instability under collinearity; not a causal estimator by itself
RidgeDense prediction problems with many correlated covariatesGood predictive stabilityWeak variable-selection interpretability
Random forestsNonlinear prediction, interaction-heavy tabular dataStrong off-the-shelf predictive performance, robust defaultsHarder to interpret; can overfit subgroup patterns if used incautiously
Gradient boostingSharp prediction tasks, ranking, tabular predictionOften strong predictive accuracySensitive tuning; target leakage and calibration problems are common
Causal forests / GRFFlexible treatment-effect heterogeneityBuilt for heterogeneous effects rather than just predictionHeterogeneity estimates can be noisy; policy conclusions require honest validation
Policy treesInterpretable treatment rulesEasy to explain and implementCan be unstable in small samples; may oversimplify the decision problem
SVMMargin-based classification in moderate-dimensional spacesEffective for some classification tasksLess natural for treatment policy or welfare problems; limited interpretability
Neural networksLarge-scale unstructured or highly nonlinear problemsPowerful when feature learning mattersData hungry, opaque, and often unnecessary for standard tabular economics settings
Clustering methodsUnsupervised grouping / typologiesUseful for exploratory segmentationClusters are not causal groups and should not be overinterpreted

The short version is:

K. Diagnostics For Reporting

Causal ML, policy learning, and external validity diagnostics

DimensionKey questionStrong caseWarning signPractical implication
Heterogeneity objectIs the goal CATE estimation or policy choice?Policy object is explicitHeterogeneity is estimated but no decision problem is definedDo not confuse subgroup estimates with treatment rules
Policy classWhat set of rules is allowed?Feasible and interpretable classFlexible rule unconstrained by implementationConstrain by budget, fairness, and deployability
OverlapAre treated and untreated units comparable where the rule assigns treatment?Good support in targeted regionsExtreme targeting where overlap is weakTrim or restrict the policy class
Value estimationHow is policy performance evaluated?Honest out-of-sample or cross-fit evaluationIn-sample policy valueReport value and regret using held-out data
External validityWill the rule travel?Clear source-target comparisonDifferent institutions, prices, or take-up conditionsTreat portability as an empirical question
Fairness and constraintsCan the rule be implemented legally and ethically?Feasibility is explicitModel-optimized rule ignores protected groups or legalitySeparate statistical from institutional optimality

The reporting discipline should be stronger than in a standard heterogeneity section. A credible paper reports the estimand, identifying assumptions, nuisance learners, policy class, value estimator, capacity constraint, validation split, source-target support, subgroup effects, fairness audit, and implementation caveats. If the result is exploratory, say so.

Research Lab

The Week 11 lab follows the standard Reproduce -> Diagnose -> Transfer structure. It is a bounded synthetic teaching path, not an official replication package. The primary anchor is Kitagawa and Tetenov because the lab reproduces the logic of empirical welfare maximization and treatment choice Kitagawa & Tetenov, 2018. The secondary challenge anchor is the external-validity literature because students then ask whether a source-trained policy rule travels to a target population Allcott, 2015Vivalt, 2020Dehejia et al., 2021. Bansak and coauthors provide the applied assignment motivation Bansak et al., 2018.

Reproduce

Students work with a deterministic synthetic job-training dataset. They estimate heterogeneous treatment effects and compare four policy rules:

The goal is to reproduce the policy-learning logic, not any published estimate:

Diagnose

Students decide whether the learned policy is credible:

The required memo should distinguish the value of a policy rule from the accuracy of a prediction model.

Transfer

Students apply the source-trained rule to a shifted target population. The target sample has different covariate distributions and a weaker implementation environment. Students compare:

The core lesson is that the same heterogeneity estimate may not justify the same policy in a new population. A rule learned in one program site can fail when the target population, treatment technology, budget, take-up, or institutions differ.

Minimum student deliverables are:

  1. one Reproduce paragraph defining π(x)\pi(x), V(π)V(\pi), and the policy class;

  2. one Diagnose paragraph interpreting value, regret, overlap, and fairness outputs;

  3. one Transfer paragraph explaining whether the learned rule transports to the target population;

  4. one final sentence stating what the policy-learning exercise identifies and what it does not identify.

Methods Box

Reading Ladder And References

Reading architecture

Core methods backbone

Policy and assignment applications

External validity and transportability

Suggested teaching flow

  1. Heterogeneity as an object

  2. Policy value and regret

  3. Policy learning under observational data

  4. Fairness and deployment

  5. Transportability and distribution shift

  6. Practical ML toolkit summary

First pass: heterogeneity tools. Review Wager and Athey on causal forests and Athey, Tibshirani, and Wager on generalized random forests Wager & Athey, 2018Athey et al., 2019. These papers connect Lecture 10’s heterogeneity tools to the inputs used in Lecture 11.

Second pass: policy learning. Read Kitagawa and Tetenov on empirical welfare maximization, then Athey and Wager on policy learning with observational data Kitagawa & Tetenov, 2018Athey & Wager, 2021.

Third pass: assignment applications. Read Bansak and coauthors for a concrete algorithmic-assignment application with institutional constraints Bansak et al., 2018. Athey and Imbens are useful for recursive partitioning and the logic of interpretable heterogeneity Athey & Imbens, 2016.

External-validity pass. Read Allcott on site selection bias, Vivalt on how much impact evaluations generalize, and Dehejia, Pop-Eleches, and Samii on local-to-global external validity Allcott, 2015Vivalt, 2020Dehejia et al., 2021.

Exercises And Discussion Prompts

  1. Give one applied setting where heterogeneity is the main research object and one where policy learning is the main object. What changes in the estimand?

  2. Explain why τ^(x)\widehat{\tau}(x) is not automatically a treatment rule. What additional information is needed?

  3. Write the value of a treat-all rule, a treat-none rule, and a threshold rule for a binary treatment.

  4. Derive how treatment costs change the simple rule π∗(x)=1{τ(x)≥0}\pi^*(x)=\mathbf 1\{\tau(x)\ge 0\}.

  5. A model predicts that high-skilled workers have the highest post-training earnings. Why does that not imply they should be targeted?

  6. A policy tree has high in-sample value but low held-out value. What diagnostics would you inspect?

  7. Suppose a rule targets mostly one demographic group. What fairness and interpretation questions should be reported before deployment?

  8. A job-training rule learned in a large city is proposed for a rural region. What source-target comparisons are necessary before claiming external validity?

  9. How does weak overlap in the targeted subgroup change the interpretation of policy value?

  10. When might a transparent rule with slightly lower estimated value dominate a flexible rule with higher estimated value?

Reproducibility And Code Lab Note

The canonical Lecture 11 lab folder is:

labs/11-causal-ml-policy-learning-and-external-validity/

The lab uses deterministic synthetic data for a job-training policy-learning exercise and a source-to-target transportability exercise. It does not claim to reproduce the published estimates in Kitagawa and Tetenov, Bansak and coauthors, Allcott, Vivalt, or Dehejia, Pop-Eleches, and Samii. The purpose is to make policy value, regret, honest evaluation, fairness audits, and source-target shift concrete.

The smoke path runs:

ENV_NAME=research bash smoke.sh

Expected outputs include policy-value comparisons, learned-rule summaries, subgroup CATE estimates, overlap diagnostics, fairness audits, source-target covariate comparisons, target-weight summaries, transfer-value comparisons, and transfer design prompts.

Slide Companion Note

The Week 11 slide deck should not duplicate the chapter. It should make the Lecture 10 versus Lecture 11 distinction explicit, define CATEs and policy rules, show policy value and regret, explain empirical welfare maximization, summarize external validity and transportability, surface fairness and implementation constraints, give a compact ML algorithm guide, and end with the Reproduce -> Diagnose -> Transfer lab design.

The canonical slide source is slides/week11/11-causal-ml-policy-learning-and-external-validity.tex.

Bridge Forward

Lecture 11 closes the core machine-learning block by showing that flexible methods become most useful when tied to economic objects: welfare, constraints, assignment, implementation, and portability. Lecture 12 turns to text as data and computational measurement. The bridge is direct: text and LLM workflows can produce features, labels, and scores that later enter prediction, causal estimation, or policy rules, but they require the same discipline about measurement, validation, and downstream use.

References
  1. Wager, S., & Athey, S. (2018). Estimation and Inference of Heterogeneous Treatment Effects Using Random Forests. Journal of the American Statistical Association, 113(523), 1228–1242.
  2. Athey, S., Tibshirani, J., & Wager, S. (2019). Generalized Random Forests. The Annals of Statistics, 47(2), 1148–1178.
  3. Kitagawa, T., & Tetenov, A. (2018). Who Should Be Treated? Empirical Welfare Maximization Methods for Treatment Choice. Econometrica, 86(2), 591–616.
  4. Athey, S., & Wager, S. (2021). Policy Learning with Observational Data. Econometrica, 89(1), 133–161.
  5. Bansak, K., Ferwerda, J., Hainmueller, J., Dillon, A., Hangartner, D., Lawrence, D., & Weinstein, J. (2018). Improving Refugee Integration through Data-Driven Algorithmic Assignment. Science, 359(6373), 325–329.
  6. Allcott, H. (2015). Site Selection Bias in Program Evaluation. Quarterly Journal of Economics, 130(3), 1117–1165.
  7. Vivalt, E. (2020). How Much Can We Generalize from Impact Evaluations? Journal of the European Economic Association, 18(6), 3045–3089.
  8. Dehejia, R., Pop-Eleches, C., & Samii, C. (2021). From Local to Global: External Validity in a Fertilizer Experiment. Journal of Business & Economic Statistics, 39(1), 217–243.
  9. Athey, S., & Imbens, G. (2016). Recursive Partitioning for Heterogeneous Causal Effects. Proceedings of the National Academy of Sciences, 113(27), 7353–7360.