强化学习微调让大模型内部激活更强烈且多样,提升数学推理能力。
Reinforcement Learning Fine-Tuning Enhances Activation Intensity and Diversity in the Internal Circuitry of LLMs
- 通过在线强化学习优化模型内部激活路径的强度与分布。
- 激活强度平均提升,模式熵增高,信息流动更冗余灵活。
- 适用于关注模型内在机制与数学推理能力提升的研究者。
大语言模型(LLMs)在大规模预训练中获取丰富先验知识,可通过监督微调(SFT)或基于强化学习(RL)的后训练进一步增强。越来越多证据表明,相比SFT,RL微调能显著提升模型性能。然而,其背后为何能改善具有不同内在特性的多种模型仍不明确。本研究受边属性打补丁(EAP)启发,分析了多模型族与数学数据集上强化学习微调前后的内部差异。结果发现在线强化学习后训练存在两个稳定效应:(i) 平均激活强度整体上升,表明更多内部通路被激活且信号更强;(ii) 激活模式多样性提高,表现为熵值更高、边分布更分散。这些变化说明强化学习重塑了信息流,使其更具冗余性和灵活性,可能解释其在数学泛化上的优势。值得注意的是,使用直接偏好优化(DPO)微调的模型偏离此趋势,内部变化显著更弱或不一致,相较于PPO与GRPO方法。研究揭示了强化学习微调系统性改变模型内部电路的机制,并凸显在线强化学习与基于偏好方法的方法学差异。代码开源:https://github.com/tsinghua-fib-lab/llm_rl_probing_analysis。
原文摘要 · Abstract (English)
Large language models (LLMs) acquire extensive prior knowledge through large-scale pretraining and can be further enhanced via supervised fine-tuning (SFT) or reinforcement learning (RL)-based post-training. A growing body of evidence has shown that RL fine-tuning improves the capability of LLMs beyond what SFT alone achieves. However, the underlying mechanisms why RL fine-tuning is able to enhance the capability of various LLMs with distinct intrinsic characteristics remain underexplored. In this study, we draw inspiration from prior work on edge attribution patching (EAP) to investigate the internal differences of LLMs before and after RL fine-tuning. Our analysis across multiple model families and mathematical datasets shows two robust effects of online RL post-training: (i) an overall increase in average activation intensity, indicating that more internal pathways are engaged and their signals become stronger, and (ii) greater diversity in activation patterns, reflected by higher entropy and less concentrated edge distributions. These changes suggest that RL reshapes information flow to be both more redundant and more flexible, which may explain its advantage in mathematical generalization. Notably, models fine-tuned with Direct Preference Optimization (DPO) deviate from these trends, exhibiting substantially weaker or inconsistent internal changes compared to PPO- and GRPO-based training. Together, our findings provide a unified view of how RL fine-tuning systematically alters the internal circuitry of LLMs and highlight the methodological distinctions between online RL and preference-based approaches. Our code is open source at https://github.com/tsinghua-fib-lab/llm_rl_probing_analysis.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。