Source-linked AI summary

Exploring the Limit of Outcome Reward for Learning Mathematical Reasoning

Chengqi Lyu, Songyang Gao, Yuzhe Gu, Wenwei Zhang, Jianfei Gao, Kuikun Liu, Ziyi Wang, Shuaibin Li, Qian Zhao, Haian Huang, Weihan Cao, Jiangning Liu, Hongwei Liu, Junnan Liu, Songyang Zhang, Dahua Lin, Kai Chen

arXiv:2502.06781v1cs.CLcs.LG

TL;DR

Mathematical reasoning is a key AI testbed, but RL faces sparse binary rewards when intermediate reasoning steps are difficult to evaluate. OREAL combines BoN-based learning, reward shaping, and token-level credit assignment; it reports 94.0 pass@1 on MATH-500 for an improved 7B model and 95.0 for OREAL-32B.

  • Problem

    Mathematical reasoning is a compelling AI testbed, but intermediate steps are labor-intensive to evaluate, leaving RL with sparse binary final-answer feedback.

    Source: §1 · p. 1
  • Method

    OREAL combines behavior cloning on positive BoN-sampled trajectories, shaped negative-sample rewards, and token-level credit assignment trained from outcome rewards.

    Source: §1 · p. 2
  • Results

    94.0 pass@1 accuracy on MATH-500 follows applying OREAL to DeepSeek-R1-Distilled-Qwen-7B, while OREAL-32B achieves 95.0 pass@1 accuracy on MATH-500.

    Source: §1 · pp. 2–3
  • Takeaways & Limitations

    The authors present OREAL as a theoretically grounded, general, and scalable approach for mathematical reasoning tasks.

    Source: §6 · pp. 11–12

    The authors identify a need for an initial policy as free of knowledge deficiencies as possible; their proposed distillation or data-synthesis route is not explored in this work.

    Source: §6 · p. 12

Abstract

from arXiv · show

Reasoning abilities, especially those for solving complex math problems, are crucial components of general intelligence. Recent advances by proprietary companies, such as o-series models of OpenAI, have made remarkable progress on reasoning tasks. However, the complete technical details remain unrevealed, and the techniques that are believed certainly to be adopted are only reinforcement learning (RL) and the long chain of thoughts. This paper proposes a new RL framework, termed OREAL, to pursue the performance limit that can be achieved through \textbf{O}utcome \textbf{RE}w\textbf{A}rd-based reinforcement \textbf{L}earning for mathematical reasoning tasks, where only binary outcome rewards are easily accessible. We theoretically prove that behavior cloning on positive trajectories from best-of-N (BoN) sampling is sufficient to learn the KL-regularized optimal policy in binary feedback environments. This formulation further implies that the rewards of negative samples should be reshaped to ensure the gradient consistency between positive and negative samples. To alleviate the long-existing difficulties brought by sparse rewards in RL, which are even exacerbated by the partial correctness of the long chain of thought for reasoning tasks, we further apply a token-level reward model to sample important tokens in reasoning trajectories for learning. With OREAL, for the first time, a 7B model can obtain 94.0 pass@1 accuracy on MATH-500 through RL, being on par with 32B models. OREAL-32B also surpasses previous 32B models trained by distillation with 95.0 pass@1 accuracy on MATH-500. Our investigation also indicates the importance of initial policy models and training queries for RL. Code, models, and data will be released to benefit future research\footnote{https://github.com/InternLM/OREAL}.

1 Introduction

OREAL addresses mathematical reasoning with sparse binary outcome feedback through BoN-based learning, reward shaping, and token-level credit assignment. It reports 95.0 pass@1 on MATH-500 for OREAL-32B and 94.0 after applying OREAL to a distilled 7B model.

1 Introduction

  • Mathematical problems offer a well-defined AI research paradigm with precise binary correctness feedback, while proprietary leading models leave no clear pathway to state-of-the-art reasoning.The introduction identifies chain-of-thought methods as part of recent progress.Source: §1 · pp. 1–2
  • 95.0 pass@1 accuracy on MATH-500 lets OREAL-32B outperform all previously reported distilled and RL-based models.Figure 1 compares OREAL-32B with competitive baselines.Source: Figure 1 · p. 2, §1 · p. 3
  • Intermediate reasoning steps are labor-intensive to evaluate, leaving binary final-answer rewards sparse across trajectories exceeding 2,000 tokens.Search- and value-based credit assignment approaches are described as remaining unsatisfactory compared with distilled models.Source: §1 · p. 2
  • OREAL shows that cloning positive trajectories sampled by best-of-N is sufficient for KL-regularized optimality and that negative-sample rewards need shaping for consistent gradients.The shaping compensates for BoN’s under-sampling of negative gradients and supports difficulty-adaptive optimization over successful and failed trajectories.Source: §1 · p. 2
  • A token-level reward model trained with outcome rewards estimates step-wise importance weights to focus learning on critical reasoning steps or errors.The approach decomposes trajectory advantages to address partial correctness in long reasoning chains.Source: §1 · p. 2
  • 91.0 pass@1 accuracy on MATH-500 makes OREAL-7B, to the authors’ knowledge, the first 7B model to reach that level using RL instead of distillation.The paper says this result exceeds QwQ-32B-Preview and o1-mini; applying OREAL to DeepSeek-R1-Distilled-Qwen-7B raises its MATH-500 score from 92.8 to 94.0.Source: §1 · p. 2

2 Methods

OREAL builds a framework for mathematical reasoning from binary outcome feedback, combining a theoretical account of learning from BoN samples with reward shaping and token-level credit assignment.

2.1 Preliminary

  • In the RL setup, a math problem prompts a multi-token reasoning trajectory, while correctness is evaluated from the final answer and returned as a binary outcome reward.This leaves thousands of tokens without intermediate progress or correctness feedback.Source: §2.1 · p. 3

2.2 Learning from Positive Samples

  • Behavior cloning on BoN-selected positive trajectories learns the KL-regularized optimal policy, and increasing the sample budget can approximate any positive KL constraint.The BoN-selected positive trajectory distribution converges to the policy conditioned on correctness, independently of the sampling budget.Source: §2.2 · p. 4

2.3 Learning from Negative Samples

  • Because BoN suppresses negative samples, reward reshaping is needed for gradient consistency between the BoN objective and training on positive and negative samples.At 50% empirical accuracy, the negative-sample probability under Best-of-4 is 6.25%.Source: §2.3 · p. 5

2.4 Dealing with Long Reasoning Chains

  • A token-level reward model trained from outcome feedback scores reasoning prefixes, directing credit toward steps that distinguish correct from incorrect responses.The model uses preference pairs and its scores reweight the training loss to emphasize critical reasoning steps or errors.Source: §2.4 · pp. 6–7

3 Implementation

The implementation initializes OREAL from rejection-sampling fine-tuned models, trains on filtered math questions with binary verification and token-level reward modeling, and adds skill-matched RFT data for recurring errors.

3.1 Policy Initialization

  • OREAL initializes its policy from rejection-sampling fine-tuned Qwen2.5-7B or Qwen2.5-32B models and also tests DeepSeek-R1-Distill-Qwen-7B as an alternative.The RFT data includes in-house data, Numina, and the MATH training set.Source: §3.1 · p. 7

3.2 Reinforcement Learning

  • Training samples 16 trajectories per question and filters by correctness rate, retaining questions with rates between 0 and 0.8 for further training.During RL, questions with pass rates of 0 or 1 are discarded, and one correct and one incorrect response are retained per remaining question.Source: §3.2 · pp. 7–8
  • A generative and rule-based verifier supplies binary outcomes, which train a token-level reward model whose scores provide token-wise importance weights.The reward model is trained with cross-entropy on sampled trajectories and verifier outcomes.Source: §3.2 · p. 7

3.3 Skill-based Enhancement

  • For repeatedly missed skills, OREAL augments training with similar MATH questions sharing the skill and adds them during the RFT stage.The approach uses the MATH dataset to reduce the cost of skill annotation.Source: §3.3 · p. 8

4 Experiment

Across the evaluated benchmarks, OREAL reports strong results at both 7B and 32B scales. Ablations and analyses examine its components, training dynamics, and sensitivity to the initial policy.

4.1 Evaluation Setup

  • Evaluations use pass@1 with zero-shot chain-of-thought prompting and greedy decoding across MATH-500, AIME2024, AIME2025 Part1, LiveMathBench, and OlympiadBench.The evaluation compares against reported and paper-run baselines.Source: §4.1 · pp. 8–9

4.2 Overall Results

  • 91.0 pass@1 on MATH-500 and 59.9 on OlympiadBench for OREAL-7B; OREAL-DSR1-Distill-Qwen-7B reaches 94.0 and 66.1, respectively.The paper reports the 7B result as achieved using RL rather than distillation, and says it surpasses larger QwQ-32B-Preview and OpenAI-o1-mini models.Source: §4.2 · p. 9
  • 95.0 pass@1 on MATH-500, 46.7 on AIME2025-I, 74.8 on LiveMathBench, and 72.4 on OlympiadBench make OREAL-32B state-of-the-art among previously reported models.The authors also describe the method as scalable across model sizes.Source: §4.2 · p. 9

4.3 Ablation Study

  • Adding reward shaping (L2), behavior cloning (L1), and importance shaping (Ltotal) step by step steadily increases 7B MATH-500 Pass@1, raising the policy model from an initial 84.8 to 91.0.Source: §4.3 · p. 10
  • REINFORCE training is unstable, reward shaping mitigates this, positive-sample behavior cloning speeds early convergence, and importance sampling grows slowly before ultimately performing best.The comparison reports average pass@1 accuracy across benchmarks during training.Source: §4.3 · p. 10, Figure 2 · p. 10

4.4 Analysis of Initial Policy Models

  • Using skill-based enhancement raises MATH-500 scores for both initial and RL-trained models, while stronger initial policies correspond to higher post-RL performance.The analysis reports that OREAL improves several starting policies, with slight AIME fluctuations when initial performance is already high.Source: §4.4 · p. 10, Table 3 · p. 11

5 Related Work

Prior work enhances mathematical reasoning through prompting, supervised fine-tuning, and reinforcement learning. The paper situates OREAL as a unified RL framework for learning from outcome rewards in mathematical reasoning.

  • Prompting methods such as chain-of-thought [7] [9], self-consistency [8], Tree-of-Thought [51], and Graph-of-Thought [52] stimulate reasoning at inference time but do not fundamentally improve underlying model ability.Source: §5 · p. 11
  • Supervised fine-tuning depends on high-quality data and capable teachers [15], while distillation [11] [12] inherits teacher limitations and SFT has been criticized for limited generalization [58].Some studies argue SFT turns models into knowledge retrievers rather than actual reasoners.Source: §5 · p. 11
  • Earlier RL work targets preference alignment [27] or reasoning [5] [6] [15] [60]; ReSTEM [61] and RFT [23] clone positive samples, while GRPO [6], RLOO [62], and REINFORCE use both outcomes.The paper distinguishes OREAL as a unified framework grounded in mathematical reasoning’s characteristics.Source: §5 · p. 11

6 Conclusion and Future Work

OREAL combines behavior cloning on positive Best-of-n trajectories, reward shaping, and token-level credit assignment for binary-feedback mathematical reasoning. The paper reports strong 7B and 32B results while identifying initial policy quality and training-data coverage as important factors for scalable RL.

6 Conclusion and Future Work

  • OREAL's three insights are positive-trajectory behavior cloning under binary feedback, reward shaping, and token-level credit assignment without additional value networks.The paper describes positive-trajectory cloning from Best-of-n sampling as necessary and sufficient for optimal policy learning.Source: §6 · pp. 11–12
  • 94 pass@1 accuracy on MATH-500 is reported for OREAL initialized from DeepSeek-R1-Distill-Qwen-7B, on par with previous best 32B models.OREAL-32B also obtains new state-of-the-art results among 32B models on MATH-500, LiveMathBench, and OlympiadBench.Source: §6 · p. 12
  • Scalable mathematical-reasoning RL is identified as relying on strong initial policies and diverse, sufficient training data across difficulty, quantity, and scope.The authors identify these factors as primary focuses of future work.Source: §6 · p. 12

A Token Level Reward Model Score Visualization

The visualized token-level reward scores vary across response positions, with different patterns for correct and incorrect responses. This supports assigning credit at token level rather than treating every token's contribution as equal.

A Token Level Reward Model Score Visualization

  • Correct responses have high overall reward scores, especially near the end, despite some lower-scoring middle sections.Scores are normalized to [0, 1]; cooler colors indicate higher scores and warmer colors lower scores.Source: A Token Level Reward Model Score… · p. 17
  • Incorrect responses show a reversed reward distribution, with scores falling closer to the end.The passage contrasts these patterns with the high overall rewards for correct responses.Source: A Token Level Reward Model Score… · p. 17
  • The differing token scores indicate that tokens contribute unequally, motivating token-level credit assignment.Source: A Token Level Reward Model Score… · p. 17

B Prompt

The appendix presents prompts for the generative verifier and for long chain-of-thought reasoning. The verifier prompt supports binary outcome rewards during RL training, while the reasoning prompt frames the model as an expert mathematician using systematic, rigorous reasoning.

B Prompt

  • Figure A3 contains the model-based verifier prompt, which is used during RL training to provide binary outcome rewards.Source: B Prompt · p. 17, Figure A3 · p. 19
  • The verifier prompt asks whether candidates' final answers are correct by comparing them with standard answers.Source: B Prompt · p. 19
  • The long-CoT system prompt casts the model as an expert mathematician following systematic thinking and rigorous reasoning.Figure A4's prompt is used for fine-tuning, RL training, and evaluation.Source: B Prompt · pp. 17, 20, Figure A4 · p. 20
Loading 2502.06781v1…