Semantic Distance for Presburger Formula Generation
Paper · 2026 · Masaya Taniguchi and Hitomi Yanaka
Summary
String-based metrics are poor judges of formulas generated from natural language. Changing ≥ to > alters a single character, yet it can shift which numbers satisfy the formula. The authors limit their study to Presburger arithmetic, which is linear integer arithmetic with addition and order but no multiplication between variables. Their semantic distance represents a formula by the collection of whole-number grid points that make it true. Each point is weighted by a factor that shrinks exponentially with its L1 norm, so even infinite sets receive finite mass. Two formulas are then compared by a weighted Jaccard ratio: the mass of their symmetric difference divided by the mass of their union. They prove this is a true metric. They also show it is computable via quantifier elimination, a polyhedral split over orthants, and Barvinok-style lattice-point generating functions. Used as a GRPO reward, the distance yields many more parsable and semantically closer formulas than a string-similarity reward. The work is a deliberately narrow first step toward semantics-aware training signals for formal translation.
Key points
- The distance-aware reward (
distance_penalized) raises parsability from 76.5% to 98.6% compared with a string-similarity-only reward (similarity_only). It also lowers semantic distance from 0.295 to 0.167. - The experiments use β = 1. The authors note that splitting space into 2^d orthants becomes costly as the number of variables d grows.
- The pipeline relies on QEPCAD for quantifier elimination and LattE for lattice-point counting. Both are expensive, so scalability to larger formulas, coefficients, or nested quantifiers is still unproven.
- Neither GRPO reward matches supervised fine-tuning (SFT) on exact string accuracy. The models also often drop quantifier prefixes such as (A …) and (E …).
- Acknowledged gaps include:
- no pure-distance GRPO ablation;
- no isolation of the pretrained base model's contribution;
- comparatively simple benchmark formulas;
- only a single translation task.
Fields, topics and concepts
📚 Shelves 2The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 works
Cite
Cite as Masaya Taniguchi and Hitomi Yanaka. 2026. Semantic Distance for Presburger Formula Generation. Proceedings of the 6th Workshop on Natural Language Meets Logic and Machine Learning (NALOMA).
@inproceedings{taniguchi2026semantic,
title = {{Semantic Distance for Presburger Formula Generation}},
author = {Masaya Taniguchi and Hitomi Yanaka},
booktitle = {Proceedings of the 6th Workshop on Natural Language Meets Logic and Machine Learning (NALOMA)},
year = {2026},
url = {https://aclanthology.org/2026.naloma-1.9/}
}References
- Luke S. Zettlemoyer and Michael Collins. 2005. Learning to map sentences to logical form: Structured classification with probabilistic categorial grammars. In Proceedings of the 21st Conference in Uncertainty in Artificial Intelligence (UAI), pages 658–666.
- D. C. Cooper. 1972. Theorem proving in arithmetic without multiplication. In Bernard Meltzer and Donald Michie, editors, Machine Intelligence 7, pages 91–99. Edinburgh University Press. find
- Li Dong and Mirella Lapata. 2016. Language to logical form with neural attention. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 33–43.
- Jonathan Herzig, Peter Shaw, Ming-Wei Chang, Kelvin Guu, Panupong Pasupat, and Yuan Zhang. 2021. Span-based semantic parsing for compositional generalization. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Nat… find
- Paul Jaccard. 1901. Étude comparative de la distribution florale dans une portion des alpes et du jura. Bulletin de la Société Vaudoise des Sciences Naturelles, 37(142):547–579. find
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/taniguchi-2026-semantic-distance-presburger-formula-generation/