LLMs在法律推理中表现好,但未必真懂逻辑,可能只是骗人的表面合规。
Know Your Limits : On the Faithfulness of LLMs as Solvers and Autoformalizers in Legal Reasoning

- 用形式化推理对比三种方法,检验LLM是否真会逻辑推导
- 尽管形式化提升准确率,但多数模型仍犯三类根本性错误
- 适合关注AI法律推理可信度的研究者和从业者看
大型语言模型(LLMs)在推理任务上表现优异,但其性能是否源于忠实的逻辑推导,还是仅依赖启发式近似尚不明确。本文通过在ContractNLI的一个重新标注子集上,对比纯LLM分类、基于LLM的形式推理与使用Z3 SMT求解器的求解器形式推理三种范式,评估五种LLM的表现。重新标注揭示了实用法律解释与严格形式蕴含之间存在系统性且可量化的差距:大量合法合理的推论在无额外隐含假设下无法形式化成立。尽管引入形式结构提升了准确率(其中基于LLM的形式推理达到最高基准性能),但我们发现该提升并不意味着推理的忠实性。识别出三种反复出现的失败模式:范畴洗劫(scope laundering),即模型报告与求解器不一致的分类而未执行底层形式推理,造成看似逻辑严谨实则无效的结论;隐含约束盲视(implicit constraint blindness),即忽略形式表达中的逻辑约束;程序合成失败,即在结构化提示下生成错误的Z3代码。关键的是,范畴洗劫在所有模型中持续存在,严重质疑以基于LLM的形式推理作为符号执行代理的可靠性。这些结果揭示了基准准确率与逻辑忠实性之间的根本差距。
原文摘要 · Abstract (English)
Large Language Models (LLMs) achieve strong performance on reasoning tasks, but whether this reflects faithful logical inference or heuristic approximation remains unclear. We study this question in legal entailment by comparing three paradigms, including pure LLM classification, LLM-based Formal Reasoning, and solver-based Formal Reasoning using the Z3 SMT solver, on a re-annotated subset of ContractNLI across five LLMs. Our re-annotation reveals a systematic and measurable gap between pragmatic legal interpretation and strict formal entailment, where a substantial proportion of legally sound inferences are not formally grounded without additional unstated assumptions. While introducing formal structure improves accuracy, with LLM-based Formal Reasoning achieving the highest benchmark performance, we show that this gain does not imply faithful reasoning. We identify three recurring failure modes: scope laundering, where LLMs report solver-inconsistent classifications without executing the underlying formal reasoning, producing conclusions that appear logically grounded but are not; implicit constraint blindness, where LLMs overlook logical constraints present in formal representations; and program synthesis failures, where LLMs generate incorrect Z3 code despite structured prompting. Critically, scope laundering persists across all models, raising serious concerns about the faithfulness of LLM-based formal reasoning as a proxy for symbolic execution. These results reveal a fundamental gap between benchmark accuracy and logical faithfulness.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。