Harnessing the Power of Large Language Models for Natural Language to First-Order Logic Translation
Yuan Yang, Siheng Xiong, Ali Payani, Ehsan Shareghi, Faramarz Fekri
Abstract
Advancements in logical reasoning, utilizing LLMs to convert natural language into logical symbolism, combined with the use of external theorem provers, have repositioned the symbolic approach as a central point of interest. The main challenge within this paradigm lies in the LLMs' capability to accurately translate natural language (NL) statements into first-order-logic (FOL) expressions. Although LLMs have shown notable success, there remains a gap in understanding the limitations and challenges they encounter in NL-FOL translation. This is primarily due to the absence of datasets and evaluation test beds at the required fine-grained level. We present MALLS, a dataset of 28K diverse and verified sentence-level NL-FOL pairs collected from GPT4. We utilize a combined strategy of FOL rule parsing, human annotation, and automatic filtering to ensure quality. We also present LOGICLLAMA, a LLaMA2-7B/13B fine-tuned on MALLS for NL-FOL translation, which can be used standalone or to correct previously generated rules by GPT3.5 after being further fine-tuned via a novel reinforcement learning with human feedback (RLHF) framework. We benchmark a wide range of LLMs on MALLS and previous datasets, highlighting weaknesses in them in NL-FOL translation and demonstrating the advantages of MALLS. We also show that LOGICLLAMA achieves GPT4-level performance and can generalize to other datasets. Project repo is available here.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 83dbf373-14a1-4d8e-a71a-ee05bd1d5d68Cited by top-tier papers13
- Logical Phase Transitions: Understanding Collapse in LLM Logical ReasoningXinglang Zhang, Yunyao Zhang, ZeLiang Chen, Junqing Yu et al.ACL 2026 · 28 citations
- Semantic-Aware Logical Reasoning via a Semiotic FrameworkYunyao Zhang, Xinglang Zhang, Junxi Sheng, Wenbing Li et al.ACL 2026 · 27 citations
- UniGraph: Learning a Unified Cross-Domain Foundation Model for Text-Attributed GraphsYufei He, Yuan Sui, Xiaoxin He, Bryan HooiKDD 2025 · 8 citations
- A Balanced Neuro-Symbolic Approach for Commonsense Abductive LogicJoseph Cotnareanu, Didier Chételat, Yingxue Zhang, Mark CoatesICLR 2026 · 3 citations
- Towards Advanced Mathematical Reasoning for LLMs via First-Order Logic Theorem ProvingChuxue Cao, Mengze Li, Juntao Dai, Jinluan Yang et al.EMNLP 2025 · 1 citation
Builds on8
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- ReClor: A Reading Comprehension Dataset Requiring Logical ReasoningWeihao Yu, Zihang Jiang, Yanfei Dong, Jiashi FengICLR 2020 · 325 citations
- SatLM: Satisfiability-Aided Language Models Using Declarative PromptingXi Ye, Qiaochu Chen, Isil Dillig, Greg DurrettNeurIPS 2023 · 126 citations
Related papers
- FOLIO: Natural Language Reasoning with First-Order LogicSimeng Han, Hailey Schoelkopf, Yilun Zhao, Zhenting Qi et al.EMNLP 2024 · 18 citations
- Do LLMs Really Struggle at NL-FOL Translation? Revealing Their Strengths via a Novel Benchmarking StrategyAndrea Brunello, Luca Geatti, Michele Mignani, Angelo Montanari et al.AAAI 2026
- TheoremLlama: Transforming General-Purpose LLMs into Lean4 ExpertsRuida Wang, Jipeng Zhang, Yizhen Jia, Rui Pan et al.EMNLP 2024 · 9 citations
- Large Language Models Meet Symbolic Provers for Logical Reasoning EvaluationChengwen Qi, Ren Ma, Bowen Li, He Du et al.ICLR 2025
- LogicBench: Towards Systematic Evaluation of Logical Reasoning Ability of Large Language ModelsMihir Parmar, Nisarg Patel, Neeraj Varshney, Mutsumi Nakamura et al.ACL 2024
