Sobolev Training of End-to-End Optimization Proxies

Andrew W. Rosemberg, Joaquim Dias Garcia, Russell Bent, Pascal Van Hentenryck · Submission to ICLR 2026 · Rejected

TL;DR

Optimization proxies replace slow, iterative solvers with millisecond-scale neural networks, but standard training often produces solutions that violate physical constraints or yield poor sensitivities. This paper introduces a sparse-masked Sobolev training framework that supervises both predicted solutions and their local sensitivities (Jacobians) derived via implicit differentiation of the KKT conditions. The result is a theoretical quadratic improvement in uniform approximation error and dramatic empirical reductions in constraint violations with zero overhead at inference time.

What Problem Does This Paper Address?

Parametric optimization problems—such as AC Optimal Power Flow (AC-OPF) in electrical grids or portfolio rebalancing in finance—must often be solved under strict millisecond deadlines. Neural network "proxies" learn the mapping from problem parameters $p$ to optimal decisions $x^*(p)$ in a single forward pass.

However, existing proxies trained purely on solution values (or regularized with constraint penalties) suffer from two major flaws:

  1. They frequently produce solutions that violate critical physical or operational constraints in edge cases.
  2. They fail to capture local problem geometry ($\nabla_p x^*$), which degrades performance when proxies are embedded as differentiable "inner loops" within nested or bilevel optimization pipelines.

Methods

The authors adopt a Sobolev training paradigm that trains proxies to match both primal solutions and solver sensitivities:

  • Implicit Sensitivity Extraction: For any optimal solution, sensitivities $\nabla_p x^*(p)$ are computed offline by applying the Implicit Function Theorem to the Karush-Kuhn-Tucker (KKT) optimality conditions via DiffOpt.jl.
  • Sparse-Masked Sobolev Loss: Full Jacobian supervision is memory-intensive and induces gradient conflict across competing constraints. The authors introduce a binary mask $M$ that randomly supervises only a tiny subset of partial derivatives (5% to 25% density): $$\mathcal{L}(\theta) = \frac{1}{N} \sum_{i=1}^N \ell\left(\hat{g}_\theta(p_i), g(p_i)\right) + \frac{\lambda}{N} \sum_{i=1}^N \ell_d\left(M \odot D\hat{g}_\theta(p_i), M \odot Dg(p_i)\right)$$
  • Theoretical Error Bounds: The authors prove that while value-only matching achieves a uniform approximation error bound of $\mathcal{O}(\delta)$ (where $\delta$ is the training-set covering radius), joint value-and-derivative matching achieves $\mathcal{O}(\delta^2)$ under derivative-Lipschitz assumptions.
  • GPU-Accelerated Implementation: Implemented in Julia using Lux.jl for nested automatic differentiation (AD) on GPUs, ensuring that training overhead remains small ($1.2\times$ to $2.6\times$ per epoch) while inference cost remains identical to standard feed-forward evaluation.

Datasets

The authors evaluate their method across two diverse operational regimes:

  1. AC Optimal Power Flow (AC-OPF): Three realistic transmission grid benchmarks from the Power Grid Library (PGLib):
  2. IEEE-300 (300 buses, 69 generators)
  3. PEGASE-1k (1,354 buses, 260 generators)
  4. RTE-6k (6,468 buses, 399 generators) Datasets (~10k train, ~5k test instances) combine uniform box sampling, line excursions to boundaries, and realistic grid load profiles.

  5. Markowitz Portfolio Selection (MPS): High-dimensional ($n=500$ assets) continuous portfolio allocation instances with quadratic risk limits, evaluated under both random dense covariance matrices and factor-model constructions.

Key Insights and Ideas

  • Derivatives provide strong geometric regularization: Supervised gradients dramatically reduce the degrees of freedom in function space. Constraining the proxy's tangent planes forces it to respect constraint boundaries much more reliably than value regression alone.
  • Extreme sparsity beats dense supervision: Counterintuitively, matching 100% of the Jacobian degrades accuracy and increases constraint violations by more than $5\times$ compared to keeping only 5% of entries. Sparse masking acts as a regularizer that alleviates gradient interference between competing constraint boundaries.
  • Regime-dependent sensitivity utility: In tight-risk portfolio settings ($\sigma_{\max} \le 0.10 B$), gradients are uninformative, and standard objective-matching baselines perform better. In looser risk regimes, Sobolev matching halves the suboptimality gap. This split naturally motivates a mixture-of-experts strategy.

Key Results

  • AC-OPF Constraint Satisfaction:
  • Reduced test Mean Squared Error (MSE) by up to 56% (on RTE-6k, dropping from $0.0009$ to $0.0004$).
  • Slashed median worst-case constraint violations by 18% (IEEE-300), 400% (PEGASE-1k), and 180% (RTE-6k) compared to MSE-only baselines.
  • Maintained near-optimal generation costs, with relative optimality gaps strictly below 0.22%.
  • Portfolio Optimization: In the medium-risk regime ($\sigma_{\max} > 10\%$), semi-self-supervised Sobolev training cut the average optimality gap from $18.9 \pm 20.2\%$ down to $8.7 \pm 9.5\%$.
  • Runtime: Training slowdown was modest ($1.2\times$ to $2.6\times$ per epoch), and inference remained a single, standard matrix-multiplication pass with zero derivative overhead.

Limitations and Future Work

  • Dependence on Regularity Conditions: Sensitivities require conditions like Linear Independence Constraint Qualification (LICQ) and strict complementarity. When degeneracies occur (e.g., active set changes or rank deficiencies), sensitivities become discontinuous or undefined.
  • Uninformative Derivatives: Problem classes with piecewise-flat or linear solution maps (e.g., standard Linear Programs) yield zero dual gradients across intervals, providing no useful Sobolev signal.
  • Self-Supervised Label Reliance: In the portfolio study, sensitivities still relied on offline solver labels. Transitioning to fully end-to-end, batch-implicit differentiation on GPU remains constrained by the numerical stability of batched linear solvers (e.g., cuDSS).
  • Future Directions: Incorporating second-order curvature information, applying the framework to mixed-integer and stochastic programs, and coupling Sobolev proxies with lightweight projection layers.

Summary updated

BibTeX
@misc{rosemberg2025sobolev,
  author = {Andrew W. Rosemberg and Joaquim Dias Garcia and Russell Bent and Pascal Van Hentenryck},
  title = {{Sobolev Training of End-to-End Optimization Proxies}},
  year = {2025},
  eprint = {2505.11342},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.11342},
}
Figure