REINFORCE is a vanilla policy-gradient algorithm that directly improves a parameterized policy from sampled trajectories. In RLHF, the policy generates completions, receives reward-model scores, and updates toward higher-reward behavior without storing scores in a replay buffer. section 6.1 section 6.6
For an action a_t in state s_t, the update weights the log-policy gradient by the return advantage: ∇θ log πθ(a_t | s_t)(G_t − b(s_t)). Here G_t is a Monte Carlo return and b(s_t) is a baseline estimating what is typical from the state. The baseline reduces variance without changing the basic policy-gradient direction. section 6.2.3 section 6.2.11
The implementation is defined by three operational components:
- Use a positive learning rate to set the update magnitude. section 6.2.3
- Subtract a baseline or other normalizing factor from the reward to improve stability. section 6.2.3 section 6.6
- Assign the scalar reward to the parameters that produced each action through the log-policy gradient. section 6.2.3
- Use recently generated, on-policy samples; unlike PPO, REINFORCE has no importance-sampling ratio or learned value function. section 6.2.11
Language-model update
A language model generates a completion, combines its reward-model score with a KL penalty from a reference model to form shaped reward, and applies the REINFORCE gradient to the sampled token decisions. section 6.2.3
Equation 6.24
\[\label{eq:REINFORCE_with_advantage} \nabla_{\theta}J(\theta) \;=\; \mathbb{E}_{\tau \sim \pi_{\theta}}\!\Big[ \sum_{t=0}^{T} \nabla_{\theta} \log \pi_{\theta}(a_t \mid s_t)A_t \Big].\]Use the advantage-form equation to inspect how sampled actions, log-policy gradients, and advantage estimates combine into the expected policy update. section 6.2.3
