Lune

ICML2024Top-tier venue

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 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.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Constrained Auto-Regressive Decoding Constrains Generative Retrieval cites Tractable Control for Autoregressive Language Generation
  • Semantic Probabilistic Layers for Neuro-Symbolic Learning cites MultiplexNet: Towards Fully Satisfied Logical Constraints in Neural Networks
  • Tractable Control for Autoregressive Language Generation cites Semantic Probabilistic Layers for Neuro-Symbolic Learning
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Constrained Auto-Regressive Decoding Constrains Generative RetrievalShiguang Wu, Zhaochun Ren, Xin Xin, Jiyuan Yang et al.SIGIR 2025 · 3 citations

Builds on8

  1. RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language ModelsSamuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi et al.EMNLP Findings 2020 · 692 citations
  2. COLD Decoding: Energy-based Constrained Text Generation with Langevin DynamicsLianhui Qin, Sean Welleck, Daniel Khashabi, Yejin ChoiNeurIPS 2022 · 217 citations
  3. Semantic Probabilistic Layers for Neuro-Symbolic LearningKareem Ahmed, Stefano Teso, Kai-Wei Chang, Guy Van den Broeck et al.NeurIPS 2022 · 133 citations
  4. MultiplexNet: Towards Fully Satisfied Logical Constraints in Neural NetworksNick Hoernle, Rafael-Michael Karampatsis, Vaishak Belle, Kobi GalAAAI 2022 · 73 citations
  5. Tractable Control for Autoregressive Language GenerationHonghua Zhang, Meihua Dang, Nanyun Peng, Guy Van den BroeckICML 2023 · 63 citations

Related papers

  1. Generalization Analysis on Learning with a Concurrent VerifierMasaaki Nishino, Kengo Nakamura, Norihito YasudaNeurIPS 2022 · 1 citation
  2. On Regularization and Inference with Label ConstraintsKaifu Wang, Hangfeng He, Tin D. Nguyen, Piyush Kumar et al.ICML 2023 · 6 citations
  3. The Devil is in the Margin: Margin-based Label Smoothing for Network CalibrationBingyuan Liu, Ismail Ben Ayed, Adrian Galdran, Jose DolzCVPR 2022 · 61 citations
  4. DeepSaDe: Learning Neural Networks That Guarantee Domain Constraint SatisfactionKshitij Goyal, Sebastijan Dumancic, Hendrik BlockeelAAAI 2024 · 9 citations
  5. Learning where and when to reason in neuro-symbolic inferenceCristina Cornelio, Jan Stuehmer, Shell Xu Hu, Timothy M. HospedalesICLR 2023
Dusk over the sea between two cliffs drawn in fine vertical lines