# Improved Logical Reasoning of Language Models via Differentiable Symbolic Programming

**Authors:** Hanlin Zhang, Jiani Huang, Ziyang Li, Mayur Naik, Eric Xing  
**arXiv:** [2305.03742](https://arxiv.org/abs/2305.03742)  
**Date:** 2023-05-05  
**Summary page:** https://www.summarizepaper.com/en/paper/2305.03742v1/

## Key points

- Authors propose a solution called DSR-LM (Differentiable Symbolic Reasoning framework) to improve logical reasoning of pre-trained large language models
- DSR-LM combines pre-trained LMs' factual knowledge with a symbolic module for deductive reasoning
- Unlike previous approaches, DSR-LM learns weighted rules and applies semantic loss for enhanced performance
- DSR-LM is scalable, interpretable, and allows easy integration of prior knowledge
- Experiments show that DSR-LM significantly improves logical reasoning abilities of pre-trained language models
- DSR-LM achieves over 20% accuracy increase on deductive reasoning benchmarks compared to baseline models
- DSR-LM outperforms competitive baselines when faced with systematic changes in sequence length
- The proposed framework opens up possibilities for further advancements in enhancing logical reasoning capabilities of language models.

## Summary

In their paper titled "Improved Logical Reasoning of Language Models via Differentiable Symbolic Programming," authors Hanlin Zhang, Jiani Huang, Ziyang Li, Mayur Naik, and Eric Xing address the challenge of pre-trained large language models (LMs) struggling to perform reliable logical reasoning. They propose a solution called DSR-LM, which stands for Differentiable Symbolic Reasoning framework. DSR-LM combines the strengths of pre-trained LMs in perceiving factual knowledge with a symbolic module that performs deductive reasoning. Unlike previous approaches that rely on hand-crafted logic rules, DSR-LM efficiently learns weighted rules and applies semantic loss to further enhance the performance of LMs. It is scalable, interpretable, and allows easy integration of prior knowledge, enabling extensive symbolic programming to derive logical conclusions more robustly. The authors conducted experiments to evaluate the effectiveness of DSR-LM. The results demonstrate that it significantly improves the logical reasoning abilities of pre-trained language models. In fact, DSR-LM achieved an accuracy increase of over 20% on deductive reasoning benchmarks compared to baseline models. Additionally, when faced with systematic changes in sequence length, DSR-LM outperformed various competitive baselines. Overall, this work presents a novel approach to enhancing the logical reasoning capabilities of pre-trained language models through differentiable symbolic programming. The proposed DSR-LM framework shows promising results and opens up possibilities for further advancements in this field by leveraging its scalability and interpretability features as well as its capability to easily integrate prior knowledge into its symbolic module for improved deductive reasoning outcomes.
