[论文解读] SatLM: Satisfiability-Aided Language Models Using Declarative Prompting
SatLM 提出了一种基于可满足性辅助的语言建模方法,通过声明式提示(declarative prompting)提升大语言模型(LLMs)的推理能力。与生成指令式程序不同,LLMs 将自然语言问题解析为逻辑约束,再通过现成的 SAT 求解器求解,确保结果正确性并减少规划错误。SatLM 在 GSM、LSAT、BoardgameQA 和 StructuredRegex 上达到最先进性能,在 GSM-Sys 上相比程序辅助 LMs 提升 23%,并在多个基准测试中创下新 SOTA 记录。
Prior work has combined chain-of-thought prompting in large language models (LLMs) with programmatic representations to perform effective and transparent reasoning. While such an approach works well for tasks that only require forward reasoning (e.g., straightforward arithmetic), it is less effective for constraint solving problems that require more sophisticated planning and search. In this paper, we propose a new satisfiability-aided language modeling (SatLM) approach for improving the reasoning capabilities of LLMs. We use an LLM to generate a declarative task specification rather than an imperative program and leverage an off-the-shelf automated theorem prover to derive the final answer. This approach has two key advantages. The declarative specification is closer to the problem description than the reasoning steps are, so the LLM can parse it out of the description more accurately. Furthermore, by offloading the actual reasoning task to an automated theorem prover, our approach can guarantee the correctness of the answer with respect to the parsed specification and avoid planning errors in the solving process. We evaluate SATLM on 8 different datasets and show that it consistently outperforms program-aided LMs in the imperative paradigm. In particular, SATLM outperforms program-aided LMs by 23% on a challenging subset of the GSM arithmetic reasoning dataset; SATLM also achieves a new SoTA on LSAT and BoardgameQA, surpassing previous models that are trained on the respective training sets.
研究动机与目标
- 解决链式思维(chain-of-thought)和程序辅助提示在需要复杂规划的复杂推理任务中的局限性。
- 通过将规格说明与执行解耦,减少基于 LLM 的推理中的执行错误与规划错误。
- 通过利用自动化定理证明器验证解是否符合声明式问题规格,提升推理准确性。
- 通过检测不可满足或模糊的问题规格,实现选择性预测。
- 在多样化的推理基准上实现最先进性能,涵盖算术、逻辑与符号推理任务。
提出的方法
- LLMs 被提示将自然语言问题描述转化为一组逻辑约束(声明式规格),而非指令式推理步骤。
- 生成的逻辑公式被输入 SAT 求解器(包括 SMT 和一阶定理证明器)以确定解。
- SAT 求解器通过验证解是否满足所有约束,确保正确性,消除执行错误。
- 该方法将 LLM 的解析角色与求解器的规划与执行角色分离,降低对易出错的链式思维生成的依赖。
- 采用少样本提示与自一致性解码,以提升零样本泛化能力与鲁棒性。
- 当规格不可满足或模糊时,系统可选择不回答,从而在选择性预测设置中提升可靠性。

实验结果
研究问题
- RQ1与指令式程序辅助提示相比,声明式提示结合 SAT 求解是否能提升 LLM 的推理性能?
- RQ2将推理规划任务卸载至 SAT 求解器是否能减少复杂推理任务中的规划与执行错误?
- RQ3LLMs 与 SAT 求解器的结合是否能在多样化的推理基准(包括算术与逻辑推理)上实现最先进性能?
- RQ4在选择性预测设置中,当不确定或模糊问题被拒绝时,该方法表现如何?
- RQ5要求 LLM 生成声明式规格是否能相比标准链式思维提示提升推理质量?
主要发现
- SatLM 在 GSM 数据集的挑战性子集 GSM-Sys 上相比程序辅助 LMs 提升 23%,显著改善算术推理性能。
- SatLM 使用少样本提示与自一致性解码,在 GSM 数据集上实现 84.8% 的新 SOTA 性能,与在完整训练集上微调的模型表现相当。
- SatLM 在 LSAT(Zhong et al., 2022)上创下新 SOTA,超越此前在相同基准上训练的模型。
- SatLM 在 BoardgameQA(Kazemi et al., 2023)与 StructuredRegex(Ye et al., 2020)上达到 SOTA 表现,表明其在各类推理任务中具有广泛适用性。
- 该方法通过依赖 SAT 求解器确保逻辑一致性,减少了程序辅助 LMs 中常见的规划错误,如错误的方程操作。
- SatLM 通过检测不可满足或模糊的问题规格,实现可靠的的选择性预测,提升了不确定情况下的准确性。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。