Recent large language models (LLMs) have achieved impressive reasoning milestones but continue to struggle with high computational costs, logical inconsistencies, and sharp performance degradation on high-complexity problems. While neuro-symbolic methods attempt to mitigate these issues by coupling LLMs with symbolic reasoners, existing approaches typically rely on monotonic logics (e.g., SMT) that cannot represent defeasible reasoning -- essential components of human cognition. We present "LLM+ASP," a framework that translates natural language into Answer Set Programming (ASP), a nonmonotonic formalism based on stable model semantics. Unlike prior "LLM+ASP" approaches that require manually authored knowledge modules, domain-specific prompts, or evaluation restricted to single problem classes, our framework operates without any per-task engineering and applies uniformly across diverse reasoning tasks. Our system utilizes an automated self-correction loop where structured feedback from the ASP solver enables iterative refinement. Evaluating across six diverse benchmarks, we demonstrate that: (1) stable model semantics allow LLMs to naturally express default rules and exceptions, outperforming SMT-based alternatives by significant margins on nonmonotonic tasks; (2) iterative self-correction is the primary driver of performance, effectively replacing the need for handcrafted domain knowledge; (3) compact in-context reference guides substantially outperform verbose documentation, revealing a "context rot" phenomenon where excessive context hinders constraint adherence.
翻译:近期大型语言模型(LLMs)在推理任务上取得了显著进展,但仍面临高计算成本、逻辑不一致性以及高复杂度问题上的性能急剧下降等挑战。尽管神经符号方法试图通过将LLMs与符号推理器结合来缓解这些问题,但现有方法通常依赖无法表示可废止推理(人类认知的核心组成部分)的单调逻辑(如SMT)。我们提出"LLM+ASP"框架,该框架将自然语言翻译为基于稳定模型语义的非单调形式化体系——回答集编程(ASP)。与先前需要手动构建知识模块、领域特定提示或局限于单类问题评估的"LLM+ASP"方法不同,我们的框架无需任何每任务工程,能统一适用于多样化推理任务。该系统采用自动化自我修正循环,通过ASP求解器提供的结构化反馈实现迭代优化。在六个不同基准上的评估表明:(1)稳定模型语义使LLMs能自然表达默认规则与例外,在非单调任务上显著超越基于SMT的替代方案;(2)迭代自我修正是性能的主要驱动力,有效替代了对手工领域知识的需求;(3)紧凑的上下文参考指南显著优于冗长文档,揭示了"上下文腐败"现象——过量上下文会阻碍约束遵循。