AIMO-2 Winning Solution: Building State-of-the-Art Mathematical Reasoning Models with OpenMathReasoning dataset
Ivan Moshkov, Darragh Hanley, Ivan Sorokin, Shubham Toshniwal, Christof Henkel, Benedikt Schifferer, Wei Du, Igor Gitman · 2025
Read AIMO-2 Winning Solution: Building State-of-the-Art Mathematical Reasoning Models with OpenMathReasoning dataset by Ivan Moshkov, Darragh Hanley, Ivan Sorokin, Shubham Toshniwal, Christof Henkel, Benedikt Schifferer, Wei Du, Igor Gitman (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-16891.txt.
Introduction
Ivan Moshkov and co-authors described their winning entry to the second AI Mathematical Olympiad progress prize in 2025. Their recipe rests on three parts. First, they built a large set of math problems and worked solutions. Second, they taught models to mix code use with long chains of thought. Third, they trained a way to pick the best answer from many tries.
The data set holds 540 thousand problems and more than three million long solutions, plus many tool-based solutions made by repeated training and filtering. Their pick method, called GenSelect, beat simple majority voting by a clear margin. Readers get a full, open recipe for strong math reasoning models. The scale and the checks at each stage are the main lessons for other teams.
Catalog record
| CREATOR | Ivan Moshkov, Darragh Hanley, Ivan Sorokin, Shubham Toshniwal, Christof Henkel, Benedikt Schifferer, Wei Du, Igor Gitman |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 95 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2504-16891
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
AIMO-2 Winning Solution: Building State-of-the-Art Mathematical Reasoning Models with OpenMathReasoning dataset Ivan Moshkov, Darragh Hanley, Ivan Sorokin, Shubham Toshniwal, Christof Henkel, Benedikt Schifferer, Wei Du, Igor Gitman Abstract Abstract: This paper presents our winning submission to the AI Mathematical Olympiad - Progress Prize 2 (AIMO-2) competition. Our recipe for building state-of-the-art mathematical reasoning models relies on three key pillars. First, we create a large-scale dataset comprising 540K unique high-quality math problems, including olympiad-level problems, and their 3.2M long-reasoning solutions. Second, we develop a novel method to integrate code execution with long reasoning models through iterative training, generation, and quality filtering, resulting in 1.7M high-quality Tool-Integrated Reasoning solutions. Third, we create a pipeline to train models to select the most promising solution from many candidates. We show that such generative solution selection (GenSelect) can significantly improve upon majority voting baseline. Combining these ideas, we train a series of models that achieve state-of-the-art results on mathematical reasoning benchmarks. To facilitate further research, we release our code, models, and the complete OpenMathReasoning dataset under a commercially permissive license. 1 Introduction Figure 1 : Accuracy on math problems from AIME and HMMT competitions. Recent advances in large language models (LLMs) have significantly improved their ability to solve complex reasoning tasks, including olympiad-level mathematics. A key idea behind this progress has been to allow models to spend more tokens thinking about the solution before producing the final answer. Initially, models were trained to produce a series of intermediate solution steps (chain - of - thought (CoT) [ 35 ] ). More recently, long reasoning models [ 12 , 10 ] have learned to reflect on their work, exploring and refining multiple strategies within a single generation. This has led to further improvements across mathematics, coding, and scientific domains. To keep pace with this rapid development, the community has introduced increasingly challenging benchmarks and competitions that help to evaluate the progress. The AI Mathematical Olympiad - Progress Prize 2 (AIMO-2) is an initiative designed to assess advancements in this domain by challenging participants to create models capable of solving 50 difficult, national-level mathematical problems within strict computational limits. These problems were never published online, ensuring a more rigorous evaluation compared to traditional benchmarks. This report details our first-place submission to the competition, which correctly solved 34 out of 50 problems on the private test set. To develop the winning recipe, we focused on addressing several limitations of the publicly available reasoning models that we describe below. Large-scale long-reasoning dataset (§ 2 ). To improve existing models we started by collecting an extensive set of mathematical problems from the internet. We developed an LLM-based problem extraction and refinement pipeline to construct a dataset of 540K unique problems. Using this dataset, we then generated 3.2M long-reasoning CoT solutions by prompting DeepSeek-R1 [ 10 ] and QwQ-32B [ 29 ] . Training Qwen2.5-Base models [ 39 ] on this large-scale distillation data, we are able to surpass the accuracy of all other open-weight models of comparable size, except for QwQ-32B , which is slightly better than our 32B model. Tool-Integrated Reasoning (§ 3 ). To improve the results further we developed a method for integrating code execution into long-reasoning generations. Our initial attempts to elicit Tool-Integrated Reasoning (TIR) from DeepSeek-R1 and QwQ-32B through simple prompting proved unsuccessful. We hypothesize that these models struggle to deviate from their standard solution format due to extensive training on reasoning tasks and limited exposure to instruction-following. To overcome this challenge, we built a pipeline that starts with a small-scale reasoning finetuning of an instruction-following model [ 42 ] . By prompting this model to generate long-reasoning TIR solutions followed by aggressive quality filtering, we established an initial dataset suitable for training. Through multiple iterations of training, generation, and filtering, we constructed a 1.7M TIR solution set that was crucial for improving the accuracy of our final models. To make TIR more efficient, we also developed a method to accurately control the number of code executions the model is allowed to make for each generation. Generative Solution Selection (§ 4 ). A common approach to maximize model accuracy is to generate multiple candidate solutions and select the most promising one. While majority voting [ 34 ] serves as a strong baseline, its performance falls significantly short of the theoretical maximum performance of pass@k. To address this limitation, we developed a pipeline for training models to identify the most promising solution when presented with multiple candidates. We generated 566K selection examples to train our models. Although this approach showed considerable promise, we ultimately were unable to integrate it into our AIMO-2 Kaggle submission due to the competition’s strict time constraints. Combining these three innovations, we developed a series of state-of-the-art open-weight math reasoning models with 1.5B, 7B, 14B, and 32B parameters. Each model supports CoT, TIR and GenSelect inference modes when appropriately prompted. For our winning AIMO-2 submission we used an intermediate version of the 14B model and implemented various inference optimizations to accommodate the competition’s time and compute constraints. We discuss model training process and evaluation results in Section 5 and list Kaggle-specific optimizations in Section 6 . To accelerate progress in open-source mathematical reasoning, we are releasing our code, finetuned OpenMath-Nemotron models, and the complete OpenMathReasoning dataset under a commercially permissive license. 1 1 1 Data and models are available at https://huggingface.co/collections/nvidia/openmathreasoning-68072c0154a5099573d2e730 , our code is avaliable at https://github.com/NVIDIA/NeMo-Skills 2 Data Preparation In this section, we outline our validation and training data curation pipeline. Section 2.1 presents our methodology for preparing a large-scale problem set for training. Section 2.2 describes our validation set collection process. Finally, Section 2.3 details our approach to synthesizing long-reasoning Chain-of-Thought (CoT) solutions. 2.1 Problems preparation We collect a large set of mathematical problems from the Art of Problem Solving (AoPS) community forums . We include all forum discussions except “Middle School Math”, which we found to be too elementary and unhelpful for training in our preliminary experiments. After retrieving forum discussions, we implement a systematic process to extract problems and their corresponding answers. Throughout our pipeline, we utilize Qwen2.5-32B-Instruct [ 39 ] for all processing steps unless specified otherwise. 1. Problem Extraction: We prompt an LLM to identify and extract all problems from the initial forum posts (Appendix A.7 ). While most posts contain a single problem, some include multiple problems or none at all. 2. Problem Classification: Each extracted problem is classified into the following categories. We use an LLM to perform the classification: • Proof problem or not (Appendix A.4 ) • Multiple choice question or not (Appendix A.3 ) • Binary question (yes-or-no answer) or not (Appendix A.1 ) • Valid problem or not (Appendix A.2 ) 2 2 2 E.g. problems that are lacking context or referring to other problems are considered invalid. We remove all multiple-choice questions, binary questions, and invalid problems from the final dataset. 3. Question Transformation: For proof questions, we convert them into answer-based questions that require similar problem-solving techniques (Appendix A.5 ). 4. Answer Extraction: For non-proof questions, we attempt to extract the final answer from the forum discussions (Appendix A.6 ) 3 3 3 We do not try to extract the full solution, just the final answer. .