AIMO-2 Winning Solution: OpenMathReasoning | Summary
23 Apr 2025 | Paper Review Mathematical Reasoning Tool-Integrated Reasoning DatasetContents
This review covers the archived arXiv:2504.16891v1 paper by Ivan Moshkov and colleagues, published on 23 April 2025. The authors describe the data and training recipe behind their AIMO-2 submission and the later OpenMath-Nemotron models. Project, code.
Source and license. This article summarizes AIMO-2 Winning Solution: Building State-of-the-Art Mathematical Reasoning Models with OpenMathReasoning dataset, arXiv:2504.16891v1 by Ivan Moshkov, Darragh Hanley, Ivan Sorokin, Shubham Toshniwal, Christof Henkel, Benedikt Schifferer, Wei Du, and Igor Gitman. The arXiv record lists the paper under CC BY 4.0. The images below are crops from the cited version's PDF: Figure 1 (PDF p. 1), Table 1 (PDF p. 3), Table 2 (PDF p. 3), Figure 2 (PDF p. 6), Figure 3 (PDF p. 7), Table 7 (PDF p. 9), Table 9 (PDF p. 10), and Table 10 (PDF p. 10).
Summary
- The authors report a first-place AIMO-2 entry that solved 34 of 50 private-test problems. This is the paper’s report, not an independently reproduced contest result. [PDF pp. 1–2, 8]
- OpenMathReasoning is reported as 540K unique problems, 3.2M long chain-of-thought (CoT) solutions, and 1.7M tool-integrated reasoning (TIR) solutions. TIR lets a model interleave reasoning with code execution. [PDF pp. 1–2, 4–5]
- Generative solution selection, or GenSelect, trains a model to compare candidate solutions and choose an answer. It is distinct from majority voting and was not used in the authors’ Kaggle submission. [PDF pp. 5–6, 8]
- The competition model was an earlier 14B checkpoint; the later OpenMath-Nemotron family and its benchmark scores must not be treated as the exact system that earned 34/50. The paper also gives different counts for retained GenSelect examples: 565K in Section 4.2 and 566K in the conclusion. [PDF pp. 6, 8, 12]
1. Introduction
The paper addresses two difficulties in mathematical reasoning: obtaining sufficient problems with useful solution traces, and selecting a reliable answer when several generated solutions disagree. Its three contributions are the OpenMathReasoning collection, a method for generating and filtering reasoning with code execution, and a learned selection procedure. The released model family is evaluated after the competition-specific submission; that timing matters when interpreting results. [PDF pp. 1–2]
The chart compares reported AIME and HMMT accuracy across model sizes and reasoning modes; the stacked colors distinguish CoT, TIR and self GenSelect results.
2. Data Preparation
2.1 Problems preparation
The authors begin with forum discussions and use a sequence of extraction, classification, filtering, answer extraction, and decontamination steps. They remove invalid, binary, and multiple-choice questions and transform selected proof problems into questions suitable for answer-based checking. Table 1 traces the pipeline from 620K discussions to 540K problems; Table 2 describes the resulting collection. The filters depend on generated or inferred judgments, so the reported size alone does not establish that every retained problem and answer is correct. [PDF pp. 2–3]
The reported pipeline narrows 620K forum discussions to 540K problems after extraction, filtering and benchmark decontamination.
The final collection contains 260K converted proofs, 190K problems with extracted answers and 90K without extracted answers.
2.2 Comp-Math-24-25 Benchmark
For validation, the authors assemble 256 problems from AIME 2024 and 2025 and HMMT 2024 and 2025. They choose these sources for similarity to AIMO-2 and exclude proof and partial-credit problems. This benchmark is a local evaluation set; it is not the competition’s private test set. [PDF p. 3]
2.3 Text-based Solution Synthesis
DeepSeek-R1 and QwQ-32B generate up to 32 candidate CoT solutions per problem. The pipeline filters candidates using an extracted expected answer where available or a majority-derived answer when no answer was extracted. The paper reports 3.2M filtered CoT solutions. Majority-derived labels can inherit shared errors, so this filtering step should not be read as an independent proof of every answer. [PDF pp. 3–4]
3. Tool-Integrated Reasoning
TIR combines a language model’s reasoning text with executable code and observed outputs. The authors report that simply prompting their initial reasoning models did not reliably produce useful tool use. Their alternative repeatedly trains a model on TIR examples, generates more candidates, and filters them. [PDF pp. 4–5]
3.1 Instruction-following reasoning model
The initial stage fine-tunes an instruction-following model on a small set of reasoning examples, then uses it to generate initial TIR candidates. This stage is a starting point for the iterative process rather than a claim that all later examples came from one generation pass. [PDF p. 4]
3.2 Filtering TIR data
The filters assess both solution correctness and whether code contributes materially to the solution. A code block used only for a trivial check is not equivalent to one that performs a useful intermediate computation. These quality decisions themselves depend on the paper’s filtering procedure. [PDF pp. 4–5]
3.3 Iterative data generation
The authors repeat generation, filtering, and training, eventually reporting 1.7M TIR solutions. This number describes the released data collection, not the 15K stage-0 TIR examples used in the competition-specific training recipe. [PDF pp. 5, 8]
3.4 Controlling code blocks
To control execution budget, training examples include notices about the remaining number of calls, and over-limit generations are filtered. This teaches a model to work within a stated limit; it does not guarantee that arbitrary generated code is safe or correct. [PDF p. 5]
4. Generative Solution Selection
Majority voting selects the answer appearing most often among candidates. GenSelect instead asks a trained model to compare candidate solutions and choose a promising answer. Its effectiveness depends on both the candidate set and the selection model; selection cannot recover a correct answer if none of the candidates contains one. [PDF pp. 5–6]
4.1 Creating New Summaries
The authors regenerate concise summaries of candidate solutions because some reasoning-model completions end too tersely to support comparison. These summaries are comparison inputs, not independent demonstrations that the underlying solutions are valid. [PDF p. 5]
4.2 Generating Selection Candidates
The pipeline forms groups with correct and incorrect candidates, generates selections and associated reasoning, and filters traces that choose an incorrect solution. Section 4.2 reports 565K retained traces. The conclusion reports 566K, and the paper does not resolve the difference in the passages reviewed here. [PDF pp. 6, 12]
4.3 Reducing computational cost
Using regenerated summaries reduces the amount of text the selector must compare. The authors report instability when comparing more than 32 candidates because of prompt limits. Figure 2 compares selection with majority and pass metrics, while Figure 3 depicts the data-generation pipeline. [PDF pp. 6–7]
The plots compare pass, GenSelect and majority accuracy as the number of sampled solutions increases for 14B CoT and TIR models.
The pipeline samples correct and incorrect solution summaries, selects a solution, filters reasoning traces and summarizes retained traces for GenSelect training.
5. OpenMath-Nemotron models
The paper describes model families with 1.5B, 7B, 14B, and 32B parameters and variants trained for CoT, TIR, or selection. A parameter count identifies model size, not a measurement of its correctness or computational cost by itself. [PDF pp. 6–7]
5.1 Training
The authors apply supervised fine-tuning and a second training pass emphasizing harder, longer problems. Table 6 reports majority@64 outcomes after the first and second rounds. These are comparisons in the authors’ setup; they do not isolate every effect of data, model size, and training duration. [PDF pp. 6–7]
The first round trains for 6 epochs on a mixture of CoT, TIR, and GenSelect tasks, with a distinct prompt for each mode. The paper describes 5.5M training samples: 3.2M CoT, 1.7M TIR, and 566K GenSelect. The second round uses a 2.2M harder, longer subset for 4 epochs and is applied to all sizes except 32B. In Table 6, CoT results generally improve while TIR results remain comparable or decline slightly; this is an observation from the reported runs. The 566K figure here differs from the 565K count in Section 4.2, as noted above. [PDF p. 7]
5.2 Results
Table 7 reports pass@1 followed by majority@64 in parentheses. In its AIME24 column, OpenMath-Nemotron-14B CoT is reported at 76.3 pass@1 and 83.3 majority@64. Separately, the rows under 14B TIR report 86.7 with self GenSelect and 90.0 with 32B GenSelect. Those selection scores must not be attributed to the CoT row. The paper describes LLM judging for HLE-Math and HMMT, and its benchmark results were not independently reproduced for this review. [PDF pp. 7, 9]
Table 8 defines a solution as unfinished when its 32K-token generation contains no \boxed answer. Under that definition, the 1.5B model has 2.23% unfinished CoT solutions versus 40.31% with TIR; for 7B the values are 0.98% and 6.45%, and for 14B they are 1.13% and 4.06%. The authors suggest that smaller models may use tools less consistently, but present that explanation as a hypothesis. These unfinished rates help interpret the comparison between pass@1 and majority voting; the criterion does not separately diagnose every cause of failure. [PDF pp. 8, 10]
The table reports mathematical benchmark scores across models and modes. Its caption distinguishes pass@1 from majority@64 and describes GenSelect and LLM judging.
6. Kaggle submission
The competition entry used an earlier Qwen2.5-14B model and a distinct training and serving recipe. The authors report training on 2.2M CoT examples and 15K stage-0 TIR samples, then merging CoT and TIR checkpoints. They explicitly state that GenSelect was not used in the Kaggle submission. [PDF p. 8]
6.1 Training recipe
The contest recipe trains the CoT and TIR modes using the competition-specific mixture described above. Its data composition and checkpoint are separate from the later model family. [PDF p. 8]
The authors first train Qwen2.5-14B-Base for 8 epochs on 2.2M CoT solutions, using only DeepSeek-R1 solutions and excluding converted proofs. They then fine-tune on 15K stage-0 TIR samples for 400 steps at a constant learning rate of 1e-5, taking the last checkpoint without averaging. This recipe should not be conflated with the later 5.5M mixed-task training run. [PDF p. 8]
6.2 Model Merging
The authors combine the CoT and TIR checkpoints to obtain a single model. They note that this model could not switch modes by prompt in the manner of their later model family. The contest outcome therefore cannot be used as a direct evaluation of the later GenSelect system. [PDF p. 8]
6.3 Inference Optimizations
The submission uses TensorRT-LLM, ReDrafter, serving and time-allocation choices, and sandboxed code execution to fit the contest’s operational constraints. Tables 9 and 10 give speed, accuracy, and merged-model comparisons. A speed result in that configuration does not establish the same performance on other hardware. [PDF pp. 8–10]
6.3.1 TensorRT-LLM Optimization
TensorRT-LLM uses in-flight batching so completed samples can leave a batch independently, alongside optimizations such as paged KV caching. The authors report prioritizing W8A16 weight-only and FP8 quantization for faster inference with minimal accuracy loss in their comparison; this is a speed and accuracy tradeoff rather than a guarantee for other deployments. [PDF p. 9]
6.3.2 Speculative Decoding
The ReDrafter model proposes up to 3 tokens per step, and the paper reports that all 3 were accepted in approximately 65% of steps. It was trained on one target-model solution for each of 100K sampled OpenMathReasoning problems. The final submission used a near-greedy setting; the authors note that outputs still varied within identical-prompt batches and present numerical accumulation only as a possible explanation. [PDF pp. 9–10]
6.3.3 Model Serving
The FastAPI backend and Nemo-Skills asynchronous generation supported time limits and early stopping. In the authors’ example, a batch of 16 generations could stop the rest after the first 4–5 completions agreed on an answer; long-running stragglers could also be cancelled. This policy can save time, but agreement among early outputs does not itself prove correctness. [PDF p. 10]
6.3.4 Time Management
Each question received a 350-second base allocation. Unused time entered a shared buffer, from which a later question could draw up to 210 additional seconds, for a maximum of 560 seconds. These are competition-specific limits, not model latency measurements. [PDF p. 10]
6.3.5 Code Execution Integration
The tool wrapper used a Flask sandbox for parallel Python execution, with at most 6 code calls per generation cycle, a 2-second timeout per call, and only the first 200 output characters returned to the model. Execution results or errors were fed back into generation. These safeguards describe the authors’ implementation and do not establish safety for arbitrary generated code. [PDF p. 10]
The reported speed and AIME scores compare optimization methods on four L4 GPUs. The caption states that scores are majority@12 averaged over five runs on the merged model.
The table compares CoT, TIR and the combined checkpoint on Comp-Math-24-25, including accuracy, average output length and average code executions.
6.4 Discussion
The authors discuss leaderboard variability, differences between local evaluations and contest performance, and longer generations from final models as possible explanations for why later models did not improve the competition score. These are explanations considered by the authors, not experimentally established causes. [PDF p. 11]
7. Related Work
The related-work section places the approach alongside tool-integrated mathematical reasoning, generative reward or selection models, and public mathematics datasets. Its comparison provides context for the individual components; it does not establish that one component alone caused the final contest result. [PDF pp. 11–12]
8. Conclusion
The paper presents a data pipeline and model family for long mathematical reasoning with code execution and candidate selection. Its most direct contest evidence is the authors’ reported 34/50 score for an earlier, separate submission. Later benchmark results, data counts, and candidate-selection experiments support a broader research account but are not a replacement for independent replication. [PDF pp. 8, 12]
Appendix
Appendices A through D give prompts for problem preparation, TIR generation and evaluation, inference, and GenSelect data; Appendix D continues onto PDF page 37. Appendices E and F include a regenerated-summary example and TIR output examples. The archived PDF is the source of the page references in this review. [PDF pp. 16–39]
Brief Thoughts
The useful distinction is between generating many plausible reasoning traces and testing whether code use and answer selection improve reliability. The paper makes both stages concrete, but its data and evaluation pipeline includes model judgments, and some results are not independently audited here. Future reproduction should check the underlying examples, evaluation procedure, and the unresolved 565K versus 566K count before drawing stronger conclusions.