The Gradient Is a Covariance
The Shape of a Post-Training Update, Part 1: the score, the Fisher, and a bound that holds for any reward
The Shape of a Post-Training Update · Part 1 of 4. Part 2 finds where the sparsity comes from. Part 3 asks what policy gradient can reach. Part 4 turns the same few directions into a bound on the rank of the update.
- Reinforcement learning (RL), on-policy distillation and supervised fine-tuning (SFT) on near-policy data change only a small fraction of parameters. Small and sparse are different claims; the question is which coordinates move.
- On the model’s own samples the score has zero mean. So the expected gradient is a covariance, the Fisher is a variance, and the Fisher caps the gradient for any reward.
- At one position the Fisher is the variance of logit sensitivities: whatever moves every candidate together counts for nothing, so it is small when the model is confident or its likely candidates react alike.
- All of this holds for any known sampler once the score is centered under it; on-policy sampling centers it for free.
The figures step through like slides. Use → or ▶, and step back with ←.
| Symbol | Meaning |
|---|---|
| $\smu(a\mid s)$ | the distribution that drew the next token after prefix $s$: the sampler |
| $\pmodel(a\mid s),\ \pi_\theta(y\mid x)$ | the model’s next-token distribution, and its probability of a response $y=(y_1,\dots,y_T)$ to prompt $x$; $\smu=\pmodel$ on-policy |
| $\kappa_{i,a}=\partial z_a/\partial\theta_i$ | how strongly parameter $i$ moves the logit $z_a$ of token $a$ |
| $A$ | the learning signal: a reward or advantage |
| $G_i,\ F_i$ | the expected update and the diagonal Fisher of parameter $i$ |
1. Sparsity needs its own explanation
A small update that carries few bits can still touch every coordinate.
RL fine-tuning changes only 5–30% of a model’s parameters, across seven algorithms and ten models (Mukherjee et al., 2025). On-policy distillation and SFT on near-policy data behave the same way (Zhang, Mukherjee & Peng, 2026). Two common explanations are that RL only reweights answers the model can already produce, and that a scalar advantage with $B$ possible values carries at most $\log_2 B$ bits per episode (Information Bandwidth). The first explains why the update is small, the second why it carries little; a hundred million parameters each moving a little would satisfy both. The question is which coordinates move, and why the same few can be found before any reward is seen.
2. The gradient is a covariance, the Fisher a variance
On the model’s own samples the score averages to zero, so the expected gradient is a covariance and the Fisher is a variance.
The line can never leave the wedge of perfect correlation, which is the cap |G| ≤ std(A) · √F: the same for both. A large Fisher allows an update; only the reward makes one.
Probabilities sum to one, so whatever a parameter does, the responses it raises are paid for by others, and weighted by probability the changes cancel. With the score’s mean at zero, the policy gradient $\mathbb{E}[A\cdot\mathrm{score}_i]$ is a covariance and the Fisher is a variance; Cauchy–Schwarz gives the bound. A baseline that depends only on the prompt changes nothing in $G_i$, since $\operatorname{Cov}(A-b,\mathrm{score}_i)=\operatorname{Cov}(A,\mathrm{score}_i)$. It changes only $\operatorname{std}(A)$ and the noise of the estimate, and the Optimal Token Baseline, set per token, is the choice that minimizes that noise.
The Fisher says where learning can happen; the reward decides where it does. After “She drank a cup of”, the output rows for tea and coffee have a large Fisher, yet if the reward does not care which one is chosen, their gradient is zero. Measured before RL training, the top 1% of coordinates by Fisher hold 47.40% of the top 1% by gradient magnitude, against 1% at random (Zhang, Mukherjee & Peng, 2026).
Proof, and the four assumptions it uses
The response space is finite (finite vocabulary, bounded length), so every exchange of a derivative and a sum below is exact. Probabilities are positive, which softmax sampling at temperature 1 without top-k or top-p guarantees. The reward $r(x,y)$ and the prompt distribution do not depend on $\theta$.
$$ \mathbb{E}_{y\sim\pi_\theta}[\mathrm{score}_i]=\sum_y\pi_\theta\,\frac{\partial_i\pi_\theta}{\pi_\theta}=\partial_i\sum_y\pi_\theta=0, $$ $$ G_i=\partial_i\,\mathbb{E}_x\Big[\sum_y\pi_\theta\,r\Big] $$ $$ =\mathbb{E}_x\Big[\sum_y\pi_\theta\,\mathrm{score}_i\,r\Big]=\mathbb{E}[r\cdot\mathrm{score}_i]. $$Subtracting $\mathbb{E}[r]\,\mathbb{E}[\mathrm{score}_i]=0$ turns the product into a covariance, and the same step turns $\mathbb{E}[\mathrm{score}_i^2]$ into a variance. Both hold per prompt, so $G_i=\mathbb{E}_x[\operatorname{Cov}(r,\mathrm{score}_i\mid x)]$, which is why a baseline $b(x)$ drops out.
The full Fisher $F_{ij}=\mathbb{E}[\mathrm{score}_i\,\mathrm{score}_j]$ is also the expected curvature: $\partial_j\mathrm{score}_i=\partial_i\partial_j\pi_\theta/\pi_\theta-\mathrm{score}_i\,\mathrm{score}_j$, and the first term has mean $\sum_y\partial_i\partial_j\pi_\theta=0$, so $F_{ij}=-\mathbb{E}[\partial_i\partial_j\log\pi_\theta]$. It must be estimated on responses the model samples. On data labels the same formula gives the empirical Fisher, a different quantity (Part 2).
3. One position: the Fisher is a spread of sensitivities
At one prefix, a parameter’s token Fisher is the variance of how strongly it moves each candidate’s logit.
So do likely candidates that react alike: over thirty times smaller.
The softmax subtracts a mean: the token score is how strongly $\theta_i$ moves the drawn token’s logit, minus how strongly it moves the average candidate. Without that subtraction the second moment would be $f_i(s)+(\bar\kappa^{p}_i)^2$. The removed part is the common component, which raises every logit together and changes no probability. The pairwise form says the same thing: only differences between likely candidates count. So a parameter has a small token Fisher exactly when it acts about equally on the candidates the model finds likely, either because the model is confident or because those candidates react alike.
4. Along the response: the Fisher adds up
Across positions the cross terms average to zero, so the Fisher is a sum of token Fishers.
Only the diagonal survives: the Fisher adds one token Fisher per position.
Here $\mathrm{score}_i^{(t)}=\kappa_{i,y_t}-\bar\kappa^{p}_i(s_t)$ is the token score at position $t$. Given the prefix $s_t$, the next token is drawn from $\pmodel(\cdot\mid s_t)$, so its score averages to zero. For $u\lt t$ the earlier token is part of that prefix: its score is already fixed and comes out of the inner expectation. Summing over positions makes the Fisher grow with length and treats every parameter alike, so length sets the overall scale and the token Fishers decide which coordinates are large.
5. What this needs: a centered score
Everything above holds for any sampler whose next-token distribution is known, once the score is centered under it.
Averaged over what the sampler draws, it is zero: a constant reward moves nothing.
Off-policy, the token was drawn by an inference engine or a stale model, and under that sampler the softmax score averages to $\bar\kappa^{\mu}_i-\bar\kappa^{p}_i$. Subtracting this average at every prefix is score centering (Marek & Ryabinin, 2026). Sections 2–4 then go through word for word with $\smu$ in place of $\pmodel$; on-policy the average is already zero, so centering comes free. The centered update is the gradient of the covariance loss in Around the Sampler: the drawn token is raised and every token is lowered by how often the sampler draws it. Centering the score needs the sampler’s full next-token distribution at every prefix, which stale models provide, and so do inference engines that return full log-probabilities. Subtracting from the signal its average under the sampler at each prefix, a value baseline that can be fitted on the samples, has the same effect in expectation and needs no probabilities. SFT gains nothing from either: its signal is constant, so centering removes its whole gradient (Part 2).
The theorem, proved
For any sampler $\smu$ whose full next-token distribution is known at every prefix:
- Zero conditional mean, by construction: $\mathbb{E}_{a\sim\smu}\big[\kappa_{i,a}-\bar\kappa^{\mu}_i\big]=0$.
- Cross terms vanish: for $u\lt t$, $c_i^{(u)}$ is fixed by $s_t$, so $\mathbb{E}_{\smu}\big[c_i^{(u)}c_i^{(t)}\big]=\mathbb{E}_{\smu}\big[c_i^{(u)}\,\mathbb{E}_{\smu}[c_i^{(t)}\mid s_t]\big]=0$.
- The Fisher is a variance: by 2 only diagonal terms survive, and by 1 each is $\operatorname{Var}_{a\sim\smu}[\kappa_{i,a}(s_t)]$. By 1 and the tower property $\mathbb{E}_{\smu}[c_i]=0$, so the second moment is the variance.
- The update is a covariance: $\operatorname{Cov}_{\smu}(A,c_i)=\mathbb{E}_{\smu}[A\,c_i]=G_i$, and Cauchy–Schwarz gives the bound.
On-policy, $c_i=\mathrm{score}_i$ and $G_i$ is the gradient of the expected reward. Off-policy, $G_i$ is the expected update of the centered estimator, which is the gradient of the covariance loss.
Next. Part 2 puts this to work. In the output layer the Fisher is an exact coin flip, concentrated on the tokens the sampler emits; in hidden layers it is low-dimensional; and without centering a mean shift can push gradient where the Fisher cannot see.
References
- Y. Zhang, S. Mukherjee, H. Peng. Understanding LLM Parameter Update Sparsity through the Lens of Fisher. arXiv, 2026.
- S. Mukherjee, L. Yuan, D. Hakkani-Tür, H. Peng. Reinforcement Learning Finetunes Small Subnetworks in Large Language Models. NeurIPS 2025.
- M. Marek, M. Ryabinin. Score Centering Stabilizes Off-policy Reinforcement Learning. arXiv, 2026.
- Y. Li, J. Xu, et al. The Optimal Token Baseline: Variance Reduction for Long-Horizon LLM-RL. ICML 2026.
- Y. Li. Information Bandwidth in Reinforcement Learning. Blog, 2025.
Citation
@online{li-2026-gradient-is-covariance,
title = {The Gradient Is a Covariance},
author = {Li, Yingru},
year = {2026},
month = oct,
url = {https://richardli.xyz/post/gradient-is-covariance/}
}