Table of Contents
Fetching ...

On the Entropy Dynamics in Reinforcement Fine-Tuning of Large Language Models

Shumin Wang, Yuexiang Xie, Wenhao Zhang, Yuchang Sun, Yanxi Chen, Yaliang Li, Yanyong Zhang

TL;DR

This work tackles the lack of principled understanding of entropy dynamics during reinforcement fine-tuning of large language models. It develops a token-level theoretical framework that begins with a single logit update and extends to Group Relative Policy Optimization (GRPO), deriving first-order expressions for entropy change that hinge on the discriminant $S_* = p_k(H+ ext{log} p_k)$ and a dynamic baseline $oldsymbol{E}_{i ilde{oldsymbol{p}}}[S_i]$. Building on these insights, the paper proposes entropy-discriminator clipping methods, Clip$_{ ext{B}}$ and Clip$_{ ext{V}}$, and shows that existing entropy-based strategies can be understood through the same dynamics. Empirical results across multiple Qwen models and standard benchmarks demonstrate improved entropy stability, better exploration-exploitation balance, and superior performance when using the proposed clipping schemes, validating the practical impact of entropy-aware RFT design.

Abstract

Entropy serves as a critical metric for measuring the diversity of outputs generated by large language models (LLMs), providing valuable insights into their exploration capabilities. While recent studies increasingly focus on monitoring and adjusting entropy to better balance exploration and exploitation in reinforcement fine-tuning (RFT), a principled understanding of entropy dynamics during this process is yet to be thoroughly investigated. In this paper, we establish a theoretical framework for analyzing the entropy dynamics during the RFT process, which begins with a discriminant expression that quantifies entropy change under a single logit update. This foundation enables the derivation of a first-order expression for entropy change, which can be further extended to the update formula of Group Relative Policy Optimization (GRPO). The corollaries and insights drawn from the theoretical analysis inspire the design of entropy control methods, and also offer a unified lens for interpreting various entropy-based methods in existing studies. We provide empirical evidence to support the main conclusions of our analysis and demonstrate the effectiveness of the derived entropy-discriminator clipping methods. This study yields novel insights into RFT training dynamics, providing theoretical support and practical strategies for optimizing the exploration-exploitation balance during LLM fine-tuning.

On the Entropy Dynamics in Reinforcement Fine-Tuning of Large Language Models

TL;DR

This work tackles the lack of principled understanding of entropy dynamics during reinforcement fine-tuning of large language models. It develops a token-level theoretical framework that begins with a single logit update and extends to Group Relative Policy Optimization (GRPO), deriving first-order expressions for entropy change that hinge on the discriminant and a dynamic baseline . Building on these insights, the paper proposes entropy-discriminator clipping methods, Clip and Clip, and shows that existing entropy-based strategies can be understood through the same dynamics. Empirical results across multiple Qwen models and standard benchmarks demonstrate improved entropy stability, better exploration-exploitation balance, and superior performance when using the proposed clipping schemes, validating the practical impact of entropy-aware RFT design.

Abstract

Entropy serves as a critical metric for measuring the diversity of outputs generated by large language models (LLMs), providing valuable insights into their exploration capabilities. While recent studies increasingly focus on monitoring and adjusting entropy to better balance exploration and exploitation in reinforcement fine-tuning (RFT), a principled understanding of entropy dynamics during this process is yet to be thoroughly investigated. In this paper, we establish a theoretical framework for analyzing the entropy dynamics during the RFT process, which begins with a discriminant expression that quantifies entropy change under a single logit update. This foundation enables the derivation of a first-order expression for entropy change, which can be further extended to the update formula of Group Relative Policy Optimization (GRPO). The corollaries and insights drawn from the theoretical analysis inspire the design of entropy control methods, and also offer a unified lens for interpreting various entropy-based methods in existing studies. We provide empirical evidence to support the main conclusions of our analysis and demonstrate the effectiveness of the derived entropy-discriminator clipping methods. This study yields novel insights into RFT training dynamics, providing theoretical support and practical strategies for optimizing the exploration-exploitation balance during LLM fine-tuning.
Paper Structure (33 sections, 7 theorems, 48 equations, 7 figures, 3 tables)

This paper contains 33 sections, 7 theorems, 48 equations, 7 figures, 3 tables.

Key Result

Lemma 3.1

Given a logit perturbation $\delta \mathbf{z} = \varepsilon \cdot \mathbf{e}_k$ on k-th token $a^k$ in the vocabulary, the resulting first-order change in the probability distribution $\mathbf{p}$ is given by:

Figures (7)

  • Figure 1: We retain or mask the gradients of tokens satisfying $S_{*} > 0$ or $S_{*} < 0$, respectively. The resulting entropy changes are shown in (a,c) for positive samples, and (b,d) for negative samples.
  • Figure 2: The effects of $\text{Clip}_{\mathcal{B}}$ and $\text{Clip}_{\mathcal{V}}$ with different $\mu$ in controlling clip fraction and entropy.
  • Figure 3: The batch-averaged value of $S_*$ and $S_* - \mathbb{E}_{i\sim \mathbf p}[S_i]$.
  • Figure 4: Comparison between $\text{Clip}_{\mathcal{B}}$ and vanilla GRPO on the distribution of problem pass rates.
  • Figure 5: The value of $-\mathrm{Cov}_\mathcal{B}(A,S_*-\mathbb{E}_{i\sim\mathbf{p}}[S_i])$.
  • ...and 2 more figures

Theorems & Definitions (16)

  • Lemma 3.1
  • proof
  • Theorem 3.2
  • proof
  • Theorem 3.3
  • proof
  • Corollary 3.4
  • Corollary 3.5
  • proof
  • proof
  • ...and 6 more