OEIS-Equiv:用等价性证明评估大模型的代码推理能力
OEIS-Equiv: Evaluating Code Reasoning in Large Language Models via Equivalence Proofs
这个基准挺有意思:让模型证明两段程序等价,而不是只对答案。DeepSeek-V4-Pro 生成的程序自己都证不了等价,其他模型也就证出几个。做代码生成工具或评估模型推理能力的开发者可以看看这套 Lean 验证的评测思路。
研究者发布 OEIS-Equiv 基准,包含 200 个任务,每个任务要求大模型证明两个程序等价:一个来自自动化搜索、用 Lean 4 领域专用语言写成,另一个由大模型针对同一整数序列生成,且每个任务都配有经 Lean 验证的参考证明。与常见基准不同,该基准刻意选用陌生代码,且不满足于对错答案,而是要求模型完成形式化等价证明。
结果相当扎眼:负责生成全部大模型程序的 DeepSeek-V4-Pro,即使每个任务推理数万 token,也没能证明任何一对程序等价;其他模型证明数量也不超过个位数。即便在自动化策略一行代码就能完成的任务上,大多数也没有任何模型能证出。这表明写对代码和推理代码对大模型来说是两种能力,现有只检查答案的评测方式掩盖了这一差距。
OEIS-Equiv: Evaluating Code Reasoning in Large Language Models via Equivalence Proofs
Large language models (LLMs) are increasingly used to turn natural language into code. But does this mean LLMs can reason about code? Existing evaluations can hardly tell, because most use familiar code and check only answers. We therefore turn to code that is valid but unfamiliar. We pair a program found by automated search, written in a Lean 4 domain-specific language, with one that an LLM generated for the same integer sequence. We then ask models to prove the two equivalent. Accordingly, we introduce OEIS-Equiv: 200 such tasks, each with a Lean-verified reference proof. DeepSeek-V4-Pro, which wrote all the LLM-generated programs, proves no pair equivalent, even after reasoning for tens of thousands of tokens per task. No other model proves more than a few. Even on tasks that a single line of automated tactics can prove, most are proved by no model. Thus, for LLMs, writing correct code and reasoning about code are not the same thing.
This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include OEIS-Equiv, Lean 4, DeepSeek-V4-Pro, code reasoning.
Primary source verification: published directly by arXiv: DeepSeek with first-party authority.