REINFORCEMENT LEARNING · INTERVIEW QUESTION
Explain PPO (Proximal Policy Optimization). Why is it preferred over vanilla policy gradient?
🔴 advanced · Policy Gradient Methods
Hint: Think about the clipped surrogate objective and trust regions.
Answer
Vanilla policy gradient (REINFORCE) has high variance and can take destructively large steps.
PPO's clipped surrogate objective:
where is the probability ratio and is the advantage estimate.
Clipping removes the incentive for some excessively large updates in the surrogate objective. It does not constrain every ratio or guarantee stability; monitor realized KL and optionally stop epochs early.
python
from stable_baselines3 import PPO
model = PPO('MlpPolicy', env, verbose=1,
learning_rate=3e-4,
clip_range=0.2, # epsilon
n_epochs=10,
batch_size=64)
model.learn(total_timesteps=100_000)Benefits: simple implementation, good sample efficiency, works across many domains. PPO is used in RLHF for LLM alignment, robotics, and game AI.
Related questions
- What is the actor-critic architecture? How does it address limitations of pure policy gradient methods?
- Explain the Bellman equation. How is it used in Q-learning?
- What is reinforcement learning, and how does it differ from supervised and unsupervised learning?
- Explain the exploration-exploitation tradeoff. What strategies address it?
- What are the key improvements in Rainbow DQN over vanilla DQN?