Dissecting AI
From the paper: LoGRA: Scaling LLM Reinforcement Learning with Low-Rank Gradient Sketches

Predicted-KL Control for Policy Updates

Policy updates can shift next-token probabilities unpredictably; LoGRA estimates their local divergence and caps the update scale to fit a KL budget.

Read the paper ↗
The short version

What it is

  • Predicted policy change Estimate how much a proposed training step would change next-token probabilities by looking at how it shifts token scores on sampled contexts.
  • Budget-based rescaling Use a target for average predicted policy change to decide what fraction of the proposed step to apply, with a cap on the multiplier.

Why it matters

A modest parameter update can still move a model's predictions noticeably. This controller gives training a local, explicit way to limit that movement, while recognizing that the prediction is an approximation.

Before I get into the mechanics, here is the short version: LoGRA can propose a policy update, then estimate how much that update would move next-token probabilities on a sample of the current training responses. It uses that estimate to shrink the update when the predicted policy change exceeds a budget. The useful idea is not “make every step small”; it is “measure the proposed step in the thing we care about, then choose its scale.”

  1. Parameter size is not policy size: a small change to weights does not necessarily mean a small change in the model’s output probabilities. The concrete example is one sampled next-token prediction: if the update shifts the score of one likely token much more than the alternatives, its probability can move appreciably even if the parameter change looks modest. Generalizing across sampled prediction contexts gives a practical estimate of policy movement. What should we measure at each context?

  2. Look at score movement across candidate tokens: think of the scores as a row of numbers behind the model’s next-token choices. If every score moves by the same amount, the probabilities do not change; if they move by different amounts, the distribution can shift. The canonical example is a two-token choice where one token’s score rises and the other’s falls: that widens their gap and changes which one is more likely. The estimate weights these differences by the current probabilities, then averages over examined contexts. This is not a full guarantee for every future prompt; it describes the sampled predictions and a local change. How does that measurement tell us what fraction of the update to keep?

  3. The budget turns measurement into a knob: the controller treats the proposed update like a step whose predicted effect grows roughly with the square of its size. So if the estimated change is four times the budget, taking half the update brings the local prediction back to the budget. A maximum multiplier keeps a tiny estimate from causing an oversized step. In the notebook analogy, this is like deciding how much of a planned change to carry forward; unlike a notebook, model outputs are nonlinear, so the estimate can miss the realized change for a finite update.

Overall, I like that this control targets output behavior rather than raw parameter distance, but I would not mistake “predicted” for “guaranteed.” A lower or gradually tightened budget favors smaller policy movements; what does the controller give up when it insists on that restraint?

Read the deep dive

Why People Wanted It

The problem is the price of a policy update: a step that looks small in parameter space can still move next-token probabilities substantially. So the real question was never just how to produce an update, but how large a fraction of that proposed update can be applied while keeping the predicted change in the policy within a chosen budget.

The Core Move

Estimate the local average KL caused by the proposed update, then scale the update so its predicted divergence fits the budget. For proposal DD and multiplier α\alpha, the local estimate is KL⁡avg≈α2q(D)\operatorname{KL}_{\mathrm{avg}}\approx\alpha^2q(D), so the constraint is α2q(D)≤δ\alpha^2q(D)\leq\delta.

Why Token-Score Changes Become a KL Estimate

Here is the part that gets technical: the estimate comes from the first-order change in every token's score at each sampled prediction context. Let z˙v(s)\dot z_v(s) be the score's rate of change along the proposed parameter update, and let pv(s)=softmax⁡(z(s)/T)vp_v(s)=\operatorname{softmax}(z(s)/T)_v be the current probability at temperature TT. The per-context contribution is the probability-weighted variance of those score changes:

q(D)=12∣P∣T2∑s∈PVar⁡v∼p(s)[z˙v(s)].q(D)=\frac{1}{2|\mathcal P|T^2}\sum_{s\in\mathcal P}\operatorname{Var}_{v\sim p(s)}[\dot z_v(s)].

The variance matters because adding the same shift to every token score changes no softmax probabilities; only differences among token-score changes affect the distribution. The factor T−2T^{-2} captures how the same score movement translates into probability movement at the evaluation temperature. Averaging across the examined contexts gives the unscaled proposal's predicted KL coefficient.

Why Predicted KL Is Quadratic in Update Size

Now for the local derivation: write the KL at a context as a function of a scalar multiplier aa on the fixed update. At a=0a=0, the two policies match, so KL is zero. Its first derivative is also zero: the probabilities sum to one, leaving no first-order KL change at the point where the distributions coincide. The leading local term is therefore curvature, giving KL⁡avg(α)=α2q(D)+O(α3)\operatorname{KL}_{\mathrm{avg}}(\alpha)=\alpha^2q(D)+O(\alpha^3) for small α\alpha, under the stated smoothness conditions on the logits.

In this approximation, doubling the update scale quadruples predicted KL; halving it cuts the prediction by four. That is a local approximation, not a guarantee about the realized divergence for a finite step. When does this quadratic rule provide a useful control knob rather than a false sense of certainty?

How the Budget Sets the Multiplier

The controller compares the predicted divergence with a target budget δ>0\delta>0. For finite positive q(D)q(D), it chooses

α=min⁡(αmax⁡,δq(D)).\alpha=\min\left(\alpha_{\max},\sqrt{\frac{\delta}{q(D)}}\right).

The square root appears because divergence scales with the square of the multiplier: if the proposal predicts four times the budget, the multiplier is at most one half. The cap αmax⁡\alpha_{\max} prevents the rule from enlarging a proposal without limit when its predicted KL is small. A fixed budget holds the target steady; an annealed budget lowers it over training to permit less policy change later.

Minimal Causal Code

This loop shows the rescaling decision after a predicted-KL estimate has been computed. The estimate is treated as a scalar; production code must obtain it from token-score changes on sampled contexts.

import math

# D is the proposed parameter update; q_D is its predicted-KL coefficient.
# The loop makes the scale decision visible rather than applying an optimizer.
delta = 1e-4
alpha_max = 1.0
q_D = estimate_predicted_kl_coefficient(D, sampled_contexts)

if q_D > 0.0:
    alpha = min(alpha_max, math.sqrt(delta / q_D))
else:
    alpha = alpha_max

for parameter, update in zip(parameters, D):
    parameter.data.add_(update, alpha=alpha)

What You Gain, and What You Lose

You gain a direct, interpretable control over the locally predicted average change in next-token probabilities, using a scale that preserves the proposed update's direction. You also get a natural way to tighten the target over training by lowering the budget.

You lose certainty beyond the local approximation: realized KL can differ from predicted KL, especially when the update is not small. The estimate is based on selected response contexts, so it summarizes those examined predictions rather than every possible context. And a strict budget can shrink updates, trading policy movement for tighter predicted control.

Quiz
If the proposed update has predicted-KL coefficient q(D), what happens to the local predicted KL when the update multiplier is halved?
It becomes zero for any nonzero proposal.
It is unchanged.
It is halved.
It is reduced to one quarter.
Core Takeaway

The controller does not change the update's direction; it chooses how much of it the predicted-KL budget can afford.