Improving Symbolic Translation of Language Models for Logical Reasoning
Ramya Keerthy Thatikonda, Jiuzhou Han, Wray Buntine, Ehsan Shareghi
TL;DR
The paper addresses the challenge of small language models translating natural language to first-order logic for deductive reasoning. It proposes a two-stage incremental inference framework—predicate generation followed by FOL translation—coupled with a lightweight verifier to address arity and formatting issues, and it leverages large-LM–generated symbolic data to fine-tune smaller models. Across four datasets, the approach reduces NL-to-FOL translation errors, increases predicate coverage, and improves reasoning performance, including on out-of-distribution data. The work makes symbolic reasoning more accessible for resource-constrained models and lays groundwork for stronger verification in downstream symbolic tasks.
Abstract
The use of formal language for deductive logical reasoning aligns well with language models (LMs), where translating natural language (NL) into first-order logic (FOL) and employing an external solver results in a verifiable and therefore reliable reasoning system. However, smaller LMs often struggle with this translation task, frequently producing incorrect symbolic outputs due to formatting and translation errors. Existing approaches typically rely on self-iteration to correct these errors, but such methods depend heavily on the capabilities of the underlying model. To address this, we first categorize common errors and fine-tune smaller LMs using data synthesized by large language models. The evaluation is performed using the defined error categories. We introduce incremental inference, which divides inference into two stages, predicate generation and FOL translation, providing greater control over model behavior and enhancing generation quality as measured by predicate metrics. This decomposition framework also enables the use of a verification module that targets predicate-arity errors to further improve performance. Our study evaluates three families of models across four logical-reasoning datasets. The comprehensive fine-tuning, incremental inference, and verification modules reduce error rates, increase predicate coverage, and improve reasoning performance for smaller LMs, moving us closer to developing reliable and accessible symbolic-reasoning systems.
