# Mostly Harmless Machine Learning: Learning Optimal Instruments in Linear IV Models

arXiv: https://arxiv.org/abs/2011.06158 · HTML: https://mlsanity.com/paper/2011.06158/

## Key facts

- Cited by 4 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 12 Nov 2020.

## Built on by (most cited first, 4 of 4)

- [Learning Causal Models from Conditional Moment Restrictions by Importance Weighting](https://mlsanity.com/paper/2108.01312/) (2021)
- [Fast Instrument Learning with Faster Rates](https://mlsanity.com/paper/2205.10772/) (2022)
- [Improving Inference from Simple Instruments through Compliance Estimation](https://mlsanity.com/paper/2108.03726/) (2021)
- [Machine learning the first stage in 2SLS: Practical guidance from bias decomposition and simulation](https://mlsanity.com/paper/2505.13422/) (2025)

## Abstract (arXiv)

We offer straightforward theoretical results that justify incorporating machine learning in the standard linear instrumental variable setting. The key idea is to use machine learning, combined with sample-splitting, to predict the treatment variable from the instrument and any exogenous covariates, and then use this predicted treatment and the covariates as technical instruments to recover the coefficients in the second-stage. This allows the researcher to extract non-linear co-variation between the treatment and instrument that may dramatically improve estimation precision and robustness by boosting instrument strength. Importantly, we constrain the machine-learned predictions to be linear in the exogenous covariates, thus avoiding spurious identification arising from non-linear relationships between the treatment and the covariates. We show that this approach delivers consistent and asymptotically normal estimates under weak conditions and that it may be adapted to be semiparametrically efficient (Chamberlain, 1992). Our method preserves standard intuitions and interpretations of linear instrumental variable methods, including under weak identification, and provides a simple, user-friendly upgrade to the applied economics toolbox. We illustrate our method with an example in law and criminal justice, examining the causal effect of appellate court reversals on district court sentencing decisions.
