GAPO: Robust Advantage Estimation for Real-World Code LLMs

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Zhang, Jianqing, Hao, Zhezheng, Xia, Wei, Dong, Hande, Wang, Hong, Wei, Chenxing, Zhou, Yuyan, Qi, Yubin, Lin, Qiang, Cao, Jian
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866912809166569472
author Zhang, Jianqing
Hao, Zhezheng
Xia, Wei
Dong, Hande
Wang, Hong
Wei, Chenxing
Zhou, Yuyan
Qi, Yubin
Lin, Qiang
Cao, Jian
author_facet Zhang, Jianqing
Hao, Zhezheng
Xia, Wei
Dong, Hande
Wang, Hong
Wei, Chenxing
Zhou, Yuyan
Qi, Yubin
Lin, Qiang
Cao, Jian
contents Reinforcement learning (RL) is widely used for post-training large language models (LLMs) in code editing, where group-relative methods, such as GRPO, are popular due to their critic-free and normalized advantage estimation. However, in real-world code-editing scenarios, reward distributions are often skewed with unpredictable noise, leading to distorted advantage computation and increased rollout outliers. To address this issue, we propose Group Adaptive Policy Optimization (GAPO), which adaptively finds an interval with the highest SNR (Signal to Noise Ratio) per prompt and uses the median of that interval as an adaptive Q to replace the group mean in advantage calculation to reduce noise further. This adaptive Q robustly handles rollout noise while remaining plug-and-play and efficient. We evaluate GAPO on nine instruction-tuned LLMs (3B-14B) using a collected large dataset of 51,844 real-world, history-aware code-editing tasks spanning 10 programming languages. GAPO yields up to 4.35 in-domain (ID) and 5.30 out-of-domain (OOD) exact-match improvements over GRPO and its variant DAPO, while achieving lower clipping ratios and higher GPU throughput. Code: https://github.com/TsingZ0/verl-GAPO.
format Preprint
id arxiv_https___arxiv_org_abs_2510_21830
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle GAPO: Robust Advantage Estimation for Real-World Code LLMs
Zhang, Jianqing
Hao, Zhezheng
Xia, Wei
Dong, Hande
Wang, Hong
Wei, Chenxing
Zhou, Yuyan
Qi, Yubin
Lin, Qiang
Cao, Jian
Machine Learning
Artificial Intelligence
Reinforcement learning (RL) is widely used for post-training large language models (LLMs) in code editing, where group-relative methods, such as GRPO, are popular due to their critic-free and normalized advantage estimation. However, in real-world code-editing scenarios, reward distributions are often skewed with unpredictable noise, leading to distorted advantage computation and increased rollout outliers. To address this issue, we propose Group Adaptive Policy Optimization (GAPO), which adaptively finds an interval with the highest SNR (Signal to Noise Ratio) per prompt and uses the median of that interval as an adaptive Q to replace the group mean in advantage calculation to reduce noise further. This adaptive Q robustly handles rollout noise while remaining plug-and-play and efficient. We evaluate GAPO on nine instruction-tuned LLMs (3B-14B) using a collected large dataset of 51,844 real-world, history-aware code-editing tasks spanning 10 programming languages. GAPO yields up to 4.35 in-domain (ID) and 5.30 out-of-domain (OOD) exact-match improvements over GRPO and its variant DAPO, while achieving lower clipping ratios and higher GPU throughput. Code: https://github.com/TsingZ0/verl-GAPO.
title GAPO: Robust Advantage Estimation for Real-World Code LLMs
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2510.21830