Papers
Topics
Authors
Recent
Search
2000 character limit reached

SAFE: Stable Alignment Finetuning with Entropy-Aware Predictive Control for RLHF

Published 4 Feb 2026 in cs.LG | (2602.04651v1)

Abstract: Optimization (PPO) has been positioned by recent literature as the canonical method for the RL part of RLHF. PPO performs well empirically but has a heuristic motivation and handles the KL-divergence constraint used in LM-RLHF in an ad-hoc manner and suffers form reward oscillations, entropy collapse, value function drift, and sudden policy divergence that require frequent restarts and extensive hyperparameter tuning. In this paper, we develop a new pure on policy actor-critic RL method for the LM-RLHF setting. We present SAFE (Stable Alignment Finetuning with Entropy-aware control),a novel RLHF algorithm that combines a Double Soft-Min Critic for pessimistic value estimation with a new multi-layer stabilization framework combining entropy-gated KL regulation, and PID-controlled adaptive thresholds. Unlike standard PPO's symmetric KL penalties, SAFE distinguishes high-entropy exploration from low-entropy mode collapse and adjusts penalties dynamically based on reward velocity. Experiments on a 3B parameter model show SAFE achieves +5.15\% training-average reward than PPO (0.725 vs 0.689), negligible reward crashes, and superior KL control than ppo . Our method adds minimal computational overhead and provides an interpretable, crash-resistant RLHF framework that maintains aggressive learning speed while ensuring stable long-horizon optimization suitable for production deployment. Code is available at https://github.com/ryyzn9/SAFE

Authors (1)

Summary

  • The paper introduces SAFE, an on-policy actor-critic method that combines soft-min double critics, asymmetric KL regulation, entropy gating, and PID-based thresholds to stabilize long-horizon RLHF.
  • SAFE improves mean reward by 5.15% over PPO, reduces reward variation 2.8×, eliminates observed reward crashes, and adds negligible compute overhead in a 3B-model benchmark.
  • The results suggest coordinated control is more effective than asymmetric KL alone, but broader validation is needed because experiments use one model, dataset, reward model, short horizon, and no component-isolation ablation.

Overview

This paper introduces SAFE, a pure on-policy actor-critic algorithm for reinforcement learning from human feedback (RLHF) that augments PPO-style optimization with three coordinated stabilization layers: a pessimistic double soft-min critic, entropy-aware asymmetric KL regulation, and PID-controlled adaptive divergence thresholds. The motivating claim is that the failure modes observed in long-horizon RLHF—reward oscillations, entropy collapse, value function drift, and sudden policy divergence—are not adequately addressed by single-axis KL regularization, because policies can remain within acceptable KL bounds while undergoing progressive determinization or unstable value estimation. The authors argue that value overestimation is a particularly destructive feedback loop in this setting: an overestimating critic amplifies outlier reward-model signals into inflated advantages, driving overly aggressive updates that cascade into instability.

The empirical evaluation uses Qwen2.5-3B with LoRA (rank 128), the ArmoRM-Llama3-8B reward model, and 5,000 Anthropic HH-RLHF training prompts over 2,000 on-policy steps. The headline results are a +5.15% improvement in training-average reward relative to PPO (0.725 vs. 0.689), elimination of reward crashes (>20% drops: zero for SAFE vs. two for PPO), a 2.8× reduction in reward standard deviation (0.0291 vs. 0.0788), and negligible compute overhead (−0.9% memory, −1.4% wall-clock time). The authors are explicit that these gains reflect a single benchmark and configuration.

Motivation: the KL estimator as a behavioral signal

A notable methodological observation underpinning the controller design concerns the Monte Carlo log-ratio estimator used in place of exact KL computation:

D^KL=1N∑i[log⁡πθ(ai∣si)−log⁡πref(ai∣si)],ai∼πθ.\widehat{D}_{\text{KL}} = \frac{1}{N} \sum_i \left[\log \pi_\theta(a_i|s_i) - \log \pi_{\text{ref}}(a_i|s_i)\right], \quad a_i \sim \pi_\theta.

Although the true KL is non-negative by definition, this finite-sample estimator can be negative due to sampling variance. The paper's central diagnostic claim is that the sign and dynamics of this estimator correlate strongly with policy behavior: negative estimates coincide with high-entropy exploration, while sustained positive estimates combined with falling entropy frequently precede exploitative behavior and reward hacking. A documented collapse trajectory illustrates the pattern—a transition from a −0.09 estimate at step 1400 to +2.89 by step 1550, accompanied by a 42% reward loss. This motivates directional (asymmetric) treatment of divergence rather than symmetric magnitude-based penalties.

It should be noted that the claimed sign–behavior correlation is presented as an empirical observation without formal analysis; the paper does not characterize how robust this signal is across datasets, reward models, or sampling temperatures.

Method

Value-level stabilization

SAFE maintains two independently parameterized critics aggregated via a differentiable soft-minimum:

Vsoft(s)=−αlog⁡[12(e−V1(s)/α+e−V2(s)/α)],V_{\text{soft}}(s) = -\alpha \log \left[\tfrac{1}{2}\left(e^{-V_1(s)/\alpha} + e^{-V_2(s)/\alpha}\right)\right],

which converges to min⁡(V1,V2)\min(V_1, V_2) as α→0\alpha \to 0 while preserving smooth gradients, unlike hard-min operators. Advantages are computed as A=r~−Vsoft(s)A = \tilde{r} - V_{\text{soft}}(s) using running-normalized rewards, then standardized per batch. Critic learning is further stabilized via layer normalization on shared representations, Polyak-averaged target networks, and a clipped Huber loss averaged over both VsoftV_{\text{soft}} and a clipped value head to cap gradient explosions from heavy-tailed TD errors. The pessimistic bias makes the policy less responsive to reward spikes—including those arising from reward-model exploitation—which the authors position as a first line of defense against both instability and reward hacking. The cost is acknowledged directly: pessimistic aggregation introduces systematic underestimation bias, which manifests empirically as higher value loss than PPO.

Policy-level asymmetric KL control

The first policy layer replaces symmetric penalties with an asymmetric controller that activates only above a threshold τ\tau, imposing zero penalty on negative (exploratory) estimates and quadratic suppression on large positive deviations. A momentum term penalizes positive KL velocity over a sliding window, enabling intervention when divergence accelerates even if absolute magnitude remains moderate. In isolation, this controller keeps ∣KL∣<0.5|\text{KL}| < 0.5 over 2,000 steps, prevents entropy collapse, and eliminates PPO's late-stage reward degradation—but it also exhibits elevated value-loss volatility (435 spikes >0.1), motivating the second control layer.

Entropy-aware predictive controller

The second layer adds four mechanisms operating on dual-timescale exponential moving averages of the KL estimator (decay rates 0.9/0.1 short-term and 0.99/0.01 long-term):

  • Adaptive thresholding: a PID controller driven by reward velocity adjusts the threshold τt=(τbase+PID(rt))⋅ϕt\tau_t = (\tau_{\text{base}} + \text{PID}(r_t)) \cdot \phi_t, clipped to [0.1,0.6][0.1, 0.6]. Constraints relax during productive optimization and tighten during stagnation.
  • Entropy-gated penalty scaling: the base quadratic penalty is multiplied by Vsoft(s)=−αlog⁡[12(e−V1(s)/α+e−V2(s)/α)],V_{\text{soft}}(s) = -\alpha \log \left[\tfrac{1}{2}\left(e^{-V_1(s)/\alpha} + e^{-V_2(s)/\alpha}\right)\right],0, amplifying corrective pressure precisely when entropy falls toward mode-collapse regimes.
  • Phase detection: a lightweight detector classifies training into warmup (Vsoft(s)=−αlog⁡[12(e−V1(s)/α+e−V2(s)/α)],V_{\text{soft}}(s) = -\alpha \log \left[\tfrac{1}{2}\left(e^{-V_1(s)/\alpha} + e^{-V_2(s)/\alpha}\right)\right],1), climbing (1.2), plateau (0.8), and converged (1.0) phases based on sliding-window reward statistics, modulating the threshold multiplicatively.
  • Gradient preview safety gate: tentative updates whose previewed KL exceeds a maximum limit are scaled down before application, though the paper notes these hooks are defined but not activated in the current implementation.

The total objective combines clipped PPO loss, Huber value loss weighted by 0.5, the entropy-gated KL penalty, and a small entropy bonus.

Empirical results

The main comparison over 2,000 steps reports the following:

Metric PPO Asymmetric-KL SAFE
Mean reward 0.689 0.672 0.725
Reward std (global) 0.079 0.054 0.029
Reward coefficient of variation 0.114 0.081 0.040
Reward crashes (>20%) 2 2 0
KL volatility (rolling std) 0.526 0.294 0.306
Value loss spikes (>0.1) 28 1256 435
Late-stage regression No Yes No

Statistical testing supports the reward difference: Welch's t-test gives Vsoft(s)=−αlog⁡[12(e−V1(s)/α+e−V2(s)/α)],V_{\text{soft}}(s) = -\alpha \log \left[\tfrac{1}{2}\left(e^{-V_1(s)/\alpha} + e^{-V_2(s)/\alpha}\right)\right],2 with Vsoft(s)=−αlog⁡[12(e−V1(s)/α+e−V2(s)/α)],V_{\text{soft}}(s) = -\alpha \log \left[\tfrac{1}{2}\left(e^{-V_1(s)/\alpha} + e^{-V_2(s)/\alpha}\right)\right],3 and Mann–Whitney U gives Vsoft(s)=−αlog⁡[12(e−V1(s)/α+e−V2(s)/α)],V_{\text{soft}}(s) = -\alpha \log \left[\tfrac{1}{2}\left(e^{-V_1(s)/\alpha} + e^{-V_2(s)/\alpha}\right)\right],4, with Cohen's Vsoft(s)=−αlog⁡[12(e−V1(s)/α+e−V2(s)/α)],V_{\text{soft}}(s) = -\alpha \log \left[\tfrac{1}{2}\left(e^{-V_1(s)/\alpha} + e^{-V_2(s)/\alpha}\right)\right],5 indicating a medium effect. Importantly, KL differences between SAFE and PPO are not statistically significant (Vsoft(s)=−αlog⁡[12(e−V1(s)/α+e−V2(s)/α)],V_{\text{soft}}(s) = -\alpha \log \left[\tfrac{1}{2}\left(e^{-V_1(s)/\alpha} + e^{-V_2(s)/\alpha}\right)\right],6), so the reward gain cannot be attributed to increased distributional drift. KL volatility falls approximately 42% relative to PPO. Both methods satisfy a convergence criterion (rolling reward std below 0.05 in the final 100 steps); SAFE improves average reward from 0.711 (early phase) to 0.731 (late phase), while its KL trend declines across phases where PPO's rises.

Two aspects of these numbers deserve emphasis. First, the intermediate asymmetric-KL-only variant performs worse than PPO on mean reward (0.672) and shows late-stage regression, implying that the full multi-layer composition—not asymmetry alone—is responsible for the gains; however, no component-isolation ablation isolates the individual contributions of the critic, entropy gating, or PID control. Second, SAFE's mean value loss (0.0582) is roughly ten times higher than PPO's (0.0059) and its spike count is substantially higher (435 vs. 28), a direct consequence of the pessimistic bias that the stability benefits rest on. The paper frames this trade-off as acceptable given smoother temporal behavior, but does not demonstrate that the bias is harmless at longer horizons.

Computational overhead is essentially nil: peak GPU memory differs by only 6 MB (54,050 MB vs. 54,044 MB), and SAFE actually completes slightly faster than PPO (3.90 s vs. 3.96 s per step), which the authors attribute plausibly but not conclusively to smoother update dynamics producing fewer destabilizing large steps.

Hypothesized reward-hacking resistance

An appendix offers a purely mechanistic argument—explicitly labeled a hypothesis rather than evidence—that SAFE may partially resist reward hacking through four channels: pessimistic values suppress the attractiveness of high-variance exploit spikes; directional KL plus momentum detects exploitative drift earlier; entropy-gated penalties apply maximal corrective pressure in low-entropy regimes characteristic of keyword stuffing and template repetition; and tighter anchoring to the never-reward-optimized reference policy constrains search away from exploit regions. The authors correctly note that none of this addresses the fundamental mismatch between the learned reward model and true preferences, and that validation requires dedicated experiments with deliberately hackable reward functions—an evaluation not performed here.

Limitations and open questions

The paper is unusually candid about scope constraints, and several bear directly on the interpretation of the headline results:

  • Experimental scope: all claims rest on one model size (3B), one dataset (Anthropic HH-RLHF), one reward model (ArmoRM-Llama3-8B), and 2,000 steps. Scaling behavior at 7B+ parameters and late-stage dynamics beyond 5,000+ steps—the regime where the instabilities motivating the work emerge—are untested. Since the paper's own motivation centers on failures appearing after hundreds or thousands of steps, the 2,000-step horizon leaves the central question incompletely answered.
  • Persistent value instability: soft-min aggregation introduces bias without eliminating spikes (435 events vs. PPO's 28).
  • Manual tuning burden: eight-plus hyperparameters (entropy floor, PID gains, phase thresholds, Vsoft(s)=−αlog⁡[12(e−V1(s)/α+e−V2(s)/α)],V_{\text{soft}}(s) = -\alpha \log \left[\tfrac{1}{2}\left(e^{-V_1(s)/\alpha} + e^{-V_2(s)/\alpha}\right)\right],7, Vsoft(s)=−αlog⁡[12(e−V1(s)/α+e−V2(s)/α)],V_{\text{soft}}(s) = -\alpha \log \left[\tfrac{1}{2}\left(e^{-V_1(s)/\alpha} + e^{-V_2(s)/\alpha}\right)\right],8 coefficients) lack systematic ablation or sensitivity analysis, raising concerns about reproducibility and transfer.
  • No component isolation: the relative contribution of each stabilization layer is unclear, particularly given that the asymmetric-KL variant alone underperforms PPO.
  • Unvalidated reward-hacking hypothesis: theoretical mechanisms only, with no adversarial evaluation.

The most pressing open questions are whether the sign-of-KL-estimator diagnostic generalizes beyond this configuration, whether the stability advantage persists at horizons exceeding 10,000 steps, and whether direct reward-hacking experiments confirm the hypothesized resistance.

Conclusion

SAFE demonstrates that coordinating control across value estimation, divergence regulation, and temporal training dynamics can materially improve RLHF stability—reducing reward variance by 2.8×, eliminating catastrophic collapses, and improving mean reward by 5.15% with statistical significance—all at effectively zero computational cost. The contribution is best read as a well-engineered integration of known techniques (double critics, PID control, phase scheduling) adapted to the peculiarities of LM-RLHF, notably the use of the signed Monte Carlo KL estimator as a behavioral control signal. Its evidential basis remains narrow: single-scale, single-dataset, short-horizon results with unisolated components and manually tuned hyperparameters. Broader claims about production readiness await multi-scale evaluation, systematic ablation, and direct reward-hacking tests, all of which the authors themselves identify as prerequisites.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.