{
  "id": 704412,
  "title": "7th  Place Solution for the AIMO3 Competition",
  "content": "<p>The AI Mathematical Olympiad - Progress Prize 3 is a challenging competition that encourages participants to develop open-source AI systems capable of solving high-level mathematical reasoning problems. For me, this competition was not only a leaderboard challenge, but also a valuable opportunity to study how modern large language models reason, fail, recover, and improve under different inference strategies.</p>\n<p>My solution is built upon a strong public baseline notebook, and my main goal was to test and reflect on related approaches, conduct several experimental attempts, and gradually identify the strategy that I considered the most suitable. In particular, I focused on prompt design, response analysis, answer extraction, and inference-time aggregation, hoping to better understand how small changes in reasoning guidance and sampling behavior can influence the final performance. I hope that sharing my observations and research can provide some value to the community.</p>\n<h1>1.Overview</h1>\n<p>My solution is based on the strong public baseline notebook shared by Andreas Bisiadis and Parthenos.</p>\n<p>This solution is mainly an inference-time optimization attempt. No additional training or fine-tuning is used. The goal is to make a large open-weight language model solve AIMO3 mathematical problems as reliably as possible under the fixed competition time budget, with final answers in the range [0, 99999].\nThe pipeline at a high level:</p>\n<ul>\n<li>Use GPT-OSS 120B as the main reasoning model</li>\n<li>Use a concise IMO-style prompt with strict boxed-answer format</li>\n<li>For each problem, run up to 8 independent reasoning attempts</li>\n<li>Allow the model to use Python tools for calculation and verification</li>\n<li>Extract valid integer answers from \\boxed{}</li>\n<li>Aggregate answers with simple inverse-entropy weighting</li>\n<li>Use frequency-based early stopping to save inference time</li>\n<li>Control the per-problem budget under the global notebook time limit</li>\n</ul>\n<p>The final version favors simplicity and stability. I tested more complex prompt and entropy variants, but the submitted version kept the components that were easier to interpret and more stable in my submissions.</p>\n<h1>2. Details of the Submission</h1>\n<h2>2.1 Main Focus</h2>\n<p>My submission mainly explores two practical questions:</p>\n<ul>\n<li>How does prompt complexity affect mathematical reasoning performance, and is a highly structured prompt necessarily better than a concise task-focused prompt?</li>\n<li>How should multiple generated answers be aggregated under the competition time limit, especially when comparing simple entropy-weighted aggregation with more complex entropy-based strategies?</li>\n</ul>\n<h3>2.1.1 Prompt Complexity vs. Stability</h3>\n<p>One practical question I explored was how prompt design can help the model avoid common mistakes in mathematical reasoning. In olympiad-style problems, a wrong answer is often not caused by a complete lack of relevant knowledge, but by smaller failures during the reasoning process: choosing a solution path too early, making arithmetic or algebraic mistakes, overlooking constraints, ignoring boundary cases, or failing to verify the final result.</p>\n<p>Inspired by Parthenos's five-step protocol — UNDERSTAND, EXPLORE, PLAN, EXECUTE, and VERIFY — I tested a more complex prompting strategy in some experimental versions.  These prompts encouraged the model to follow a more deliberate problem-solving process: first understand the problem, then explore possible strategies, make a plan, execute the solution, and finally verify the result. I also added reminders to check arithmetic, test special cases, consider constraints, and use Python for calculations or verification when appropriate. The goal was not to teach the model new mathematics, but to make its reasoning process less careless and more self-checking.</p>\n<p>In practice, longer prompts introduced extra instructions and did not always give a stable advantage. They also consumed more context and sometimes made the reasoning process less direct. Therefore, in the final version, I chose a simpler prompt that focused on the most important constraints: the model should act as a strong olympiad-level solver, the answer must be a non-negative integer in the required range, and the final answer must be placed inside \\boxed{}.</p>\n<pre><code>system_prompt = (\n    'You are a world-class International Mathematical Olympiad (IMO) competitor. '\n    'The final answer must be a non-negative integer between 0 and 99999. '\n    'You must place the final integer answer inside \\\\boxed{}. '\n)\n\ntool_prompt = (\n    'Use this tool to execute Python code. '\n    'The environment is a stateful Jupyter notebook. '\n    'You must use print() to output results.'\n)\n\npreference_prompt = (\n    'You have access to math, numpy and sympy to solve the problem.'\n)\n</code></pre>\n<p>This choice reflects a balance between guidance and simplicity. The prompt provides the essential task framing and output constraints, while Python tool usage, multiple independent attempts, answer extraction, and entropy-weighted aggregation handle much of the practical reliability. In this way, prompt design helped reduce common errors mainly by clarifying the task, enforcing the answer format, and encouraging a careful mathematical-solving mindset, without making the final system overly complicated.</p>\n<p>I should note that this was not a rigorous ablation study of prompt engineering. Rather, it was a practical exploration during the competition, and the final prompt was selected because it was simple, stable, and consistent with the rest of the inference pipeline.</p>\n<table>\n<thead>\n<tr>\n<th>Prompt Strategy</th>\n<th>Main Design</th>\n<th>Entropy Strategy Setting</th>\n<th>Number of Submissions</th>\n<th>Public LB Score Range</th>\n<th>Observation</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Final submitted prompt</td>\n<td>Short and direct prompt focusing on IMO-level role, valid answer range, and boxed-answer format</td>\n<td>Same entropy strategy: simple inverse-entropy weighting</td>\n<td>6</td>\n<td>36–40<br>(Scored 40 twice)</td>\n<td>More stable in practice and better aligned with the rest of the inference pipeline</td>\n</tr>\n<tr>\n<td>More structured error-aware prompt</td>\n<td>Explicitly guides the model through understanding, exploration, planning, execution, and verification</td>\n<td>Same entropy strategy: simple inverse-entropy weighting</td>\n<td>6</td>\n<td>35–39</td>\n<td>Helpful in principle, but did not show a stable advantage in my submissions</td>\n</tr>\n</tbody>\n</table>\n<p>Based on these submission results, I finally chose the shorter prompt for the final submission. Although the more structured prompt was designed to reduce common reasoning errors, such as premature conclusions, missed constraints, and insufficient verification, it did not provide a consistently better leaderboard result in my tests. One possible reason is that a longer prompt introduces more instructions for the model to follow, which may consume context, make the reasoning process less direct, and increase sensitivity to sampling randomness. In contrast, the shorter prompt kept only the most important constraints and worked more smoothly with the rest of the system, including Python tool use, multiple independent attempts, answer extraction, and entropy-weighted aggregation.</p>\n<h3>2.1.2 Entropy-Based Answer Aggregation</h3>\n<p>In addition to the simple inverse-entropy weighting strategy, I also tested a more complex entropy metric inspired by Parthenos. Instead of using only the mean entropy of generated tokens, this variant tried to model several aspects of reasoning confidence: the average uncertainty level, the confidence of later tokens closer to the final answer, the variance of entropy across the reasoning process, the proportion of sustained high-entropy tokens, and the existence of long low-entropy streaks.</p>\n<p>Although the complex entropy metric was more expressive, I finally selected the simpler inverse-entropy weighting strategy for the final submission. The main reason was robustness. The complex metric introduced several hand-designed components and hyperparameters, such as the position decay factor, high-entropy threshold, low-entropy threshold, and the weights of each component. With only a limited number of leaderboard submissions and a small number of attempts per problem, these extra choices were difficult to tune reliably.</p>\n<table>\n<thead>\n<tr>\n<th>Aggregation Strategy</th>\n<th>Same Prompt Setting</th>\n<th>Main Idea</th>\n<th>Number of Submissions</th>\n<th>Public LB Score Range</th>\n<th>Observation</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Simple inverse-entropy weighting</td>\n<td>Yes</td>\n<td>Use mean token entropy as an uncertainty signal, then weight each valid answer by 1 / entropy</td>\n<td>6</td>\n<td>36–40<br>(Scored 40 twice)</td>\n<td>Simple, stable, and easy to interpret</td>\n</tr>\n<tr>\n<td>More complex entropy metric</td>\n<td>Yes</td>\n<td>Combine mean entropy, position-weighted entropy, entropy variance, high-entropy penalty, and low-entropy streak reward</td>\n<td>3</td>\n<td>36–39</td>\n<td>More expressive, but did not show a stable advantage</td>\n</tr>\n</tbody>\n</table>\n<p>In addition, token-level entropy is only an approximate confidence signal. A more complicated transformation of this signal may amplify noise rather than provide better calibration. In my tests, the complex strategy achieved scores in the range of 36–39, while the simpler strategy achieved 36–40. Therefore, I did not observe a sufficiently stable advantage from the complex variant. I chose the simple inverse-entropy method because it was easier to interpret, less dependent on tuning, and more consistent with the practical constraints of the competition.</p>\n<h2>2.2 What Was Tried and Limitations</h2>\n<p>During development, I also explored several practical variants that were not selected for the final submission:</p>\n<ul>\n<li>Longer Per-Problem Budget: Giving each problem more time could help difficult cases, but it risked consuming too much time early and hurting later problems. I therefore kept a dynamic budget strategy.</li>\n<li>More Aggressive Early Stopping: Stopping earlier after repeated answers can save time, but it may also lock in a repeated wrong answer. I kept early stopping conservative and used it mainly for efficiency.</li>\n<li>More Extensive Parameter Tuning: I considered broader tuning of temperature, min_p, and timeout settings, but leaderboard feedback and compute resources were limited. The final settings were chosen for practical stability rather than theoretical optimality.\nOverall, these attempts suggested that more computation or more aggressive control rules do not always improve performance. Under the competition constraints, I preferred a simpler and more stable configuration.</li>\n</ul>\n<p>Because of the limited number of submissions and other practical constraints, my prompt exploration was not exhaustive. I still believe that better prompt designs could potentially bring meaningful improvements. However, among the variants I actually tested, the alternative prompts did not show a clear performance gain. Therefore, my final choice was based on empirical testing and the actual scores observed in practice.</p>\n<h1>3. Hardware &amp; Runtime</h1>\n<table>\n<thead>\n<tr>\n<th>Item</th>\n<th>Detail</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>GPU</td>\n<td>1× H100 80GB</td>\n</tr>\n<tr>\n<td>Model</td>\n<td>GPT-OSS 120B, FP8 KV-cache, up to 81,920 context tokens</td>\n</tr>\n<tr>\n<td>Attempts per problem</td>\n<td>8 parallel attempts</td>\n</tr>\n<tr>\n<td>Jupyter kernels</td>\n<td>16 persistent Jupyter kernels</td>\n</tr>\n<tr>\n<td>Avg time per problem</td>\n<td>~300–400 seconds</td>\n</tr>\n<tr>\n<td>Total runtime (50 problems)</td>\n<td>~4–5 hours</td>\n</tr>\n<tr>\n<td>Training</td>\n<td>None</td>\n</tr>\n</tbody>\n</table>\n<h1>4. Conclusion and Acknowledgements</h1>\n<p>I would like to sincerely thank Kaggle and the host team for organizing this challenging and inspiring competition. I am also deeply grateful to the outstanding contributors in the community, especially Andreas Bisiadis, parthenos, and many others who shared strong notebooks, thoughtful discussions, and detailed write-ups. Their work provided valuable references for my own testing, reflection, and improvement. I have deep respect for their contributions, and I hope that sharing my observations and research can provide some value to the community.</p>\n<h2>Reference</h2>\n<ul>\n<li>Andreas Bisiadis<a href=\"https://www.kaggle.com/code/andreasbis/aimo-3-gpt-oss-120b-with-tools\" target=\"_blank\">Link to Kaggle Code</a></li>\n<li>parthenos<a href=\"https://www.kaggle.com/code/nihilisticneuralnet/44-50-let-me-over-cook\" target=\"_blank\">Link to Kaggle Code</a></li>\n<li>parthenos<a href=\"https://www.kaggle.com/code/nihilisticneuralnet/43-50-aimo-3-gpt-oss-120b-weighted-entropy\" target=\"_blank\">Link to Kaggle Code</a></li>\n<li>vLLM: Kwon et al. (2023), PagedAttention, SOSP 2023</li>\n<li>SymPy: exact symbolic computation: <a href=\"https://www.sympy.org/en/index.html\" target=\"_blank\">https://www.sympy.org/en/index.html</a></li>\n</ul>\n<h2>Competition Link</h2>\n<ul>\n<li>Competition overview page: <a href=\"https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3/overview\" target=\"_blank\">Link</a></li>\n<li>Competition data page: <a href=\"https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3/data\" target=\"_blank\">Link</a></li>\n</ul>\n<p><em>Thanks to Parthenos and Andreas Bisiadis for openly sharing the base notebook, to the AIMO competition organizers for hosting the competition, and to the Kaggle community for the valuable discussions and contributions.</em></p>",
  "comments": [],
  "comment_count": 0,
  "messages": [
    {
      "id": 3466678,
      "postDate": "2026-06-04T13:37:54.543Z",
      "content": "<p>The AI Mathematical Olympiad - Progress Prize 3 is a challenging competition that encourages participants to develop open-source AI systems capable of solving high-level mathematical reasoning problems. For me, this competition was not only a leaderboard challenge, but also a valuable opportunity to study how modern large language models reason, fail, recover, and improve under different inference strategies.</p>\n<p>My solution is built upon a strong public baseline notebook, and my main goal was to test and reflect on related approaches, conduct several experimental attempts, and gradually identify the strategy that I considered the most suitable. In particular, I focused on prompt design, response analysis, answer extraction, and inference-time aggregation, hoping to better understand how small changes in reasoning guidance and sampling behavior can influence the final performance. I hope that sharing my observations and research can provide some value to the community.</p>\n<h1>1.Overview</h1>\n<p>My solution is based on the strong public baseline notebook shared by Andreas Bisiadis and Parthenos.</p>\n<p>This solution is mainly an inference-time optimization attempt. No additional training or fine-tuning is used. The goal is to make a large open-weight language model solve AIMO3 mathematical problems as reliably as possible under the fixed competition time budget, with final answers in the range [0, 99999].\nThe pipeline at a high level:</p>\n<ul>\n<li>Use GPT-OSS 120B as the main reasoning model</li>\n<li>Use a concise IMO-style prompt with strict boxed-answer format</li>\n<li>For each problem, run up to 8 independent reasoning attempts</li>\n<li>Allow the model to use Python tools for calculation and verification</li>\n<li>Extract valid integer answers from \\boxed{}</li>\n<li>Aggregate answers with simple inverse-entropy weighting</li>\n<li>Use frequency-based early stopping to save inference time</li>\n<li>Control the per-problem budget under the global notebook time limit</li>\n</ul>\n<p>The final version favors simplicity and stability. I tested more complex prompt and entropy variants, but the submitted version kept the components that were easier to interpret and more stable in my submissions.</p>\n<h1>2. Details of the Submission</h1>\n<h2>2.1 Main Focus</h2>\n<p>My submission mainly explores two practical questions:</p>\n<ul>\n<li>How does prompt complexity affect mathematical reasoning performance, and is a highly structured prompt necessarily better than a concise task-focused prompt?</li>\n<li>How should multiple generated answers be aggregated under the competition time limit, especially when comparing simple entropy-weighted aggregation with more complex entropy-based strategies?</li>\n</ul>\n<h3>2.1.1 Prompt Complexity vs. Stability</h3>\n<p>One practical question I explored was how prompt design can help the model avoid common mistakes in mathematical reasoning. In olympiad-style problems, a wrong answer is often not caused by a complete lack of relevant knowledge, but by smaller failures during the reasoning process: choosing a solution path too early, making arithmetic or algebraic mistakes, overlooking constraints, ignoring boundary cases, or failing to verify the final result.</p>\n<p>Inspired by Parthenos's five-step protocol — UNDERSTAND, EXPLORE, PLAN, EXECUTE, and VERIFY — I tested a more complex prompting strategy in some experimental versions.  These prompts encouraged the model to follow a more deliberate problem-solving process: first understand the problem, then explore possible strategies, make a plan, execute the solution, and finally verify the result. I also added reminders to check arithmetic, test special cases, consider constraints, and use Python for calculations or verification when appropriate. The goal was not to teach the model new mathematics, but to make its reasoning process less careless and more self-checking.</p>\n<p>In practice, longer prompts introduced extra instructions and did not always give a stable advantage. They also consumed more context and sometimes made the reasoning process less direct. Therefore, in the final version, I chose a simpler prompt that focused on the most important constraints: the model should act as a strong olympiad-level solver, the answer must be a non-negative integer in the required range, and the final answer must be placed inside \\boxed{}.</p>\n<pre><code>system_prompt = (\n    'You are a world-class International Mathematical Olympiad (IMO) competitor. '\n    'The final answer must be a non-negative integer between 0 and 99999. '\n    'You must place the final integer answer inside \\\\boxed{}. '\n)\n\ntool_prompt = (\n    'Use this tool to execute Python code. '\n    'The environment is a stateful Jupyter notebook. '\n    'You must use print() to output results.'\n)\n\npreference_prompt = (\n    'You have access to math, numpy and sympy to solve the problem.'\n)\n</code></pre>\n<p>This choice reflects a balance between guidance and simplicity. The prompt provides the essential task framing and output constraints, while Python tool usage, multiple independent attempts, answer extraction, and entropy-weighted aggregation handle much of the practical reliability. In this way, prompt design helped reduce common errors mainly by clarifying the task, enforcing the answer format, and encouraging a careful mathematical-solving mindset, without making the final system overly complicated.</p>\n<p>I should note that this was not a rigorous ablation study of prompt engineering. Rather, it was a practical exploration during the competition, and the final prompt was selected because it was simple, stable, and consistent with the rest of the inference pipeline.</p>\n<table>\n<thead>\n<tr>\n<th>Prompt Strategy</th>\n<th>Main Design</th>\n<th>Entropy Strategy Setting</th>\n<th>Number of Submissions</th>\n<th>Public LB Score Range</th>\n<th>Observation</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Final submitted prompt</td>\n<td>Short and direct prompt focusing on IMO-level role, valid answer range, and boxed-answer format</td>\n<td>Same entropy strategy: simple inverse-entropy weighting</td>\n<td>6</td>\n<td>36–40<br>(Scored 40 twice)</td>\n<td>More stable in practice and better aligned with the rest of the inference pipeline</td>\n</tr>\n<tr>\n<td>More structured error-aware prompt</td>\n<td>Explicitly guides the model through understanding, exploration, planning, execution, and verification</td>\n<td>Same entropy strategy: simple inverse-entropy weighting</td>\n<td>6</td>\n<td>35–39</td>\n<td>Helpful in principle, but did not show a stable advantage in my submissions</td>\n</tr>\n</tbody>\n</table>\n<p>Based on these submission results, I finally chose the shorter prompt for the final submission. Although the more structured prompt was designed to reduce common reasoning errors, such as premature conclusions, missed constraints, and insufficient verification, it did not provide a consistently better leaderboard result in my tests. One possible reason is that a longer prompt introduces more instructions for the model to follow, which may consume context, make the reasoning process less direct, and increase sensitivity to sampling randomness. In contrast, the shorter prompt kept only the most important constraints and worked more smoothly with the rest of the system, including Python tool use, multiple independent attempts, answer extraction, and entropy-weighted aggregation.</p>\n<h3>2.1.2 Entropy-Based Answer Aggregation</h3>\n<p>In addition to the simple inverse-entropy weighting strategy, I also tested a more complex entropy metric inspired by Parthenos. Instead of using only the mean entropy of generated tokens, this variant tried to model several aspects of reasoning confidence: the average uncertainty level, the confidence of later tokens closer to the final answer, the variance of entropy across the reasoning process, the proportion of sustained high-entropy tokens, and the existence of long low-entropy streaks.</p>\n<p>Although the complex entropy metric was more expressive, I finally selected the simpler inverse-entropy weighting strategy for the final submission. The main reason was robustness. The complex metric introduced several hand-designed components and hyperparameters, such as the position decay factor, high-entropy threshold, low-entropy threshold, and the weights of each component. With only a limited number of leaderboard submissions and a small number of attempts per problem, these extra choices were difficult to tune reliably.</p>\n<table>\n<thead>\n<tr>\n<th>Aggregation Strategy</th>\n<th>Same Prompt Setting</th>\n<th>Main Idea</th>\n<th>Number of Submissions</th>\n<th>Public LB Score Range</th>\n<th>Observation</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Simple inverse-entropy weighting</td>\n<td>Yes</td>\n<td>Use mean token entropy as an uncertainty signal, then weight each valid answer by 1 / entropy</td>\n<td>6</td>\n<td>36–40<br>(Scored 40 twice)</td>\n<td>Simple, stable, and easy to interpret</td>\n</tr>\n<tr>\n<td>More complex entropy metric</td>\n<td>Yes</td>\n<td>Combine mean entropy, position-weighted entropy, entropy variance, high-entropy penalty, and low-entropy streak reward</td>\n<td>3</td>\n<td>36–39</td>\n<td>More expressive, but did not show a stable advantage</td>\n</tr>\n</tbody>\n</table>\n<p>In addition, token-level entropy is only an approximate confidence signal. A more complicated transformation of this signal may amplify noise rather than provide better calibration. In my tests, the complex strategy achieved scores in the range of 36–39, while the simpler strategy achieved 36–40. Therefore, I did not observe a sufficiently stable advantage from the complex variant. I chose the simple inverse-entropy method because it was easier to interpret, less dependent on tuning, and more consistent with the practical constraints of the competition.</p>\n<h2>2.2 What Was Tried and Limitations</h2>\n<p>During development, I also explored several practical variants that were not selected for the final submission:</p>\n<ul>\n<li>Longer Per-Problem Budget: Giving each problem more time could help difficult cases, but it risked consuming too much time early and hurting later problems. I therefore kept a dynamic budget strategy.</li>\n<li>More Aggressive Early Stopping: Stopping earlier after repeated answers can save time, but it may also lock in a repeated wrong answer. I kept early stopping conservative and used it mainly for efficiency.</li>\n<li>More Extensive Parameter Tuning: I considered broader tuning of temperature, min_p, and timeout settings, but leaderboard feedback and compute resources were limited. The final settings were chosen for practical stability rather than theoretical optimality.\nOverall, these attempts suggested that more computation or more aggressive control rules do not always improve performance. Under the competition constraints, I preferred a simpler and more stable configuration.</li>\n</ul>\n<p>Because of the limited number of submissions and other practical constraints, my prompt exploration was not exhaustive. I still believe that better prompt designs could potentially bring meaningful improvements. However, among the variants I actually tested, the alternative prompts did not show a clear performance gain. Therefore, my final choice was based on empirical testing and the actual scores observed in practice.</p>\n<h1>3. Hardware &amp; Runtime</h1>\n<table>\n<thead>\n<tr>\n<th>Item</th>\n<th>Detail</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>GPU</td>\n<td>1× H100 80GB</td>\n</tr>\n<tr>\n<td>Model</td>\n<td>GPT-OSS 120B, FP8 KV-cache, up to 81,920 context tokens</td>\n</tr>\n<tr>\n<td>Attempts per problem</td>\n<td>8 parallel attempts</td>\n</tr>\n<tr>\n<td>Jupyter kernels</td>\n<td>16 persistent Jupyter kernels</td>\n</tr>\n<tr>\n<td>Avg time per problem</td>\n<td>~300–400 seconds</td>\n</tr>\n<tr>\n<td>Total runtime (50 problems)</td>\n<td>~4–5 hours</td>\n</tr>\n<tr>\n<td>Training</td>\n<td>None</td>\n</tr>\n</tbody>\n</table>\n<h1>4. Conclusion and Acknowledgements</h1>\n<p>I would like to sincerely thank Kaggle and the host team for organizing this challenging and inspiring competition. I am also deeply grateful to the outstanding contributors in the community, especially Andreas Bisiadis, parthenos, and many others who shared strong notebooks, thoughtful discussions, and detailed write-ups. Their work provided valuable references for my own testing, reflection, and improvement. I have deep respect for their contributions, and I hope that sharing my observations and research can provide some value to the community.</p>\n<h2>Reference</h2>\n<ul>\n<li>Andreas Bisiadis<a href=\"https://www.kaggle.com/code/andreasbis/aimo-3-gpt-oss-120b-with-tools\" target=\"_blank\">Link to Kaggle Code</a></li>\n<li>parthenos<a href=\"https://www.kaggle.com/code/nihilisticneuralnet/44-50-let-me-over-cook\" target=\"_blank\">Link to Kaggle Code</a></li>\n<li>parthenos<a href=\"https://www.kaggle.com/code/nihilisticneuralnet/43-50-aimo-3-gpt-oss-120b-weighted-entropy\" target=\"_blank\">Link to Kaggle Code</a></li>\n<li>vLLM: Kwon et al. (2023), PagedAttention, SOSP 2023</li>\n<li>SymPy: exact symbolic computation: <a href=\"https://www.sympy.org/en/index.html\" target=\"_blank\">https://www.sympy.org/en/index.html</a></li>\n</ul>\n<h2>Competition Link</h2>\n<ul>\n<li>Competition overview page: <a href=\"https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3/overview\" target=\"_blank\">Link</a></li>\n<li>Competition data page: <a href=\"https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3/data\" target=\"_blank\">Link</a></li>\n</ul>\n<p><em>Thanks to Parthenos and Andreas Bisiadis for openly sharing the base notebook, to the AIMO competition organizers for hosting the competition, and to the Kaggle community for the valuable discussions and contributions.</em></p>",
      "rawMarkdown": "The AI Mathematical Olympiad - Progress Prize 3 is a challenging competition that encourages participants to develop open-source AI systems capable of solving high-level mathematical reasoning problems. For me, this competition was not only a leaderboard challenge, but also a valuable opportunity to study how modern large language models reason, fail, recover, and improve under different inference strategies.\n\nMy solution is built upon a strong public baseline notebook, and my main goal was to test and reflect on related approaches, conduct several experimental attempts, and gradually identify the strategy that I considered the most suitable. In particular, I focused on prompt design, response analysis, answer extraction, and inference-time aggregation, hoping to better understand how small changes in reasoning guidance and sampling behavior can influence the final performance. I hope that sharing my observations and research can provide some value to the community.\n\n# 1.Overview\nMy solution is based on the strong public baseline notebook shared by Andreas Bisiadis and Parthenos.\n\nThis solution is mainly an inference-time optimization attempt. No additional training or fine-tuning is used. The goal is to make a large open-weight language model solve AIMO3 mathematical problems as reliably as possible under the fixed competition time budget, with final answers in the range [0, 99999].\nThe pipeline at a high level:\n- Use GPT-OSS 120B as the main reasoning model\n- Use a concise IMO-style prompt with strict boxed-answer format\n- For each problem, run up to 8 independent reasoning attempts\n- Allow the model to use Python tools for calculation and verification\n- Extract valid integer answers from \\boxed{}\n- Aggregate answers with simple inverse-entropy weighting\n- Use frequency-based early stopping to save inference time\n- Control the per-problem budget under the global notebook time limit\n\nThe final version favors simplicity and stability. I tested more complex prompt and entropy variants, but the submitted version kept the components that were easier to interpret and more stable in my submissions.\n\n# 2. Details of the Submission\n## 2.1 Main Focus\nMy submission mainly explores two practical questions:\n- How does prompt complexity affect mathematical reasoning performance, and is a highly structured prompt necessarily better than a concise task-focused prompt?\n- How should multiple generated answers be aggregated under the competition time limit, especially when comparing simple entropy-weighted aggregation with more complex entropy-based strategies?\n\n### 2.1.1 Prompt Complexity vs. Stability\nOne practical question I explored was how prompt design can help the model avoid common mistakes in mathematical reasoning. In olympiad-style problems, a wrong answer is often not caused by a complete lack of relevant knowledge, but by smaller failures during the reasoning process: choosing a solution path too early, making arithmetic or algebraic mistakes, overlooking constraints, ignoring boundary cases, or failing to verify the final result.\n\nInspired by Parthenos's five-step protocol — UNDERSTAND, EXPLORE, PLAN, EXECUTE, and VERIFY — I tested a more complex prompting strategy in some experimental versions.  These prompts encouraged the model to follow a more deliberate problem-solving process: first understand the problem, then explore possible strategies, make a plan, execute the solution, and finally verify the result. I also added reminders to check arithmetic, test special cases, consider constraints, and use Python for calculations or verification when appropriate. The goal was not to teach the model new mathematics, but to make its reasoning process less careless and more self-checking.\n\nIn practice, longer prompts introduced extra instructions and did not always give a stable advantage. They also consumed more context and sometimes made the reasoning process less direct. Therefore, in the final version, I chose a simpler prompt that focused on the most important constraints: the model should act as a strong olympiad-level solver, the answer must be a non-negative integer in the required range, and the final answer must be placed inside \\boxed{}.\n\n```python\nsystem_prompt = (\n    'You are a world-class International Mathematical Olympiad (IMO) competitor. '\n    'The final answer must be a non-negative integer between 0 and 99999. '\n    'You must place the final integer answer inside \\\\boxed{}. '\n)\n\ntool_prompt = (\n    'Use this tool to execute Python code. '\n    'The environment is a stateful Jupyter notebook. '\n    'You must use print() to output results.'\n)\n\npreference_prompt = (\n    'You have access to math, numpy and sympy to solve the problem.'\n)\n```\n\nThis choice reflects a balance between guidance and simplicity. The prompt provides the essential task framing and output constraints, while Python tool usage, multiple independent attempts, answer extraction, and entropy-weighted aggregation handle much of the practical reliability. In this way, prompt design helped reduce common errors mainly by clarifying the task, enforcing the answer format, and encouraging a careful mathematical-solving mindset, without making the final system overly complicated.\n\nI should note that this was not a rigorous ablation study of prompt engineering. Rather, it was a practical exploration during the competition, and the final prompt was selected because it was simple, stable, and consistent with the rest of the inference pipeline.\n\n| Prompt Strategy | Main Design | Entropy Strategy Setting | Number of Submissions | Public LB Score Range | Observation |\n|---|---|---|---:|---|---|\n| Final submitted prompt | Short and direct prompt focusing on IMO-level role, valid answer range, and boxed-answer format | Same entropy strategy: simple inverse-entropy weighting | 6 | 36–40<br>(Scored 40 twice) | More stable in practice and better aligned with the rest of the inference pipeline |\n| More structured error-aware prompt | Explicitly guides the model through understanding, exploration, planning, execution, and verification | Same entropy strategy: simple inverse-entropy weighting | 6 | 35–39 | Helpful in principle, but did not show a stable advantage in my submissions |\n\n\nBased on these submission results, I finally chose the shorter prompt for the final submission. Although the more structured prompt was designed to reduce common reasoning errors, such as premature conclusions, missed constraints, and insufficient verification, it did not provide a consistently better leaderboard result in my tests. One possible reason is that a longer prompt introduces more instructions for the model to follow, which may consume context, make the reasoning process less direct, and increase sensitivity to sampling randomness. In contrast, the shorter prompt kept only the most important constraints and worked more smoothly with the rest of the system, including Python tool use, multiple independent attempts, answer extraction, and entropy-weighted aggregation.\n\n### 2.1.2 Entropy-Based Answer Aggregation\nIn addition to the simple inverse-entropy weighting strategy, I also tested a more complex entropy metric inspired by Parthenos. Instead of using only the mean entropy of generated tokens, this variant tried to model several aspects of reasoning confidence: the average uncertainty level, the confidence of later tokens closer to the final answer, the variance of entropy across the reasoning process, the proportion of sustained high-entropy tokens, and the existence of long low-entropy streaks.\n\nAlthough the complex entropy metric was more expressive, I finally selected the simpler inverse-entropy weighting strategy for the final submission. The main reason was robustness. The complex metric introduced several hand-designed components and hyperparameters, such as the position decay factor, high-entropy threshold, low-entropy threshold, and the weights of each component. With only a limited number of leaderboard submissions and a small number of attempts per problem, these extra choices were difficult to tune reliably.\n\n| Aggregation Strategy | Same Prompt Setting | Main Idea | Number of Submissions | Public LB Score Range | Observation |\n|---|---|---|---:|---|---|\n| Simple inverse-entropy weighting | Yes | Use mean token entropy as an uncertainty signal, then weight each valid answer by 1 / entropy | 6 | 36–40<br>(Scored 40 twice) | Simple, stable, and easy to interpret |\n| More complex entropy metric | Yes | Combine mean entropy, position-weighted entropy, entropy variance, high-entropy penalty, and low-entropy streak reward | 3 | 36–39 | More expressive, but did not show a stable advantage |\n\nIn addition, token-level entropy is only an approximate confidence signal. A more complicated transformation of this signal may amplify noise rather than provide better calibration. In my tests, the complex strategy achieved scores in the range of 36–39, while the simpler strategy achieved 36–40. Therefore, I did not observe a sufficiently stable advantage from the complex variant. I chose the simple inverse-entropy method because it was easier to interpret, less dependent on tuning, and more consistent with the practical constraints of the competition.\n\n## 2.2 What Was Tried and Limitations\nDuring development, I also explored several practical variants that were not selected for the final submission:\n- Longer Per-Problem Budget: Giving each problem more time could help difficult cases, but it risked consuming too much time early and hurting later problems. I therefore kept a dynamic budget strategy.\n- More Aggressive Early Stopping: Stopping earlier after repeated answers can save time, but it may also lock in a repeated wrong answer. I kept early stopping conservative and used it mainly for efficiency.\n- More Extensive Parameter Tuning: I considered broader tuning of temperature, min_p, and timeout settings, but leaderboard feedback and compute resources were limited. The final settings were chosen for practical stability rather than theoretical optimality.\nOverall, these attempts suggested that more computation or more aggressive control rules do not always improve performance. Under the competition constraints, I preferred a simpler and more stable configuration.\n\nBecause of the limited number of submissions and other practical constraints, my prompt exploration was not exhaustive. I still believe that better prompt designs could potentially bring meaningful improvements. However, among the variants I actually tested, the alternative prompts did not show a clear performance gain. Therefore, my final choice was based on empirical testing and the actual scores observed in practice.\n\n# 3. Hardware & Runtime\n\n| Item | Detail |\n|---|---|\n| GPU | 1× H100 80GB |\n| Model | GPT-OSS 120B, FP8 KV-cache, up to 81,920 context tokens |\n| Attempts per problem | 8 parallel attempts |\n| Jupyter kernels | 16 persistent Jupyter kernels |\n| Avg time per problem | ~300–400 seconds |\n| Total runtime (50 problems) | ~4–5 hours |\n| Training | None |\n\n# 4. Conclusion and Acknowledgements\nI would like to sincerely thank Kaggle and the host team for organizing this challenging and inspiring competition. I am also deeply grateful to the outstanding contributors in the community, especially Andreas Bisiadis, parthenos, and many others who shared strong notebooks, thoughtful discussions, and detailed write-ups. Their work provided valuable references for my own testing, reflection, and improvement. I have deep respect for their contributions, and I hope that sharing my observations and research can provide some value to the community.\n\n\n## Reference\n- Andreas Bisiadis[Link to Kaggle Code](https://www.kaggle.com/code/andreasbis/aimo-3-gpt-oss-120b-with-tools)\n- parthenos[Link to Kaggle Code](https://www.kaggle.com/code/nihilisticneuralnet/44-50-let-me-over-cook)\n- parthenos[Link to Kaggle Code](https://www.kaggle.com/code/nihilisticneuralnet/43-50-aimo-3-gpt-oss-120b-weighted-entropy)\n- vLLM: Kwon et al. (2023), PagedAttention, SOSP 2023\n- SymPy: exact symbolic computation: [https://www.sympy.org/en/index.html](https://www.sympy.org/en/index.html)\n\n## Competition Link\n- Competition overview page: [Link](https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3/overview)\n- Competition data page: [Link](https://www.kaggle.com/competitions/ai-mathematical-olympiad-progress-prize-3/data)\n\n*Thanks to Parthenos and Andreas Bisiadis for openly sharing the base notebook, to the AIMO competition organizers for hosting the competition, and to the Kaggle community for the valuable discussions and contributions.*\n"
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-20T04:27:10Z",
  "competition_id": 118448,
  "competition_slug": "ai-mathematical-olympiad-progress-prize-3",
  "team_id": 14824800,
  "solution_url": "/competitions/ai-mathematical-olympiad-progress-prize-3/writeups/7th-place-solution-for-the-aimo3-competition"
}