LongCat-Flash-Prover: Advancing Native Formal Reasoning via Agentic Tool-Integrated Reinforcement Learning

TL;DR

LongCat-Flash-Prover enhances Lean4 formal reasoning via tool-integrated RL, achieving 97.1% pass rate on MiniF2F-Test.

cs.AI 🔴 Advanced 2026-03-22 2 views
Jianing Wang Jianfei Zhang Qi Guo Linsen Guo Rumei Li Chao Zhang Chong Peng Cunguang Wang Dengchang Zhao Jiarong Shi Jingang Wang Liulin Feng Mengxia Shen Qi Li Shengnan An Shun Wang Wei Shi Xiangyu Xi Xiaoyu Li Xuezhi Cao Yi Lu Yunke Zhao Zhengyu Chen Zhimin Lin Wei Wang Peng Pei Xunliang Cai
formal reasoning reinforcement learning mixture of experts auto-formalization theorem proving

Key Findings

Methodology

The paper introduces a hybrid-experts iteration framework combining auto-formalization, sketching, and proving capabilities. It uses a Hierarchical Importance Sampling strategy to stabilize training on long-horizon tasks and incorporates theorem consistency and legality detection to prevent reward hacking.

Key Results

  • On MiniF2F-Test, LongCat-Flash-Prover achieved a 97.1% pass rate with only 72 inference budget per problem, significantly outperforming existing open-source models.
  • It solved 70.8% of ProverBench and 41.5% of PutnamBench, surpassing baseline models.
  • On MathOlympiad-Bench and PutnamBench, it improved Pass@32 by 25.5% and 20.3%, respectively.

Significance

LongCat-Flash-Prover sets a new benchmark for open-source models in formal reasoning, addressing instability in long-horizon tasks and significantly improving inference efficiency. This advancement is crucial for both academia and industry in formal verification and automated reasoning.

Technical Contribution

Building on existing methods, this research introduces a hybrid-experts iteration framework and Hierarchical Importance Sampling strategy, significantly enhancing training stability and inference efficiency for long-horizon tasks. The model dynamically selects appropriate tools and strategies, adapting to varying task difficulties.

Novelty

This is the first to introduce a hybrid-experts iteration framework and Hierarchical Importance Sampling strategy in formal reasoning tasks, markedly improving model efficiency and stability. Compared to existing work, it innovates in tool integration and task decomposition.

Limitations

  • In extremely complex theorem proving tasks, the model's inference efficiency still has room for improvement, potentially requiring more inference budget.
  • The model may perform poorly when handling unstructured data, needing further optimization.

Future Work

Future research could explore applying this framework to more complex reasoning tasks, optimizing tool integration strategies, and further enhancing model inference efficiency and stability. Applying this method to other formal languages is also a significant direction.

AI Executive Summary

Recent advancements in formal reasoning have highlighted its growing importance in AI. However, existing large language models struggle with formal theorem proving tasks, particularly in stability and inference efficiency for long-horizon tasks.

LongCat-Flash-Prover introduces a hybrid-experts iteration framework and Hierarchical Importance Sampling strategy, significantly enhancing performance in Lean4 formal reasoning. The model can auto-formalize informal problems, generate sketch-style proofs, and excel in complex theorem proving tasks.

Experimental results show that LongCat-Flash-Prover outperforms existing open-source models on multiple benchmarks, achieving a 97.1% pass rate on MiniF2F-Test. This progress offers new possibilities for automating and enhancing formal reasoning, driving further development in the field.

Deep Analysis

Background

Formal reasoning plays a crucial role in ensuring the reliability of software and hardware systems. With the development of large-scale language models, automating formal reasoning has become possible. However, existing models still face challenges in complex theorem proving tasks, particularly in stability and inference efficiency for long-horizon tasks.

Core Problem

Existing large language models perform poorly in formal theorem proving tasks, mainly due to instability and low inference efficiency in long-horizon tasks. Improving model inference efficiency and stability without increasing inference budget is a pressing issue.

Innovation

The proposed hybrid-experts iteration framework combines auto-formalization, sketching, and proving capabilities, significantly enhancing model inference efficiency. The Hierarchical Importance Sampling strategy allows the model to dynamically select appropriate tools and strategies, adapting to varying task difficulties.

Methodology

  • �� Auto-formalization: Transforms informal problems into formal statements.
  • �� Sketching: Generates sketch-style proofs with auxiliary lemmas.
  • �� Proving: Completes the overall proof of target theorems.
  • �� Hierarchical Importance Sampling: Optimizes training for long-horizon tasks.

Experiments

Experiments were conducted on MiniF2F-Test, ProverBench, and PutnamBench, using Pass@32 and inference budget as evaluation metrics. The superiority of LongCat-Flash-Prover was validated through comparisons with existing open-source models.

Results

On MiniF2F-Test, LongCat-Flash-Prover achieved a 97.1% pass rate with only 72 inference budget per problem. It solved 70.8% of ProverBench and 41.5% of PutnamBench, surpassing baseline models.

Applications

The model can be used for automated formal verification and complex theorem proving tasks, particularly in scenarios requiring efficient reasoning, such as software verification and security analysis.

Limitations & Outlook

Although the model performs well on multiple benchmarks, its inference efficiency still has room for improvement in extremely complex theorem proving tasks. Additionally, it may perform poorly when handling unstructured data.

Plain Language Accessible to non-experts

Imagine you're cooking in a kitchen. You have a recipe (informal problem) that needs to be turned into specific steps (formal statement). Then, you list the ingredients and tools needed (sketching), and finally, you follow the steps to complete the dish (theorem proving). LongCat-Flash-Prover acts like a smart assistant, helping you optimize each step to ensure your dish is both delicious and up to standard.

ELI14 Explained like you're 14

Imagine you're playing a puzzle game. Each puzzle is a problem you need to solve (informal problem). You need to turn it into an executable plan (formal statement) and then solve it step by step (theorem proving). LongCat-Flash-Prover is like your game guide, helping you find the fastest solution!

Glossary

Mixture-of-Experts (MoE)

A model architecture that combines multiple expert models to improve performance.

Used to enhance LongCat-Flash-Prover's reasoning capabilities.

Auto-Formalization

The process of converting informal problems into formal statements.

Used to generate verifiable formal statements.

Sketching

Generating sketch-style proofs with auxiliary lemmas.

Used to decompose complex theorem proving tasks.

Hierarchical Importance Sampling

An optimization strategy to stabilize training on long-horizon tasks.

Used to optimize LongCat-Flash-Prover's training.

Theorem Consistency

A mechanism to ensure generated proofs are consistent with the original theorem.

Used to prevent reward hacking issues.

Open Questions Unanswered questions from this research

  • 1 How to further improve inference efficiency in extremely complex theorem proving tasks?
  • 2 How to apply this method to other formal languages?

Applications

Immediate Applications

Software Verification

Automating formal verification to improve the reliability and security of software systems.

Long-term Vision

General AI

Advancing the application of formal reasoning in general AI, achieving more efficient automated reasoning.

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.

cs.AI cs.CL