Pretrain-Then-Calibrate: Reliable Contextual Optimization Along a Solution Path
Abstract
We study contextual optimization subject to a population chance constraint. We propose pretrain-then-calibrate, a calibration layer for any pretrained decision rule fixed before validation. The method constructs a finite interpolation path from the pretrained rule to a known safe rule and uses calibration data to choose one safety parameter. This leaves the original training procedure unchanged and requires no new model fit. We develop several ways to choose the safety parameter, targeting different finite-sample reliability guarantees and levels of conservatism. In synthetic newsvendor and portfolio experiments, calibration substantially improves reliability while preserving much of the pretrained rule's optimality. Real data experiments further demonstrate the empirical optimality-reliability tradeoff benefit of our framework compared to general conformal and (distributionally) robust optimization pipelines.