Enforcing convex constraints in Graph Neural Networks
Ahmed Rashwan, Keith Briggs, Chris Budd, Lisa Kreusser
TL;DR
ProjNet addresses the need for outputs that strictly satisfy input-dependent convex constraints in graph-structured data. It integrates a GPU-accelerated Component-Averaged Dykstra (CAD) projection with sparse vector clipping to produce feasible outputs in $C=\bigcap_i C_i$ and support end-to-end differentiability via a surrogate gradient for CAD. The approach achieves strong speed-ups over traditional solvers (e.g., up to two orders of magnitude faster under favorable conditions) while maintaining competitive solution quality across linear programming, non-convex quadratic programs, and transmit power optimization. The framework leverages constrained input graphs and batched processing to scale to large graphs, offering a tunable speed-accuracy trade-off via a penalty parameter $c_h$ and confirming CAD as a viable, scalable projection tool for constrained GNNs.
Abstract
Many machine learning applications require outputs that satisfy complex, dynamic constraints. This task is particularly challenging in Graph Neural Network models due to the variable output sizes of graph-structured data. In this paper, we introduce ProjNet, a Graph Neural Network framework which satisfies input-dependant constraints. ProjNet combines a sparse vector clipping method with the Component-Averaged Dykstra (CAD) algorithm, an iterative scheme for solving the best-approximation problem. We establish a convergence result for CAD and develop a GPU-accelerated implementation capable of handling large-scale inputs efficiently. To enable end-to-end training, we introduce a surrogate gradient for CAD that is both computationally efficient and better suited for optimization than the exact gradient. We validate ProjNet on four classes of constrained optimisation problems: linear programming, two classes of non-convex quadratic programs, and radio transmit power optimization, demonstrating its effectiveness across diverse problem settings.
