Paper Review: Exploring the Limit of Outcome Reward for Learning Mathematical Reasoning

Seems like verifiers are quite a hot topic these days...

10 min read
Paper Review: Exploring the Limit of Outcome Reward for Learning Mathematical Reasoning

Lyu et al. (2025)—ArXiv

TLDR

New RL framework (OREAL) for training Binary Outcome Based Reasoning models. Prove that BC (Behavioral Cloning, i.e., SFT) on positive trajectories from BoN (Best-of-N) sampling is sufficient to learn the KL-regularized optimal policy in binary feedback environments. They also apply a token-level RM to sample important tokens in reasoning traces for learning.

Interesting Bits

Lemma 2.1 (Learning from Positive Samples): Let π(θ,s)\pi(\theta, s) be a distribution over parameters θ\theta and trajectory ss, where each ss is associated with a binary reward R(s){0,1}R(s) \in \{0, 1\}. Define pEsπ(θ,)[R(s)=1]>0p \triangleq \mathbb{E}_{s \sim \pi(\theta, \cdot)}[R(s) = 1] > 0. Consider the BoN sampling: n=n0n = n_0 \rightarrow \infty and sample {s1,s2,,sn}\{s_1, s_2, \ldots, s_n\} i.i.d. from πθ\pi_\theta. BoN selects ss^* uniformly from the subset with R(si)=1R(s_i) = 1. We have that, The probability of selecting ss^* is converge to π(θ,s)p\frac{\pi(\theta, s)}{p}, which is independent of nn.

Breakdown:

  • “Let π(θ,s)\pi(\theta, s) be a distribution over parameters θ\theta and trajectory ss…”

    • π(θ,s)\pi(\theta, s): This represents a policy (the LLM), parameterized by θ\theta, that defines a probability distribution over trajectories ss. π(θ,s)\pi(\theta, s) gives the probability of observing the trajectory ss when following the policy parameterized by θ\theta.
    • ss: A trajectory (in this case, a reasoning trace for a query) generated by the policy.
  • “… where each ss is associated with a binary reward R(s){0,1}R(s) \in \{0, 1\}.”

    • R(s){0,1}R(s) \in \{0, 1\}: The reward function RR is binary (as now common with ORMs). It assigns a reward of 1 if the trajectory ss attains the correct solution, and 0 otherwise.
  • “Define pEsπ(θ,)[R(s)=1]>0p \triangleq \mathbb{E}_{s \sim \pi(\theta, \cdot)}[R(s) = 1] > 0.”

    • pEsπ(θ,)[R(s)=1]p \triangleq \mathbb{E}_{s \sim \pi(\theta, \cdot)}[R(s) = 1]: This defines pp as the probability of getting a positive reward when we sample a trajectory ss from the policy π(θ,)\pi(\theta, \cdot). The notation Esπ(θ,)[]\mathbb{E}_{s \sim \pi(\theta, \cdot)}[\cdot] denotes the expectation over trajectories sampled from the policy π(θ,)\pi(\theta, \cdot), that is #Trajectories that attain reward 1#Total trajctories\frac{\#\text{Trajectories that attain reward 1}}{\#\text{Total trajctories}}.
    • p>0p > 0: This assumption states that there is a non-zero probability of achieving a positive reward under the policy π(θ,)\pi(\theta, \cdot). This is a necessary condition; otherwise, if p=0p=0, we would never get positive samples to learn from (i.e., when sampling enough times, the model can at least once achieve a correct solution).
  • “Consider the BoN sampling: n=n0n = n_0 \rightarrow \infty and sample {s1,s2,,sn}\{s_1, s_2, \ldots, s_n\} i.i.d. from πθ\pi_\theta.”

    • BoN sampling: Best-of-N sampling. We are generating nn trajectories.
    • n=n0n = n_0 \rightarrow \infty: The number of sampled trajectories nn is initially some number n0n_0 and is considered to go to infinity. This is a theoretical consideration to analyze the asymptotic behavior. In practice, nn would be a large but finite number.
    • {s1,s2,,sn}\{s_1, s_2, \ldots, s_n\} i.i.d. from πθ\pi_\theta: We sample nn trajectories independently and identically distributed (i.i.d.) according to the policy πθ=π(θ,)\pi_\theta = \pi(\theta, \cdot).
  • “BoN selects ss^* uniformly from the subset with R(si)=1R(s_i) = 1.”

    • Subset with R(si)=1R(s_i) = 1: From the nn sampled trajectories {s1,s2,,sn}\{s_1, s_2, \ldots, s_n\}, we consider only those trajectories that received a positive reward (i.e., R(si)=1R(s_i) = 1). Let’s call this set of successful trajectories S+={siR(si)=1,i{1,2,,n}}S^+ = \{s_i \mid R(s_i) = 1, i \in \{1, 2, \ldots, n\}\}.
    • BoN selects ss^* uniformly from S+S^+: If S+S^+ is not empty, BoN sampling selects one trajectory ss^* uniformly at random from the set S+S^+.
  • “We have that, The probability of selecting ss^* is converge to π(θ,s)p\frac{\pi(\theta, s)}{p}, which is independent of nn.”

    • “The probability of selecting ss^* is converge to π(θ,s)p\frac{\pi(\theta, s)}{p}…”: This is the core result of the lemma. It states that as nn \rightarrow \infty, if we perform BoN sampling as described, the probability distribution of the selected trajectory ss^* converges to a distribution that is proportional to π(θ,s)\pi(\theta, s) and normalized by pp.
    • π(θ,s)p\frac{\pi(\theta, s)}{p}: This is a normalized probability distribution. Note that summing π(θ,s)p\frac{\pi(\theta, s)}{p} over all trajectories ss that can have R(s)=1R(s)=1 would sum to 1 (if we consider the appropriate domain). Basically, we are conditioning on the event that we obtained a positive reward. We can think of p=s:R(s)=1π(θ,s)p = \sum_{s: R(s)=1} \pi(\theta, s) (if trajectory space is discrete, or integral if continuous), so π(θ,s)p=π(θ,s)s:R(s)=1π(θ,s)\frac{\pi(\theta, s)}{p} = \frac{\pi(\theta, s)}{\sum_{s': R(s')=1} \pi(\theta, s')}, which is the conditional probability π(θ,sR(s)=1)\pi(\theta, s | R(s)=1).
    • “… which is independent of nn.”: The limiting distribution π(θ,s)p\frac{\pi(\theta, s)}{p} does not depend on the number of samples nn used in BoN sampling, once nn is sufficiently large (theoretically, as nn \rightarrow \infty). The value of nn affects how quickly we approach this limiting distribution, but the distribution itself is determined by the policy π(θ,s)\pi(\theta, s) and the probability of positive reward pp.

Implications

What does this lemma tell us?

In essence, Lemma 2.1 states that when we use BoN sampling and select a trajectory ss^* from the successful ones, the distribution of these selected trajectories, in the limit as we sample a very large number of initial trajectories, becomes proportional to the original policy distribution π(θ,s)\pi(\theta, s), but conditioned on achieving a positive reward.

Why is this important?

  • Focus on Successful Trajectories: BoN sampling naturally focuses on trajectories that are successful (positive reward). In scenarios where positive rewards are sparse but crucial for learning, BoN helps to concentrate learning efforts on these valuable samples.
  • Implicit Policy Improvement: By sampling from πθ\pi_\theta and then selecting from the positive reward set, we are effectively biasing our selection towards trajectories that are more likely under πθ\pi_\theta and lead to positive rewards. This can be seen as a form of implicit policy improvement or directed exploration.
  • Connection to Importance Sampling: The form π(θ,s)p\frac{\pi(\theta, s)}{p} is reminiscent of importance sampling. Here, we are implicitly re-weighting trajectories based on the condition of positive reward.
  • Theoretical Foundation for BoN in Positive Reward Learning: This lemma provides a theoretical grounding for using BoN sampling in situations where we are primarily interested in learning from positive examples, and rewards are binary indicating success or failure.

Proof:

Lemma 2.1 (Formal Statement): Let π(θ,s)\pi(\theta, s) be a probability distribution over trajectories ss, and let R(s){0,1}R(s) \in \{0, 1\} be a binary reward associated with each trajectory ss. Define p=Esπ(θ,)[R(s)=1]>0p = \mathbb{E}_{s \sim \pi(\theta, \cdot)}[R(s) = 1] > 0. For a given nNn \in \mathbb{N}, let {s1,s2,,sn}\{s_1, s_2, \ldots, s_n\} be nn independent and identically distributed (i.i.d.) samples from π(θ,)\pi(\theta, \cdot). Let S+={siR(si)=1,i{1,2,,n}}S^+ = \{s_i \mid R(s_i) = 1, i \in \{1, 2, \ldots, n\}\}. If S+S^+ \neq \emptyset, let ss^* be selected uniformly at random from S+S^+. We want to show that for any trajectory ss with R(s)=1R(s) = 1, the probability of selecting s=ss^* = s (in a suitable sense as nn \to \infty) is proportional to π(θ,s)/p\pi(\theta, s) / p. More precisely, we will show that for any trajectory ss with R(s)=1R(s) = 1:

limnP(s=sS+)=π(θ,s)p\lim_{n \to \infty} P(s^* = s \mid S^+ \neq \emptyset) = \frac{\pi(\theta, s)}{p}


Let ss be a trajectory such that R(s)=1R(s) = 1. We are interested in the probability P(s=sS+)P(s^* = s \mid S^+ \neq \emptyset). By definition of conditional probability, we have:

P(s=sS+)=P((s=s)(S+))P(S+)P(s^* = s \mid S^+ \neq \emptyset) = \frac{P((s^* = s) \cap (S^+ \neq \emptyset))}{P(S^+ \neq \emptyset)}

First, let’s consider the denominator P(S+)P(S^+ \neq \emptyset). The event S+=S^+ = \emptyset means that for all i{1,2,,n}i \in \{1, 2, \ldots, n\}, R(si)=0R(s_i) = 0. Since sis_i are i.i.d. and P(R(si)=1)=pP(R(s_i) = 1) = p, we have P(R(si)=0)=1pP(R(s_i) = 0) = 1 - p. Thus, P(S+=)=P(i,R(si)=0)=i=1nP(R(si)=0)=(1p)nP(S^+ = \emptyset) = P(\forall i, R(s_i) = 0) = \prod_{i=1}^n P(R(s_i) = 0) = (1 - p)^n Since p>0p > 0, as nn \to \infty, (1p)n0(1 - p)^n \to 0. Therefore, P(S+)=1P(S+=)=1(1p)n1P(S^+ \neq \emptyset) = 1 - P(S^+ = \emptyset) = 1 - (1 - p)^n \to 1 as nn \to \infty.

Now let’s consider the numerator P((s=s)(S+))P((s^* = s) \cap (S^+ \neq \emptyset)). For s=ss^* = s to occur, it must be the case that at least one of the sampled trajectories is ss and has a positive reward (which is true since R(s)=1R(s) = 1), and when we sample from S+S^+, we select one of the instances of ss.

Let Ns(n)N_s(n) be the number of times the trajectory ss appears in the sample {s1,,sn}\{s_1, \ldots, s_n\}, i.e., Ns(n)=i=1nI(si=s)N_s(n) = \sum_{i=1}^n \mathbb{I}(s_i = s). Let N+(n)N^+(n) be the number of trajectories with positive reward in the sample, i.e., N+(n)=S+=i=1nI(R(si)=1)N^+(n) = |S^+| = \sum_{i=1}^n \mathbb{I}(R(s_i) = 1).

If N+(n)>0N^+(n) > 0, BoN selects uniformly from S+S^+. The event s=ss^* = s occurs if and only if at least one of the selected trajectories in S+S^+ is ss, and when we choose uniformly from S+S^+, we choose one of these instances. Since we are interested in the probability of selecting a trajectory that is equal to ss, and all instances of ss in S+S^+ are indistinguishable in the uniform selection process, the probability of selecting s=ss^* = s given S+S^+ \neq \emptyset is the ratio of the expected number of instances of ss in S+S^+ to the expected size of S+S^+, in the limit.

More formally, consider the number of indices ii such that si=ss_i = s. Let Is={isi=s,1in}I_s = \{i \mid s_i = s, 1 \leq i \leq n\}. Then Is=Ns(n)|I_s| = N_s(n). Also, let I+={iR(si)=1,1in}I^+ = \{i \mid R(s_i) = 1, 1 \leq i \leq n\}. Then I+=N+(n)|I^+| = N^+(n). If I+I^+ \neq \emptyset, we select an index jI+j \in I^+ uniformly at random. Then s=sjs^* = s_j. The event s=ss^* = s occurs if the chosen index jI+j \in I^+ is also in IsI_s. Since R(s)=1R(s) = 1, if si=ss_i = s, then R(si)=R(s)=1R(s_i) = R(s) = 1. Thus, IsI+I_s \subseteq I^+. So, IsI+=IsI_s \cap I^+ = I_s. Therefore, the number of indices jI+j \in I^+ such that sj=ss_j = s is Is=Ns(n)|I_s| = N_s(n). And the total number of indices in I+I^+ is I+=N+(n)|I^+| = N^+(n).

If N+(n)>0N^+(n) > 0, then the probability of choosing an index jI+j \in I^+ such that sj=ss_j = s is IsI+=Ns(n)N+(n)\frac{|I_s|}{|I^+|} = \frac{N_s(n)}{N^+(n)}. Thus, given S+S^+ \neq \emptyset (which is equivalent to N+(n)>0N^+(n) > 0), the probability of selecting s=ss^* = s is Ns(n)N+(n)\frac{N_s(n)}{N^+(n)}.

We know that by the Law of Large Numbers, as nn \to \infty: Ns(n)n=1ni=1nI(si=s)pE[I(si=s)]=P(si=s)=π(θ,s)\frac{N_s(n)}{n} = \frac{1}{n} \sum_{i=1}^n \mathbb{I}(s_i = s) \xrightarrow{p} \mathbb{E}[\mathbb{I}(s_i = s)] = P(s_i = s) = \pi(\theta, s) N+(n)n=1ni=1nI(R(si)=1)pE[I(R(si)=1)]=P(R(si)=1)=p\frac{N^+(n)}{n} = \frac{1}{n} \sum_{i=1}^n \mathbb{I}(R(s_i) = 1) \xrightarrow{p} \mathbb{E}[\mathbb{I}(R(s_i) = 1)] = P(R(s_i) = 1) = p where p\xrightarrow{p} denotes convergence in probability.

By the Continuous Mapping Theorem and the ratio theorem for convergence in probability (since p>0p>0), we have: Ns(n)N+(n)=Ns(n)/nN+(n)/npπ(θ,s)p\frac{N_s(n)}{N^+(n)} = \frac{N_s(n)/n}{N^+(n)/n} \xrightarrow{p} \frac{\pi(\theta, s)}{p} This means that for large nn, Ns(n)N+(n)\frac{N_s(n)}{N^+(n)} is close to π(θ,s)p\frac{\pi(\theta, s)}{p} with high probability.

Since P(s=sS+)=Ns(n)N+(n)P(s^* = s \mid S^+ \neq \emptyset) = \frac{N_s(n)}{N^+(n)} when N+(n)>0N^+(n) > 0, and we are interested in the limit as nn \to \infty, we can say that in probability, for large nn, P(s=sS+)π(θ,s)pP(s^* = s \mid S^+ \neq \emptyset) \approx \frac{\pi(\theta, s)}{p}.

To make this more rigorous in terms of limit of probabilities, we can use the convergence in probability to convergence in distribution in this case. Since Ns(n)N+(n)pπ(θ,s)p\frac{N_s(n)}{N^+(n)} \xrightarrow{p} \frac{\pi(\theta, s)}{p}, it also converges in distribution to a degenerate random variable at π(θ,s)p\frac{\pi(\theta, s)}{p}. Thus, the limit of the probability is indeed π(θ,s)p\frac{\pi(\theta, s)}{p}.

Therefore, limnP(s=sS+)=π(θ,s)p \lim_{n \to \infty} P(s^* = s \mid S^+ \neq \emptyset) = \frac{\pi(\theta, s)}{p}

This completes the formal proof. The probability of selecting a specific trajectory ss (with R(s)=1R(s) = 1) using BoN sampling, conditioned on getting at least one positive sample, converges to π(θ,s)p\frac{\pi(\theta, s)}{p} as the number of initial samples nn goes to infinity.

AIRLPaper ReviewORMVerification

I keep an open calendar for conversations about debate, scalable oversight, and elicitation. If you're working on any of these, write to me.