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.
翻译:尽管近期兴起的思维链(CoT)技术通过心智理论增强了大语言模型(LLMs)的推理能力,但在处理高度依赖符号表达式与严格演绎规则的逻辑推理任务时仍存在局限。为强化LLMs的逻辑推理能力,我们提出一种新颖的符号思维链框架——SymbCoT,这是一个完全基于LLM的架构,将符号表达式与逻辑规则整合至CoT提示中。技术上,SymbCoT以LLM为基础:1)首先将自然语言上下文转化为符号格式;2)随后运用符号逻辑规则推导出逐步解决问题的方案;3)最后通过验证器对转换过程与推理链进行校验。通过对5个标准数据集(涵盖一阶逻辑与约束优化符号表达式)的全面评估,SymbCoT相较CoT方法展现出显著且一致的性能提升,同时刷新了当前最优性能记录。我们进一步证明,该系统在实现更忠实、灵活与可解释的逻辑推理方面取得进展。据我们所知,这是首次将符号表达式与规则融入CoT框架以实现LLMs的逻辑推理。代码已开源:https://github.com/Aiden0526/SymbCoT。