N-GRPO:嵌入级语义邻居混合用于增强策略优化
阅读原文· arxiv.org针对token级采样易产生冗余轨迹、嵌入级随机噪声破坏语义一致性的问题,N-GRPO将语义邻居混合(Semantic Neighbor Mixing)机制集成到GRPO框架中。该方法通过混合锚点token及其最近语义邻居的嵌入构造输入表示,在注入多样性的同时保持局部语义流形。在DeepSeek-R1-Distill-Qwen系列不同规模模型上的实验表明,N-GRPO在数学推理基准上持续优于强基线,并在分布外任务上展现稳健泛化能力。
The success of Large Language Models in mathematical reasoning relies heavily on the generation of diverse and valid solution paths during the rollout phase. However, current rollout techniques face a fundamental trade-off: token-level sampling often yields redundant trajectories that differ only in rephrasing, while embedding-level methods utilizing random noise frequently disrupt semantic consistency. To resolve this, we introduce N-GRPO, a novel exploration strategy integrated into the Group Relative Policy Optimization (GRPO) framework. Rather than relying on token-level sampling or native embedding-level noise, our approach leverages Semantic Neighbor Mixing. This mechanism dynamically constructs input representations by mixing the embeddings of an anchor token and its nearest semantic neighbors, thereby injecting diversity while strictly adhering to the local semantic manifold. Experimental evaluations on the DeepSeek-R1-Distill-Qwen models across different sizes show that N-GRPO not only achieves consistent improvements over strong baselines on math reasoning benchmarks but also exhibits robust generalization capabilities on out-of-distribution tasks.