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 Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
Cited by top-tier papers2
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
