Trait selection is a projection of learning dynamics
Suppose responses with a particular behavior earn less reward than responses without it. Will RL make that behavior less common? The tempting answer is yes. In one of the training runs in the paper discussed below, answers flagged as lying earned less reward than the rest at every step. Their rate still rose from 7.3% to 16.0% by step 9, before falling back to 10.2% by step 24.
Reward differences tell us how responses are weighted in the update. They do not tell us how that update changes the probabilities of other responses that share the same parameters.
Trait Selection Decomposition (TSD; van der Weij et al., 2026) makes this distinction explicit. The way I find it easiest to read is as a statement about motion: split the velocity of the parameters into two contributions, then project each onto the direction that increases the trait’s probability.
One contribution comes from reward differences between responses with and without the trait. The other comes from reward differences within each class. Both move the same model. Both can change how often the trait appears.
Start with the moving parameters
Fix a training prompt and a binary trait, such as discussing the grader in a response. Let \(\pi_\theta(y)\) be the probability of a complete response \(y\) under parameters \(\theta\). Write \(z(y)=1\) when the response has the trait and \(z(y)=0\) otherwise. The prompt is omitted from the notation.
Use ordinary policy gradient with SGD, a fixed reward function \(R(y)\), and no KL penalty. Define
\[p = \Pr_{y\sim\pi_\theta}(z(y)=1), \qquad \mu_1 = \mathbb E[R\mid z=1], \qquad \mu_0 = \mathbb E[R\mid z=0].\]Here \(p\) is the trait’s probability on the training prompt, and \(\mu_1,\mu_0\) are the mean rewards in the two classes. Assume both classes have nonzero probability. All three quantities depend on \(\theta\). Individual responses keep their rewards, but the model changes which responses it generates, including which ones it generates within each class.
The expected reward is
\[J(\theta)=p\mu_1+(1-p)\mu_0.\]In the small-step limit, gradient ascent gives a parameter velocity \(\dot\theta=\nabla_\theta J\), with the learning rate absorbed into the time coordinate. The dot denotes a time derivative. Applying the product rule gives
\[\dot\theta = \underbrace{(\mu_1-\mu_0)\nabla_\theta p}_{v_S} + \underbrace{p\nabla_\theta\mu_1+(1-p)\nabla_\theta\mu_0}_{v_W}.\]The vectors \(v_S\) and \(v_W\) live in parameter space. They add up to the ordinary policy gradient.
The first asks which class earns more on average. If responses with the trait do better, \(v_S\) points toward increasing their total probability. If they do worse, it points toward decreasing it. The reward gap \(\delta=\mu_1-\mu_0\) sets the sign and scales the magnitude.
The second retains the competition within each class. Some responses with the trait are better than others; the same is true of responses without it. Learning from those differences produces \(v_W\).
Within-class competition does not preserve class probability
This is the part I initially found confusing. If we only compare responses within a class, why should that change the probability of the class itself?
Because the comparison defines the weights on the gradients. It does not constrain where the gradients can move the model.
Let \(s(y)=\nabla_\theta\log\pi_\theta(y)\) be the score of a response. Both gradients in the split are averages of scores:
\[\nabla_\theta p = \mathbb E\left[(z(y)-p)\,s(y)\right], \qquad \nabla_\theta\mu_1 = \mathbb E\left[(R(y)-\mu_1)s(y)\mid z=1\right],\]and likewise for class zero.
Derivation
Since \(\nabla_\theta\pi_\theta(y)=\pi_\theta(y)\,s(y)\) and the class probability is a sum over responses, \(p=\sum_y z(y)\,\pi_\theta(y)\),
\[\nabla_\theta p = \sum_y z(y)\,\pi_\theta(y)\,s(y) = \mathbb E\left[z(y)\,s(y)\right] = \mathbb E\left[(z(y)-p)\,s(y)\right].\]The last step uses \(\mathbb E[s(y)]=\nabla_\theta\sum_y\pi_\theta(y)=0\): probabilities sum to one, so subtracting a constant from the weights changes nothing.
For the class means, write \(\mu_1=\mathbb E[R\,z]/p\) and differentiate the quotient:
\[\nabla_\theta\mu_1 = \frac{\mathbb E[R\,z\,s]-\mu_1\nabla_\theta p}{p} = \frac{\mathbb E[z\,(R-\mu_1)\,s]}{p} = \mathbb E\left[(R(y)-\mu_1)s(y)\mid z=1\right].\]Each response is compared with its own class’s mean reward. A response above that mean is reinforced; one below it is suppressed.
Those updates pass through shared parameters. A parameter that helps the model choose better responses within a class may also make that class more likely overall. Nothing in class-wise centering forces the resulting update to be perpendicular to \(\nabla_\theta p\).
The same split can be seen directly in the reward weights. Let \(\bar R=J\) be the overall mean reward, and let \(\mu_{z(y)}\) be the mean reward of the class containing \(y\). Then
\[R(y)-\bar R = \underbrace{\delta\,(z(y)-p)}_{\text{between classes}} + \underbrace{R(y)-\mu_{z(y)}}_{\text{within a class}}.\]Multiply both sides by \(s(y)\) and average under the policy. The first term produces \(v_S\) and the second produces \(v_W\). This is a decomposition of one update, not two independently trained models.
The reward weights also show the route through the shared parameters. Follow one response \(y'\) under the within-class update alone. Its log-probability changes at the rate
\[s(y')\cdot v_W = \mathbb E_{y}\left[(R(y)-\mu_{z(y)})\,s(y')\cdot s(y)\right].\]Each response \(y\) pushes every other response \(y'\), by its within-class advantage times the inner product of the two scores. The paper calls that inner product the score kernel. Inside each class the advantages average to zero. The pushes do not have to, because the kernel weights them differently for every \(y'\). Whatever part of them lands unevenly on the two classes changes the class probability.
Read the motion through a trait
Now choose where to measure the behavior. Let \(q(\theta)\) be its probability on a readout distribution, and let \(g=\nabla_\theta q\). Here \(q\) is a scalar trait probability, not a second policy. The readout might use the same tasks as training, or ask whether coding updates change behavior on math problems.
The gradient is computed the same way as \(\nabla_\theta p\), with responses \(y'\) drawn on the readout prompts:
\[g = \mathbb E_{y'}\left[(z(y')-q)\,s(y')\right].\]By the chain rule,
\[\dot q =g\cdot\dot\theta =g\cdot v_S+g\cdot v_W.\]The dot products measure how much each parameter velocity points along the direction that increases the readout probability, as in Figure 1. In terms of the pushes above, \(g\cdot v_W\) adds up the pushes on the readout responses, counted positively for those with the trait and negatively for those without.
For a small SGD step with learning rate \(\eta\), TSD’s contributions are
\[S=\eta\,g\cdot v_S, \qquad W=\eta\,g\cdot v_W, \qquad \Delta q\approx S+W.\]This distinction matters: \(v_S,v_W\) are vectors describing parameter motion; \(S,W\) are scalar changes in an observable. The within-class term can reinforce direct selection, oppose it, or have no first-order effect on this particular readout. It is not an approximation error or an inherently opposing force.
When training and readout coincide, \(q=p\), and the equation becomes especially transparent:
\[\dot p =\delta\,\lVert\nabla_\theta p\rVert^2 +\nabla_\theta p\cdot v_W.\]The squared norm is nonnegative, so the direct-selection contribution has the sign of the reward gap whenever the gradient is nonzero. The total change need not. If training and readout differ, even the direct-selection contribution depends on the alignment between their probability gradients.
A negative gap with a positive velocity
Here is a small example of my own. A one-parameter policy has four possible responses, with logits \(4\theta,-2\theta,\theta,-3\theta\) and softmax probabilities. At \(\theta=0\) they are equally likely. Responses A and B have the trait.
| Response | Trait label | Reward | Score at \(\theta=0\) |
|---|---|---|---|
| A | 1 | 0.8 | 4 |
| B | 1 | 0 | -2 |
| C | 0 | 1 | 1 |
| D | 0 | 0 | -3 |
The scores equal the logit coefficients here because their mean is zero. The two class means are \(\mu_1=0.4\) and \(\mu_0=0.5\), giving a negative gap \(\delta=-0.1\). But
\[\frac{\partial p}{\partial\theta} =\frac14(4-2)=0.5, \qquad \frac{\partial J}{\partial\theta} =\frac14(0.8\times4+1\times1)=1.05.\]So gradient ascent increases the trait probability:
\[\dot p=0.5\times1.05=0.525.\]The decomposition tells us how. The parameter velocity \(1.05\) splits into \(v_S=\delta\,\partial p/\partial\theta=-0.05\) and \(v_W=1.10\). Projecting each onto \(\partial p/\partial\theta=0.5\), direct selection contributes \(-0.025\) to \(\dot p\) and the within-class update contributes \(0.55\), more than offsetting it. Class-level reward statistics favor responses without the trait, while learning which responses are better within the classes pushes the shared parameter strongly enough in the other direction.
With a single parameter there is only one direction to move in, so every update changes the trait’s probability, whichever comparison produced it. That is parameter sharing in its most extreme form.
Figure 2 shows the same step response by response. Inside each class the reward advantages cancel: +0.4 and −0.4, +0.5 and −0.5. The pushes they produce do not. In the class with the trait, A gains more than B loses.
The forces change as the model learns
The reward gap is not a fixed external force. Neither are the gradients. All are properties of the current policy.
Imagine the trait initially offers a useful shortcut. Its class earns more reward, so direct selection increases its frequency. Meanwhile, learning within the other class may improve responses that do not use the shortcut. Their mean reward can catch up, shrinking the gap and weakening direct selection.
This gives the within-class update two distinct roles. It can change the trait probability now, through its projection onto the readout gradient. It can also change the reward gap and gradient geometry that determine future updates. Even a within-class update with zero projection today can affect the trait’s trajectory later.
That is why a local decomposition does not by itself predict the end of training. It gives the current velocity; a forecast also needs to describe how that velocity field evolves. The SGD equations here are enough to see the structure; the paper extends the same split to GRPO, a KL penalty, and Adam.
The useful shift in perspective is to ask two questions together: which responses does reward favor, and how does learning from those responses move the behavior we care about? TSD separates the reward comparisons while retaining their shared route through the parameters. A trait’s reward advantage is one contribution to its dynamics. Learning to do better within either class supplies another.
References
- Teun van der Weij et al., Toward a Science of RL Dynamics: Introducing Trait Selection Decomposition, 2026.
Enjoy Reading This Article?
Here are some more articles you might like to read next: