CAffNet: Hard Constraint-Affine Neural Networks
Not on the map. Why?
Abstract (arXiv)
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. The code is available at https://github.com/ice-t-lab/CAffNet.git.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 19 of its 25 references that are in the map. First posted on arXiv 23 May 2026.
Builds on
19 of 25 references.
References · 19
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
- 2021Safe Learning in Robotics: From Learning-Based Control to Safe Reinforcement Learningcited by 337
- 2016Control Barrier Function Based Quadratic Programs for Safety Critical Systemscited by 261
- 2021DC3: A learning method for optimization with hard constraintscited by 181
- 2020Learning Stable Deep Dynamics Modelscited by 110
- 2019A Survey of Deep Learning Applications to Autonomous Vehicle Controlcited by 101
- 2020Minimum Width for Universal Approximationcited by 92
- 2017Imposing Hard Constraints on Deep Networks: Promises and Limitationscited by 42
- 2023RAYEN: Imposition of Hard Convex Constraints on Neural Networkscited by 30
- 2024Physics-Informed Neural Networks with Hard Linear Equality Constraintscited by 30
- 2024How Realistic Is Your Synthetic Data? Constraining Deep Generative Models for Tabular Datacited by 29
7 more
- 2024HardNet: Hard-Constrained Neural Networks with Universal Approximation Guaranteescited by 29
- 2022POLICE: Provably Optimal Linear Constraint Enforcement for Deep Neural Networkscited by 19
- 2025FSNet: Feasibility-Seeking Neural Network for Constrained Optimization with Guaranteescited by 19
- 2024Safety Filters for Black-Box Dynamical Systems by Learning Discriminating Hyperplanescited by 8
- 2023Composing Control Barrier Functions for Complex Safety Specificationscited by 7
- 2022Neural Network-based Flight Control Systems: Present and Futurecited by 6
- 2023Data-Driven Control with Inherent Lyapunov Stabilitycited by 6
Built on by
Not cited yet.