From Trajectories to Graphs: Contract-Checked Editing for Verifier-Guided LLM Reasoning

Rui Li, Shuang Cao


Abstract
Inference-time search can substantially improve LLM reasoning when tasks admit deterministic verification, but existing methods largely refine single trajectories and lack a reliable mechanism for composing partial solutions across candidates. We propose contract-checked graph editing: represent each candidate as an interface-typed reasoning DAG and validate every nontrivial edit with a deterministic structural gate (acyclicity, namespace closure, schema validity, terminal constraints) before invoking the verifier. The gate certifies runnability only and emits auditable rejection reasons; semantic correctness is determined solely by the verifier. Instantiated in Genetic Inference Search (GIS) with Qwen2.5-32B-Instruct under strictly matched token budgets (8K tokens), contract-checked grafting increases verifier-runnable recombination from 41.2% to 92.8% and improves accuracy over rStar (+6.1 on MATH, +9.1 on MATH L5) while using 42% fewer verifier calls. The same operators transfer across outer loops (beam, best-first, MCTS) and to structured generation and code, outperforming execution-guided beam search on Spider (+2.8) and improving multi-file code generation on HumanEval-MF (+9.2).
Anthology ID:
2026.acl-long.2004
Volume:
Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Month:
July
Year:
2026
Address:
San Diego, California, United States
Editors:
Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens
Venue:
ACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
43259–43306
Language:
URL:
https://preview.aclanthology.org/ingest-acl/2026.acl-long.2004/
DOI:
Bibkey:
Cite (ACL):
Rui Li and Shuang Cao. 2026. From Trajectories to Graphs: Contract-Checked Editing for Verifier-Guided LLM Reasoning. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 43259–43306, San Diego, California, United States. Association for Computational Linguistics.
Cite (Informal):
From Trajectories to Graphs: Contract-Checked Editing for Verifier-Guided LLM Reasoning (Li & Cao, ACL 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-acl/2026.acl-long.2004.pdf
Checklist:
 2026.acl-long.2004.checklist.pdf