Group Relative Policy Optimization (GRPO)

Objective Function

GRPO [1] maximizes the expected total reward of a group of responses. Given a question π‘ž sampled from dataset π’ŸοΈ€ and a group of 𝐺 responses {π‘œπ‘–}𝑖=1𝐺 sampled from the old policy πœ‹πœƒold, the objective is:

π’₯οΈ€(πœƒ)=𝔼{(π‘ž,π‘Ž)βˆΌπ’ŸοΈ€,{π‘œπ‘–}𝑖=1πΊβˆΌπœ‹πœƒold(β‹…|π‘ž)}[1πΊβˆ‘π‘–=1𝐺1|π‘œπ‘–|βˆ‘π‘‘=1|π‘œπ‘–|[min(π‘Ÿπ‘–,𝑑(πœƒ)𝐴̂𝑖,𝑑,clip(π‘Ÿπ‘–,𝑑(πœƒ),1βˆ’πœ€,1+πœ€)𝐴̂𝑖,𝑑)]]

where:

  • (π‘ž,π‘Ž)βˆΌπ’ŸοΈ€ is the question-answer pair from dataset π’ŸοΈ€
  • 𝐺 is the group size; π‘œπ‘– is the 𝑖-th response; |π‘œπ‘–| is the length of the 𝑖-th response
  • π‘Ÿπ‘–,𝑑(πœƒ)=πœ‹πœƒ(π‘œπ‘–,𝑑|π‘ž,π‘œπ‘–,<𝑑)πœ‹πœƒold(π‘œπ‘–,𝑑|π‘ž,π‘œπ‘–,<𝑑) is the probability ratio of the 𝑑-th token in the 𝑖-th response
  • πœ‹πœƒ(π‘œπ‘–,𝑑|π‘ž,π‘œπ‘–,<𝑑) / πœ‹πœƒold(π‘œπ‘–,𝑑|π‘ž,π‘œπ‘–,<𝑑) is the probability of generating token π‘œπ‘–,𝑑 under current/old policy (πœ‹πœƒ / πœ‹πœƒold)
  • 𝐴̂𝑖,𝑑 is the advantage of the 𝑑-th token in the 𝑖-th response

GRPO maximizes the expected total reward of the group. It:

  • increases probability of high-advantage responses
  • decreases probability of low-advantage responses
  • keeps the policy update within a trust region

Probability Ratio π‘Ÿπ‘–,𝑑(πœƒ)

The probability ratio measures how much the current policy differs from the old policy for each token:

π‘Ÿπ‘–,𝑑(πœƒ)=πœ‹πœƒ(π‘œπ‘–,𝑑|π‘ž,π‘œπ‘–,<𝑑)πœ‹πœƒold(π‘œπ‘–,𝑑|π‘ž,π‘œπ‘–,<𝑑)

where:

  • πœ‹πœƒ(π‘œπ‘–,𝑑|π‘ž,π‘œπ‘–,<𝑑): probability of generating token π‘œπ‘–,𝑑 under current policy (∈[0,1])
  • πœ‹πœƒold(π‘œπ‘–,𝑑|π‘ž,π‘œπ‘–,<𝑑): probability under old policy (∈[0,1])
  • π‘œπ‘–,<𝑑: sequence of tokens before position 𝑑 in response 𝑖 (token sequence of length π‘‘βˆ’1)

Advantage 𝐴̂𝑖,𝑑

The advantage of the 𝑖-th response is calculated by normalizing the group-level rewards {𝑅𝑖}𝑖=1𝐺:

𝐴̂𝑖,𝑑=π‘…π‘–βˆ’mean({𝑅𝑖}𝑖=1𝐺)std({𝑅𝑖}𝑖=1𝐺)

where:

  • 𝑅𝑖: reward for the 𝑖-th response (∈{0,1})
  • mean({𝑅𝑖}𝑖=1𝐺)=1πΊβˆ‘π‘—=1𝐺𝑅𝑗: average reward across group
  • std({𝑅𝑖}𝑖=1𝐺): standard deviation of group rewards
  • 𝐴̂𝑖,𝑑: normalized advantage for token 𝑑 in response 𝑖

Note that 𝐴̂𝑖,𝑑 is computed at the response level (using response reward 𝑅𝑖), so for all tokens in the same response, 𝐴̂𝑖,𝑑 is the same.

The Clipping Mechanism

The core of GRPO (inherited from PPO [2]) is the clipped objective:

min(π‘Ÿπ‘–,𝑑(πœƒ)𝐴̂𝑖,𝑑,clip(π‘Ÿπ‘–,𝑑(πœƒ),1βˆ’πœ€,1+πœ€)𝐴̂𝑖,𝑑)

Recall from the probability ratio and advantage definitions that:

π‘Ÿπ‘–,𝑑(πœƒ)∈[0,+∞)𝐴̂𝑖,π‘‘βˆˆ{βˆ’,+}

The behavior depends on the sign of the advantage. The following table shows the raw analysis:

𝐴̂𝑖,π‘‘π‘Ÿπ‘–,𝑑(πœƒ)ObjectiveClip?Prevent what?
>0(0,1βˆ’πœ€)(1βˆ’πœ€)𝐴̂𝑖,𝑑Yesno/less advantage on positive
>0[1βˆ’πœ€,1+πœ€]π‘Ÿπ‘–,𝑑(πœƒ)𝐴̂𝑖,𝑑Nonormal
>0(1+πœ€,+∞)(1+πœ€)𝐴̂𝑖,𝑑Yesover advantage on positive
<0(0,1βˆ’πœ€)(1βˆ’πœ€)𝐴̂𝑖,𝑑Yesno/less penalty on negative
<0[1βˆ’πœ€,1+πœ€]π‘Ÿπ‘–,𝑑(πœƒ)𝐴̂𝑖,𝑑Nonormal
<0(1+πœ€,+∞)(1+πœ€)𝐴̂𝑖,𝑑Yesover penalty on negative

Taking the min in the clipped objective simplifies the behavior. When 𝐴̂𝑖,𝑑>0, the min effectively computes min(π‘Ÿπ‘–,𝑑(πœƒ),clip(π‘Ÿπ‘–,𝑑(πœƒ),1βˆ’πœ€,1+πœ€)). When 𝐴̂𝑖,𝑑<0, it becomes max(π‘Ÿπ‘–,𝑑(πœƒ),clip(π‘Ÿπ‘–,𝑑(πœƒ),1βˆ’πœ€,1+πœ€)):

𝐴̂𝑖,𝑑Effectiveπ‘Ÿπ‘–,𝑑(πœƒ)ResultPrevent what?
>0min(π‘Ÿ,clip(π‘Ÿ,1βˆ’πœ€,1+πœ€))(0,1βˆ’πœ€)π‘Ÿπ‘–,𝑑(πœƒ)already safe
>0min(π‘Ÿ,clip(π‘Ÿ,1βˆ’πœ€,1+πœ€))(1βˆ’πœ€,1+πœ€)π‘Ÿπ‘–,𝑑(πœƒ)trust region
>0min(π‘Ÿ,clip(π‘Ÿ,1βˆ’πœ€,1+πœ€))(1+πœ€,+∞)1+πœ€over-increase
<0max(π‘Ÿ,clip(π‘Ÿ,1βˆ’πœ€,1+πœ€))(0,1βˆ’πœ€)1βˆ’πœ€over-decrease
<0max(π‘Ÿ,clip(π‘Ÿ,1βˆ’πœ€,1+πœ€))(1βˆ’πœ€,1+πœ€)π‘Ÿπ‘–,𝑑(πœƒ)trust region
<0max(π‘Ÿ,clip(π‘Ÿ,1βˆ’πœ€,1+πœ€))(1+πœ€,+∞)π‘Ÿπ‘–,𝑑(πœƒ)self-penalizing

Intuition:

  • If 𝐴̂𝑖,𝑑>0 and π‘Ÿπ‘–,𝑑(πœƒ)>1+πœ€: the model already has higher advantage on this case. To prevent over-increase, clip π‘Ÿπ‘–,𝑑(πœƒ) to 1+πœ€.
  • If 𝐴̂𝑖,𝑑<0 and π‘Ÿπ‘–,𝑑(πœƒ)<1βˆ’πœ€: the model already has lower advantage on this case. To prevent over-decrease, clip π‘Ÿπ‘–,𝑑(πœƒ) to 1βˆ’πœ€.

As stated in the original PPO paper: β€œWe only ignore the change in probability ratio when it would make the objective improve, and we include it when it makes the objective worse.”

Example

Let’s walk through a concrete example to illustrate how GRPO works in practice.

Setup

  • Question: π‘ž="What is the capital of France?"
  • Group size: 𝐺=4
  • Clipping parameter: πœ€=0.2

Step 1: Group Sampling

The old policy πœ‹πœƒold generates 𝐺=4 responses for the question with varying lengths:

ResponseGenerated TextLength
π‘œ1β€œThe capital of France is Paris.”7 tokens
π‘œ2β€œWell, the capital city of France, which is Paris.”12 tokens
π‘œ3β€œParis, France.”4 tokens
π‘œ4β€œFrance’s capital city is the beautiful Paris, located in Europe.”12 tokens

Step 2: Reward and Advantage

Each response receives a binary reward based on correctness, then we compute group statistics and advantages:

ResponseRewardExplanation
π‘œ1𝑅1=1Correct
π‘œ2𝑅2=1Correct
π‘œ3𝑅3=1Correct
π‘œ4𝑅4=0Incorrect

Compute the group-level statistics for advantage estimation:

mean({𝑅𝑖}𝑖=14)=1+1+1+04=0.75

std({𝑅𝑖}𝑖=14)=βˆ‘π‘–=14(π‘…π‘–βˆ’0.75)24=0.433

Using the advantage formula, compute the advantage for each response:

ResponseAdvantageResult
π‘œ1𝐴̂1,𝑑=1βˆ’0.750.433β‰ˆ0.577
π‘œ2𝐴̂2,𝑑=1βˆ’0.750.433β‰ˆ0.577
π‘œ3𝐴̂3,𝑑=1βˆ’0.750.433β‰ˆ0.577
π‘œ4𝐴̂4,𝑑=0βˆ’0.750.433β‰ˆβˆ’1.732

Note that 𝐴̂𝑖,𝑑 is the same for all tokens 𝑑 within response 𝑖.

Step 3: Per-Token Probability Ratios

For each token (𝑖,𝑑), we need both πœ‹πœƒold(π‘œπ‘–,𝑑|π‘ž,π‘œπ‘–,<𝑑) and πœ‹πœƒ(π‘œπ‘–,𝑑|π‘ž,π‘œπ‘–,<𝑑) to compute the probability ratio.

Response 1: π‘œ1=[The,capital,of,France,is,Paris,.]

PosTokenContextOld PolicyNew PolicyRatioClipped
1β€œTheβ€π‘ž0.300.351.1671.167
2β€œcapitalβ€π‘ž, β€œThe”0.250.281.1201.120
3β€œofβ€π‘ž, β€œThe”, β€œcapital”0.400.451.1251.125
4β€œFranceβ€π‘ž, …, β€œof”0.350.320.9140.914
5β€œisβ€π‘ž, …, β€œFrance”0.450.501.1111.111
6β€œParisβ€π‘ž, …, β€œis”0.600.651.0831.083
7β€œ.β€π‘ž, …, β€œParis”0.800.851.0631.063

Response 2: π‘œ2=[Well,,,the,capital,city,of,France,,,which,is,Paris,.]

PosTokenContextOld PolicyNew PolicyRatioClipped
1β€œWellβ€π‘ž0.150.120.8000.800
2β€œ,β€π‘ž, β€œWell”0.400.350.8750.875
3β€œtheβ€π‘ž, β€œWell”, β€œ,”0.500.551.1001.100
4β€œcapitalβ€π‘ž, …, β€œthe”0.450.481.0671.067
5β€œcityβ€π‘ž, …, β€œcapital”0.300.250.8330.833
6β€œofβ€π‘ž, …, β€œcity”0.400.451.1251.125
7β€œFranceβ€π‘ž, …, β€œof”0.350.401.1431.143
8β€œ,β€π‘ž, …, β€œFrance”0.250.200.8000.800
9β€œwhichβ€π‘ž, …, β€œ,”0.200.150.7500.800
10β€œisβ€π‘ž, …, β€œwhich”0.600.651.0831.083
11β€œParisβ€π‘ž, …, β€œis”0.700.751.0711.071
12β€œ.β€π‘ž, …, β€œParis”0.800.851.0631.063

Response 3: π‘œ3=[Paris,,,France,.]

PosTokenContextOld PolicyNew PolicyRatioClipped
1β€œParisβ€π‘ž0.200.251.2501.200
2β€œ,β€π‘ž, β€œParis”0.300.351.1671.167
3β€œFranceβ€π‘ž, β€œParis”, β€œ,”0.250.301.2001.200
4β€œ.β€π‘ž, …, β€œFrance”0.700.751.0711.071

Note how β€œParis” in Response 3 has π‘Ÿ3,1=1.250>1+πœ€=1.2, so it gets clipped to 1.200.

Response 4: π‘œ4=[France's,capital,city,is,the,beautiful,Paris,,,located,in,Europe,.]

PosTokenContextOld PolicyNew PolicyRatioClipped
1β€œFrance’sβ€π‘ž0.100.080.8000.800
2β€œcapitalβ€π‘ž, β€œFrance’s”0.250.301.2001.200
3β€œcityβ€π‘ž, …, β€œcapital”0.150.181.2001.200
4β€œisβ€π‘ž, …, β€œcity”0.400.451.1251.125
5β€œtheβ€π‘ž, …, β€œis”0.350.401.1431.143
6β€œbeautifulβ€π‘ž, …, β€œthe”0.100.080.8000.800
7β€œParisβ€π‘ž, …, β€œbeautiful”0.600.651.0831.083
8β€œ,β€π‘ž, …, β€œParis”0.200.180.9000.900
9β€œlocatedβ€π‘ž, …, β€œ,”0.150.120.8000.800
10β€œinβ€π‘ž, …, β€œlocated”0.450.501.1111.111
11β€œEuropeβ€π‘ž, …, β€œin”0.250.200.8000.800
12β€œ.β€π‘ž, …, β€œEurope”0.750.801.0671.067

Step 4: Objective Terms

For each token (𝑖,𝑑), compute the clipped objective term:

obj𝑖,𝑑=min(π‘Ÿπ‘–,𝑑(πœƒ)𝐴̂𝑖,𝑑,π‘Ÿπ‘–,𝑑clipped𝐴̂𝑖,𝑑)

Recall our advantages from Step 2:

  • 𝐴̂1,𝑑=0.577 for all 𝑑 in response 1
  • 𝐴̂2,𝑑=0.577 for all 𝑑 in response 2
  • 𝐴̂3,𝑑=0.577 for all 𝑑 in response 3
  • 𝐴̂4,𝑑=βˆ’1.732 for all 𝑑 in response 4

Response 1 objective terms (𝐴̂1,𝑑=0.577>0):

  • obj1,1=min(1.167Γ—0.577,1.167Γ—0.577)=0.673
  • obj1,2=min(1.120Γ—0.577,1.120Γ—0.577)=0.646
  • obj1,3=min(1.125Γ—0.577,1.125Γ—0.577)=0.649
  • obj1,4=min(0.914Γ—0.577,0.914Γ—0.577)=0.527
  • obj1,5=min(1.111Γ—0.577,1.111Γ—0.577)=0.641
  • obj1,6=min(1.083Γ—0.577,1.083Γ—0.577)=0.625
  • obj1,7=min(1.063Γ—0.577,1.063Γ—0.577)=0.613

Response 2 objective terms (𝐴̂2,𝑑=0.577>0):

  • obj2,1=min(0.800Γ—0.577,0.800Γ—0.577)=0.462
  • obj2,2=min(0.875Γ—0.577,0.875Γ—0.577)=0.505
  • obj2,3=min(1.100Γ—0.577,1.100Γ—0.577)=0.635
  • obj2,4=min(1.067Γ—0.577,1.067Γ—0.577)=0.616
  • obj2,5=min(0.833Γ—0.577,0.833Γ—0.577)=0.481
  • obj2,6=min(1.125Γ—0.577,1.125Γ—0.577)=0.649
  • obj2,7=min(1.143Γ—0.577,1.143Γ—0.577)=0.660
  • obj2,8=min(0.800Γ—0.577,0.800Γ—0.577)=0.462
  • obj2,9=min(0.750Γ—0.577,0.800Γ—0.577)=0.433
  • obj2,10=min(1.083Γ—0.577,1.083Γ—0.577)=0.625
  • obj2,11=min(1.071Γ—0.577,1.071Γ—0.577)=0.618
  • obj2,12=min(1.063Γ—0.577,1.063Γ—0.577)=0.613

Response 3 objective terms (𝐴̂3,𝑑=0.577>0):

  • obj3,1=min(1.250Γ—0.577,1.200Γ—0.577)=min(0.721,0.692)=0.692
  • obj3,2=min(1.167Γ—0.577,1.167Γ—0.577)=0.673
  • obj3,3=min(1.200Γ—0.577,1.200Γ—0.577)=0.692
  • obj3,4=min(1.071Γ—0.577,1.071Γ—0.577)=0.618

Response 4 objective terms (𝐴̂4,𝑑=βˆ’1.732<0):

  • obj4,1=min(0.800Γ—(βˆ’1.732),0.800Γ—(βˆ’1.732))=βˆ’1.386
  • obj4,2=min(1.200Γ—(βˆ’1.732),1.200Γ—(βˆ’1.732))=βˆ’2.078
  • obj4,3=min(1.200Γ—(βˆ’1.732),1.200Γ—(βˆ’1.732))=βˆ’2.078
  • obj4,4=min(1.125Γ—(βˆ’1.732),1.125Γ—(βˆ’1.732))=βˆ’1.949
  • obj4,5=min(1.143Γ—(βˆ’1.732),1.143Γ—(βˆ’1.732))=βˆ’1.980
  • obj4,6=min(0.800Γ—(βˆ’1.732),0.800Γ—(βˆ’1.732))=βˆ’1.386
  • obj4,7=min(1.083Γ—(βˆ’1.732),1.083Γ—(βˆ’1.732))=βˆ’1.876
  • obj4,8=min(0.900Γ—(βˆ’1.732),0.900Γ—(βˆ’1.732))=βˆ’1.559
  • obj4,9=min(0.800Γ—(βˆ’1.732),0.800Γ—(βˆ’1.732))=βˆ’1.386
  • obj4,10=min(1.111Γ—(βˆ’1.732),1.111Γ—(βˆ’1.732))=βˆ’1.924
  • obj4,11=min(0.800Γ—(βˆ’1.732),0.800Γ—(βˆ’1.732))=βˆ’1.386
  • obj4,12=min(1.067Γ—(βˆ’1.732),1.067Γ—(βˆ’1.732))=βˆ’1.848

Step 5: Final Objective

Per-response averages:

  • Response 1: 17βˆ‘π‘‘=17obj1,𝑑=17(0.673+0.646+β‹―)=0.625
  • Response 2: 112βˆ‘π‘‘=112obj2,𝑑=112(0.462+0.505+β‹―)=0.563
  • Response 3: 14βˆ‘π‘‘=14obj3,𝑑=14(0.692+0.673+β‹―)=0.669
  • Response 4: 112βˆ‘π‘‘=112obj4,𝑑=112(βˆ’1.386βˆ’2.078βˆ’β‹―)=βˆ’1.736

Final GRPO objective (group average):

π’₯οΈ€GRPO(πœƒ)=1πΊβˆ‘π‘–=1𝐺1|π‘œπ‘–|βˆ‘π‘‘=1|π‘œπ‘–|obj𝑖,𝑑=14(0.625+0.563+0.669+(βˆ’1.736))=0.030

Follow-ups and Variants

GRPO in DeepSeek R1

DeepSeek R1 [3] modifies the original GRPO objective which includes a length normalization term 1|π‘œπ‘–| and a KL divergence penalty:

π’₯οΈ€(πœƒ)=𝔼{(π‘ž,π‘Ž)βˆΌπ’ŸοΈ€,{π‘œπ‘–}𝑖=1πΊβˆΌπœ‹πœƒold(β‹…|π‘ž)}[1πΊβˆ‘π‘–=1𝐺1|π‘œπ‘–|βˆ‘π‘‘=1|π‘œπ‘–|[min(π‘Ÿπ‘–,𝑑(πœƒ)𝐴̂𝑖,𝑑,clip(π‘Ÿπ‘–,𝑑(πœƒ),1βˆ’πœ€,1+πœ€)𝐴̂𝑖,𝑑)βˆ’π›½π·KL]]

DeepSeek R1 removes the length normalization term 1|π‘œπ‘–|:

π’₯οΈ€(πœƒ)=𝔼{(π‘ž,π‘Ž)βˆΌπ’ŸοΈ€,{π‘œπ‘–}𝑖=1πΊβˆΌπœ‹πœƒold(β‹…|π‘ž)}[1πΊβˆ‘π‘–=1πΊβˆ‘π‘‘=1|π‘œπ‘–|[min(π‘Ÿπ‘–,𝑑(πœƒ)𝐴̂𝑖,𝑑,clip(π‘Ÿπ‘–,𝑑(πœƒ),1βˆ’πœ€,1+πœ€)𝐴̂𝑖,𝑑)βˆ’π›½π·KL]]

Dr. GRPO

Dr. GRPO [4] (GRPO Done Right, without bias) removes both the length normalization and the standard deviation normalization:

π’₯οΈ€Dr. GRPO(πœƒ)=𝔼{(π‘ž,π‘Ž)βˆΌπ’ŸοΈ€,{π‘œπ‘–}𝑖=1πΊβˆΌπœ‹πœƒold(β‹…|π‘ž)}[1πΊβˆ‘π‘–=1πΊβˆ‘π‘‘=1|π‘œπ‘–|min(π‘Ÿπ‘–,𝑑(πœƒ)𝐴̂𝑖,𝑑,clip(π‘Ÿπ‘–,𝑑(πœƒ),1βˆ’πœ€,1+πœ€)𝐴̂𝑖,𝑑)],

where 𝐴̂𝑖,𝑑=π‘…π‘–βˆ’mean({𝑅𝑖}𝑖=1𝐺) (no std normalization compared to the original GRPO advantage).

DAPO

Decouple Clip and Dynamic sAmpling Policy Optimization (DAPO) [5] introduces several modifications:

π’₯οΈ€DAPO(πœƒ)=𝔼{(π‘ž,π‘Ž)βˆΌπ’ŸοΈ€,{π‘œπ‘–}𝑖=1πΊβˆΌπœ‹πœƒold(β‹…|π‘ž)}[1βˆ‘π‘–=1𝐺|π‘œπ‘–|βˆ‘π‘–=1πΊβˆ‘π‘‘=1|π‘œπ‘–|min(π‘Ÿπ‘–,𝑑(πœƒ)𝐴̂𝑖,𝑑,clip(π‘Ÿπ‘–,𝑑(πœƒ),1βˆ’πœ€low,1+πœ€high)𝐴̂𝑖,𝑑)]s.t.0<|{π‘œπ‘–|is_equivalent(π‘Ž,π‘œπ‘–)}|<𝐺,

Key innovations:

  • Clip-Higher: asymmetric clipping with separate πœ€low and πœ€high, raising the ceiling
  • Dynamic sampling: over-sample and filter out prompts with the accuracy equal to 1 and 0
  • Token-level loss: rebalancing with token-level policy gradient loss

GPG

Group Policy Gradient (GPG) [6] uses log-probabilities directly instead of importance sampling ratios:

π’₯οΈ€GPG(πœƒ)=𝔼{(π‘ž,π‘Ž)βˆΌπ’ŸοΈ€,{π‘œπ‘–}𝑖=1𝐺}[1βˆ‘π‘–=1𝐺|π‘œπ‘–|βˆ‘π‘–=1πΊβˆ‘π‘‘=1|π‘œπ‘–|(logπœ‹πœƒ(π‘œπ‘–,𝑑|π‘ž,π‘œπ‘–,<𝑑)𝐴̂𝑖,𝑑)],

where 𝐴̂𝑖,𝑑=π‘…π‘–βˆ’mean({𝑅𝑖}𝑖=1𝐺)𝐹norm with 𝐹norm being an optional normalization technique.

CISPO

Clipped IS-weight Policy Optimization (CISPO) [7] combines importance sampling weights with log-probability gradients:

π’₯οΈ€CISPO(πœƒ)=𝔼{(π‘ž,π‘Ž)βˆΌπ’ŸοΈ€,{π‘œπ‘–}𝑖=1πΊβˆΌπœ‹πœƒold(β‹…|π‘ž)}[1βˆ‘π‘–=1𝐺|π‘œπ‘–|βˆ‘π‘–=1πΊβˆ‘π‘‘=1|π‘œπ‘–|sg(π‘ŸΜ‚π‘–,𝑑(πœƒ))𝐴̂𝑖,𝑑logπœ‹πœƒ(π‘œπ‘–,𝑑|π‘ž,π‘œπ‘–,<𝑑)],

where π‘ŸΜ‚π‘–,𝑑(πœƒ)=clip(π‘Ÿπ‘–,𝑑(πœƒ),1βˆ’πœ€lowIS,1+πœ€highIS) is the clipped IS weight and sg(β‹…) denotes stop-gradient.

C3PO

Constrained Contextual Computation Policy Optimization (C3PO) [8] introduces a training token budget constraint:

β„’οΈ€C3PO(πœƒ)=𝔼{{π‘ž,π‘Ž}𝑙=1πΏβˆΌπ’ŸοΈ€,{𝑦𝑖}𝑖=1πΎβˆΌπœ‹old(β‹…|π‘ž)}[1Ξ¦βˆ‘π‘–=1π‘†βˆ‘π‘‘=1|𝑦𝑖|𝕀[𝑦𝑖,π‘‘βˆˆΞ¨](min(π‘Ÿπ‘–,𝑑(πœƒ)𝐴𝑖,𝑑,clip(π‘Ÿπ‘–,𝑑(πœƒ),1βˆ’πœ€,1+πœ€)𝐴𝑖,𝑑)βˆ’π›½π·KL))],

subject to |Ξ¨|=Ξ¦, where:

Ξ¨={(𝑦1,𝑦2,…,𝑦𝑁)|π‘¦π‘–βˆˆβ„¬οΈ€}s.t.𝑁≀|ℬ︀|,βˆ‘π‘—=1π‘βˆ’1|𝑦𝑗|<Ξ¦,βˆ‘π‘—=1𝑁|𝑦𝑗|β‰₯Ξ¦

and:

  • Ξ¦ is the training token budget
  • Ξ¨ is the selected tokens by custom sampling strategy
  • 𝑆 is the selected responses for training
  • 𝑦𝑖 is the 𝑖-th response

Value-Based Variants

PPO

A response trajectory 𝜏=(𝑠0,π‘Ž0,π‘Ÿ1,…,𝑠𝑑,π‘Žπ‘‘,π‘Ÿπ‘‘+1,…,π‘ π‘‡βˆ’1,π‘Žπ‘‡βˆ’1,π‘Ÿπ‘‡,𝑠𝑇). PPO [2] optimizes the total rewards:

π’₯οΈ€PPO(πœƒ)=𝔼𝑑,𝑠𝑑,π‘Žπ‘‘βˆΌπœ‹πœƒold[min(π‘Ÿπ‘‘π΄Μ‚π‘‘,clip(π‘Ÿπ‘‘,1βˆ’πœ€,1+πœ€)𝐴̂𝑑)]

where the advantage is estimated via Generalized Advantage Estimation (GAE):

𝐴̂𝑑=𝛿𝑑+(π›Ύπœ†)𝛿𝑑+1+(π›Ύπœ†)2𝛿𝑑+2+…+(π›Ύπœ†)π‘‡βˆ’π‘‘βˆ’1π›Ώπ‘‡βˆ’1𝛿𝑑=π‘Ÿπ‘‘+1+𝛾𝑉(𝑠𝑑+1)βˆ’π‘‰(𝑠𝑑)

Here 𝛿𝑑 is the Temporal Difference (TD) error between the estimated value of the next state π‘Ÿπ‘‘+1+𝛾𝑉(𝑠𝑑+1) and the estimated value of the current state 𝑉(𝑠𝑑).

VC-PPO

Value-Calibrated PPO (VC-PPO) [9] uses the same PPO objective, and addresses the value initialization bias through:

  • Value-Pretraining: addressing the value initialization bias by value pretraining
  • Decoupled-GAE: improving in-training value estimate with decoupled-GAE

VAPO

Value-model-based Augmented PPO (VAPO) [10] optimizes:

β„’οΈ€VAPO(πœƒ)=[1βˆ‘π‘–=1𝐺|π‘œπ‘–|βˆ‘π‘–=1πΊβˆ‘π‘‘=1|π‘œπ‘–|min(π‘Ÿπ‘–,𝑑(πœƒ)𝐴̂𝑖,𝑑,clip(π‘Ÿπ‘–,𝑑(πœƒ),1βˆ’πœ€low,1+πœ€high)𝐴̂𝑖,𝑑)]

Key innovations:

  • Length-Adaptive GAE: address the inconsistency across sequences of varying lengths
  • Token-level policy gradient loss
  • Dealing with sparsity of reward signal in verifier-based tasks:

    • Clip-higher
    • Positive example LM loss: additional negative log-likelihood (NLL) loss for the correct outcomes
    • Group-sampling: sample discriminative positive and negative samples within the same prompt

T-PPO

Truncated Proximal Policy Optimization (T-PPO) [11] optimizes:

π’₯οΈ€T-PPO(πœƒ)=𝔼𝑑,𝑠𝑑,π‘Žπ‘‘βˆΌπœ‹πœƒold[min(πœ‹πœƒ(π‘Žπ‘‘|𝑠𝑑)πœ‹πœƒold(π‘Žπ‘‘|𝑠𝑑)𝐴̂𝑑,clip(πœ‹πœƒ(π‘Žπ‘‘|𝑠𝑑)πœ‹πœƒold(π‘Žπ‘‘|𝑠𝑑),1βˆ’πœ€low,1+πœ€high)𝐴̂𝑑)]

Key innovations:

  • Extended GAE: improved advantage estimation
  • Token filtering: if some sequences reach an ending condition, these sequences are removed in the next training step

References

  • [1] Z. Shao et al., β€œDeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models,” arXiv preprint arXiv:2402.03300, 2024.
  • [2] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov, β€œProximal Policy Optimization Algorithms,” arXiv preprint arXiv:1707.06347, 2017.
  • [3] DeepSeek-AI et al., β€œDeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning,” Nature, vol. 645, pp. 633–638, 2025.
  • [4] Z. Liu et al., β€œUnderstanding R1-Zero-Like Training: A Critical Perspective,” arXiv preprint arXiv:2503.20783, 2025.
  • [5] Q. Yu et al., β€œDAPO: An Open-Source LLM Reinforcement Learning System at Scale,” arXiv preprint arXiv:2503.14476, 2025.
  • [6] X. Chu, H. Huang, X. Zhang, F. Wei, and Y. Wang, β€œGPG: A Simple and Strong Reinforcement Learning Baseline for Model Reasoning,” arXiv preprint arXiv:2504.02546, 2025.
  • [7] MiniMax et al., β€œMiniMax-M1: Scaling Test-Time Compute Efficiently with Lightning Attention,” arXiv preprint arXiv:2506.13585, 2025.
  • [8] Ling Team et al., β€œRing-lite: Scalable Reasoning via C3PO-Stabilized Reinforcement Learning for LLMs,” arXiv preprint arXiv:2506.14731, 2025.
  • [9] Y. Yuan, Y. Yue, R. Zhu, T. Fan, and L. Yan, β€œWhat's Behind PPO's Collapse in Long-CoT? Value Optimization Holds the Secret,” arXiv preprint arXiv:2503.01491, 2025.
  • [10] Y. Yue et al., β€œVAPO: Efficient and Reliable Reinforcement Learning for Advanced Reasoning Tasks,” arXiv preprint arXiv:2504.05118, 2025.
  • [11] T. Fan et al., β€œTruncated Proximal Policy Optimization,” arXiv preprint arXiv:2506.15050, 2025.