MathlibPR: 用于正式数学库的拉取请求合并准备性基准
MathlibPR: Pull Request Merge-Outcome Benchmark for Formal Mathematical Libraries
AI总结:
本文提出MathlibPR基准,通过真实Mathlib4 PR历史评估LLM在审查合并准备性PR中的能力,揭示LLM在区分有效PR与需修订PR中的不足。
摘要:
Lean和Mathlib生态系统已成为大型语言模型(LLM)辅助形式推理的事实标准,但其成功仅将Mathlib作为必要依赖而非直接贡献。Mathlib的增长近期受到审查流程的瓶颈,需人类评审员判断提出的拉取请求(PR)是否符合Mathlib的规范并值得整合。为此,我们引入MathlibPR基准,基于真实Mathlib4 PR历史构建,并提出分阶段评估协议,用于评估LLM模型和LLM代理。令人惊讶的是,LLM模型和代理在区分合并准备PR与修订或未合并PR时表现不佳。通过将Mathlib PR历史转化为监督信号,MathlibPR为评审助手和奖励模型提供了步骤,以帮助评估PR并引导LLM生成合并准备的Mathlib贡献。
英文摘要:
The ecosystem of Lean and Mathlib has become the de facto standard for large language model (LLM) assisted formal reasoning with remarkable successes in recent years. Those successes, however, only consume Mathlib as an essential dependency but do not directly contribute to it. In the meantime, the growth of Mathlib has recently been bottlenecked by the review process, which requires human reviewers to judge whether proposed pull requests (PRs) follow the Mathlib's conventions and are worth integrating as part of a shared mathematical infrastructure. This leads to our central question: can LLMs help review Mathlib PRs? To this end, we introduce MathlibPR, a benchmark built from real Mathlib4 PR histories. We further propose a staged evaluation protocol and use it to evaluate both LLM models (e.g., DeepSeek, Qwen, Goedel, and Kimina) and LLM agents (e.g., Codex and Claude Code). Surprisingly, both LLM models and LLM agents struggle to distinguish merge-ready PRs from build-passing PRs that were revised or never merged. By turning Mathlib PR histories into a supervised signal, MathlibPR provides a step toward reviewer assistants and reward models that could help evaluate PRs and steer LLMs toward producing merge-ready Mathlib contributions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。