cs.LGMar 5, 2026

Why Is RLHF Alignment Shallow? A Gradient Analysis

Authors: Robin Young

Organizations: Department of Computer Science and Technology University of Cambridge Cambridge, UK

Abstract

Why is safety alignment in LLMs shallow? We prove that gradient-based alignment inherently concentrates on positions where harm is decided and vanishes beyond. Using a martingale decomposition of sequence-level harm, we derive an exact characterization of alignment gradients. The gradient at position tt equals the covariance between the conditional expected harm and the score function. This implies that positions beyond the harm horizon where the output's harmfulness is already determined receive zero gradient signal during training. This explains empirical observations that KL divergence between aligned and base models concentrates on early tokens. Consequently, standard alignment objectives cannot produce deep alignment, regardless of optimization quality. We introduce the concept of harm information ItI_t, which quantifies each position's influence on harm, and prove that equilibrium KL divergence tracks this quantity. Finally, we derive an objective based on recovery penalties that creates gradient signal at all positions, providing theoretical grounding for empirically successful data augmentation techniques.

Explore similar work

CardsList
  1. Alignment Dynamics in LLM Fine-Tuning

    May 18, 2026Yuhan Huang, Huanran Chen, Yinpeng DongLLM AlignmentLLM Fine-Tuning

  2. When Autoregressive Consistency Hurts Safety Alignment

    Jun 2, 2026Bochen Lyu, Yiyang Jia, Xiaohao Cai +1Adversarial Attacks on LLMsLLM Safety Alignment

  3. HARC: Coupling Harmfulness and Refusal Directions for Robust Safety Alignment

    Jul 1, 2026Shei Pern Chua, Hao Wu, Qianli Ma +1Adversarial Attacks on LLMsLLM Safety Alignment