cs.LGApr 14, 2026

Balanced Aggregation: Understanding and Fixing Aggregation Bias in GRPO

Authors: Zhiyuan Zeng, Jiameng Huang, Zhangyue Yin, Jiashuo Liu, Ziniu Li, Bingrui Li, Yuhao Wu, Yining Zheng, +3 more

Organizations: Fudan University · M-A-P · Peking University · Tsinghua University · Singapore University of Technology and Design · Shanghai Innovation Institute

Abstract

Reinforcement learning with verifiable rewards (RLVR) has become a central paradigm for improving reasoning and code generation in large language models, and GRPO-style training is widely adopted for its simplicity and effectiveness. However, an important design choice remains underexplored: how token-level policy gradient terms are aggregated within each sampled group. Standard GRPO uses sequence aggregation, while recent work has advocated token aggregation as a better alternative. We show that these two rules induce different optimization biases: token aggregation introduces sign-length coupling, while sequence aggregation implicitly downweights longer responses through sequence-level equal weighting. To address this tension, we propose Balanced Aggregation (BA), a simple drop-in replacement that computes token-level means separately within the positive and negative subsets and then combines them with sequence-count-based weights. Experiments with Qwen2.5-Math-7B and Qwen3-1.7B on DAPO-17k and Polaris, evaluated on six reasoning and coding benchmarks, show that BA consistently improves training stability and final performance over standard token and sequence aggregation. Our analysis further shows that the relative effectiveness of token and sequence aggregation is largely governed by response-length variation and the positive-negative length gap, highlighting aggregation as a critical design dimension in GRPO-style RLVR.

Figures & tables

Explore similar work

CardsList
  1. ReCo: Reweighting GRPO Against Distributional Concentration

    Jul 29, 2026Junoh Park, Junseo Hwang, Wonguk Cho +1Reasoning DiversityRL for Language Model Reasoning

  2. EP-GRPO: Entropy-Progress Aligned Group Relative Policy Optimization with Implicit Process Guidance

    May 6, 2026Song Yu, Li Li, Wenwen Zhao +1RL for Language Model ReasoningGroup Relative Policy Optimization