Constraint-Aware Training
Jinwoo Kim
Key points
From the paper's conclusion- We show, through a controlled synthetic experiment, that the theorems survive training dynamics: constraint-aware training yields lower prediction loss at a matched parameter count and data compared to ordinary cross-entropy training, motivating training objectives that incorporate the analyses used during generation.
Abstract
When generating programs with language models, constrained decoding can apply program analyses to exclude tokens that violate syntax, scope, or typing rules. However, there is a duplication: standard training already teaches the model to suppress the tokens rejected by these analyses. This duplication leads to the question: if we will perform some analysis to filter a set tokens out during inference anyways, can we avoid teaching the model the said analysis altogether during training, and does this externalization lead to more efficient models? This paper defines a general constraint-aware objective satisfying this externalization desideratum and formalizes the benefits of externalization into three concrete theorems about model size and data efficiency. We show, through a controlled synthetic experiment, that the theorems survive training dynamics: constraint-aware training yields lower prediction loss at a matched parameter count and data compared to ordinary cross-entropy training, motivating training objectives that incorporate the analyses used during generation.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- DConstrain: Compiling Context-Parameterized Transitions for Diffusion Language Model Constrained DecodingarXiv · 2026
- AGDecode: Semantic Attribute Grammar Derivatives for Safety-Constrained Decoding of Large Language ModelsarXiv · 2026
- Breaking the Space Barrier and its Application to Language Model InferencearXiv · 2026
- CM-DPO: Constraint-Margin Direct Preference Optimization for LLM PlanningarXiv · 2026
- Validating Autoformalized Specifications via Contrapuntal LanguagesarXiv · 2026
- Constrained Decoding: Harmful or Beneficial? Revisiting Its Impact on LLM PerformancearXiv · 2026