arXiv:2410.10807cs.LGcs.AI2024-10被引 38

让神经网络强制满足复杂约束,还能保持强大表达能力。

HardNet: Hard-Constrained Neural Networks with Universal Approximation Guarantees

  • 通过可微分的闭式层实现输入相关不等式约束的硬性满足
  • 在多种任务中实现约束达标率100%且性能优于传统方法
  • 适合安全关键系统如自动驾驶、工业控制等需严格合规的场景

将先验知识或输入输出关系纳入机器学习模型备受关注,因其能提升小样本下的泛化能力并确保输出符合要求。然而,现有方法多采用软约束,通过正则化惩罚违反行为,无法保证约束在远离训练分布的输入下仍被满足——这在安全关键应用中至关重要。而直接施加硬约束又可能损害模型表达能力。为此,我们提出HardNet,一种可构建天然满足硬约束的神经网络框架,无需牺牲模型容量。与仅在推理时调整输出的方法不同,HardNet支持端到端训练并保证约束成立。据我们所知,它是首个能高效、可微分地执行多个输入相关不等式约束的方法。通过在输出层附加一个可微分的闭式约束强化层,允许使用标准优化算法对网络参数进行无约束优化。此外,我们证明了HardNet保留了神经网络的通用逼近能力。我们在多个场景中验证其有效性:分段约束学习、优化求解器的可行性保障学习,以及安全关键系统中的控制策略优化。

原文摘要 · Abstract (English)

Incorporating prior knowledge or specifications of input-output relationships into machine learning models has attracted significant attention, as it enhances generalization from limited data and yields conforming outputs. However, most existing approaches use soft constraints by penalizing violations through regularization, which offers no guarantee of constraint satisfaction, especially on inputs far from the training distribution--an essential requirement in safety-critical applications. On the other hand, imposing hard constraints on neural networks may hinder their representational power, adversely affecting performance. To address this, we propose HardNet, a practical framework for constructing neural networks that inherently satisfy hard constraints without sacrificing model capacity. Unlike approaches that modify outputs only at inference time, HardNet enables end-to-end training with hard constraint guarantees, leading to improved performance. To the best of our knowledge, HardNet is the first method that enables efficient and differentiable enforcement of more than one input-dependent inequality constraint. It allows unconstrained optimization of the network parameters using standard algorithms by appending a differentiable closed-form enforcement layer to the network's output. Furthermore, we show that HardNet retains neural networks' universal approximation capabilities. We demonstrate its versatility and effectiveness across various applications: learning with piecewise constraints, learning optimization solvers with guaranteed feasibility, and optimizing control policies in safety-critical systems.

神经网络约束学习可微分安全关键

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。