让神经网络自动满足复杂约束,且保证不因训练而失效。
CAffNet: Hard Constraint-Affine Neural Networks

- 设计可训练的约束仿射层,动态处理输入相关的仿射约束。
- 在多个数据集上实现100%约束满足率,性能优于传统惩罚方法。
- 适合对可靠性要求高的场景,如医疗、金融决策系统。
我们提出一种新框架,将硬约束融入前馈神经网络和Transformer架构中,支持任意数量的输入相关仿射约束。传统方法依赖惩罚项软约束(无法保证满足)或训练后修正(可能次优)。本文引入可训练的约束仿射(CAffine)层,构建CAffNet,突破了固定正交/平行投影的限制,实现与网络参数联合优化。该方法不限制约束空间维度,且保持神经网络的通用逼近能力,同时对所有输入提供可证明的约束满足保证。实验验证其在多种需严格满足约束的领域均表现稳健。
原文摘要 · Abstract (English)
We present a novel framework for embedding hard constraint satisfaction into neural network (NN) architectures, specifically feedforward neural networks and transformers, with input-dependent affine constraints of arbitrary cardinality. Traditional constraint enforcement approaches either rely on penalty-based soft constraints, which offer no guarantee of satisfaction, or on post-processing methods that enforce constraints after the NN is trained, which may lead to suboptimality. We introduce a trainable constraint-affine (CAffine) layer into NNs, yielding CAffNet, which goes beyond enforcing affine constraints via fixed orthogonal or parallel projections and enables joint optimization with network parameters. Moreover, we impose no restrictions on the constraint space dimensions and establish that our construction preserves the universal approximation properties of NNs, while providing provable guarantees on constraint adherence for all inputs. Experimental validation demonstrates robust performance across diverse domains requiring guaranteed constraint satisfaction.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。