Neural network constraint satisfaction is crucial for safety-critical applications such as power system optimization, robotic path planning, and autonomous driving. However, existing constraint satisfaction methods face efficiency-applicability trade-offs, with hard constraint methods suffering from either high computational complexity or restrictive assumptions on constraint structures. The Sampling Kaczmarz-Motzkin (SKM) method is a randomized iterative algorithm for solving large-scale linear inequality systems with favorable convergence properties, but its argmax operations introduce non-differentiability, posing challenges for neural network applications. This work proposes the Trainable Sampling Kaczmarz-Motzkin Network (T-SKM-Net) framework and, for the first time, systematically integrates SKM-type methods into neural network constraint satisfaction. The framework transforms mixed constraint problems into pure inequality problems through null space transformation, employs SKM for iterative solving, and maps solutions back to the original constraint space, efficiently handling both equality and inequality constraints. We provide theoretical proof of post-processing effectiveness in expectation and end-to-end trainability guarantees based on unbiased gradient estimators, demonstrating that despite non-differentiable operations, the framework supports standard backpropagation. On the DCOPF case118 benchmark, our method achieves 4.27ms/item GPU serial forward inference with 0.0025% max optimality gap with post-processing mode and 5.25ms/item with 0.0008% max optimality gap with joint training mode, delivering over 25$\times$ speedup compared to the pandapower solver while maintaining zero constraint violations under given tolerance.
翻译:神经网络约束满足对于电力系统优化、机器人路径规划与自动驾驶等安全关键应用至关重要。然而,现有约束满足方法面临效率与适用性之间的权衡:硬约束方法或受限于高计算复杂度,或需对约束结构施加严格假设。采样Kaczmarz-Motzkin(SKM)方法是一种用于求解大规模线性不等式系统的随机迭代算法,具有优良的收敛特性,但其argmax操作引入了不可微性,为神经网络应用带来挑战。本研究提出可训练采样Kaczmarz-Motzkin网络(T-SKM-Net)框架,首次系统地将SKM类方法集成至神经网络约束满足中。该框架通过零空间变换将混合约束问题转化为纯不等式问题,采用SKM进行迭代求解,并将解映射回原始约束空间,从而高效处理等式与不等式约束。我们提供了后处理效果在期望意义上的理论证明,以及基于无偏梯度估计器的端到端可训练性保证,论证了尽管存在不可微操作,该框架仍支持标准反向传播。在DCOPF case118基准测试中,本方法在GPU串行前向推理中实现:后处理模式下4.27毫秒/样本(最大最优性间隙0.0025%),联合训练模式下5.25毫秒/样本(最大最优性间隙0.0008%),在给定容差下保持零约束违反的同时,较pandapower求解器实现超过25倍的加速。