强化学习微调大模型时,仅需更新少量参数即可达到全量微调效果。
Reinforcement Learning Finetunes Small Subnetworks in Large Language Models
- RL微调仅激活5%-30%参数,其余基本不变,形成内在稀疏性。
- 仅微调子网络即可复现全模型性能,精度几乎无损失。
- 不同训练条件下子网络重叠度远高于随机预期,具高度可重复性。
强化学习(RL)能显著提升大语言模型在下游任务中的表现与人类价值观对齐程度。令人惊讶的是,这些显著提升仅通过更新占总参数5%至30%的子网络即可实现,其余参数基本保持不变。我们称此现象为由强化学习引起的参数更新稀疏性。该现象在所有7种主流RL算法(如PPO、GRPO、DPO)和10个来自不同家族的LLM中均被观察到,且不依赖任何显式的稀疏正则化或架构约束。仅微调该子网络即可恢复完整微调的测试精度,甚至生成与全量微调几乎完全相同的模型。不同随机种子、训练数据及算法产生的子网络重叠度远超随机预期。分析表明,这种稀疏性并非源于仅更新部分层,而是几乎所有参数矩阵均接受类似稀疏更新。此外,各参数矩阵的更新近似满秩,说明少量参数的更新已能覆盖其可表示的几乎全部子空间。我们推测,这种稀疏性主要归因于在接近策略分布的数据上训练,而KL正则化和梯度裁剪等技术影响有限。
原文摘要 · Abstract (English)
Reinforcement learning (RL) yields substantial improvements in large language models (LLMs) downstream task performance and alignment with human values. Surprisingly, such large gains result from updating only a small subnetwork comprising just 5 percent to 30 percent of the parameters, with the rest effectively unchanged. We refer to this phenomenon as parameter update sparsity induced by RL. It is observed across all 7 widely used RL algorithms (e.g., PPO, GRPO, DPO) and all 10 LLMs from different families in our experiments. This sparsity is intrinsic and occurs without any explicit sparsity promoting regularizations or architectural constraints. Finetuning the subnetwork alone recovers the test accuracy, and, remarkably, produces a model nearly identical to the one obtained via full finetuning. The subnetworks from different random seeds, training data, and even RL algorithms show substantially greater overlap than expected by chance. Our analysis suggests that this sparsity is not due to updating only a subset of layers, instead, nearly all parameter matrices receive similarly sparse updates. Moreover, the updates to almost all parameter matrices are nearly full-rank, suggesting RL updates a small subset of parameters that nevertheless span almost the full subspaces that the parameter matrices can represent. We conjecture that the this update sparsity can be primarily attributed to training on data that is near the policy distribution, techniques that encourage the policy to remain close to the pretrained model, such as the KL regularization and gradient clipping, have limited impact.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。