Improving Rule-based Reasoning in LLMs using Neurosymbolic Representations
Varun Dhanraj, Chris Eliasmith
Abstract
Large language models (LLMs) continue to face challenges in reliably solving reasoning tasks, particularly tasks that involve precise rule following, as often found in mathematical reasoning tasks. This paper introduces a novel neurosymbolic method that improves LLM reasoning by encoding hidden states into neurosymbolic vectors, enabling problem-solving within a neurosymbolic vector space. The results are decoded and merged with the original hidden state, significantly boosting the model's performance on numerical reasoning tasks. By offloading computation through neurosymbolic representations, this method enhances efficiency, reliability, and interpretability. Our experimental results demonstrate an average of 88.6% lower cross-entropy loss and 15.4 times more problems correctly solved on a suite of mathematical reasoning tasks compared to chain-of-thought prompting and supervised fine-tuning (LoRA), while not hindering the LLM's performance on other tasks. We make our code available at Neurosymbolic LLM 1 .
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 f73cde3b-5d9c-493d-9005-d55bbe069401Builds on6
- 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
- Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 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
- 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
- PAL: Program-aided Language ModelsLuyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon et al.ICML 2023 · 700 citations
- Neuro-Symbolic Data Generation for Math ReasoningZenan Li, Zhi Zhou, Yuan Yao, Xian Zhang et al.NeurIPS 2024 · 35 citations
- Enhancing Numerical Reasoning with the Guidance of Reliable Reasoning ProcessesDingzirui Wang, Longxu Dou, Xuanliang Zhang, Qingfu Zhu et al.ACL 2024
- CoMAT: Chain of Mathematically Annotated Thought Improves Mathematical ReasoningJoshua Ong Jun Leang, Aryo Pradipta Gema, Shay B. CohenEMNLP 2025
- Divide and Translate: Compositional First-Order Logic Translation and Verification for Complex Logical ReasoningHyun Ryu, Gyeongman Kim, Hyemin S. Lee, Eunho YangICLR 2025
