Sample-Specific Output Constraints for Neural Networks
Mathis Brosowsky, Florian Keck, Olaf Dünkel, Marius Zöllner
Abstract
It is common practice to constrain the output space of a neural network with the final layer to a problem-specific value range. However, for many tasks it is desired to restrict the output space for each input independently to a different subdomain with a non-trivial geometry, e.g. in safety-critical applications, to exclude hazardous outputs sample-wise. We propose ConstraintNet—a scalable neural network architecture which constrains the output space in each forward pass independently. Contrary to prior approaches, which perform a projection in the final layer, ConstraintNet applies an input-dependent parametrization of the constrained output space. Thereby, the complete interior of the constrained region is covered and computational costs are reduced significantly. For constraints in form of convex polytopes, we leverage the vertex representation to specify the parametrization. The second modification consists of adding an auxiliary input in form of a tensor description of the constraint to enable the handling of multiple constraints for the same sample. Finally, ConstraintNet is end-to-end trainable with almost no overhead in the forward and backward pass. We demonstrate ConstraintNet on two regression tasks: First, we modify a CNN and construct several constraints for facial landmark detection tasks. Second, we demonstrate the application to a follow object controller for vehicles and accomplish safe reinforcement learning in this case. In both experiments, ConstraintNet improves performance and we conclude that our approach is promising for applying neural networks in safety-critical environments.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 1343071c-e332-4c31-b55c-b1c23cf713f1Cited by top-tier papers2
- Enforcing convex constraints in Graph Neural NetworksAhmed Rashwan, Keith Briggs, Chris J. Budd, Lisa Maria KreusserNeurIPS 2025 · 2 citations
- Learning from Interval TargetsRattana Pukdee, Ziqi Ke, Chirag GuptaNeurIPS 2025 · 1 citation
Related papers
- SafeMPO: Constrained Reinforcement Learning with Probabilistic Incremental ImprovementAlexander Mattick, Dominik Seuß, Christopher MutschlerICLR 2026
- Enforcing Hard Linear Constraints in Deep Learning Models with Decision RulesGonzalo E. Constante, Hao Chen, Can LiNeurIPS 2025 · 13 citations
- CAffNet: Hard Constraint-Affine Neural NetworksYang Zhao, Jungeun Lee, Jeong hwan Jeon, Sze Zheng YongICML 2026 · 1 citation
- DeepSaDe: Learning Neural Networks That Guarantee Domain Constraint SatisfactionKshitij Goyal, Sebastijan Dumancic, Hendrik BlockeelAAAI 2024 · 9 citations
- Out of the Shadows: Exploring a Latent Space for Neural Network VerificationLukas Koller, Tobias Ladner, Matthias AlthoffICLR 2026 · 6 citations
