ENFORCE: Nonlinear Constrained Learning with Adaptive-depth Neural Projection
Giacomo Lastrucci, Artur M. Schweidtmann
TL;DR
ENFORCE tackles the challenge of strictly enforcing nonlinear equality constraints in neural networks by embedding a differentiable, adaptive-depth projection module (AdaNP) into the architecture. The projection is proven to be 1-Lipschitz, non-expansive, and conducive to stable gradient flow, while AdaNP adaptively increases projection depth to meet a tolerance on constraint satisfaction. The method achieves constraint feasibility with modest overhead and can substantially accelerate large-scale constrained optimization (up to ~25× faster than IPOPT) while preserving near-optimal objectives and improving predictive accuracy over unconstrained baselines. These results demonstrate a scalable, solver-free pathway to hard-constrained learning, with implications for safety-critical and physics-informed applications, and potential extensions to piecewise or inequality constraints and integration with GenAI pipelines.
Abstract
Ensuring neural networks adhere to domain-specific constraints is crucial for addressing safety and ethical concerns while also enhancing inference accuracy. Despite the nonlinear nature of most real-world tasks, existing methods are predominantly limited to affine or convex constraints. We introduce ENFORCE, a neural network architecture that uses an adaptive projection module (AdaNP) to enforce nonlinear equality constraints in the predictions. We prove that our projection mapping is 1-Lipschitz, making it well-suited for stable training. We evaluate ENFORCE on an illustrative regression task and for learning solutions to high-dimensional optimization problems in an unsupervised setting. The predictions of our new architecture satisfy $N_C$ equality constraints that are nonlinear in both the inputs and outputs of the neural network, while maintaining scalability with a tractable computational complexity of $\mathcal{O}(N_C^3)$ at training and inference time.
