Keywords: logic reasoning, boolean satisfiability
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 \textbf{DiLA} (Differential Logic Layer-Aided Language Modeling), a novel framework that integrates a differentiable logic layer into LLMs to jointly leverage linguistic understanding and gradient-based 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$\times$ 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. Our code is available at https://anonymous.4open.science/r/DiLA-33DE/.
Submission Number: 8
Loading