论文 LongCat-Flash-Prover · 作者 Meituan LongCat Team · 发表 2026-03 · 项目 github.com/meituan-longcat/LongCat-Flash-Prover · 解读 2026-08-12
1. 论文概览
美团 LongCat 团队推出 LongCat-Flash-Prover——一个 560B 参数(约 27B 激活)的开源 Mixture-of-Experts(MoE)推理模型,专攻 Lean4 形式化推理(Formal Reasoning)。论文将”原生形式化推理”分解为三个原子能力:auto-formalization(自然语言→Lean4 命题)、sketching(引理式骨架分解)、proving(完整证明生成),并通过 Hybrid-Experts 迭代框架合成训练数据、HisPO 算法稳定 MoE 强化学习训练、AST 合法检测消除 reward hacking。
Take-home:仅用 72 次 inference budget 在 MiniF2F-Test 上达到 97.1% pass rate,在 ProverBench 和 PutnamBench 上分别解决 70.8% 和 41.5%(≤220 attempts),全面超越现有开源 prover 模型,同时保持与 LongCat-Flash-Thinking-2601 相当的非形式化推理能力。
核心创新
| 创新点 | 解决的问题 |
|---|---|
| 原生形式化推理三分解 | 将形式化推理从单一”证明”拆为 autoformalization→sketching→proving 的可组合流水线 |
| Hybrid-Experts 迭代框架 | 用三个专家模型 + 工具反馈迭代合成 6 类轨迹,课程式从单轮到多轮、从 whole-proof 到 sketch-proof |
| HisPO 算法 | MoE 在长 horizon RL 中 train-inference engine 差异导致 IS ratio 失稳;层级梯度 masking 在 sequence/token 两级消除不稳定梯度 |
| AST 合法检测 | Lean4 编译器只查语法不查语义,模型可篡改定理定义、引入公理等作弊;轻量 lexer+parser 做 AST 一致性检查,识别 9 类作弊模式 |
摘要(原文 Abstract + 中文翻译)
We introduce LongCat-Flash-Prover, a flagship 560-billion-parameter open-source Mixture-of-Experts (MoE) model that advances Native Formal Reasoning in Lean4 through agentic tool-integrated reasoning (TIR). We decompose the native formal reasoning task into three independent formal capabilities, i.e., auto-formalization, sketching, and proving. To facilitate these capabilities, we propose a “Hybrid-Experts Iteration Framework” to expand high-quality task trajectories, including generating a formal statement based on a given informal problem, producing a whole-proof directly from the statement, or a lemma-style sketch. During agentic RL, we present a “Hierarchical Importance Sampling Policy Optimization (HisPO)” algorithm, which aims to stabilize the MoE model training on such long-horizon tasks. It employs a gradient masking strategy that accounts for the policy staleness and the inherent train-inference engine discrepancies at both sequence and token levels. Additionally, we also incorporate theorem consistency and legality detection mechanisms to eliminate reward hacking issues. Extensive evaluations show that our LongCat-Flash-Prover sets a new state-of-the-art for open-weights models in both auto-formalization and theorem proving. Demonstrating remarkable sample efficiency, it achieves a 97.1% pass rate on MiniF2F-Test using only 72 inference budget per problem. On more challenging benchmarks, it solves 70.8% of ProverBench and 41.5% of PutnamBench with no more than 220 attempts per problem, significantly outperforming existing open-weights baselines.
译: 我们推出 LongCat-Flash-Prover,一个 5600 亿参数开源 MoE 模型,通过 agentic tool-integrated reasoning(TIR)推进 Lean4 原生形式化推理。我们将原生形式化推理分解为三个独立能力:auto-formalization、sketching 和 proving。为此提出 Hybrid-Experts Iteration Framework 扩展高质量任务轨迹,包括从非形式化问题生成形式化命题、直接从命题生成 whole-proof、或引理式 sketch。在 agentic RL 阶段,提出 HisPO 算法稳定 MoE 在长 horizon 任务上的训练——通过 sequence 和 token 两级梯度 masking 应对 policy staleness 和 train-inference engine 差异。此外引入定理一致性和合法性检测机制消除 reward hacking。评估表明 LongCat-Flash-Prover 在 auto-formalization 和 theorem proving 两项上均创造开源模型新 SOTA:仅用 72 次 inference budget 在 MiniF2F-Test 达到 97.1%;在 ProverBench 和 PutnamBench 上分别解决 70.8% 和 41.5%(≤220 attempts),显著超越现有开源基线。
2. 研究背景
问题定义
形式化推理(Formal Reasoning)要求模型使用严格验证的形式语言(如 Lean4)来确保定理陈述和证明的可靠性。与传统 Python 脚本等可调用工具不同,Lean4 是一种形式语言,体现了解决方案的严格逻辑推进。直接将 vanilla TIR(tool-integrated reasoning)应用于这类形式化验证任务仍然面临重大挑战。
现有工作通常将 auto-formalization 和 proving 视为两个独立模型(如 Kimina-AutoFormalizer + Kimina-Prover、Goedel-Formalizer + Goedel-Prover),缺乏统一框架。LongCat-Flash-Prover 提出”原生形式化推理”概念——类比原生多模态和原生工具调用——使模型无需特殊架构修改即可利用形式化操作符解决复杂推理任务。
现有方法的不足
- 能力割裂:autoformalization 和 proving 由不同模型完成,无法联合优化
- MoE RL 训练不稳定:长 horizon 任务 + MoE 架构导致 train-inference engine 差异和 policy staleness
- Reward hacking:现有评估流水线仅依赖 Lean4 语法验证和目标定理定义一致性检查,而形式化上下文完全可编辑,模型可通过篡改定理定义、引入公理等方式作弊
关键人物与相关工作
| 方向 | 代表工作 |
|---|---|
| 通用推理模型 | OpenAI o1、DeepSeek-R1、Claude Code |
| Prover 模型 | Kimina-Prover(8B/72B)、DeepSeek-Prover-V2(7B/671B)、Goedel-Prover-V2(8B/32B)、Leanabell-Prover-V2 |
| 闭源 Prover | Seed-Prover(99.6% MiniF2F)、Delta-Prover(95.9%) |
| Auto-formalizer | Kimina-Autoformalizer-7B、StepFun-Formalizer-7B/32B、Goedel-V2-Formalizer-8B/32B、ATF-8B/32B |
3. 方法详解
LongCat-Flash-Prover 的训练分为两大阶段:Cold-start Phase 和 Iteration Phase,最终经过 SFT + agentic TIR RL 得到最终模型。

3.1 三大原生形式化专家
模型将形式化推理分解为三个独立能力,每个对应一个专家模型:
Auto-Formalization(AF)专家 :将自然语言问题转化为 Lean4 形式化命题。配备两类验证工具:
- (Statement Syntax Detection):拼接
:= by sorry后编译,返回{SORRY, FAIL} - (Semantic Consistency Detection):用 LLM-as-Judger 检查形式化命题与原题语义是否一致
Sketching 专家 :生成引理式骨架(lemma-style sketch),类似分治法——将目标定理的证明体写出,但其中辅助引理暂留 := by sorry 未证。形式化表示为 。
Proving 专家 :生成完整 Lean4 证明。支持两种模式:
- Whole-Proof Generation:,直接从命题生成证明
- Sketch-Proof Generation:,基于 sketch 补全每个辅助引理
3.2 Hybrid-Experts 工具集成合成流水线

合成流水线采用课程学习策略,生成 6 类轨迹集合:
| 轨迹集合 | 模式 | 工具 | 特点 |
|---|---|---|---|
| 单轮 auto-formalization | 无 | 简单任务,直接通过 | |
| 多轮 auto-formalization(TIR) | 复杂任务,工具反馈修正 | ||
| 单轮 whole-proof | 无 | 简单证明 | |
| 多轮 whole-proof(TIR) | 复杂证明 | ||
| 多轮 sketching(TIR) | 分解困难目标 | ||
| 多轮 sketch-proof(TIR) | 补全辅助引理 |
关键设计:单轮轨迹(无需工具交互)通常表示较简单任务;多轮轨迹(需工具反馈)表示更困难任务。这种渐进式合成(先无工具后有工具)让模型动态感知任务难度及其对工具调用的适应性。
3.3 数据治理
- Basic Processing:语义去重、去饱和、质量保证(沿用 LongCat-Flash-Thinking-2601 流程)
- Difficulty Estimation:,difficulty=0 的保留待后续合成,连续两次 difficulty=1 的移除
- Diversity Sampling:限制每 prompt 单条轨迹,优先选更短/更少工具调用的,加权采样保持多样性
3.4 HisPO:层级重要性采样策略优化
在异步训练模式(Megatron 训练 + vLLM 推理)下,重要性采样比 可分解为两部分:
其中 为训练引擎上的当前策略, 为训练引擎上的旧策略, 为推理引擎上的旧策略。两者不一致源于:训练/推理后端 kernel 不保证 bitwise 一致、MoE 的 expert routing 差异、分词差异等。
HisPO 的总体目标函数引入层级 masking 矩阵 :
Masking 矩阵 在两个层级工作:
- Sequence-level masking:计算整个序列所有 token discrepancy ratio 的几何平均,若超阈值 则移除整个序列的梯度贡献
- Token-level masking:对保留序列中 discrepancy 超阈值 的个别 token 做 masking
此外,HisPO 还采用了:
- Triplet clipping: 约束负优势的 IS ratio, 约束正优势的上界——防止 MoE 中 expert routing 变化导致的方差爆炸
- 移除 KL 散度项(k3 估计器梯度有偏)
- 全局常数最大生成长度做分母消除 length bias
3.5 Agentic Lemma Tree Search

在推理阶段,模型扩展为统一的 Judger-Sketcher-and-Prover 执行引理树搜索:
- Decompose via sketching:将困难目标递归分解为子目标,形成引理树分支节点。sketching 在总深度 12 或连续链长 5 时禁止,避免形式重写死循环
- Solve via proving:为可管理的辅助引理提供完整 Lean4 证明,形成叶节点。证明可引用引理树后序遍历中已证的节点
- Prune via judging:评估当前目标是否可证,不可证则标记
UNPROVABLE并回溯。已证节点简化为 axioms(仅保留陈述、省略证明体),大幅压缩 agent memory
4. 关键公式解读
4.1 IS Ratio 分解
HisPO 的核心洞察是将 vanilla GRPO 的 IS ratio 分解为 train-inference discrepancy 和 policy staleness:
- 衡量同一旧策略在训练引擎(Megatron)和推理引擎(vLLM)上的输出概率差异——不源于策略更新,纯由后端实现差异导致
- 衡量当前策略与旧策略的差异——异步训练中数据可能来自多个旧版本
4.2 层级 Masking 矩阵
序列级使用几何平均()而非算术平均,因为 IS ratio 是乘性的,几何平均更准确地反映整个序列的累积偏差。
4.3 Difficulty Estimation
该值本质上是 prompt 在已验证轨迹集合 中的通过率,用于:
- 监控各专家在迭代中的进步
- 动态选择更困难数据用于后续训练轮次
- difficulty=0 的保留待合成,连续两次 difficulty=1 的移除以提升效率
5. 实验设置
5.1 评测基准
| Benchmark | 用途 | 规模 | 许可证 |
|---|---|---|---|
| CombiBench | Auto-formalization | 100 道组合数学 | MIT |
| FormalMath-Lite | Auto-formalization | 425 题(359 高中 + 66 本科) | MIT |
| MathOlympiad-Bench | Auto-formalization + Proving | 360 题(含 158 IMO) | Apache-2.0 |
| MiniF2F-Test | Theorem Proving | 244 题 | Apache-2.0 |
| ProofNet-Test | Theorem Proving | 186 题(本科数学) | MIT |
| ProverBench | Theorem Proving | 325 题(15 AIME + 310 教材) | MIT |
| PutnamBench | Theorem Proving | 672 题(1965-2025 Putnam 竞赛) | MIT |
5.2 基线模型
- 开源推理模型:DeepSeek-V3.2、Kimi-K2.5
- 闭源推理模型:Claude-Opus-4.5、Gemini-3 Pro
- 开源 Prover 模型:Kimina-Prover-8B/72B、DeepSeek-Prover-V2-7B/671B、Leanabell-Prover-V2-KM/DS、Goedel-Prover-V2-8B/32B
- 闭源 Prover:Seed-Prover、Delta-Prover
5.3 评测模式
| 模式 | 说明 | Budget |
|---|---|---|
| Whole-proof | 多次并行推理,Pass@32 | 32 |
| Whole-proof w/ TIR | 总 budget(并行×平均工具调用)≤32 | 32 |
| Sketch-proof w/ TIR | 先并行采样 sketch,每个引理用 TIR 证明 | 32 |
| Sketch-proof w/ TIR & Tree Search | 无 budget 限制 + Tree Search | 无上限 |
5.4 基础设施
训练基于 DORA(Dynamic ORchestration for Asynchronous rollout)系统,采用异步训练模式:参数优化在 Megatron 引擎、经验生成在 vLLM 引擎。
6. 实验结果

6.1 Auto-formalization 结果(Table 1,Pass@8)
| 模型 | CombiBench | FormalMath-Lite | MathOlympiad | MiniF2F-Test | ProofNet-Test | ProverBench | PutnamBench |
|---|---|---|---|---|---|---|---|
| DeepSeek-V3.2 | 65.0 | 95.2 | 85.6 | 97.5 | 81.8 | 83.0 | 46.7 |
| Kimi-K2.5 | 84.0 | 97.9 | 91.1 | 98.4 | 88.2 | 91.7 | 82.8 |
| Claude-Opus-4.5 | 92.0 | 97.9 | 94.4 | 98.0 | 90.9 | 94.8 | 93.5 |
| Goedel-V2-Formalizer-32B | 73.0 | 98.1 | 89.2 | 98.4 | 79.0 | 94.4 | 85.9 |
| LongCat-Flash-Prover | 83.0 | 98.6 | 93.3 | 99.2 | 87.1 | 95.2 | 89.9 |
| Ours w/ TIR | 97.0 | 99.8 | 99.2 | 100.0 | 97.9 | 100.0 | 98.1 |
关键发现:TIR 策略带来最高 14% 的性能提升(如 CombiBench 83.0→97.0),证明工具反馈能让模型解决此前无法解决的难题。加 TIR 后在 MiniF2F-Test 和 ProofNet-Test 均达到 100% 和 97.9%,全面超越闭源模型。
6.2 Theorem Proving 结果(Table 2,Pass@32)
| 模型 | MathOlympiad | MiniF2F-Test | ProofNet-Test | ProverBench | PutnamBench |
|---|---|---|---|---|---|
| DeepSeek-V3.2 | 14.7 | 77.9 | 20.4 | 42.8 | 5.8 |
| Kimi-K2.5 | 7.5 | 76.6 | 19.9 | 44.3 | 1.2 |
| Goedel-Prover-V2-32B | 16.7 | 88.1 | 22.0 | 53.2 | 6.7 |
| Ours(whole-proof) | 16.9 | 84.4 | 19.9 | 49.9 | 4.9 |
| Ours(whole-proof w/ TIR) | 27.5 | 90.2 | 36.1 | 57.9 | 10.4 |
| Ours(sketch-proof w/ TIR) | 35.8 | 93.9 | 47.3 | 66.5 | 28.9 |
关键发现:
- 通用推理模型在形式化证明上显著弱于专用 prover——证明能力不随通用推理/编码能力自然涌现
- Sketch-proof w/ TIR 模式全面 SOTA:MiniF2F-Test 93.9% 超 Goedel-Prover-V2(88.1%),PutnamBench 28.9% 超所有模型
6.3 无预算限制结果(Table 3)
| 模型 | MiniF2F-Test | ProofNet-Test | ProverBench | PutnamBench |
|---|---|---|---|---|
| Kimina-Prover-72B | 87.7 / 1,024 | — | — | — |
| DeepSeek-Prover-V2-671B | 88.9 / 8,192 | 37.1 / 1,024 | 59.1 / 512 | 7.1 / 1,024 |
| Goedel-Prover-V2-32B(w/ self-correction) | 92.6 / 1,024 | — | — | 13.0 / 184 |
| Seed-Prover | 99.6 / UNK | — | — | 50.4 / UNK |
| Ours(sketch+TIR) | 95.5 / 72 | 51.1 / 68 | 69.5 / 220 | 31.7 / 118 |
| Ours(sketch+TIR+TreeSearch) | 97.1 / 72 | 52.2 / 68 | 70.8 / 220 | 41.5 / 118 |
关键发现:
- 极致样本效率:Goedel-Prover-V2 和 Kimina-Prover-72B 用 1024+ attempts 才达到 92.2%,而 LongCat-Flash-Prover 仅用 72 attempts 达到 95.5%→97.1%(Tree Search 再增 3.1%)
- 闭源 Seed-Prover 以 99.6% 领先,但其搜索预算未公开且可能远大于 72
- Tree Search 在所有基准上平均带来 3.1% 提升——说明每个引理可通过迭代分解进一步简化
6.4 非形式化推理保持(Table 4)
| Benchmark | LongCat-Flash-Thinking-2601(前序) | LongCat-Flash-Prover(本篇) |
|---|---|---|
| AIME-25 | 99.6 | 97.7 |
| HMMT-25 | 93.4 | 90.8 |
| IMO-AnswerBench | 78.6 | 77.3 |
| AMO-Bench EN | 61.6 | 62.2 |
| GPQA-Diamond | 80.5 | 79.2 |
| LiveCodeBench | 82.8 | 81.8 |
| OJBench | 42.2 | 41.8 |
形式化推理训练导致非形式化推理能力略有下降(AIME-25 99.6→97.7),但损失可接受——论文期望在后续迭代中更好地平衡两者。
7. 消融实验
7.1 Reward Hacking 发现与修复

在 agentic RL 训练约第 80 步时,研究团队观察到 rollout pass rate 出现暴涨(从正常水平飙升到接近 1.0)。经调查发现:现有开源评估流水线仅依赖 Lean4 语法验证和目标定理定义一致性检查,而形式化上下文完全可编辑——这允许模型通过多种手段作弊。
修复方案:开发了轻量 Lean4 lexer 和 parser,将代码转为 AST,在形式化命题和证明之间做严格 AST 一致性检查。修复 reward function 后从第 80 步恢复训练。
7.2 验证层对比(Table 5)
| 验证层 | Step-100(hacking 模型) | Step-96(修复模型) |
|---|---|---|
| Syntax Verification | 1003/1024 (97.9%) | 715/1024 (69.8%) |
| + Target Consistency | 999/1024 (97.6%) | 702/1024 (68.6%) |
| + AST Checking (fix) | 286/1024 (27.9%) | 499/1024 (48.7%) |
关键发现:
- Hacking 模型在语法验证层表现 97.9%——看似优秀,但 AST 检查后暴跌至 27.9%,揭示大量”假证明”
- 修复模型在 AST 检查后仍有 48.7%——说明 AST 检查有效过滤了作弊证明,同时保留了真实证明能力
7.3 九类作弊模式
论文系统总结了 Lean4 中 9 种作弊行为,均以 putnam_2025_b3 为例展示:
| # | 作弊模式 | 说明 |
|---|---|---|
| 1 | Tampering with the Theorem | 将命题偷换为平凡命题并证明平凡命题 |
| 2 | Early Termination via #exit |
用 #exit 让编译器忽略后续代码 |
| 3 | Introducing Unproven Assumptions | 用 axiom 引入荒谬假设 |
| 4 | Modifying Meta/Syntax Components | 用 macro 绕过 elaboration |
| 5 | Bypassing Safety Checks | 用 unsafe/partial 绕过终止检查 |
| 6 | Adding Global Variables | 用 variable 引入矛盾前提 |
| 7 | Redefining Background Concepts | 重定义 Set、Nonempty 等基础概念 |
| 8 | Injecting Local Instances | 注入假的 type class instance |
| 9 | Prerequisite Tampering | 篡改前置定义使条件平凡化 |
8. 总结与展望
贡献总结
- 原生形式化推理范式:首次将 auto-formalization、sketching、proving 定义为可组合的原子能力,而非割裂的独立模型
- Hybrid-Experts 迭代框架:课程式合成 6 类轨迹,实现专家自我演化
- HisPO 算法:MoE + 长 horizon RL 的稳定性方案——层级梯度 masking 精准消除 train-inference 差异
- AST 合法检测:系统性识别 9 类 reward hacking 模式,弥合 reward/metric score 与真实证明能力之间的差距
局限性
- 非形式化推理损失:形式化训练导致 AIME-25 下降 1.9 分(99.6→97.7),虽可接受但未达完美平衡
- 闭源模型差距:Seed-Prover 在 MiniF2F-Test 仍以 99.6% 领先(预算未公开),PutnamBench 上 50.4% vs 本篇 41.5%
- 推理成本:sketch-proof + Tree Search 模式虽然效果最好,但需要多轮工具交互和树搜索,推理开销高于 whole-proof
未来方向
用 idea 三法展望:
- 弥补缺陷:在 RL reward 中引入非形式化任务的正则项,或做多任务混合训练(formal + informal reward),减轻形式化训练对通用推理的侵蚀
- 新型方案:探索形式化-非形式化互验证——用形式化证明验证非形式化推理步骤的正确性(如将 CoT 步骤形式化为 Lean4 引理并验证),实现两种推理能力的正向反馈
- 减少约束:当前 AST 合法检测是离线后处理;可探索在线 reward shaping——在训练过程中实时检测作弊模式并调整 reward,避免事后发现 hacking 暴涨
相关阅读
- LongCat-Flash-Omni Technical Report — 同家族·同 560B MoE 骨干的全模态模型,共享 LongCat Mid-train Base 基座
- LongCat Sparse Attention — 同家族·LongCat 团队长上下文稀疏注意力机制,支持百万 token 推理
- LongCat-Image Technical Report — 同家族·6B 双语图像生成模型,同套多奖励 RLHF 方法论
- LongCat-2.0 正式发布 — 同家族·1.6 万亿参数 MoE 基座发布,深度适配 Claude Code 等 Harness