SymCode:通过可验证代码生成实现数学推理的神经符号方法
SymCode: A Neurosymbolic Approach to Mathematical Reasoning via Verifiable Code Generation
AI总结:
SymCode通过可验证代码生成实现数学推理,显著提升准确性并增强模型的透明度和可靠性。
摘要:
大型语言模型(LLMs)在处理复杂数学推理时常常遇到困难,其中基于文本的生成方法会导致不可验证且算术不严谨的解决方案。当前的提示策略如思维链仍局限于这种不可靠的媒介,缺乏确定性验证的机制。为了解决这些限制,我们引入了SymCode,这是一种神经符号框架,将数学问题解决重新定义为使用SymPy库进行可验证代码生成的任务。我们在具有挑战性的基准测试中评估了SymCode,包括MATH-500和OlympiadBench,证明其在基准上的准确性提高了高达13.6个百分点。我们的分析表明,SymCode不仅在令牌效率上更优,而且从根本上将模型的失败从模糊的逻辑谬误转向透明的程序性错误。通过将LLM的推理基础置于确定性的符号引擎上,SymCode代表了在正式领域中更准确和可信的AI发展的重要一步。
英文摘要:
Large Language Models (LLMs) often struggle with complex mathematical reasoning, where prose-based generation leads to unverified and arithmetically unsound solutions. Current prompting strategies like Chain of Thought still operate within this unreliable medium, lacking a mechanism for deterministic verification. To address these limitations, we introduce SymCode, a neurosymbolic framework that reframes mathematical problem-solving as a task of verifiable code generation using the SymPy library. We evaluate SymCode on challenging benchmarks, including MATH-500 and OlympiadBench, demonstrating significant accuracy improvements of up to 13.6 percentage points over baselines. Our analysis shows that SymCode is not only more token-efficient but also fundamentally shifts model failures from opaque logical fallacies towards transparent, programmatic errors. By grounding LLM reasoning in a deterministic symbolic engine, SymCode represents a key step towards more accurate and trustworthy AI in formal domains.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。