Self-supervised Penalty-Based Learning for Robust Constrained Optimization

Wyame Benslimane, Paul Grigas

TL;DR

Researchers from UC Berkeley have developed a self-supervised learning framework that trains neural networks to solve robust optimization problems—optimization under uncertainty—without needing pre-solved "ground truth" labels. By using a custom loss function based on optimization penalty methods, their approach achieves inference speeds orders of magnitude faster than traditional solvers while effectively balancing the trade-off between solution optimality and feasibility.

What Problem Does This Paper Address?

Decision-making in the real world is rarely certain. Whether it's managing inventory with fluctuating demand or packing a knapsack with items of varying weights, we often rely on Robust Optimization (RO) to find solutions that remain feasible even in the "worst-case" scenarios of uncertainty.

However, RO comes with two major hurdles:

  1. Computational Cost: Traditional solvers (like Gurobi) are mathematically rigorous but can be painfully slow, especially for large-scale or combinatorial (discrete) problems. This makes them unsuitable for real-time applications like ride-sharing dispatch or power grid adjustments.
  2. Data Scarcity: While Machine Learning (ML) can "learn to optimize," standard supervised learning requires thousands of pre-solved problem instances to serve as training labels. Generating these labels using slow RO solvers is often computationally prohibitive.

This paper tackles these issues by proposing a self-supervised approach that learns to solve RO problems directly from the problem's mathematical structure, bypassing the need for expensive labels.

Methods

The authors introduce a "learning to optimize" framework that replaces the traditional solver with a neural network proxy. The key innovations include:

  • Self-Supervised Penalty Loss: Instead of comparing the network's output to a label, they use a loss function derived from the exact penalty method. The loss function has two parts: one that encourages maximizing the objective (e.g., profit) and another that penalizes any violation of the robust constraints.
  • Handling Uncertainty: The loss function specifically accounts for the "worst-case" constraint violations within a defined uncertainty set (like a box or an ellipsoid), ensuring the learned solutions are robust.
  • Differentiable Discrete Layers: To handle combinatorial problems (where variables must be 0 or 1), they incorporate a "smoothed" linear optimization surrogate into the network's last layer during training. This allows gradients to flow through the network even when the final output is discrete.
  • Tunable Parameters: A penalty parameter ($\nu$) allows users to "dial in" the desired level of robustness. A higher $\nu$ forces the model to prioritize feasibility, while a lower $\nu$ allows for more aggressive, optimal solutions.

Datasets

The methodology was evaluated on three synthetic datasets representing classic optimization challenges:

  1. Multidimensional Knapsack (Continuous): Allocating resources with continuous variables.
  2. Combinatorial Multidimensional Knapsack (Discrete): A version of the knapsack problem where items must be either fully selected or not (binary).
  3. Inventory Management: A multi-retailer "newsvendor" model where a central warehouse must decide stocking levels to maximize profit under uncertain demand across multiple locations.

Key Insights and Ideas

  • Labels are Optional: The biggest "aha moment" is that you don't need to know the answer to a problem to teach a network how to solve it. By encoding the constraints directly into the loss function, the network "discovers" the optimal feasible region.
  • The Feasibility-Optimality Trade-off: The paper demonstrates that feasibility isn't binary in a learning context. By tuning the penalty parameter, researchers can find a "sweet spot" where the model is nearly as good as a solver but significantly faster.
  • Supervised Learning Fails at Feasibility: In complex scenarios like inventory management, standard supervised learning (training on labels) often produced 0% feasible solutions, whereas the self-supervised penalty approach reached over 90% feasibility.

Key Results

  • Massive Speedups: The learned neural network solvers achieved inference times significantly faster than traditional solvers. The authors report speedups of over 10 orders of magnitude for single-instance solving compared to the Gurobi solver.
  • High Feasibility: For the Knapsack problem, the model achieved up to 99% feasibility on test sets.
  • Real-Time Potential: Because the "heavy lifting" is done during training, the resulting model can provide robust decisions in milliseconds, making it viable for high-frequency, real-time systems.

Limitations and Future Work

  • Optimality Gap: While fast, the neural network is an approximation. There is still a "regret" (a gap in objective value) compared to the exact solutions provided by traditional solvers.
  • Simple Domains: The current method assumes the variable domain (the set of possible $x$ values) is relatively simple to project onto or solve over. Handling "complex" domain constraints that aren't part of the uncertainty set remains a challenge.
  • Uncertainty Set Geometry: The research focuses on norm-based uncertainty sets (boxes and ellipsoids). Extending this to more complex, data-driven uncertainty sets is a logical next step.

Summary updated

BibTeX
@inproceedings{benslimane2025self,
  author = {Wyame Benslimane and Paul Grigas},
  title = {{Self-supervised Penalty-Based Learning for Robust Constrained Optimization}},
  booktitle = {CPAIOR},
  year = {2025},
  doi = {10.1007/978-3-031-95973-8\_7},
}

Loading related content...

Figure