대규모 언어 모델의 추론을 위한 강화 학습: 단일 학습 예제 활용
Reinforcement Learning for Reasoning in Large Language Models with One Training Example
April 29, 2025
저자: 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
초록
하나의 훈련 예시를 사용한 검증 가능한 보상 강화 학습(1-shot RLVR)이 대규모 언어 모델(LLMs)의 수학적 추론 능력을 촉진하는 데 효과적임을 보여줍니다. RLVR을 기본 모델인 Qwen2.5-Math-1.5B에 적용하여, MATH500에서 모델 성능을 36.0%에서 73.6%로 향상시키고, 여섯 가지 일반적인 수학적 추론 벤치마크에서의 평균 성능을 17.6%에서 35.7%로 개선하는 단일 예시를 식별했습니다. 이 결과는 앞서 언급한 예시를 포함하는 1.2k DeepScaleR 부분집합(MATH500: 73.6%, 평균: 35.9%)을 사용하여 얻은 성능과 일치합니다. 다양한 모델(Qwen2.5-Math-7B, Llama3.2-3B-Instruct, DeepSeek-R1-Distill-Qwen-1.5B), RL 알고리즘(GRPO 및 PPO), 그리고 다른 수학 예시들(대부분이 단일 훈련 예시로 사용될 때 MATH500에서 약 30% 이상의 개선을 가져옴)에서도 유사한 상당한 개선이 관찰되었습니다. 또한, 1-shot RLVR 동안 흥미로운 현상들을 식별했는데, 이에는 도메인 간 일반화, 자기 반성 빈도의 증가, 그리고 훈련 정확도가 포화된 후에도 지속되는 테스트 성능 개선(이를 포화 후 일반화라고 명명)이 포함됩니다. 더 나아가, 1-shot RLVR의 효과가 주로 정책 경사 손실에서 비롯됨을 확인하여 이를 "그로킹(grokking)" 현상과 구별했습니다. 또한, 1-shot RLVR 훈련에서 탐색 촉진(예: 적절한 계수로 엔트로피 손실 추가)의 중요한 역할을 보여줍니다. 보너스로, 결과 보상 없이 엔트로피 손실만을 적용하는 것만으로도 Qwen2.5-Math-1.5B의 MATH500 성능이 27.4% 크게 향상됨을 관찰했습니다. 이러한 발견들은 RLVR 데이터 효율성에 대한 미래 연구에 영감을 주고, RLVR의 최근 진전과 기본 메커니즘을 재검토하도록 장려할 수 있습니다. 우리의 코드, 모델, 데이터는 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