NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Automatic repair of convex optimization problems

Shane Barratt, Guillermo Angeris, Stephen BoydOptimization 2020 · DOI

Introduction

In the field of convex optimization, practitioners frequently encounter the "Infeasible" or "Unbounded" status. Whether modeling a spacecraft's descent or a complex financial portfolio, these errors indicate that the constraints are too restrictive or the objective function is poorly defined. Traditionally, resolving these issues requires a manual, iterative process of "parameter tweaking"—adjusting constraints or costs until the solver finds a valid solution.

In their paper, "Automatic Repair of Convex Optimization Problems," Shane Barratt, Guillermo Angeris, and Stephen Boyd propose a systematic framework to automate this process. Rather than relying on human intuition to guess which parameters to modify, the authors treat the repair process itself as an optimization problem.

Problem Formulation and Complexity

The core challenge addressed is finding the "smallest" change to a problem's parameters $\theta$ that renders the problem solvable. In a supply chain context, for instance, $\theta$ might represent warehouse capacities. If the current capacities make the problem infeasible, the goal is to find the minimal adjustment to these capacities to restore feasibility.

The authors formally demonstrate that finding the absolute optimal repair is NP-hard. This complexity arises because "solvability" is a non-convex property. Consequently, while existing tools like Gurobi or MOSEK can handle specific linear cases, a general-purpose heuristic is required for the broader class of convex cone programs.

Methodology: The Three Pillars of Repair

The proposed method leverages three primary technical components to navigate the non-convex landscape of solvability:

1. The Solvability Detector ($t^*$)

The authors utilize a "primal-dual embedding" of the original problem. This construction is a specialized version of the problem that is guaranteed to be feasible and bounded. They define a function $t^*(\theta)$, which represents the optimal value of this embedding. Crucially, $t^*(\theta) = 0$ if and only if the original problem is solvable. If $t^*(\theta) > 0$, the problem remains broken.

2. Differentiable Optimization

To minimize the solvability score $t^*(\theta)$, the algorithm requires gradients. The authors employ diffcp, a tool for differentiating through the solution of cone programs. This allows the system to calculate how incremental changes in parameters (e.g., spacecraft mass or fuel limits) affect the overall solvability of the model.

3. The Penalty Method

The repair task is framed as minimizing a performance metric $r(\theta)$—representing the distance from the original parameters—subject to the solvability constraint $t^*(\theta) = 0$. To solve this, the authors combine the terms into a single objective function: $$\text{minimize } \lambda r(\theta) + t^*(\theta)$$ This objective is minimized using a proximal gradient method, iteratively shifting the parameters until the problem reaches a solvable state.

Empirical Benchmarks

The algorithm was evaluated on two distinct simulated scenarios:

  • Spacecraft Landing: In this trajectory optimization problem, initial parameters such as mass and thrust limits rendered a safe landing impossible. The repair algorithm successfully identified a feasible configuration by reducing the spacecraft's mass from 12 to 9.03 and adjusting fuel constraints, achieving a total perturbation score of 0.948.
  • Arbitrage-Free Markets: In a financial model where certain return matrices allowed for "infinite money" (unboundedness), the algorithm identified the smallest perturbations to the market returns (averaging 0.03 to 0.09) required to eliminate arbitrage opportunities.

Key Insights

A significant contribution of this work is the transformation of a binary state (solvable vs. unsolvable) into a continuous, differentiable "solvability surface." This allows for gradient-based search techniques to be applied to model debugging. Furthermore, the framework is flexible; the "performance metric" $r(\theta)$ can be customized to penalize changes to specific parameters more heavily, ensuring that the suggested repairs align with engineering or economic constraints.

Limitations and Conclusion

Despite its utility, the method has limitations. Because the problem is NP-hard, the heuristic may converge to a local minimum—finding a valid repair that is not necessarily the global minimum. Additionally, the method assumes that problem data are differentiable functions of the parameters, and the computational cost of solving an optimization problem within an optimization loop can be significant for large-scale models.

Implemented in the Python package cvxpyrepair, this research provides a powerful tool for the CVXPY ecosystem, moving the field closer to "self-healing" optimization models that can autonomously suggest corrections to their own constraints.

Summary updated

BibTeX
@inproceedings{barratt2020automatic,
  author = {Shane Barratt and Guillermo Angeris and Stephen Boyd},
  title = {{Automatic repair of convex optimization problems}},
  booktitle = {Optimization},
  year = {2020},
  doi = {10.1007/s11081-020-09508-9},
}
Figure