Towards a Theoretical Understanding to the Generalization of RLHF
Zhaochun Li, Mingyang Yi, Yue Wang, Shisheng Cui, Yong Liu
TL;DR
This work provides an end-to-end theoretical framework for RLHF by analyzing the generalization of policies learned through KL-regularized RLHF under a linear reward model. Using algorithmic stability and a feature coverage assumption, it establishes a dimension-free suboptimality bound of order $\tilde{O}(n^{-1/2})$ for empirical optima and extends the results to Gradient Ascent and Stochastic Gradient Ascent with explicit rates in terms of $n$ and $T$. The analysis reveals how sufficient data coverage leads to exact recovery, while realistic insufficient coverage yields robust generalization via a decomposed error bound. The results offer theoretical support for the empirically observed generalization capabilities of LLMs after RLHF and provide guidance for data collection and optimization strategy in practice. Overall, the framework advances understanding of how RLHF generalizes in high dimensions and under practical training dynamics, highlighting the role of feature coverage and algorithmic stability in enabling data-efficient alignment.
Abstract
Reinforcement Learning from Human Feedback (RLHF) and its variants have emerged as the dominant approaches for aligning Large Language Models with human intent. While empirically effective, the theoretical generalization properties of these methods in high-dimensional settings remain to be explored. To this end, we build the generalization theory on RLHF of LLMs under the linear reward model, through the framework of algorithmic stability. In contrast to the existing works built upon the consistency of maximum likelihood estimations on reward model, our analysis is presented under an end-to-end learning framework, which is consistent with practice. Concretely, we prove that under a key \textbf{feature coverage} condition, the empirical optima of policy model have a generalization bound of order $\mathcal{O}(n^{-\frac{1}{2}})$. Moreover, the results can be extrapolated to parameters obtained by gradient-based learning algorithms, i.e., Gradient Ascent (GA) and Stochastic Gradient Ascent (SGA). Thus, we argue that our results provide new theoretical evidence for the empirically observed generalization of LLMs after RLHF.
