arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.29303cs.AI
收藏

基于熵-KL散度的令牌掩码:一种用于大语言模型选择性微调的新方法

Entropy-KL Divergence-based Token Masking: A Novel Approach for Selective Fine-tuning of Large Language Models

University of Science and Technology of China(中国科学技术大学);Huawei Cloud(华为云)

Qi Liu, Mingdi Sun, Yongyi He, Zhi Zheng, Tong Xu, Yi Zheng, Zhefeng Wang, Enhong Chen

AI总结:

针对低数据场景下标准监督微调导致模型分布偏移的问题,提出EKSFT方法,通过选择性掩码高熵或高KL散度的令牌,在注入任务知识的同时保持预训练分布完整性,在数学推理基准上优于标准SFT并提升后续RL性能。

摘要:

监督微调(SFT)后接强化学习(RL)已成为大语言模型的标准后训练范式。该范式为RL探索提供了冷启动,避免了纯RL中在线采样产生不足正样本的低效问题。然而,在实践中,现有方法通常使用少量数据进行SFT初始化(相比RL阶段),这可能导致模型拟合有限样本并偏离其预训练分布。这种分布偏移阻碍了模型在后续RL训练中有效探索的能力。为解决这一挑战,我们提出在低数据场景下,SFT应优先激活任务相关能力而非记忆特定内容。沿着这一思路,我们提出EKSFT(熵-KL选择性微调),该方法选择性掩码那些相对于参考模型表现出高熵或高KL散度的令牌。通过排除这些高不确定性、分布偏移的令牌进行模仿,EKSFT在注入任务特定知识的同时保持了模型预训练分布的完整性。在数学推理基准上的实证评估表明,EKSFT始终优于标准SFT。从EKSFT模型进行进一步的RL微调可获得一致更好的后RL性能,表明RL阶段的探索得到了改善。我们的代码和数据集可在https://github.com/MINE-USTC/EKSFT获取。

英文摘要:

Supervised fine-tuning (SFT) followed by reinforcement learning (RL) has become a standard post-training paradigm for large language models. This paradigm provides a cold-start for RL exploration, avoiding the inefficiency of pure RL where on-policy sampling yields insufficient positive samples. However, in practice, existing approaches often use a small amount of data for SFT initialization compared to the RL phase, which can cause the model to fit the limited samples and shift away from its pre-trained distribution. This distribution shift impedes the model's ability to effectively explore during subsequent RL training. To address this challenge, we propose that in low-data regimes, SFT should prioritize activating task-relevant capabilities rather than memorizing specific content. Along this line, we propose EKSFT (Entropy-KL Selective Fine-Tuning), which selectively masks tokens that exhibit either high entropy or high KL divergence from a reference model. By excluding these high-uncertainty, distribution-shifting tokens from imitation, EKSFT injects task-specific knowledge while preserving the integrity of the model's pre-trained distribution. Empirical evaluations on mathematical reasoning benchmarks demonstrate that EKSFT consistently outperforms standard SFT. Further RL fine-tuning from the EKSFT model yields consistently better post-RL performance, indicating improved exploration for the RL stage. Our codes and datasets are available at https://github.com/MINE-USTC/EKSFT.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑