DiLA: Enhancing LLM Tool Learning with Differential Logic Layer
Yu Zhang, Hui-Ling Zhen, Zehua Pei, Yingzhao Lian, Lihao Yin, Mingxuan Yuan, Bei Yu
Abstract
Logical reasoning remains a significant challenge for large language models (LLMs), particularly in tasks involving complex constraint satisfaction such as Boolean satisfiability (SAT) and graph coloring. Existing approaches-ranging from pure prompting-based reasoning to solver-aided frameworks-either suffer from unfaithful reasoning or face scalability bottlenecks due to exponential search spaces in symbolic solvers. In this paper, we present DiLA (Differential Logic Layer-Aided Language Modeling), a novel framework that integrates a differentiable logic layer into LLMs to jointly leverage linguistic understanding and gradientbased logical refinement. DiLA first translates natural language problems into SAT specifications and generates an initial LLM-informed variable assignment, then iteratively refines it through a logic layer implementing differentiable MaxSAT optimization. This synergy enables efficient reasoning grounded in formal logic while maintaining semantic awareness. Comprehensive experiments across logical deduction, SAT, and graph coloring benchmarks demonstrate that DiLA achieves 100% accuracy with up to 65× runtime speedup over solver-aided methods such as SATLM. On industrial-scale benchmarks where state-of-the-art solvers (Z3, Kissat) fail within 10,000 seconds, DiLA successfully converges in under 300 seconds, illustrating its robustness in large and highly constrained settings. Furthermore, on the Natural Language Constraint Reasoning benchmark, DiLA reaches 87% end-to-end success rate, outperforming both SATLM and pure LLM baselines by large margins.
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 e3cc4085-568f-4734-8f79-08ca2cafe358Cited by top-tier papers1
Ask how each one uses itBuilds on13
- Let's Verify Step by StepHunter Lightman, Vineet Kosaraju, Yuri Burda, Harrison Edwards et al.ICLR 2024 · 3,045 citations
- PAL: Program-aided Language ModelsLuyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon et al.ICML 2023 · 700 citations
- Self-Consistency Improves Chain of Thought Reasoning in Language ModelsXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le et al.ICLR 2023 · 681 citations
- AlphaZero-Like Tree-Search can Guide Large Language Model Decoding and TrainingZiyu Wan, Xidong Feng, Muning Wen, Stephen Marcus McAleer et al.ICML 2024 · 325 citations
- Least-to-Most Prompting Enables Complex Reasoning in Large Language ModelsDenny Zhou, Nathanael Schärli, Le Hou, Jason Wei et al.ICLR 2023 · 318 citations
Related papers
- SatLM: Satisfiability-Aided Language Models Using Declarative PromptingXi Ye, Qiaochu Chen, Isil Dillig, Greg DurrettNeurIPS 2023 · 126 citations
- Logic.py: Bridging the Gap between LLMs and Constraint SolversPascal Kesseli, Peter W. O'Hearn, Ricardo Silveira CabralNeurIPS 2025 · 10 citations
- SATBench: Benchmarking LLMs' Logical Reasoning via Automated Puzzle Generation from SAT FormulasAnjiang Wei, Yuheng Wu, Yingjia Wan, Tarun Suresh et al.EMNLP 2025 · 1 citation
- A Balanced Neuro-Symbolic Approach for Commonsense Abductive LogicJoseph Cotnareanu, Didier Chételat, Yingxue Zhang, Mark CoatesICLR 2026 · 3 citations
- Divide and Translate: Compositional First-Order Logic Translation and Verification for Complex Logical ReasoningHyun Ryu, Gyeongman Kim, Hyemin S. Lee, Eunho YangICLR 2025
