GRPOは10倍効率的か?Kwai AIのSRPOがYesを示唆
本文の状態
日本語全文を表示中
詳細モードで約12分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Synced Review
Kwai AIは、大規模強化学習を用いた推論モデルの効率化手法「SRPO」を発表した。これはOpenAI o1やDeepSeek-R1の背景にある技術に関連し、GRPOを最大10倍効率的にできる可能性を示唆している。
Continue in AI NEW LAB
このニュースを、実務の判断につなげる
AI NEW LABで、試したことや先に確認したい条件を共有できます。まずはログインなしで読めます。
AI NEW LABで論点を見るSource Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
OpenAI の o1 シリーズと DeepSeek-R1 の目覚ましい成功は、大規模な強化学習(RL)が洗練された推論行動を引き出し、大規模言語モデル(LLM)の能力を大幅に向上させる力を持っていることを明確に示しました。

しかし、これらの画期的な推論モデルの背後にある中核的なトレーニング手法は、技術報告書において依然として不明瞭なままです。最近のコミュニティの取り組みは主に数学的推論に焦点を当てており、ドメイン横断的な一般化という課題はほとんど探求されていません。さらに、標準的な好意最適化からの強化学習(GRPO)トレーニングは、パフォーマンスのボトルネック、サンプル利用の非効率性、混合ドメインデータセットを扱う際に専門的な推論スキルを育成する難しさといった一般的な問題に悩まされています。これらの課題は、LLM に対する RL 手法の効果的なスケーリングを複雑にしています。
これらの限界に対処するため、Kuaishou の Kwaipilot チームの研究者たちは、新しい強化学習フレームワークである「2 段階履歴再サンプリングポリシー最適化(SRPO)」を導入しました。この革新的なアプローチは、上記のトレーニング課題を複数の次元にわたって体系的に解決するために設計されています。チームはトレーニング手法の詳細を詳述した技術報告書を公開するとともに、SRPO-Qwen-32B モデルもオープンソース化しています。
特筆すべきは、この研究が数学およびコードの両ドメインにおいて、DeepSeek-R1-Zero レベルのパフォーマンスを同時に達成した初の事例となる点です。DeepSeek と同じベースモデル(Qwen2.5-32B)を活用し、純粋な強化学習(Reinforcement Learning: RL)アプローチを採用することで、SRPO は AIME24 (50) および LiveCodeBench (41.6) のベンチマークにおいて印象的な結果を達成し、DeepSeek-R1-Zero-32B のパフォーマンスを上回りました。
さらに驚くべきことに、SRPO は R1-Zero が要するトレーニングステップのわずか 10 分の 1 で、このレベルのパフォーマンスを実現しています。
バニラ GRPO の課題
初期の探索において、Kwaipilot チームは標準的な GRPO アルゴリズムを試験しました。しかし、すぐにボトルネックに直面し、モデルが望ましい R1-Zero レベルのパフォーマンスに到達することを阻害されました。これらの問題には以下が含まれます:
ドメイン横断最適化の競合(数学 vs コード): 数学的な問題は、より長く詳細な推論軌道(Long CoT)を引き起こす傾向がありますが、コードデータはこれに対する傾斜が弱いです。この 2 つのデータタイプを直接混合すると競合が生じ、両ドメインにおいて最適ではないパフォーマンスにつながりました。
類似したグループ報酬によるトレーニング効率の低下:GRPO アルゴリズムは、サンプリングされたグループ内の非ゼロ報酬の分散を利用してアドバンテージを計算します。グループ内のロールアウトがほぼ同一の報酬値をもたらす場合、計算されるアドバンテージはゼロに近づきます。トレーニングバッチの大きな割合がこの現象を示す場合、有効な勾配寄与は最小限となり、トレーニング効率が劇的に低下します。
早期のパフォーマンス飽和:GRPO トレーニングでは、ベンチマーク評価において早期のパフォーマンス頭打ちと報酬飽和が発生しました。この問題は部分的にデータ品質の不足に起因しています。トレーニングデータに十分な複雑さや多様性が欠けており、特に単純な問題が abundant である場合、モデルは容易なタスクでのパフォーマンスを保守的に維持する傾向があり、困難な問題に必要な複雑で深遠な推論能力の開発を阻害します。
二段階トレーニング
数学ドメインとコードドメインの間にある本質的な応答長競合に対処するため、Kwaipilot チームは二段階のトレーニングパラダイムを実装しました:
第 1 ステージ:推論能力の誘発:この初期トレーニングフェーズは、困難な数学データに専念します。主な目的は、モデルのテスト時スケーリングを完全にインセンティブ化し、反射的一時停止、バックトラック、段階的な分解といった能力を育成することです。
第2段階:スキル統合:この段階では、トレーニングプロセスにコードデータが導入されます。第1段階で確立された推論の基盤を踏まえ、このフェーズはコーディング能力をさらに強化すると同時に、手続き的思考、再帰、およびツール呼び出し機能を段階的に高めていくことを目指しています。
トレーニング戦略の比較分析
異なるトレーニングデータ戦略が応答長に与える影響を分析したところ、以下の知見が得られました。
混合トレーニング:数学データとコードデータの両方を組み合わせてトレーニングされたモデルは、応答長の成長が限定的であり、ベンチマーク性能も低かったです。数学問題ではいくつかの推論パターンを引き出すこともありましたが、コード問題では即座にコード出力を行うことに焦点を当てた短く直接的な応答が多く、事前分析や計画が最小限にとどまる傾向がありました。
数学のみトレーニング:数学データのみでトレーニングを行った結果、応答長は安定的に増加し、数学ベンチマークでの性能も極めて良好でした。重要なのは、強力で汎用性の高い推論能力を育んだことです。プログラミングタスクに直面した際にも、モデルは詳細な段階的な推論を試み、数学的問題解決における綿密な確認や手順の再検討を含むものでした。
コードのみによるトレーニング:コードベンチマークでのパフォーマンスは向上しましたが、明示的な推論行動の開発は最小限にとどまり、応答長の大幅な増加を達成するのは困難でした。コードと数学の両方の問題に対する応答は、数学のみによるトレーニングと比較して明らかに短く、コード解決策はしばしば段階的な推論や初期分析なしに直接生成されていました。
段階的トレーニング:Kwaipilot チームが提案した 2 段階トレーニングアプローチは、数学およびプログラミングの両ドメインで優れた結果をもたらしました。モデルは一貫して数学問題に対して詳細な段階的な推論を生成し、プログラミングタスクに対して構造化された推論パターンを示しました。特筆すべきは、複雑な行動が現れたことです。例えば、モデルが自発的にコードを利用して数学的推論を補助するといった行動です。
履歴再サンプリング
Kwaipilot チームの観察によると、トレーニングの中盤から後期にかけて、バッチ内のサンプリングされたグループのほぼ 50% が同一の報酬を生成していました。これは、モデルが簡単な問題に対して一貫して成功し、結果として報酬の変動が最小限となり、勾配更新が非効果的になる場合に頻繁に発生しました。
この非効率性を解消し、勾配信号の品質を向上させるために、彼らは履歴再サンプリング(History Resampling)を導入しました。トレーニング中、各エポック内のすべてのロールアウトの結果となる報酬を記録します。エポック終了時、以下の基準に基づいて次のエポック用のデータセットを再構築します。
過度に単純なサンプルのフィルタリング:すべてのロールアウトが正解に至ったサンプルは除外されます。これらはポリシー改善のための有益な信号を提供しないためです。
情報量の多いサンプルの保持:多様な結果(正解と不正解の両方を含む)またはすべてが不正解となるサンプルは保持されます。これらのサンプルは正味の報酬分散を生み出し、ゼロでないアドバンテージと効果的な勾配信号を確保します。さらに、現在のエポックですべてのロールアウトが不正解となった困難なサンプルも維持されます。その理由は、当初は難易度が高い問題であっても、更新されたポリシーにとっては相対的に容易になり、後のトレーニングで効果的な勾配を生み出す可能性があるからです。この戦略はカリキュラム学習の原則に合致しており、モデルを徐々に平均してより困難なサンプルに曝すことで、トレーニング効率を向上させます。
DAPO で提案されたダイナミックサンプリング(Dynamic Sampling)手法と比較すると、履歴再サンプリングは計算効率を大幅に改善し、応答長の成長をより安定したものにしました。
データ
KwaiPilot チームは、公開されている Code&Math データセットに対して綿密なデータクリーニングとフィルタリングを行いました。彼らはヒューリスティックルールを適用して無関係な URL やフォーマットノイズを除去し、元データの核心フィールド(質問と回答の正解)の完全性を確保しました。数学データにおける PRIME のデータクリーニングアプローチに倣い、多段階の問題や純粋な証明ベースの問題、画像や表の理解を必要とする問題を除外しました。コードデータについては、特定の環境依存性、ファイル入出力、ネットワーク相互作用に依存する問題を排除し、アルゴリズムロジックに焦点を当てました。
データ取り込み前に、数学およびコード問題の両方について正誤検証を実施し、回答の正確性と解ける可能性を保証しました。その際、誤りや曖昧な解答を含む問題は破棄しています。その後、各問題の難易度を評価し、パス率(Pass@k)に基づいて容易・中程度・困難の 3 レベルに分類しました。
実験結果
本節では、SRPO 手法を用いて得られた実験結果について詳述します。KwaiPilot チームは、トレーニング中の報酬や応答長さなどの指標の変化に注力して観察を行いました。
トレーニングプロセス
上記の図は、SRPO 訓練中の完全な報酬曲線と応答長曲線を示しています。初期の報酬増加が頭打ちになり始めた後、訓練は第 2 ステージに移行しました。第 2 ステージの初めには、モデルがコードに関する事前訓練を十分に受けていなかったため全体の報酬が一時的に減少しましたが、その後の訓練を通じて報酬は着実に増加しました。コードデータの統合は応答長を大幅に増加させることはありませんでした。これは彼らの予想通りでした。同時に、ベンチマーク結果は、数学的およびコーディング能力の両面でモデルが継続的で安定した改善を示していることを示しており、新手法の有効性が実証されました。
具体的には、履歴再サンプリング(History Resampling)により、各訓練ステップにおける勾配更新が効果的に維持され、情報量の多い勾配の割合が直接的に増加しました。このサンプリング効率の向上は、安定した報酬成長をもたらすとともに、再サンプリング戦略によって達成された訓練効率の改善を明確に示しています。
推論行動
Kwaipilot チームは、3 つの代表的な反省パターンを特定しました。それは再確認(recheck)、躊躇(hesitation)、そして探索(exploration)です。これらのパターンを含む回答を統計的に分析し、各パターンの平均応答長を記録しました。強化学習(RL: Reinforcement Learning)トレーニング中、モデルの自己反省、修正、後退の頻度が徐々に増加していることが観察され、「自己検証」能力の出現が示唆されました。彼らは、強化学習中のモデルにおいて人間の認知プロセスに似た「反省」が現れることは、ポリシー最適化プロセスの結果としての適応行動であると仮定しています。
上記の図に示すように、トレーニングの初期段階ではモデルは以前の推論ステップに対する能動的なチェックや反省をほとんど行いませんでした。しかし、トレーニングが進むにつれて、モデルは顕著な反省的および後退行動を示し、段階的な推論(step-by-step reasoning)、数値置換(numerical substitution)、段階的検証(step-by-step verification)、自己最適化(self-optimization)といった応答パターンを形成しました。
興味深いことに、彼らはまた、モデルが数学的問題を解決する際に自発的にプログラムコードを検証に使用することを学習したことも発見しました。まず数式推論を通じて解決プロセスを提供し、その後、解決策の正しさを検証するために積極的にプログラムコードを記述します。これらの事例は、モデルが自己修正や複数回の試行のために手続き的思考を活用できる能力を示しており、さらに訓練の後期段階において、モデルが広範な思考法を習得し、問題解決のために様々なコードベース推論アプローチを統合的に応用できるようになったことを示唆しています。
論文「SRPO: A Cross-Domain Implementation of Large-Scale Reinforcement Learning on LLM」は arXiv に掲載されています。
HuggingFace で SRPO-Qwen-32B モデルを試すことができます。
本記事「Can GRPO be 10x Efficient? Kwai AI’s SRPO Suggests Yes with SRPO」は、Synced に最初に投稿されました。
原文を表示
The remarkable success of OpenAI’s o1 series and DeepSeek-R1 has unequivocally demonstrated the power of large-scale reinforcement learning (RL) in eliciting sophisticated reasoning behaviors and significantly enhancing the capabilities of large language models (LLMs).

However, the core training methodologies behind these groundbreaking reasoning models often remain veiled in their technical reports. Recent community efforts have predominantly focused on mathematical reasoning, leaving the challenge of cross-domain generalization largely unexplored. Furthermore, standard Reinforcement Learning from Preference Optimization (GRPO) training is plagued by common issues such as performance bottlenecks, inefficient sample utilization, and difficulties in cultivating specialized reasoning skills when dealing with mixed-domain datasets. These challenges complicate the effective scaling of RL methods for LLMs.
Addressing these limitations, researchers from the Kwaipilot team at Kuaishou have introduced a novel reinforcement learning framework: Two-Staged history-Resampling Policy Optimization (SRPO). This innovative approach is designed to systematically tackle the aforementioned training challenges across multiple dimensions. The team has publicly released a technical report detailing the intricacies of their training method and has also open-sourced the SRPO-Qwen-32B model.
Notably, this work marks the first instance of achieving DeepSeek-R1-Zero-level performance concurrently in both mathematical and code domains. By leveraging the same base model as DeepSeek (Qwen2.5-32B) and employing a purely reinforcement learning training approach, SRPO has achieved impressive results on the AIME24 (50) and LiveCodeBench (41.6) benchmarks, surpassing the performance of DeepSeek-R1-Zero-32B.
Even more remarkably, SRPO achieves this level of performance with only one-tenth of the training steps required by R1-Zero.
Challenges with Vanilla GRPO
In their initial explorations, the Kwaipilot team experimented with the standard GRPO algorithm. However, they quickly encountered bottlenecks that prevented the model from reaching the desired R1-Zero performance levels. These issues included:
Cross-Domain Optimization Conflicts (Math vs. Code): Mathematical problems tend to elicit longer and more detailed reasoning trajectories (Long CoT), while code data exhibits a weaker inclination towards this. Directly mixing these two data types led to conflicts, resulting in suboptimal performance in both domains.
Reduced Training Efficiency due to Similar Group Rewards: The GRPO algorithm relies on the variance of non-zero rewards within a sampled group to calculate the advantage. When rollouts within a group yield nearly identical reward values, the calculated advantage approaches zero. If a significant portion of the training batch exhibits this phenomenon, effective gradient contributions become minimal, drastically reducing training efficiency.
Premature Performance Saturation: GRPO training encountered early performance plateaus and reward saturation on benchmark evaluations. This issue was partly attributed to insufficient data quality. When the training data lacks sufficient complexity or diversity, particularly with an abundance of simpler problems, the model tends to conservatively maintain its performance on easier tasks, hindering its ability to develop the complex and in-depth reasoning required for challenging problems.
Two-Staged Training
To address the inherent response length conflicts between mathematical and code domains, the Kwaipilot team implemented a two-stage training paradigm:
Stage 1: Eliciting Reasoning Abilities: This initial training phase focuses exclusively on challenging mathematical data. The primary goal is to fully incentivize the model’s test-time scaling, fostering capabilities such as reflective pausing, backtracking, and step-by-step decomposition.
Stage 2: Skill Integration: In this stage, code data is introduced into the training process. Building upon the reasoning foundation established in Stage 1, this phase aims to further enhance coding abilities while progressively strengthening procedural thinking, recursion, and tool-calling capabilities.
Comparative Analysis of Training Strategies
The impact of different training data strategies on response length was analyzed, revealing the following insights:
Mixed Training: Models trained on a mixture of math and code data showed limited growth in response length and poor benchmark performance. While math problems elicited some reasoning patterns, code problems often resulted in short, direct responses focused on immediate code output with minimal preliminary analysis or planning.
Math-Only Training: Training solely on mathematical data led to a stable increase in response length and excellent performance on math benchmarks. Crucially, it fostered strong and generalizable reasoning abilities; when faced with programming tasks, the model attempted detailed, step-by-step reasoning, including meticulous checking and revisiting steps in mathematical problem-solving.
Code-Only Training: While showing improved performance on code benchmarks, the development of explicit reasoning behavior was minimal, and achieving significant increases in response length proved difficult. Responses to both code and math problems were noticeably shorter compared to math-only training, with code solutions often being directly generated without substantial step-by-step reasoning or initial analysis.
Staged Training: The two-stage training approach proposed by the Kwaipilot team yielded superior results in both mathematical and programming domains. The model consistently generated detailed step-by-step reasoning for math problems and structured reasoning patterns for programming tasks. Notably, complex behaviors emerged, such as the model spontaneously utilizing code to assist in mathematical reasoning.
History Resampling
The Kwaipilot team observed that during the mid-to-late stages of training, nearly 50% of the sampled groups within a batch produced identical rewards. This often occurred when the model consistently succeeded on easier problems, leading to minimal reward variance and ineffective gradient updates.
To address this inefficiency and improve the quality of the gradient signal, they introduced History Resampling. During training, they recorded the reward outcomes of all rollouts within each epoch. At the end of an epoch, they reconstructed the dataset for the next epoch based on the following criteria:
Filtering Overly Simple Samples: Samples where all rollouts resulted in correct answers were excluded, as they provided no informative signal for policy improvement.
Retaining Informative Samples: Samples with diverse outcomes (both correct and incorrect) or all incorrect outcomes were retained. These samples generated positive reward variance, ensuring non-zero advantages and effective gradient signals. Furthermore, difficult samples where all rollouts were incorrect in the current epoch were also kept. The rationale is that these initially challenging problems might become relatively easier for the updated policy, thus generating effective gradients in subsequent training. This strategy aligns with the principle of curriculum learning, gradually exposing the model to increasingly challenging samples on average to enhance training efficiency.
Compared to the Dynamic Sampling method proposed in DAPO, History Resampling significantly improved computational efficiency and resulted in more stable response length growth.
Data
The Kwaipilot team performed meticulous data cleaning and filtering on publicly available Code&Math datasets. They applied heuristic rules to filter out irrelevant URLs, formatting noise, and ensured the completeness of core fields (question and answer ground truth) in the original data. Following the data cleaning approach of PRIME for mathematical data, they removed multi-part questions, pure proof-based problems, and those requiring image or table understanding. For code data, they excluded problems dependent on specific environments, file I/O, or network interactions, focusing on algorithmic logic.
Before data ingestion, they conducted correctness verification for both math and code problems to ensure the accuracy and solvability of the answers, discarding those with incorrect or ambiguous solutions. Subsequently, they assessed the difficulty of each problem, categorizing them into easy, medium, and hard levels based on their pass rate (Pass@k).
Experimental Results
This section details the experimental results obtained using the SRPO method. The Kwaipilot team focused on observing the changes in reward and metrics such as response length during training.
Training Process
The figure above illustrates the complete reward curve and response length curve during SRPO training. After the initial reward growth began to plateau, the training transitioned into the second stage. At the beginning of the second stage, the overall reward decreased due to the model’s prior lack of training on code, followed by a steady increase in reward during subsequent training. Integrating code data did not significantly increase the response length, which aligned with their expectations. Simultaneously, benchmark results indicated a continuous and stable improvement in both the mathematical and coding abilities of the model, demonstrating the effectiveness of the new method.
Specifically, History Resampling ensured that gradient updates remained effective at each training step, directly increasing the proportion of informative gradients. This enhanced sampling efficiency led to stable reward growth, clearly showcasing the improved training efficiency achieved by the resampling strategy.
Reasoning Behaviors
The Kwaipilot team identified three representative reflective patterns: recheck, hesitation, and exploration. They statistically analyzed responses containing these patterns and recorded the average response length for each. During RL training, they observed a gradual increase in the frequency of the model’s self-reflection, correction, and backtracking, indicating the emergence of a “self-verification” ability. They posit that the emergence of “reflection,” akin to human cognitive processes, in the model during RL is an adaptive behavior resulting from the policy optimization process.
As shown in the figure above, the model exhibited almost no proactive checking and reflection of previous reasoning steps in the early stages of training. However, as training progressed, the model displayed significant reflective and backtracking behaviors, forming response patterns such as step-by-step reasoning, numerical substitution, step-by-step verification, and self-optimization.
Interestingly, they also discovered that the model learned to spontaneously use program code for verification when solving mathematical problems. It would first provide a solution process through mathematical reasoning and then proactively write program code to verify the correctness of the solution. These instances demonstrated the model’s ability to leverage procedural thinking for self-correction and multiple attempts, further indicating that in the later stages of training, the model had mastered broad thinking and the integrated application of various code-based reasoning approaches for problem-solving.
The Paper SRPO: A Cross-Domain Implementation of Large-Scale Reinforcement Learning on LLM is on arXiv
Try with the SRPO-Qwen-32B Model on HuggingFace
The post Can GRPO be 10x Efficient? Kwai AI’s SRPO Suggests Yes with SRPO first appeared on Synced.
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み