TRPO
In vanilla policy gradient methods, like REINFORCE, each update step moves the policy parameters in proportion to the advantage of sampled actions. Helpful actions get pushed up. Harmful actions get pushed down.
But policy networks are highly nonlinear. A small step in parameter space can cause a huge change in action probabilities. That can collapse exploration or erase prior good behavior.
For example, if a few random trajectories get high rewards, the model can overfit to them and forget everything else it had learned.
Trust Region Policy Optimization
TRPO frames learning as constrained optimization: improve expected return, but do not let the new policy deviate too far from the old policy.
The deviation is measured by Kullback-Leibler divergence, or KL divergence, which quantifies how different two probability distributions are.
Trust-region lab
A modest parameter push can become a big policy shift
Imagine a few lucky trajectories made the action right look excellent. Increase the update pressure and watch the new policy drift away from the old one.
ratio for right
1.95
KL distance
0.056
trust limit
0.04
Outside the trust region
The action probabilities have shifted too far. TRPO would reject or shrink this update to avoid collapsing exploration or erasing useful behavior.
The ratio compares the probability of the sampled action under the new policy to its probability under the old policy.
If , the new policy assigns higher probability to that action. If , it assigns lower probability.
Equation walkthrough
TRPO improves the policy inside a constraint
Click each part of the constrained objective to see how TRPO turns policy improvement into a trust-region problem.
Probability ratio
new policy divided by old policy
If the ratio is greater than 1, the new policy assigns higher probability to that sampled action. If it is below 1, the new policy assigns lower probability.
Terms
TRPO's constrained objective is
subject to
where
The objective encourages the policy to increase the probability of actions that led to above-average returns and decrease the probability of actions that performed worse than expected.
The KL term measures how different the new policy's action probabilities are from the old policy's probabilities. The constraint keeps the update within a trust region, preventing large destructive policy changes.
That is the central promise of TRPO: steady, stable improvement without forgetting previously learned behaviors.
The Cost
TRPO is theoretically elegant and robust, but very computationally expensive.
That cost is one reason PPO became so popular: it keeps much of the trust-region intuition while being simpler to optimize.
What problem is TRPO mainly trying to prevent with its KL-divergence constraint?