Large Language Model Meets Constraint Propagation
Abstract
Large Language Models (LLMs) excel at generating fluent text but struggle to enforce external constraints because they generate tokens sequentially without explicit control mechanisms. GenCP addresses this limitation by combining LLM predictions with Constraint Programming (CP) reasoning, formulating text generation as a Constraint Satisfaction Problem (CSP). In this paper, we improve GenCP by integrating Masked Language Models (MLMs) for domain generation, which allows bidirectional constraint propagation that leverages both past and future tokens. This integration bridges the gap between token-level prediction and structured constraint enforcement, leading to more reliable and constraint-aware text generation. Our evaluation on COLLIE benchmarks demonstrates that incorporating domain preview via MLM calls significantly improves GenCP's performance. Although this approach incurs additional MLM calls and, in some cases, increased backtracking, the overall effect is a more efficient use of LLM inferences and an enhanced ability to generate feasible and meaningful solutions, particularly in tasks with strict content constraints.
Cite
Text
Bonlarron et al. "Large Language Model Meets Constraint Propagation." International Joint Conference on Artificial Intelligence, 2025. doi:10.24963/IJCAI.2025/1115Markdown
[Bonlarron et al. "Large Language Model Meets Constraint Propagation." International Joint Conference on Artificial Intelligence, 2025.](https://mlanthology.org/ijcai/2025/bonlarron2025ijcai-large/) doi:10.24963/IJCAI.2025/1115BibTeX
@inproceedings{bonlarron2025ijcai-large,
title = {{Large Language Model Meets Constraint Propagation}},
author = {Bonlarron, Alexandre and Régin, Florian and De Maria, Elisabetta and Régin, Jean-Charles},
booktitle = {International Joint Conference on Artificial Intelligence},
year = {2025},
pages = {10036-10044},
doi = {10.24963/IJCAI.2025/1115},
url = {https://mlanthology.org/ijcai/2025/bonlarron2025ijcai-large/}
}