Understanding the Impact of Introducing Constraints at Inference Time on Generalization Error
Masaaki Nishino, Kengo Nakamura, Norihito Yasuda
Abstract
Since machine learning technologies are being used in various practical situations, models with merely low prediction errors might not be satisfactory; prediction errors occurring with a low probability might yield dangerous results in some applications. Therefore, there are attempts to achieve an ML model whose input-output pairs are guaranteed to satisfy given constraints. Among such attempts, many previous works chose the approach of modifying the outputs of an ML model at the inference time to satisfy the constraints. Such a strategy is handy because we can control its output without expensive training or fine-tuning. However, it is unclear whether using constraints only in the inference time degrades a model's predictive performance. This paper analyses how the generalization error bounds change when we only put constraints in the inference time. Our main finding is that a class of loss functions preserves the relative generalization error, i.e., the difference in generalization error compared with the best model will not increase by imposing constraints at the inference time on multi-class classification. Some popular loss functions preserve the relative error, including the softmax cross-entropy loss. On the other hand, we also show that some loss functions do not preserve relative error when we use constraints. Our results suggest the importance of choosing a suitable loss function when we only use constraints in the inference time.
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 bea0dd66-ae0e-42f8-9bb6-5147057f3ce9Cited by top-tier papers1
Ask how each one uses itBuilds on7
- COLD Decoding: Energy-based Constrained Text Generation with Langevin DynamicsLianhui Qin, Sean Welleck, Daniel Khashabi, Yejin ChoiNeurIPS 2022 · 217 citations
- Semantic Probabilistic Layers for Neuro-Symbolic LearningKareem Ahmed, Stefano Teso, Kai-Wei Chang, Guy Van den Broeck et al.NeurIPS 2022 · 133 citations
- MultiplexNet: Towards Fully Satisfied Logical Constraints in Neural NetworksNick Hoernle, Rafael-Michael Karampatsis, Vaishak Belle, Kobi GalAAAI 2022 · 73 citations
- Tractable Control for Autoregressive Language GenerationHonghua Zhang, Meihua Dang, Nanyun Peng, Guy Van den BroeckICML 2023 · 63 citations
- Learning with Explanation ConstraintsRattana Pukdee, Dylan Sam, J. Zico Kolter, Maria-Florina Balcan et al.NeurIPS 2023 · 11 citations
Related papers
- Generalization Analysis on Learning with a Concurrent VerifierMasaaki Nishino, Kengo Nakamura, Norihito YasudaNeurIPS 2022 · 1 citation
- On Regularization and Inference with Label ConstraintsKaifu Wang, Hangfeng He, Tin D. Nguyen, Piyush Kumar et al.ICML 2023 · 6 citations
- The Devil is in the Margin: Margin-based Label Smoothing for Network CalibrationBingyuan Liu, Ismail Ben Ayed, Adrian Galdran, Jose DolzCVPR 2022 · 61 citations
- DeepSaDe: Learning Neural Networks That Guarantee Domain Constraint SatisfactionKshitij Goyal, Sebastijan Dumancic, Hendrik BlockeelAAAI 2024 · 9 citations
- Learning where and when to reason in neuro-symbolic inferenceCristina Cornelio, Jan Stuehmer, Shell Xu Hu, Timothy M. HospedalesICLR 2023
