Only Project Once: Projection-Adaptive Loss for Exact Constraint Satisfaction

Tim Aebersold, Soheyl Massoudi, Mark D. Fuge

ETH Zurich

Preprint
Paper arXiv Code BibTeX
Blended wing body aircraft with internal structure
City block with buildings over a pedestrian wind speed field
One-line diagram of the IEEE 57-bus power grid

In training, a single detached projection step is enough for exact constraint satisfaction.

Abstract

Precise constraint satisfaction is a prerequisite to deploying learned models in many areas, motivating methods that repair raw neural predictions with a repair procedure. Current methods unroll multiple repair steps in training and softly penalize constraint violations that remain after the unroll. This is compute- and memory-intensive, lacks robustness when the repair fails to converge, and surrenders most of the constraint satisfaction work to the repair. Our central finding is that, contrary to common practice, a single detached projection step suffices in training. We accomplish this with a Projection-Adaptive Loss (PAL), which uses the constraint residual after this single step to adaptively weigh constraint penalties on the raw prediction. In experiments, PAL is the only method that retains virtually perfect feasibility on extremely nonlinear constraints, and matches or outperforms current methods on synthetic and engineering benchmarks. Because it only requires a single detached projection step, PAL trains 2.5× faster than the canonical repair-based method (DC3) on its own ACOPF benchmark. PAL can also be trained when constraints are expensive to evaluate (e.g., via neural surrogates), a setting where current unrolled methods are memory-intractable.

Method

Current methods unroll many repair steps in training and backpropagate through all of them. Constraint violations that remain after the unroll are softly penalized in the loss with a fixed weight. We show that a single detached projection step suffices in training. PAL uses the constraint residual after this single step to adaptively weigh constraint penalties on the raw prediction.

Diagram comparing unrolled repair training with PAL, which uses a single detached projection step to set adaptive penalty weights

Results

We test PAL on three engineering case studies. Aircraft design uses a neural geometry model with surrogates for structure and aerodynamics. Urban planning uses a video diffusion model to rate pedestrian wind comfort. On both, the unrolled repair baselines run out of memory even at a batch size of 1 (SnareNet on aircraft design at 8), while PAL trains with batches of 32 and 16. On the ACOPF power grid benchmark with 576 constraints, PAL leads in feasibility and optimality and trains 2.5× faster than DC3.

Results table for the aircraft, urban wind and power grid case studies, comparing PAL with ALM, DC3, FSNet, SnareNet, ENFORCE and IPOPT
Mean and standard deviation over 10 seeds. Mem is peak GPU memory in GB at batch size 1. Viol is the maximum constraint violation. Bold marks the best value among feasible methods. † 0% feasibility. § Batch size 8. ‡ 49 GB on 3 seeds, out of memory on 7. △ No convergence. ◇ Not applicable.

To test highly nonlinear constraints, we sweep the constraint curvature κ on a synthetic problem. Despite its single repair step, PAL matches the full unroll methods on optimality and keeps the highest feasibility up to κ = 106. Its adaptive weight raises the constraint pressure whenever the single repair step leaves large residuals.

Feasibility, objective and constraint gradient share over constraint curvature for PAL and baselines
Feasibility, objective and share of training pressure from the constraint loss over curvature κ. PAL keeps high feasibility at high curvature despite a single repair step.

Cite

Aebersold, T., Massoudi, S., and Fuge, M. D. (2026). Only Project Once: Projection-Adaptive Loss for Exact Constraint Satisfaction. arXiv:XXXX.XXXXX.

@article{aebersold2026onlyprojectonce,title = {Only Project Once: Projection-Adaptive Loss for Exact Constraint Satisfaction},author = {Aebersold, Tim and Massoudi, Soheyl and Fuge, Mark D.},journal = {arXiv preprint arXiv:XXXX.XXXXX},year = {2026}}