균일성에서 이질성으로: 각 토큰의 특성에 맞춘 정책 최적화
From Uniform to Heterogeneous: Tailoring Policy Optimization to Every Token's Nature
September 20, 2025
저자: Zheng Liu, Mengjie Liu, Siwei Wen, Mengzhang Cai, Bin Cui, Conghui He, Wentao Zhang
cs.AI
초록
강화 학습(Reinforcement Learning)은 대형 언어 모델(LLMs)의 추론 능력을 향상시키기 위한 핵심 기술로 부상했습니다. 그러나 기존 알고리즘은 모든 토큰에 동일한 최적화를 적용하여, 추론 과정에서 토큰들이 수행하는 다양한 역할을 무시해 왔습니다. 이러한 한계를 해결하기 위해, 우리는 토큰 엔트로피를 기반으로 동적으로 최적화를 조정하는 포괄적인 토큰 인식 알고리즘인 이종 적응형 정책 최적화(Heterogeneous Adaptive Policy Optimization, HAPO)를 소개합니다. 롤아웃 샘플링을 위해, 우리는 실시간으로 샘플링 온도를 조정하여 높은 엔트로피 토큰에서는 탐색을 촉진하고 낮은 엔트로피 토큰에서는 일관성을 유지하는 적응형 온도 샘플링(Adaptive Temperature Sampling)을 제안합니다. 이점 계산을 위해, 우리는 토큰 수준 그룹 평균(Token Level Group Average)을 도입하여 토큰 수준에서 이점을 정규화하고, 토큰 평균 손실에서와 같이 시퀀스 길이를 고려하면서 편향되지 않은 처리를 유지합니다. 그런 다음, 우리는 엔트로피와 중요도 비율을 활용하여 명확한 신호를 가진 토큰에 대한 보조 조정 업데이트를 변조하는 차등 이점 재분배(Differential Advantage Redistribution)를 개발합니다. 클리핑 손실을 위해, 우리는 노이즈가 많은 낮은 엔트로피 토큰에 대해서는 공격적인 확률 감소를 허용하고 높은 엔트로피 토큰에 대해서는 탐색을 가능하게 하는 비대칭 적응형 클리핑(Asymmetric Adaptive Clipping)을 설계했습니다. 엔트로피와 훈련 동역학 간의 체계적인 연구를 통해, 우리는 모든 단계에 토큰 수준 처리를 내장하여 세밀한 제어를 달성했습니다. 광범위한 실험을 통해 HAPO가 다양한 모델 규모에서 DAPO를 일관되게 능가함을 입증했습니다. 우리의 코드는 https://github.com/starriver030515/HAPO에서 확인할 수 있습니다.
English
Reinforcement Learning has emerged as the fundamental technique for enhancing
reasoning in LLMs. However, existing algorithms apply uniform optimization to
all tokens, ignoring their different roles in reasoning process. To address
this limitation, we introduce Heterogeneous Adaptive Policy Optimization
(HAPO), a comprehensive token-aware algorithm that dynamically adapts
optimization based on token entropy. For rollout sampling, we propose Adaptive
Temperature Sampling, which adjusts sampling temperature in real time,
promoting exploration at high-entropy tokens while preserving coherence at
low-entropy ones. For advantage calculation, we introduce Token Level Group
Average that normalizes advantages at token level, jointly accounting for
sequence-length as in token-mean loss while preserving non-biased treatment. We
then develop Differential Advantage Redistribution that leverages entropy and
importance ratios to modulate rewards-adjusting updates for tokens with clear
signals. For clipping loss, we design Asymmetric Adaptive Clipping, allowing
aggressive probability reduction for noisy low-entropy tokens while enabling
exploration for high-entropy tokens. Through systematic investigation between
entropy and training dynamics, we embedded token-level treatment into every
stages to achieve fine-grained control. Extensive experiments demonstrate that
HAPO consistently outperforms DAPO across multiple model scales. Our code can
be found in https://github.com/starriver030515/HAPO.