Prefix Grouper: Efficient GRPO Training through Shared-Prefix Forward
On the map: LLM reasoning → Reinforcement learning for reasoning
Abstract (arXiv)
Group Relative Policy Optimization (GRPO) enhances policy learning by computing gradients from relative comparisons among candidate outputs that share a common input prefix. Despite its effectiveness, GRPO introduces substantial computational overhead when processing long shared prefixes, which must be redundantly encoded for each group member. This inefficiency becomes a major scalability bottleneck in long-context learning scenarios. We propose Prefix Grouper, an efficient GRPO training algorithm that eliminates redundant prefix computation via a Shared-Prefix Forward strategy. In particular, by restructuring self-attention into two parts, our method enables the shared prefix to be encoded only once, while preserving full differentiability and compatibility with end-to-end training. We provide both theoretical and empirical evidence that Prefix Grouper is training-equivalent to standard GRPO: it yields identical forward outputs and backward gradients, ensuring that the optimization dynamics and final policy performance remain unchanged. Empirically, our experiments confirm that Prefix Grouper achieves consistent results while significantly reducing the computational cost of training, particularly in long-prefix scenarios. The proposed method is fully plug-and-play: it is compatible with existing GRPO-based architectures and can be seamlessly integrated into current training pipelines as a drop-in replacement, requiring no structural modifications and only minimal changes to input construction and attention computation. Prefix Grouper enables the use of larger group sizes under the same computational budget, thereby improving the scalability of GRPO to more complex tasks and larger models. Code is now available at https://github.com/johncaged/PrefixGrouper
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Placed in Reinforcement learning for reasoning, one of 17 directions in LLM reasoning. Builds on 8 of its 8 references that are in the map. First posted on arXiv 5 Jun 2025.
Builds on
8 of 8 references.
References · 8
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
- 2025Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learningcited by 1,444
- 2024Qwen2.5-Math Technical Report: Toward Mathematical Expert Model via Self-Improvementcited by 1,090
- 2025Vision-R1: Incentivizing Reasoning Capability in Multimodal Large Language Modelscited by 665
- 2025VLM-R1: A Stable and Generalizable R1-style Large Vision-Language Modelcited by 526
- 2025Video-R1: Reinforcing Video Reasoning in MLLMscited by 484
- 2025VideoChat-R1: Enhancing Spatio-Temporal Perception via Reinforcement Fine-Tuningcited by 255
- 2025Time-R1: Post-Training Large Vision Language Model for Temporal Video Groundingcited by 146
Built on by
Citing papers per year: 2025: 3; 2026: 6.
9 papers.
- 2025SPEC-RL: Accelerating On-Policy Reinforcement Learning with Speculative Rolloutscited by 12
- 2025Tree Training: Accelerating Agentic LLMs Training via Shared Prefix Reusecited by 5
- 2026DualKV: Shared-Prompt Flash Attention for Efficient RL Training with Large Rollouts and Long Contextscited by 2
- 2026Faster Synchronous On-Policy RL via Straggler-Aware Group Sizingcited by 2
- 2025LaV-CoT: Language-Aware Visual CoT with Multi-Aspect Reward Optimization for Real-World Multilingual VQAcited by 1
- 2026Thinking Seeds: Leveraging Historical Diversity for Position-Aware RL in LLMscited by 1
- 2026Consensus Group Relative Policy Optimization for Text Generationcited by 1
- 2026Are complicated loss functions necessary for teaching LLMs to reason?cited by 1
- 2026Rollplex: Cross-Phase GPU Spatial Sharing for Vision Language Model Post-Trainingcited by 1
- 2026Rollplex: Cross-Phase GPU Spatial Sharing for Vision Language Model Post-Training14 Aug 2026
- 2026Faster Synchronous On-Policy RL via Straggler-Aware Group Sizing1 Jun 2026
- 2026DualKV: Shared-Prompt Flash Attention for Efficient RL Training with Large Rollouts and Long Contexts14 May 2026
- 2026Are complicated loss functions necessary for teaching LLMs to reason?19 Mar 2026
- 2026Consensus Group Relative Policy Optimization for Text Generation3 Feb 2026
- 2026Thinking Seeds: Leveraging Historical Diversity for Position-Aware RL in LLMs29 Jan 2026
- 2025Tree Training: Accelerating Agentic LLMs Training via Shared Prefix Reuse1 Nov 2025
- 2025SPEC-RL: Accelerating On-Policy Reinforcement Learning with Speculative Rollouts27 Sep 2025
- 2025LaV-CoT: Language-Aware Visual CoT with Multi-Aspect Reward Optimization for Real-World Multilingual VQA12 Sep 2025
Similar, not cited
Close in wording, no citation either way
- 2026Demystifying Group Relative Policy Optimization: Its Policy Gradient is a U-Statistic
- 2025GTPO: Stabilizing Group Relative Policy Optimization via Gradient and Entropy Control
- 2025Composing Policy Gradients and Prompt Optimization for Language Model Programs
- 2025Revisiting Group Relative Policy Optimization: Insights into On-Policy and Off-Policy Training
- 2025GRPO-RM: Fine-Tuning Representation Models via GRPO-Driven Reinforcement Learning
- 2026Constrained Group Relative Policy Optimization
- 2026BPPO: Binary Prefix Policy Optimization for Efficient GRPO-Style Reasoning RL with Concise Responses
- 2026On the Policy Gradient Foundations of Group Relative Policy Optimization: Credit Assignment, Gradient Sparsity, and Rank Collapse