Convex-SKM-Net: Low-Latency Block Halfspace Corrections for Neural Convex Constraint Satisfaction
Organizations: Zhejiang University
Abstract
Fast inference and strict constraint satisfaction are essential for learning-based decision-making. Existing methods often rely on constraint-specific projections or feasible-set parameterizations, while iterative repair can be costly. We introduce Convex-SKM-Net, a convex constraint-satisfaction layer that forms linearization halfspaces from residual and (sub)gradient oracles without constraint-specific inequality projectors. It applies fixed-depth dual projected-gradient descent (dual PGD) to minimum-displacement block problems using GPU-friendly matrix operations. We jointly learn the predictor and a positive-definite mobility, adapting the correction geometry to improve objective quality. We prove convergence of the outer iterates at fixed dual depth and linear convergence in distance under Slater's condition and bounded subgradients. All our test outputs on three second-order-cone model-predictive control (SOC-MPC) horizons and six power-system convex relaxations satisfy a feasibility tolerance. Comparisons with the latest constraint-satisfaction methods show inference speedups of up to on SOC-MPC and on a convex quadratically constrained quadratic programming (QCQP) benchmark with joint training. On QCQP, the mean objective gap is , with full test feasibility at . Learning mobility reduces the five-seed affine-task mean gap by and improves gaps in matched power-system comparisons.
Figures & tables
| Operation | Local objective | Computation |
|---|---|---|
| Single-row SKM | Minimum displacement into one halfspace | Closed-form projection |
| Equality-LS | Boundary fit on all selected rows | Pseudoinverse or linear solve |
| Block-pinv | Boundary fit on violated rows | Pseudoinverse |
| Violation-GD | Primal gradient steps | |
| Dual PGD (ours) | Minimum displacement under inequalities | Dual projected-gradient steps |
| Method | Gap (%) | Feas. (%) | Time (ms) |
|---|---|---|---|
| Gurobi | 0.000 | 100 | 20.809 |
| MOSEK | 0.000 | 100 | 4.974 |
| DC3 | 5.909 | 100 | 0.566 |
| net | 0.130 | 100 | 75.952 |
| SnareNet | 2.913 | 100 | 58.567 |
| Ours | 0.192 | 100 | 0.941 |
| Method | 57 buses | 118 buses | 300 buses | ||||||
| Gap (%) | Feas. (%) | Time (ms) | Gap (%) | Feas. (%) | Time (ms) | Gap (%) | Feas. (%) | Time (ms) | |
| (a) SOCP | |||||||||
| MOSEK | 0.000 | 100 | 31.234 | 0.000 | 100 | 108.978 | 0.000 | 100 | 410.376 |
| net | 0.059 | 100 | 203.366 | 0.396 | 98.5 | 2169.503 | 0.106 | 99.2 | 20934.989 |
| FSNet | 0.053 | 100 | 26.556 | 0.395 | 97.0 | 355.968 | 0.112 | 8.5 | 3199.870 |
| SnareNet | 0.116 | 100 | 48.862 | 0.530 | 88.25 | 6452.791 | — | — | — |
| DC3 | JAXopt | SnareNet | net ( ) | Ours (identity) | Ours (learned) | |
|---|---|---|---|---|---|---|
| Gap (%) | 7.894 | 0.388 | 6.169 | 0.331 | 0.245 | 0.190 |
| Feas. (%) | 99.824 | 100 | 100 | 100 | 100 | 100 |
| Time (ms) | 3.043 | 7.226 | 3.041 | 0.642 | 0.410 | 0.523 |
| Method | Gap (%) | Time (ms) |
|---|---|---|
| DC3 | 66.918 | 0.600 |
| SnareNet | 0.159 | 18.963 |
| net ( ) | 0.040 | 6.126 |
| Ours | 0.012 | 2.469 |
| Method | Squared affine | Log-sum-exp | Rotated SOC | |||
|---|---|---|---|---|---|---|
| Single row (frozen) | 29.745 / | 107.956 | 34.383 / | 100.015 | 18.444 / | 66.106 |
| M-SSP | 16.916 / | 41.322 | 23.284 / | 67.219 | 11.842 / | 73.798 |
| Violation-GD | 4.076 / | 5.004 | 3.438 / | 4.257 | 2.790 / | 3.585 |
| BPP-16 | 54.299 / | 43.175 | 33.791 / | 28.204 | 29.333 / | 24.068 |
| Dual PGD (ours) | 3.470 / | 4.759 | 3.047 / | 3.822 | 2.363 / | 3.201 |
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Training | Validation | Test |
|---|---|---|---|
| SOC-MPC, each | 8,000 | 1,000 | 1,000 |
| Affine-constrained nonconvex optimization | 7,952 | 1,024 | 1,024 |
| Convex QCQP | 8,334 | 833 | 833 |
| ACOPF, 57 buses | 2,000 | 200 | 200 |
| ACOPF, 118 buses | 4,000 | 400 | 400 |
| ACOPF, 300 buses | 10,000 | 1,000 | 1,000 |
| Step | Train steps | Penalty | Test cap | |
|---|---|---|---|---|
| 20 | 5 | 0.5 | 500 | |
| 40 | 20 | 5 | 8000 | |
| 80 | 5 | 5 | 12800 |
| Buses | Train outer | Train inner | Train dual | Test inner | Test dual |
| 57 | 2 | 4 | 4 | 4 | 8 |
| 118 | 2 | 10 | 10 | 10 | 20 |
| 300 | 2 | 20 | 20 | 20 | 40 |
| Primitive | Subgradient | |
|---|---|---|
| Affine | ||
| Squared affine | ||
| Log-sum-exp | ||
| Norm minus affine | ||
| Squared norm | ||
| PSD |
| Mobility | Head rate | Gap (%) | Time (ms) | |
|---|---|---|---|---|
| 20 | Identity | fixed | 0.19939 | 0.828 |
| 20 | Learned, common-rate control | 0.33924 | 1.308 | |
| 20 | Learned, main | 0.19200 | 0.941 | |
| 40 | Identity | fixed | 0.77589 | 0.947 |
| 40 | Learned, main | 0.23561 | 1.061 | |
| 80 | Identity | fixed | 0.94790 | 1.100 |
| Fixed | Gap (%) | Max viol. | Feas. (%) | Time (ms) | |
| 20 | 10 | 23.58977 | 44.1 | 2.281 | |
| 20 | 25 | 5.41482 | 14.8 | 5.055 | |
| 20 | 50 | 0.54972 | 9.5 | 9.841 | |
| 20 | 100 | 0.14579 | 49.9 | 19.278 | |
| 20 | 200 | 0.11107 | 97.8 | 38.747 | |
| 20 | 400 | 0.13016 | 100.0 | 75.952 |
| Stopping | Gap (%) | Max viol. | Feas. (%) | Time (ms) | |
|---|---|---|---|---|---|
| 20 | Original | 0.01904 | 77.9 | 20.534 | |
| 20 | Calibrated | 2.91321 | 100.0 | 58.567 | |
| 40 | Original | 0.06786 | 79.2 | 61.758 | |
| 40 | Calibrated | 1.76219 | 100.0 | 175.515 |
| Method | Gap (%) | Feas. (%) | Time (ms) | |
|---|---|---|---|---|
| 20 | Gurobi | -4.50e-5 | 100 | 20.809 |
| 20 | MOSEK | -1.07e-6 | 100 | 4.974 |
| 20 | DC3 | 5.90896 | 100 | 0.566 |
| 20 | net | 0.13016 | 100 | 75.952 |
| 20 | SnareNet | 2.91321 | 100 | 58.567 |
| 20 | Ours | 0.19200 | 100 | 0.941 |
| Method | Gap (%) | Max viol. | Feas. (%) | Single time (ms) | Batch time (ms) |
|---|---|---|---|---|---|
| DC3 | 7.89393 | 0.30938 | 99.824 | 3.043 | 3.809 |
| JAXopt | 0.38841 | 100 | 7.226 | 111.679 | |
| SnareNet | 6.16897 | 100 | 3.041 | 61.441 | |
| net ( ) | 0.33117 | 100 | 0.642 | 5.370 | |
| Ours (identity mobility) | 0.24518 | 100 | 0.410 | 1.864 | |
| Ours (learned mobility) | 0.19032 | 100 | 0.523 | 4.384 |
| Test mode | Gap (%) | Max viol. | Feas. (%) | Single time (ms) | Batch time (ms) |
|---|---|---|---|---|---|
| 29.77461 | 75.84 | 0.079 | 0.410 | ||
| 4.14283 | 0 | 0.106 | 0.554 | ||
| 0.02529 | 0 | 0.158 | 0.845 | ||
| 0.25240 | 0 | 0.211 | 1.335 | ||
| 0.35811 | 0.059 | 0.266 | 1.833 | ||
| 0.32809 | 0.02 | 0.312 | 2.317 |
| Mobility | Train tol | Test tol | Gap (%) | Max viol. | Single time (ms) | Batch time (ms) |
|---|---|---|---|---|---|---|
| Identity | 0.24518 | 0.410 | 1.864 | |||
| Learned | 0.19032 | 0.523 | 4.384 | |||
| Identity | 0.24606 | 0.341 | 1.678 | |||
| Identity | 0.24636 | 0.833 | 2.918 | |||
| Learned | 0.19167 | 0.543 | 4.908 | |||
| Learned | 0.19215 | 3.605 | 9.267 |
| Epochs | AdaRel | Gap (%) | Max viol. | Single time (ms) | Batch time (ms) |
|---|---|---|---|---|---|
| 50 | Off | 3.525 | 62.326 | ||
| 50 | On, main | 3.041 | 61.441 | ||
| 100 | Off | 4.465 | 65.159 | ||
| 100 | On | 2.943 | 58.483 |
| Mean gap (%) | ||||||
|---|---|---|---|---|---|---|
| Post | Joint | |||||
| Relax. | Buses | Full | Head | Identity full | Identity head | Learned head |
| SOCP | 57 | 0.05115 | 0.05142 | 0.04430 | 0.05013 | 0.05010 |
| SOCP | 118 | 0.41878 | 0.18361 | 0.40576 | 0.17931 | 0.16658 |
| SOCP | 300 | 0.09816 | 0.04123 | 0.09951 | 0.04130 | 0.03676 |
| SDP | 57 | 0.07490 | 0.06420 | 0.07079 | 0.06408 | 0.06401 |
| Task | Method | Failed / Total | At cap | Max eq. | Max ineq. |
|---|---|---|---|---|---|
| SOCP118 | net | 6/400 | 6 | ||
| SOCP118 | FSNet | 12/400 | 12 | ||
| SOCP118 | SnareNet | 47/400 | 47 | ||
| SDP57 | SnareNet | 25/200 | 25 | ||
| SDP118 | SnareNet | 295/400 | 295 | ||
| SOCP300 | FSNet | 915/1,000 | 915 |
| Case | Step | Epochs | Feasible tests | Max ineq. violation |
|---|---|---|---|---|
| SOCP57 | 2000 | 0.19304 | ||
| SOCP118 | 2000 | 189.69979 | ||
| SDP57 | 2000 | 0.13667 | ||
| SDP118 | 2000 | 94.37722 |
| Relax. | Buses | Max equality | Max inequality | Build time (ms) |
|---|---|---|---|---|
| SOCP | 57 | 5.378 | ||
| SOCP | 118 | 12.333 | ||
| SOCP | 300 | 27.268 | ||
| SDP | 57 | 16.649 | ||
| SDP | 118 | 53.069 | ||
| SDP | 300 | 331.634 |
| Method | Success | Stop time (ms) | Mean outer | Max viol. | Paired ratio |
|---|---|---|---|---|---|
| Squared affine | |||||
| Single-row SKM | 5/5 | 75.606 | 589.0 | 9.952e-04 | 21.79 |
| Single-row frozen | 5/5 | 29.745 | 117.8 | 9.516e-04 | 9.23 |
| Equality-LS/pinv | 0/5 | 1045.233 † | 8.0 | 1.887e+02 | – |
| Equality-LS/lstsq | 0/5 | 1044.895 † | 8.0 | 8.198e+02 | – |
| Block-pinv | 5/5 | 547.114 | 5.4 | 8.586e-04 | 152.52 |
| Method | Success | Stop time (ms) | Mean outer | Max viol. | Paired ratio |
|---|---|---|---|---|---|
| Squared affine | |||||
| Single-row SKM | 0/5 | 182.660 † | 1024.0 | 1.092e-02 | – |
| Single-row frozen | 5/5 | 107.956 | 242.2 | 9.847e-04 | 21.93 |
| Equality-LS/pinv | 0/5 | 1066.688 † | 8.0 | 2.561e+02 | – |
| Equality-LS/lstsq | 0/5 | 1069.191 † | 8.0 | 2.539e+02 | – |
| Block-pinv | 5/5 | 642.880 | 5.6 | 6.650e-04 | 136.56 |
| Time (ms) | |||||
|---|---|---|---|---|---|
| Scale | Family | M-SSP | Dual PGD | Ratio | M-SSP outer |
| Small | Squared affine | 16.916 | 3.617 | 4.88 | 140.2 |
| Log-sum-exp | 23.284 | 3.257 | 7.43 | 160.2 | |
| Rotated SOC | 11.842 | 2.315 | 5.11 | 95.0 | |
| Medium | Squared affine | 41.322 | 4.898 | 9.44 | 297.6 |
| Log-sum-exp | 67.219 | 4.303 | 15.90 | 362.2 | |
| Absolute gap | |||||
|---|---|---|---|---|---|
| Mode | Method | Geom. mean | Max | Max ineq. | Max eq. |
| Joint | DC3 | 8.7725242 | 13.8658313 | ||
| Joint | SnareNet | 0.0202505 | 0.0749286 | ||
| Joint | net ( ) | 0.00194093 | 0.0616385 | ||
| Joint | Ours | 0.00130975 | 0.0165973 | ||
| Post | SnareNet | 0.500654 | 1.038013 | ||
| Epochs | Test correction | Gap (%) | Feas. (%) | Max viol. | Time (ms) |
|---|---|---|---|---|---|
| Released | 78.19945 | 97.719 | 0.372 | ||
| Released | 66.90930 | 96.279 | 0.378 | ||
| Calibrated | 66.91845 | 100 | 0.600 |
| Mode | Gap (%) | Max viol. | Feas. (%) | Time (ms) | |
|---|---|---|---|---|---|
| Joint | 5 | 0.00000 | 0 | 0.330 | |
| 10 | 0.00032 | 0 | 0.465 | ||
| 20 | 0.06495 | 0 | 0.753 | ||
| 30 | 0.08713 | 0 | 1.057 | ||
| 50 | 0.04274 | 0 | 1.639 | ||
| 75 | 0.04031 | 58.583 | 2.422 |
Constrained Optimization
Constrained optimization finds the best decisions while satisfying equality, inequality, resource, safety, or fairness requirements.
See all 342 papers