Apprentissage par Renforcement pour le Raisonnement dans les Grands Modèles de Langage avec un Seul Exemple d'Entraînement
Reinforcement Learning for Reasoning in Large Language Models with One Training Example
April 29, 2025
Auteurs: Yiping Wang, Qing Yang, Zhiyuan Zeng, Liliang Ren, Lucas Liu, Baolin Peng, Hao Cheng, Xuehai He, Kuan Wang, Jianfeng Gao, Weizhu Chen, Shuohang Wang, Simon Shaolei Du, Yelong Shen
cs.AI
Résumé
Nous démontrons que l'apprentissage par renforcement avec récompense vérifiable utilisant un seul exemple d'entraînement (RLVR en 1-shot) est efficace pour stimuler les capacités de raisonnement mathématique des grands modèles de langage (LLMs). En appliquant RLVR au modèle de base Qwen2.5-Math-1.5B, nous identifions un seul exemple qui améliore les performances du modèle sur MATH500 de 36,0 % à 73,6 %, et augmente la performance moyenne sur six benchmarks courants de raisonnement mathématique de 17,6 % à 35,7 %. Ce résultat correspond aux performances obtenues en utilisant le sous-ensemble DeepScaleR de 1,2k exemples (MATH500 : 73,6 %, moyenne : 35,9 %), qui inclut l'exemple mentionné. Des améliorations substantielles similaires sont observées sur divers modèles (Qwen2.5-Math-7B, Llama3.2-3B-Instruct, DeepSeek-R1-Distill-Qwen-1.5B), algorithmes de RL (GRPO et PPO), et différents exemples mathématiques (dont beaucoup entraînent une amélioration d'environ 30 % ou plus sur MATH500 lorsqu'ils sont utilisés comme unique exemple d'entraînement). De plus, nous identifions des phénomènes intéressants lors du RLVR en 1-shot, notamment la généralisation inter-domaines, une fréquence accrue d'auto-réflexion, et une amélioration soutenue des performances en test même après que la précision en entraînement a saturé, un phénomène que nous appelons généralisation post-saturation. Par ailleurs, nous vérifions que l'efficacité du RLVR en 1-shot découle principalement de la perte de gradient de politique, la distinguant ainsi du phénomène de "grokking". Nous montrons également le rôle crucial de la promotion de l'exploration (par exemple, en ajoutant une perte d'entropie avec un coefficient approprié) dans l'entraînement RLVR en 1-shot. En bonus, nous observons que l'application de la perte d'entropie seule, sans aucune récompense de résultat, améliore significativement les performances de Qwen2.5-Math-1.5B sur MATH500 de 27,4 %. Ces résultats peuvent inspirer des travaux futurs sur l'efficacité des données en RLVR et encourager un réexamen des progrès récents ainsi que des mécanismes sous-jacents en RLVR. Notre code, modèle et données sont open source à l'adresse https://github.com/ypwang61/One-Shot-RLVR.
English
We show that reinforcement learning with verifiable reward using one training
example (1-shot RLVR) is effective in incentivizing the math reasoning
capabilities of large language models (LLMs). Applying RLVR to the base model
Qwen2.5-Math-1.5B, we identify a single example that elevates model performance
on MATH500 from 36.0% to 73.6%, and improves the average performance across six
common mathematical reasoning benchmarks from 17.6% to 35.7%. This result
matches the performance obtained using the 1.2k DeepScaleR subset (MATH500:
73.6%, average: 35.9%), which includes the aforementioned example. Similar
substantial improvements are observed across various models (Qwen2.5-Math-7B,
Llama3.2-3B-Instruct, DeepSeek-R1-Distill-Qwen-1.5B), RL algorithms (GRPO and
PPO), and different math examples (many of which yield approximately 30% or
greater improvement on MATH500 when employed as a single training example). In
addition, we identify some interesting phenomena during 1-shot RLVR, including
cross-domain generalization, increased frequency of self-reflection, and
sustained test performance improvement even after the training accuracy has
saturated, a phenomenon we term post-saturation generalization. Moreover, we
verify that the effectiveness of 1-shot RLVR primarily arises from the policy
gradient loss, distinguishing it from the "grokking" phenomenon. We also show
the critical role of promoting exploration (e.g., by adding entropy loss with
an appropriate coefficient) in 1-shot RLVR training. As a bonus, we observe
that applying entropy loss alone, without any outcome reward, significantly
enhances Qwen2.5-Math-1.5B's performance on MATH500 by 27.4%. These findings
can inspire future work on RLVR data efficiency and encourage a re-examination
of both recent progress and the underlying mechanisms in RLVR. Our code, model,
and data are open source at https://github.com/ypwang61/One-Shot-RLVRSummary
AI-Generated Summary