Semantic Distance for Presburger Formula Generation

Masaya Taniguchi, Hitomi Yanaka


Abstract
We study how to evaluate and train natural-language-to-formula generation whensurface similarity is a poor proxy for semantic correctness. Focusing ontranslation into Presburger arithmetic, we introduce a geometric distancebetween formulas by viewing each formula as a set of integer lattice pointsand assigning an exponentially decaying weight to that set. The resultingdistance yields finite comparisons even for infinite definable sets, can becomputed through quantifier elimination, polyhedral decomposition, andlattice-point generating functions, and inherits the standard metric properties. Wethen use this distance in experiments on supervised fine-tuning and GRPO fortranslating arithmetic statements into formal formulas. The results show thata distance-aware reward substantially improves parsability and adjustedsemantic quality compared with a string-similarity-only reward, while alsorevealing the remaining challenge of preserving quantifier structure.
Anthology ID:
2026.naloma-1.9
Volume:
Proceedings of the 6th Workshop on Natural Language Meets Logic and Machine Learning (NALOMA)
Month:
August
Year:
2026
Address:
Prague, Czechia
Editors:
Hitomi Yanaka, Lasha Abzianidze
Venues:
NALOMA | WS
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
71–79
Language:
URL:
https://preview.aclanthology.org/ingest-naloma/2026.naloma-1.9/
DOI:
Bibkey:
Cite (ACL):
Masaya Taniguchi and Hitomi Yanaka. 2026. Semantic Distance for Presburger Formula Generation. In Proceedings of the 6th Workshop on Natural Language Meets Logic and Machine Learning (NALOMA), pages 71–79, Prague, Czechia. Association for Computational Linguistics.
Cite (Informal):
Semantic Distance for Presburger Formula Generation (Taniguchi & Yanaka, NALOMA 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-naloma/2026.naloma-1.9.pdf