Machine learning with contracts — is restored post hoc by → Model repair

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

Contracts and model repair sit at different points in a system's lifecycle. The contracts framing is about specification: decide, before or during training, what behavioral guarantee a system must satisfy, in place of the implicit and brittle promise that test data will resemble training data (concrete-problems, §"A unifying view: counterfactual reasoning and machine learning with contracts.", p. 19). Model repair is what happens when that specified property turns out not to hold in an already-trained model: rather than retraining from scratch, it alters the trained model directly to force compliance with the desired safety property. The paper lists it alongside reachability analysis as one of the "avenues for obtaining better contracts," but it is the only one of the two that operates after training is complete, making it the contracts framework's answer to a contract violation discovered too late to prevent.