Advancing Natural Language Formalization to First Order Logic with Fine-tuned LLMs

Felix Vossel, Till Mossakowski, Björn Gehrke
9/26/2025
cs.CLcs.AI

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

Automating the translation of natural language to first-order logic (FOL) is crucial for knowledge representation and formal methods, yet remains challenging. We present a systematic evaluation of fine-tuned LLMs for this task, comparing architectures (encoder-decoder vs. decoder-only) and training strategies. Using the MALLS and Willow datasets, we explore techniques like vocabulary extension, predicate conditioning, and multilingual training, introducing metrics for exact match, logical equivalence, and predicate alignment. Our fine-tuned Flan-T5-XXL achieves 70% accuracy with predicate lists, outperforming GPT-4o and even the DeepSeek-R1-0528 model with CoT reasoning ability as well as symbolic systems like ccg2lambda. Key findings show: (1) predicate availability boosts performance by 15-20%, (2) T5 models surpass larger decoder-only LLMs, and (3) models generalize to unseen logical arguments (FOLIO dataset) without specific training. While structural logic translation proves robust, predicate extraction emerges as the main bottleneck.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{vossel2025advancing,
  title  = {Advancing Natural Language Formalization to First Order Logic with Fine-tuned LLMs},
  author = {Felix Vossel and Till Mossakowski and Björn Gehrke},
  year   = {2025},
  eprint = {2509.22338},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.22338v2}
}

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/2509.22338.svg)](https://codeofpaper.com/paper/2509.22338)

Discussion