While the recent Chain-of-Thought (CoT) technique enhances the reasoning ability of large language models (LLMs) with the theory of mind, it might still struggle in handling logical reasoning that relies much on symbolic expressions and rigid deducing rules. To strengthen the logical reasoning capability of LLMs, we propose a novel Symbolic Chain-of-Thought, namely SymbCoT, a fully LLM-based framework that integrates symbolic expressions and logic rules with CoT prompting. Technically, building upon an LLM, SymbCoT 1) first translates the natural language context into the symbolic format, and then 2) derives a step-by-step plan to solve the problem with symbolic logical rules, 3) followed by a verifier to check the translation and reasoning chain. Via thorough evaluations on 5 standard datasets with both First-Order Logic and Constraint Optimization symbolic expressions, SymbCoT shows striking improvements over the CoT method consistently, meanwhile refreshing the current state-of-the-art performances. We further demonstrate that our system advances in more faithful, flexible, and explainable logical reasoning. To our knowledge, this is the first to combine symbolic expressions and rules into CoT for logical reasoning with LLMs. Code is open at https://github.com/Aiden0526/SymbCoT.
翻译:尽管近期提出的思维链技术借助心智理论增强了大型语言模型的推理能力,但在依赖符号表达式和严格推理规则的逻辑推理任务中仍存在不足。为强化大型语言模型的逻辑推理能力,本文提出一种新型符号思维链框架——SymbCoT,该框架完全基于大型语言模型,将符号表达式与逻辑规则融入思维链提示。技术层面,SymbCoT基于大型语言模型实现:1)首先将自然语言语境转化为符号格式;2)继而利用符号逻辑规则制定分步求解方案;3)最终通过验证器检验转化与推理链条的准确性。通过在5个包含一阶逻辑与约束优化符号表达式的标准数据集上的全面评估,SymbCoT在持续超越现有思维链方法的同时,刷新了当前最优性能。进一步实验证明,本系统在逻辑推理中实现了更强的忠实性、灵活性与可解释性。据我们所知,这是首个将符号表达式与规则融入思维链以实现大型语言模型逻辑推理的研究。开源代码发布于https://github.com/Aiden0526/SymbCoT。