Double Machine Learning: Prediction Is Not Causal Inference
August 2026 | Applied Economics | Causal Inference | ← Back to Blog
Machine learning can predict treatment and outcomes with real accuracy and still produce a biased treatment effect. This post explains why, and walks through how Double Machine Learning can recover a credible causal estimate in settings with many confounders and complicated relationships.
Why Prediction Accuracy Is Not the Same as Causal Credibility
Treatment is rarely randomly assigned in the real world. A pricing change, a policy rollout, a marketing campaign, all of these are typically assigned based on factors that also affect the outcome, the very definition of confounding. In settings with many confounders and complicated, nonlinear relationships between them, the natural instinct is to reach for a flexible machine learning model. That model can predict who receives treatment and what the outcome will be with genuine accuracy.
That accuracy is not the same thing as a credible treatment effect. A model can achieve excellent overall prediction performance while still producing a badly biased estimate of the one coefficient that actually matters for a causal question. Understanding why requires looking closely at what regularization actually does.
Where Regularization Bias Comes From
Flexible prediction models, Lasso, ridge regression, random forests, gradient boosting, all use some form of complexity control to avoid overfitting. In penalized regression methods like Lasso and ridge specifically, this takes the form of shrinking coefficients toward zero unless the data provides strong evidence they should be large. This is exactly what makes these models good at prediction, it keeps them from chasing noise in the training data.
"That shrinkage does not know which coefficient matters for causal inference and which one does not. It shrinks the treatment coefficient along with everything else."
If treatment is included directly in a penalized regression alongside every confounder, its coefficient gets shrunk the same way every other coefficient does, whether or not shrinking it improves prediction accuracy. The model has no way of knowing that one coefficient is what you actually care about and the rest are just there to help predict the outcome. Everything gets treated the same way, and the treatment effect ends up shrunk right along with it.
This is regularization bias, and it shows up whenever a treatment effect is estimated directly inside a regularized model built for prediction rather than causal estimation. More data or a different penalty will not fix this on its own, because the underlying problem is not that the model predicts poorly. The problem is that prediction and causal estimation are different goals, and a model built for one does not automatically deliver the other.
The Fix: Two Prediction Steps, Then a Third Regression
Double Machine Learning, developed by Chernozhukov, Chetverikov, Demirer, Duflo, Hansen, Newey, and Robins, solves this by separating prediction from causal estimation entirely, rather than trying to do both in a single model. The "double" refers to two separate prediction steps.
Step one. Use a flexible machine learning model to predict the outcome from the confounders alone, without including treatment. Save the residuals, the part of the outcome the confounders could not explain.
Step two. Use a second flexible machine learning model to predict treatment from the same confounders. Save these residuals too, the part of treatment the confounders could not explain.
Step three. Regress the outcome residuals on the treatment residuals. This regression asks a narrow, specific question: does the part of treatment that has nothing to do with the confounders explain the part of the outcome that has nothing to do with the confounders. Under the appropriate identification assumptions, the coefficient from this final regression estimates the treatment effect.
The two ML models in steps one and two exist for a narrow purpose, they are not the answer themselves. Their whole job is to remove the predictable, confounded part of both treatment and outcome, so that what remains in step three is the variation that genuinely reflects treatment assignment, not the confounders driving both treatment and outcome at once.
The Classical Connection: Frisch-Waugh-Lovell
This three-step procedure is not a new idea invented for the machine learning era. The intuition behind it comes directly from the Frisch-Waugh-Lovell theorem, a classical result from linear regression.
In its original linear form, FWL states that the coefficient on treatment in a multivariate regression with confounders can be recovered exactly by first regressing the outcome on the confounders to get residuals, regressing treatment on the confounders to get residuals, then regressing the outcome residuals on the treatment residuals. The coefficient from that final regression is identical to the treatment coefficient from the full multivariate regression.
DML applies this same partialling-out logic, but replaces the two linear regressions in the first two steps with flexible machine learning models. This is what allows DML to handle settings where the true relationship between confounders and treatment, or between confounders and outcome, is nonlinear and would be poorly approximated by a simple linear model.
Why This Still Works With Imperfect Models
A natural question is why residualizing with imperfect machine learning models works at all. The predictions from steps one and two are not perfect, they carry their own estimation error. DML's construction is set up specifically so that small errors in those two prediction steps only barely affect the final treatment effect estimate, rather than translating directly into a proportionally large mistake. This property, called Neyman orthogonality, is what makes it safe to use flexible, imperfect ML models for the two prediction steps, rather than requiring them to be estimated with the same precision the final treatment effect itself needs.
Cross-Fitting: Why Held-Out Predictions Matter
One more ingredient makes DML work in practice: cross-fitting, also called sample splitting. If a prediction model is used to generate residuals for the same data it was trained on, it can overfit that data and introduce bias into the final treatment effect estimate.
Cross-fitting solves this by splitting the sample into folds, training the two prediction models on one part of the data, and computing residuals on a different, held-out part. The roles are then swapped and averaged across folds, so the residuals used in the final estimate never come from a model that already saw that exact data during training.
Identification Assumptions Still Apply
DML does not remove the need for standard causal identification assumptions, it changes how flexibly those assumptions can be operationalized. The core requirement is still unconfoundedness, that conditional on the observed confounders, treatment assignment is as good as random. DML also requires sufficient overlap, that units with similar confounder values have a genuine chance of receiving either treatment status, and that the two prediction models are accurate enough for the orthogonality property described above to hold in practice.
What DML changes is the burden placed on functional form. A researcher no longer needs to correctly specify a linear or otherwise parametric relationship between the confounders and treatment or outcome. The flexible ML models can capture that complexity. What DML cannot do is recover a credible estimate if there are unobserved confounders driving both treatment and outcome, that limitation is unrelated to model flexibility and applies to any observational method.
When DML Is the Right Tool, and When It Is Not
DML is best suited to settings with many observed confounders, complicated or nonlinear relationships between those confounders and the treatment or outcome, and a genuine belief that unconfoundedness holds once those confounders are accounted for. Marketplace pricing decisions, where dozens of product, customer, and market-level variables jointly influence both what price gets set and what demand results, are a natural fit.
DML is not the right tool when a cleaner identification strategy is available. If a natural experiment, a policy discontinuity, or genuine randomization exists, those approaches remain preferable, since they rely on a more transparent and directly verifiable identifying assumption rather than the harder-to-verify claim that all relevant confounders have been observed and included.
The Actual Skill
Prediction accuracy alone was never going to be enough. A model can predict treatment and outcome beautifully and still hand you a badly biased treatment effect if it was never built to separate the two tasks. Knowing which tool fits which data structure, rather than defaulting to whichever model predicts best, is what separates a credible causal estimate from a plausible-looking one.
Further Reading
Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W., and Robins, J. (2018). Double/Debiased Machine Learning for Treatment and Structural Parameters. The Econometrics Journal, 21(1), C1-C68.
Frisch, R. and Waugh, F. V. (1933). Partial Time Regressions as Compared with Individual Trends. Econometrica, 1(4), 387-401.