GTPO and GRPO-S: Token and Sequence-Level Reward Shaping with Policy Entropy
This paper introduces GTPO and GRPO-S, two novel reinforcement learning algorithms that enhance Large Language Model reasoning by implementing dynamic entropy-based reward shaping to achieve fine-grained, token-level and sequence-level credit assignment, thereby overcoming the coarse-grained limitations of existing methods like GRPO and DAPO.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The Big Problem: The "All-or-Nothing" Grade
Imagine you are teaching a student (the AI) to solve a very long, complex math problem. The student writes a 50-step solution.
- Steps 1 through 49 are brilliant, logical, and correct.
- Step 50 (the final answer) is wrong because of a tiny calculation error.
In the current mainstream methods (like GRPO), the teacher looks at the final result, sees it's wrong, and gives the entire 50-step essay a failing grade (0 points).
- The Result: The student thinks, "Oh, I guess steps 1 through 49 were useless too." They forget the good parts and might try a completely different, random approach next time.
- The Flaw: This is called coarse-grained credit assignment. It treats the whole chain of thought as a single block, ignoring that most of it was actually perfect.
The Solution: The "Entropy" Compass
The authors of this paper propose a new way to grade the student. They introduce a concept called Policy Entropy.
Think of Entropy as a measure of "thinking hard" or "uncertainty."
- Low Entropy: The student is very confident. They are just typing out what they already know (e.g., "1 + 1 = 2").
- High Entropy: The student is pausing, considering multiple options, and wrestling with a difficult choice. They are exploring different paths.
The paper argues that High Entropy is good when you are right (it means you explored the right path carefully), but High Entropy is bad when you are wrong (it means you were guessing confidently in the wrong direction).
The Two New Algorithms
The paper introduces two new "teachers" (algorithms) that use this Entropy compass to give better feedback.
1. GTPO (Group Token Policy Optimization)
The Analogy: The "Highlighter" Teacher
Instead of grading the whole essay at once, GTPO grades every single word (token) individually.
- If the essay is Correct: The teacher highlights the words where the student hesitated or explored different options (High Entropy) and gives them extra bonus points. This tells the student: "Good job thinking hard about that specific step!"
- If the essay is Incorrect: The teacher looks for the words where the student was too confident but wrong (Low Entropy). They give these words a heavy penalty. This tells the student: "You were too sure of yourself here, and you were wrong. Don't be so confident next time."
Why it helps: It saves the good parts of the reasoning and punishes the specific moments of overconfidence that led to failure.
2. GRPO-S (Sequence-Level GRPO)
The Analogy: The "Report Card" Teacher
Sometimes, grading every single word is too slow or computationally heavy. GRPO-S is a lighter version.
- Instead of looking at individual words, it looks at the average "thinking effort" of the whole essay.
- If the essay is Correct: It checks, "Did the student generally think hard and explore?" If yes, the whole essay gets a boost.
- If the essay is Incorrect: It checks, "Was the student confidently wrong?" If yes, the whole essay gets a bigger penalty.
Why it helps: It's faster but still smarter than the old "All-or-Nothing" method. It's particularly good at keeping the student stable during very long reasoning tasks.
The Results: What Happened?
The authors tested these new teachers on tough math benchmarks (like AIME and MATH).
- The Old Way (GRPO/DAPO): The student often got stuck. They would either give up too quickly or get "stuck" in a loop of confident but wrong answers (Policy Collapse).
- The New Way (GTPO/GRPO-S):
- Exploration: The students kept trying different paths longer because they were rewarded for "thinking hard" (high entropy) when they were right.
- Precision: They learned to stop being confidently wrong.
- Performance: They scored significantly higher on difficult math problems, solving more complex chains of reasoning than before.
Summary in One Sentence
This paper teaches AI models to stop treating a long chain of thought as a single "pass or fail" grade, and instead gives them a detailed report card that rewards them for thinking hard when they are right and being humble when they are wrong, leading to much smarter reasoning.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.