Contextual Optimization Under Model Misspecification: A Tractable and Generalizable Approach

Omar Bennouna, Jiawei Zhang, Saurabh Amin, Asuman E. Ozdaglar

Introduction

Contextual optimization leverages machine learning to predict unknown parameters that inform downstream decision-making. For instance, a GPS routing system must choose the fastest path (the optimization problem) based on estimated traffic costs derived from weather and time-of-day (the context). While standard methods perform well under ideal conditions, they often fail when the predictive model is "misspecified"—meaning it cannot perfectly capture the true real-world dynamics.

This paper introduces a novel surrogate loss function called Consistent Integrated Learning and Optimization (CILO). By leveraging advanced smoothing techniques, CILO guarantees optimal decision-making even under model misspecification, providing a tractable, generalizable approach that significantly outperforms existing methods in realistic environments.

The Challenge of Model Misspecification

The standard "predict-then-optimize" pipeline uses historical data to train a machine learning model to predict costs, which are then fed into an optimization solver. Existing approaches generally fall into two categories:

  1. Sequential Learning and Optimization (SLO): Focuses purely on minimizing prediction error, ignoring how the predictions will actually be used in the downstream task.
  2. Integrated Learning and Optimization (ILO): Methods like SPO+ train the model by directly penalizing downstream decision errors.

However, both approaches typically assume the model is well-specified—that the true cost function exists perfectly within the model's hypothesis class. In reality, models are almost always misspecified due to incomplete features, unmodeled dependencies, or distribution shifts. When forced to use a misspecified model, existing methods can learn systematically biased estimates that lead to poor downstream decisions.

A crucial insight of this work is the distinction between prediction and decision misspecification. A model can be terrible at predicting exact costs but still rank options correctly, leading to perfect decisions. Yet, standard methods like SPO+ and SLO will often ignore a perfect decision-maker within a misspecified hypothesis class in favor of a mathematically "safer" but practically worse predictor.

The CILO Framework

The true objective in contextual optimization—minimizing the actual cost of the decision made based on a prediction—is notoriously difficult to optimize because it is non-convex and non-smooth. To solve this, the authors introduce the CILO loss.

To make CILO computationally tractable, the authors employ several clever mathematical techniques:

  • Difference of Convex (DC) Functions: They restructure the CILO loss into the difference between two convex functions.
  • Moreau Envelope Smoothing (s-CILO): They apply a smoothing technique to the DC formulation. This smooths out the jagged mathematical landscape, ensuring that gradient descent won't get stuck in poor local minima.
  • Log-Barrier Surrogate (log-CILO): To prevent the model from trivially minimizing the math expression by predicting a cost of exactly zero for everything, the authors introduce a log-barrier technique to actively push the model away from this useless zero-solution.

CILO is the first approach to provably optimize the true decision cost under misspecification. The authors mathematically prove that minimizing their surrogate loss directly minimizes the true decision error.

Experimental Results and Theoretical Guarantees

The authors provide strong theoretical backing for their approach. They prove that their smoothed surrogate loss has no "bad" first-order stationary points for linear models (Theorem 4). Furthermore, they provide strong generalization bounds, proving that minimizing empirical CILO on training data yields near-optimal out-of-sample performance (Theorem 2).

Empirically, the authors evaluate their method using a synthetic linear optimization dataset. The "ground truth" cost is generated using a complex polynomial function of the input features, while the predictive models are restricted to a simple linear function using only a truncated subset of those features. This setup allows the authors to explicitly dial the "misspecification level" up or down.

Out-of-sample regret comparison across different levels of model misspecification.

As shown in the evaluation, in perfectly well-specified settings, traditional SLO actually performs best, aligning with prior literature. However, as the level of misspecification increases (represented by the number of hidden features), CILO significantly outperforms both SLO and SPO+. SLO degrades rapidly because it chases prediction accuracy over decision quality, while SPO+ fails because its decision-aware math breaks down outside of well-specified assumptions.

Limitations and Future Work

While the general framework applies broadly, the strongest theoretical guarantee—that every stationary point is a global minimum—is currently proven specifically for linear hypothesis sets. The authors believe it extends to broader classes of predictors, but this remains to be formally proven. Additionally, some of the tighter consistency bounds assume the set of feasible decisions is a polyhedron.

Currently, the experimental validation is limited to synthetic data. Future work will involve testing the method on real-world datasets to compare its practical performance against existing toolkits like PyEPO.

Summary updated

BibTeX
@inproceedings{bennouna2025contextual,
  author = {Omar Bennouna and Jiawei Zhang and Saurabh Amin and Asuman E. Ozdaglar},
  title = {{Contextual Optimization Under Model Misspecification: A Tractable and Generalizable Approach}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=e3NNvqD7wA},
}
Figure