Is OpenAI's Mysterious RL Algorithm Just an STE Approximation?
A recent arXiv paper, Score Centering Stabilizes Off-policy Reinforcement Learning, has attracted attention as a possible account of the reinforcement-learning algorithm used in OpenAI's post-training pipeline. Curious about the method, I took a closer look. My main takeaway is that score centering can be understood as an approximate implementation of a straight-through estimator (STE), a trick that has long been used in sim-to-real reinforcement learning. Nothing is entirely new under the sun. In this post, I will walk through this interpretation in detail.
The Problem Setup for LLM Reinforcement Learning#
One complication in LLM reinforcement learning is that training and inference often use different engines: Megatron for training and vLLM for inference. Even given the same input, the two engines can produce slightly different logits in the forward pass. This train-inference mismatch is a key distinction between LLM RL and conventional RL with smaller models.
Our actual goal is to maximize the performance of the model deployed with vLLM, not the one trained with Megatron.
To formalize the problem, consider it from the perspective of information-geometric optimization (IGO). We use vLLM to generate rollout trajectories, evaluate them with rewards, and obtain an optimal target distribution. The goal is then to optimize the policy by minimizing its KL divergence from this target distribution.
The difficulty is that we cannot backpropagate through the model running in vLLM. We therefore use gradients computed in Megatron as a proxy for the unavailable vLLM gradients. In practice, this changes the RL objective from
to
Keep this expression in mind, as it captures the central issue in LLM RL.
Analyzing the Objective#
The key observation is that the probability ratio in the second objective is not necessarily 1, even at the beginning of optimization. It therefore cannot be understood in the same way as the ratio used in PPO clipping.
In PPO, the ratio starts at 1 and changes only as the policy is updated. Clipping this ratio keeps the new policy close to the old one and helps stabilize optimization. With a train-inference mismatch between vLLM and Megatron, however, the ratio can already differ from 1 before any update occurs. Clipping does not address this mismatch and may even be harmful. I believe this helps explain why approaches such as MIS and bypass-PPO often fail.
A simple and natural alternative is to use a straight-through estimator. Let \(Z_{\mathrm{Megatron}}(x)\) denote the logits computed by Megatron, and let \(Z_{\mathrm{vLLM}}^{\mathrm{old}}(x)\) denote those computed by vLLM under the old policy. We can define surrogate logits as
where \(\operatorname{sg}[\cdot]\) denotes the stop-gradient operator. The corresponding surrogate distribution is
The RL objective can then be written as
At the old parameters, the surrogate distribution matches the vLLM distribution in the forward pass, making the ratio equal to 1. The complete gradient derivation is
This is exactly the same gradient as the one used by the algorithm attributed to OpenAI. In other words, the method can be interpreted as an STE approximation that compensates for the inference mismatch between Megatron and vLLM.
What Changes in the Off-Policy Setting?#
So far, the derivation has assumed an on-policy setting, where each batch of rollout data is used for a single optimizer step. Once we reuse rollout data to improve sample efficiency, the training becomes off-policy, and the two formulations are no longer equivalent.
The gradient of the surrogate-STE version becomes
In this case, the ratio is no longer 1. The surrogate-STE estimator effectively treats the samples as if they were drawn from \(\hat P_{\mathrm{Megatron}}\), whereas score centering continues to use samples drawn from \(P_{\mathrm{vLLM}}^{\mathrm{old}}\). I therefore view the latter estimator as biased because it omits importance sampling. This leads me to expect the surrogate-STE formulation to be more stable in the off-policy setting.
The paper's authors also evaluate score centering combined with truncated importance sampling (TIS). In my view, that formulation is already quite close to the surrogate-STE variant.
Further Thoughts#
Looking back, many RL algorithms for LLMs have not been analyzed systematically. They often appear instead as heuristic modifications of earlier methods such as PPO. Clipping makes sense in the original PPO setting because it implicitly constrains how far the updated policy can move. But when the problem is specifically the train-inference mismatch between vLLM and Megatron, I believe clipping is the wrong tool. It tends to invite additional patches, producing a system that is difficult to reason about and tune.
Starting from the IGO perspective leads to a more direct derivation and a clearer intuition for what is happening. In a sense, this is an exercise in subtraction: removing unnecessary machinery makes the core problem easier to see.
This viewpoint also suggests room for improvement. An STE provides a surrogate, or “fake,” gradient, which is not guaranteed to be a valid subgradient. A natural next step would be to use the actual inference behavior of vLLM to correct that surrogate gradient.
IGO is a powerful mathematical tool. Viewed through this lens, the underlying geometry of many RL algorithms becomes much easier to understand.