Counterfactual reasoning — is the descriptive counterpart to → Machine learning with contracts

explored within the theme Reframing distributional shift as broken contracts and causal structure

The paper offers these as a matched pair — "two viewpoints" introduced in the same paragraph for thinking about out-of-distribution prediction (concrete-problems, §"A unifying view: counterfactual reasoning and machine learning with contracts.", p. 19) — but they answer different questions about the same failure. Counterfactual reasoning is descriptive: it asks what distributional shift fundamentally is, and answers that it is a special case of asking what would have happened had the world been different, connecting the problem to a pre-existing statistical and causal literature (Neyman, Rubin, Pearl). Machine learning with contracts is prescriptive: it asks what an ML system should be built to guarantee, and answers that most systems implicitly promise only that training and test distributions match, a contract the paper calls "extremely brittle." One diagnoses the nature of the problem; the other proposes what a fix should be obligated to satisfy.