Large Language Models as Formalizers on Constraint Satisfaction Problems

Rikhil Amonkar, Ceyhun Efe Kayan, May Lai, Ronan Le Bras, Li Zhang
5/19/2025
cs.CL

No official code found. Best implementation: CassieHuang22/llm-as-pddl-formalizer (6 stars, last commit 2025-05-05).

Abstract

An emerging line of recent work advocates for using large language models (LLMs) as formalizers instead of as end-to-end solvers for various types of problems. Instead of generating the solution, the LLM generates a formal program that derives a solution via an external solver. We thoroughly investigate the formalization capability of LLMs on real-life constraint satisfaction problems. On 4 domains, we systematically evaluate 6 LLMs, including 4 large reasoning models with inference-time scaling, paired with 5 pipelines, including 2 types of formalism. We show that in zero-shot settings, LLM-as-formalizer performs on par with the mainstream LLM-as-solver while offering verifiability, interpretability, and robustness. We also observe excessive reasoning tokens and hard-coded solutions scaling with problem complexity, which demonstrates that even the state-of-the-art LLMs have limited ability to generate solutions or formal programs. We present our detailed analysis and actionable remedies to drive future research that improves LLM-as-formalizer.

View on arXivView PDF

Code Implementations(1)

62PDDL, PythonDec 11, 20241 years ago

Similar Papers

Cite this paper

@article{amonkar2025large,
  title  = {Large Language Models as Formalizers on Constraint Satisfaction Problems},
  author = {Rikhil Amonkar and Ceyhun Efe Kayan and May Lai and Ronan Le Bras and Li Zhang},
  year   = {2025},
  eprint = {2505.13252},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.13252v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.13252.svg)](https://codeofpaper.com/paper/2505.13252)

Discussion