arXiv:2502.18548cs.LGcs.AI2025-02被引 24

解析GRPO算法如何聚合偏好,揭示其与传统方法的本质差异。

What is the Alignment Objective of GRPO?

  • 通过奖励偏好模型与反KL散度惩罚,实现非标准偏好聚合。
  • 在双样本组下,偏好聚合等价于成对比较,大组时趋向稳定分布。
  • 适合研究对齐机制、强化学习训练策略的科研人员阅读。

本文分析了用于训练DeepSeek-R1-Zero和DeepSeekMath等先进AI模型的分组策略优化(GRPO)算法所实现的偏好聚合机制。该算法利用奖励偏好模型,通过采样多个输出并观察对应奖励值,再进行平移缩放归一化处理;同时引入惩罚项以抑制与参考策略的偏离。我们构建了一个框架,刻画了GRPO的平稳策略。分析表明,其偏好聚合方式与标准对数池化有本质区别,源于奖励偏好模型的定义及惩罚项——后者实质上是聚合策略与参考策略间的反向Kullback-Leibler(KL)散度。有趣的是,在两样本组情况下,奖励偏好模型等价于成对比较偏好,类似于基于成对反馈的其他对齐方法。本文给出了二元问题、两样本组及大样本极限下的聚合偏好显式表达式,揭示了正则化常数与答案置信度边际对聚合结果的影响。最后,讨论了将惩罚项改为直接KL散度或去除归一化的修改版本所得偏好的变化。

原文摘要 · Abstract (English)

In this note, we examine the aggregation of preferences achieved by the Group Policy Optimisation (GRPO) algorithm, a reinforcement learning method used to train advanced artificial intelligence models such as DeepSeek-R1-Zero and DeepSeekMath. The GRPO algorithm trains a policy using a reward preference model, which is computed by sampling a set of outputs for a given context, observing the corresponding rewards, and applying shift-and-scale normalisation to these reward values. Additionally, it incorporates a penalty function to discourage deviations from a reference policy. We present a framework that enables us to characterise the stationary policies of the GRPO algorithm. This analysis reveals that the aggregation of preferences differs fundamentally from standard logarithmic pooling, which is implemented by other approaches such as RLHF. The precise form of preference aggregation arises from the way the reward preference model is defined and from the penalty function, which we show to essentially correspond to the reverse Kullback-Leibler (KL) divergence between the aggregation policy and the reference policy. Interestingly, we demonstrate that for groups of size two, the reward preference model corresponds to pairwise comparison preferences, similar to those in other alignment methods based on pairwise comparison feedback. We provide explicit characterisations of the aggregate preference for binary questions, for groups of size two, and in the limit of large group size. This provides insights into the dependence of the aggregate preference on parameters such as the regularisation constant and the confidence margin of question answers. Finally, we discuss the aggregation of preferences obtained by modifying the GRPO algorithm to use direct KL divergence as the penalty or to use rewards without scale normalisation.

强化学习对齐机制策略优化偏好聚合

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。