paper-with-me

Papers

The Alignment Problem in Constrained Code Generation

2026-06-19 · Matteo Biagiola, Jahrim Gabriele Cesario, Luca Di Grazia, George Zakhour, Guido Salvaneschi arxiv

Large Language Models (LLMs) have demonstrated strong capabilities in code generation, but their outputs frequently contain syntax or type errors that result in compilation failures. Constrained decoding has been proposed as a solution to mitigate compilation errors by construction, improving functional correctness as a byproduct. However, previous works overlook a critical aspect of constrained decoding: the alignment between constrainer (e.g., types), language model and the target specification language (e.g., TypeScript). Misalignment is caused by the constrainer being incomplete--rejecting programs that belong to the target--or unsound--allowing programs that are not part of the target. The bias created by incompleteness distorts the language model distribution, and can be detrimental for code generation. We evaluate this hypothesis using seven language models, two target languages, two constrainers, enforcing types and syntax during decoding, and we study how language models react to varying levels of incompleteness. On three benchmarks, when the constrainer is incomplete, unconstrained decoding significantly outperforms constrained decoding in terms of functional correctness. Incompleteness pushes the model into low-probability regions of the program space, causing the generation to frequently time out, and reducing functional correctness by up to 97%. These contributions make the community aware of the negative effects of misalignment in constrained decoding, and provide quantitative insights on how to design constrainers that are beneficial for code generation systems with formal guarantees.

📄 PDF Abstract BibTeX arXiv:2606.21619

Code (0)

등록된 구현이 없습니다.

Tasks

Code Generation

Similar Papers 제목 키워드 기반

Constrained Graphic Layout Generation via Latent Optimization

2021-08-02 · Kotaro Kikuchi, Edgar Simo-Serra, Mayu Otani, Kota Yamaguchi

It is common in graphic design humans visually arrange various elements according to their design intent and semantics. For example, a title text almost always appears on top of other elements in a document. In this work…

Layout Generation

GMapLatent: Geometric Mapping in Latent Space

2025-03-30 · Wei Zeng, Xuebin Chang, Jianghao Su, Xiang Gu 외

Cross-domain generative models based on encoder-decoder AI architectures have attracted much attention in generating realistic images, where domain alignment is crucial for generation accuracy. Domain alignment methods u…

Decoder

DISK: Domain-constrained Instance Sketch for Math Word Problem Generation

2022-04-10 · COLING 2022 10 · Tianyang Cao, Shuang Zeng, Xiaodan Xu, Mairgup Mansur 외

A math word problem (MWP) is a coherent narrative which reflects the underlying logic of math equations. Successful MWP generation can automate the writing of mathematics questions. Previous methods mainly generate MWP t…

Math

MAC-XA: Multi-view Anatomy-Correspondence Fusion for Coronary Stenosis Reporting from X-ray Angiography

2026-07-07 · Chen Jia, Baochang Zhang, Fatia Kusuma Dewi, Amir Yousefi 외 arxiv

Multi-view reasoning in coronary X-ray angiography is inherently a cross-projection geometric problem, yet automated report generation in this setting remains largely unexplored. The 3D vascular topology leads to project…

Composition and Alignment of Diffusion Models using Constrained Learning

2025-08-26 · Shervin Khalafi, Ignacio Hounie, Dongsheng Ding, Alejandro Ribeiro arxiv

Diffusion models have become prevalent in generative modeling due to their ability to sample from complex distributions. To improve the quality of generated samples and their compliance with user requirements, two common…

Image Generation