Large Language Models (LLMs) have recently demonstrated remarkable capabilities in solving high-school Olympiad-level mathematics. However, their performance drops precipitously when applied to undergraduate-level domains like mathematical optimization. OptProver is a novel formal theorem-proving model designed to bridge this gap. By combining expert iteration with a specialized "utility-aware" preference learning strategy, OptProver achieves state-of-the-art success rates on optimization proofs while avoiding the catastrophic forgetting that typically plagues domain-specific fine-tuning.
The Challenge: Moving Beyond Olympiad Math
Optimization is the mathematical backbone of machine learning, operations research, and scientific computing. Proving theorems in this space requires specialized formalisms—such as convexity, KKT optimality conditions, and algorithmic convergence analysis. Existing provers face three primary hurdles when attempting to master these concepts:
- Distribution Shift: The syntax, definitions, and logical structures in optimization libraries (such as Lean 4’s Optlib) differ drastically from general mathematics.
- Catastrophic Forgetting: When models are fine-tuned on optimization data, they frequently lose the foundational, general reasoning skills acquired from Olympiad math training.
- The "Stagnant Tactic" Problem: During proof searches, models often propose steps that are syntactically valid but strategically useless. These steps satisfy the proof checker but lead the search tree into a dead end, wasting computational resources.
The OptProver Methodology
To overcome these challenges, researchers developed a multi-stage pipeline to transform a strong general prover (BFS-Prover-V2-7B) into OptProver. The methodology is anchored by three key innovations:
- Large-Scale Self-Distillation: Rather than relying solely on static textbook proofs, the pipeline uses the model to "re-discover" proofs within Mathlib (Lean's massive mathematical library). This translates static knowledge into the model’s own active "tactic language."
- Utility-Aware Preference Optimization (UAPO): Standard training often treats any valid proof step as a success. UAPO introduces a more nuanced, three-tier utility scale:
- Proven: Steps that actively advance the proof toward a solution.
- Stagnant: Steps that are syntactically valid but lead to dead ends (which are explicitly penalized).
- Invalid: Steps with syntax or logical errors (also penalized).
- Perplexity-Weighted DPO (PW-DPO): To stabilize the training process, updates are weighted based on token-level perplexity. If the reference model is highly "confused" by a token, the gradient update is down-weighted. This prevents noisy updates from degrading the model's foundational reasoning skills.
Datasets and Benchmarks
Rigorous evaluation required the curation of several specialized datasets:
- Dbook: Formalized versions of classic mathematical textbooks, including Rockafellar’s Convex Analysis and Tao’s Real Analysis.
- Dpro: Approximately 7,000 problems translated from natural language into Lean 4.
- OptBench (New): A novel benchmark comprising 400 undergraduate optimization problems, categorized into Basics, Convexity, and Algorithm Analysis.
- General Benchmarks: The model was also evaluated on MiniF2F (Olympiad math) and ProofNet (undergraduate math) to test for robustness and knowledge retention.
Key Insights
The development of OptProver yielded several broader insights into how LLMs handle formal logic:
- The Low-Perplexity Trap: A model can exhibit low perplexity (high linguistic fluency) on a dataset while remaining entirely incapable of proving theorems. This decoupling of linguistic prediction and logical utility explains why standard fine-tuning often fails in formal logic.
- Stagnant Tactics as "Search Sinks": In a search tree, a valid but unhelpful step is a computational disaster. Explicitly penalizing these "correct but useless" steps was a major driver of OptProver's performance.
- Step-Level vs. Whole-Proof Generation: The research reinforces that "step-level" proving—where the model interacts with the Lean verifier line-by-line—is vastly superior to generating whole proofs at once for complex undergraduate math. Interaction allows the model to detect and recover from early mistakes.
Results
OptProver sets a new state-of-the-art for its size class (7B parameters) in the optimization domain:
- OptBench Performance: The model achieved a 55.25% Pass@32 success rate, a massive improvement over the base model's 32%.
- Outperforming Larger/Whole-Proof Models: It significantly outperformed whole-proof models like DeepSeek-Prover-V2-7B, which achieved only ~14% on the same benchmark.
- No Catastrophic Forgetting: On the general MiniF2F benchmark, OptProver maintained parity with its base model. Furthermore, it actually improved performance on ProofNet (solving 31 problems at Pass@1, up from 21), demonstrating that learning optimization concepts positively transfers to general undergraduate reasoning.
Limitations and Future Directions
While OptProver represents a significant leap forward, the authors note a few remaining challenges. Formalized optimization data remains scarce compared to general mathematics, limiting the ceiling of supervised fine-tuning. Additionally, very long proofs (100+ lines) remain difficult due to the exponential growth of the search tree. Finally, the model's skills are currently tied to the Lean 4 ecosystem; porting these capabilities to other proof assistants like Coq or Isabelle would require substantial new data curation efforts.
Summary updated