techlist.io

Policy Gradient

6 posts

Microsoft2026-02-273 min readCurated summary

Engineering and algorithmic interventions for multimodal post-training at Microsoft scale

At production scale, post-training multimodal agents fail for reasons that standard reinforcement-learning literature often overlooks. Heterogeneous tasks, long tool-use trajectories, noisy reward sources, and strict latency and safety requirements can make aggregate reward look healthy while the policy gradient becomes uninformative and important capabilities regress. The post presents interventions designed to preserve useful advantage signals as scale, task diversity, and interaction horizons grow. ## Production-Scale Challenges - Copilot agents must simultaneously handle: - Tool orchestration - Enterprise documents and mixed-media inputs - Content moderation - Multi-step execution - Trajectories range from roughly 100 to more than 2,000 tokens and span 6 to 25+ interaction steps. - Rewards come from programmatic checks, human judgments, and implicit usage signals, each with different noise and latency. - A single scalar reward can hide regressions in robustness, long-horizon planning, or downstream task success. - Aggregate reward may rise while gradient updates increasingly depend on a small, unrepresentative subset of trajectories. ## Staged Objective Curriculum - The team separates: - **Verifiable objectives**, such as tool syntax and format compliance - **Preference objectives**, such as tool choice and response quality - Training uses only verifiable objectives during the first 30%. - Preference signals are then introduced linearly. - An entropy floor, implemented through a KL penalty activated below a threshold, prevents premature policy collapse. - Entropy bonuses were insufficient because the issue was not simply exploration; optimization was favoring behaviors that were easy to score. - A 30% warmup worked better than 10% or 50% across task families. - Early text-only supervision could also activate multimodal capabilities more reliably than noisy direct multimodal supervision, assuming adequate cross-modal alignment from pretraining. ## Adaptive Curriculum Based on Estimator Health - The team monitors effective sample size (ESS): `ESS = (Σ wᵢ)² / Σ wᵢ²` - ESS measures how many trajectories meaningfully contribute after importance weighting. - ESS falling below 20% of nominal batch size predicted learning stalls by about 35 epochs. - When ESS drops, the system: - Injects near-miss trajectories from a reservoir buffer - Temporarily increases the KL penalty to limit policy drift - Near-misses worked better than hard negatives because they preserve useful distinctions near the decision boundary instead of merely pushing the policy away from failure. - The intervention maintained ESS above 70%, with approximately 15% additional memory usage. ## Variance-Corrected Normalization - Per-task gradient normalization balances task magnitudes but ignores variance within each task. - Broad categories such as “coding” may contain trajectories ranging from 100 to 2,000 tokens, with very different variance. - Importance weighting can cause long trajectories to dominate the effective gradient even after task-level normalization. - The excerpt ends while introducing the team’s variance-correction approach, so its implementation and results are not included here. The central recommendation is to treat estimator health—not just reward and task metrics—as a first-class training signal. Monitoring ESS, controlling objective timing, and accounting for trajectory variance can help prevent healthy-looking dashboards from masking policy collapse and capability regressions.

OpenAI2018-04-173 min readCurated summary

Evolved Policy Gradients

# Evolved Policy Gradients: Learning the Loss Function Instead of the Policy OpenAI's Evolved Policy Gradients (EPG) is an experimental metalearning method that evolves the loss function used by learning agents rather than a policy or a reward function. Once evolved, the learned loss lets agents learn quickly on novel tasks and generalize beyond their training distribution, such as walking to a target on the opposite side of an arena from anything seen in training. EPG can also train agents faster than PPO, though the learned losses are currently narrow and do not transfer to very different kinds of tasks. ## Encoding Prior Knowledge as a Loss - Most RL agents start from a blank slate and depend entirely on external rewards, which is why they learn simple skills far more slowly than humans. - EPG instead encodes prior knowledge as a learned loss function, parameterized as a temporal-convolutional neural network, that tells the agent what counts as making progress. - The method is related to earlier work on evolving reward functions, but it goes further by evolving a complete loss, so the loss must effectively encode an RL algorithm internally. ## Two-Loop Optimization - **Inner loop:** An agent learns a task from scratch using stochastic gradient descent, optimizing its policy against the loss proposed by the outer loop. Tasks come from a family, such as "move gripper to target location [x, y]." - **Outer loop:** Evolution Strategies (ES) evaluate the returns achieved after inner-loop learning and adjust the loss parameters to produce higher returns. - Because ES optimizes final trained-policy performance rather than short-term returns, and the loss can adapt to the environment and the agent's history, the approach offers advantages over standard RL losses. ## Why Learn a Loss Instead of a Policy - Recurrent meta-learned policies tend to overfit the tasks they were trained on, and learned policy initializations offer limited help with exploration. - Loss functions are expected to generalize better across substantially different tasks, as hand-designed losses like PPO's already do across Atari and robotics. ## Generalization Experiment - Researchers evolved an EPG loss so that simulated "ants" learned to walk to random targets on the right half of an arena. - With the loss frozen, the ants were given targets on the left half. They learned to walk left, a case outside the training distribution. - RL², a baseline metalearning method that directly learns an adaptive policy, succeeded on the right-side targets but kept walking right when given left-side targets, which suggests it overfit to its training tasks. ## Limitations - An EPG loss is currently effective only for one small family of tasks at a time. It is unlikely to work on a very different task, such as Space Invaders. - Standard RL losses are general enough to learn a wide range of skills, so EPG trades generality for performance. - Metalearning methods that both outperform standard RL and retain its generality remain a long-term goal.

OpenAI2018-03-192 min readCurated summary

Variance reduction for policy gradient with action-dependent factorized baselines

Policy gradient methods work well in deep reinforcement learning, but their gradient estimates have high variance, especially in long-horizon tasks and those with high-dimensional action spaces. This post derives a bias-free, action-dependent baseline that uses the structure of the stochastic policy without adding assumptions about the MDP. The authors show through theory and experiments that it reduces variance and speeds learning, and that it scales to high-dimensional control. ## The Variance Problem in Policy Gradients - Policy gradient estimates often vary widely between samples, which slows and destabilizes learning. - The problem worsens as the horizon grows or the action space becomes higher-dimensional. ## An Action-Dependent, Bias-Free Baseline - The baseline depends on the action as well as the state, going beyond the conventional state-dependent baselines. - It exploits the factorized form of the stochastic policy itself, so it needs no additional assumptions about the environment. - The method stays computationally efficient, which makes it practical for large problems. ## Theoretical and Empirical Results - The authors quantify the variance benefit of the action-dependent baseline analytically. - They also analyze how suboptimal the optimal state-dependent baseline is, which shows the gap the new baseline closes. - On standard RL benchmarks and high-dimensional hand manipulation tasks, the action-dependent baseline yields faster learning. ## Scaling and Extensions - The approach scales to a synthetic 2000-dimensional target matching task. - The general idea of adding extra information to baselines also extends to partially observed and multi-agent settings. For practitioners facing high-dimensional action spaces or long horizons, the post suggests that an action-dependent factorized baseline is a low-cost way to reduce gradient variance without introducing bias.

OpenAI2017-09-122 min readCurated summary

Learning with opponent-learning awareness

Learning with Opponent-Learning Awareness (LOLA) is a multi-agent reinforcement learning method in which each agent accounts for how its own policy will shape the other agents' anticipated learning updates. Unlike independent learners, LOLA agents that encounter each other learn to cooperate, even in social dilemmas where self-interest would otherwise lead to defection. The method is practical for model-free RL and scales to large parameter spaces and nonlinear function approximators. ## The Problem with Multi-Agent Learning - When multiple agents learn at once, each agent's environment becomes non-stationary, which often causes unstable training or poor final outcomes. - The post frames this as a general issue across deep multi-agent RL, hierarchical RL, generative adversarial networks, and decentralised optimisation. ## The LOLA Learning Rule - Each agent anticipates the other agents' parameter updates and adds a term that measures how its own policy affects those updates. - This lets an agent shape the learning of its opponents rather than treating them as fixed. - The method can be computed efficiently with an extension of the policy gradient estimator, so it works without a model of the environment. ## Results on Benchmark Games - **Iterated prisoners' dilemma:** Two LOLA agents converge to tit-for-tat and cooperate, while independent learners do not. LOLA agents also earn higher payouts than naive learners and resist exploitation by higher-order gradient methods. - **Repeated matching pennies:** LOLA agents converge to the Nash equilibrium. - **Round-robin tournament:** LOLA agents shape the learning of a range of multi-agent algorithms from the literature and achieve the highest average returns on the iterated prisoners' dilemma. ## Grid World with Embedded Social Dilemma - The authors test LOLA on a grid world containing a social dilemma, using recurrent policies and opponent modelling. - By explicitly modelling the other agent's learning, LOLA agents learn to cooperate out of self-interest. ## Practical Takeaway For multi-agent settings where agents learn simultaneously, explicitly modelling how other agents will update can turn competitive dynamics into cooperative outcomes. The authors have released their code.

OpenAI2017-07-193 min readCurated summary

Proximal Policy Optimization

# Proximal Policy Optimization: A Simpler, Robust Policy Gradient Method OpenAI introduces Proximal Policy Optimization (PPO), a new family of reinforcement learning algorithms that matches or beats state-of-the-art methods while being far simpler to implement and tune. The post argues that PPO strikes a practical balance between ease of implementation, sample efficiency, and ease of tuning, and reports that it has become OpenAI's default RL algorithm as a result. ## The Problems with Policy Gradient Methods - Policy gradient methods underpin many deep RL successes, including video games, 3D locomotion, and Go. - They are highly sensitive to the step size: too small and learning is painfully slow, too large and noise overwhelms the signal or performance collapses. - They often have poor sample efficiency, needing millions or billions of timesteps to learn simple tasks. ## Earlier Fixes: TRPO and ACER - TRPO and ACER constrain or otherwise optimize the size of each policy update to address these issues. - ACER is considerably more complex than PPO, requiring off-policy corrections and a replay buffer, while only marginally outperforming PPO on Atari. - TRPO works well for continuous control but is hard to combine with architectures that share parameters between the policy and value function, or that use auxiliary losses, which are common in vision-heavy domains like Atari. ## The PPO Objective - Supervised learning is predictable, whereas RL algorithms have many interacting parts that are hard to debug and require heavy tuning. - PPO computes each update to minimize the cost function while keeping the new policy close to the previous one. - An earlier PPO variant used an adaptive KL penalty to control policy change. The new version replaces this with a clipped surrogate objective built from the probability ratio between the new and old policies, multiplied by the estimated advantage, with a clipping hyperparameter ε typically set to 0.1 or 0.2. - This objective approximates a trust region update while remaining compatible with stochastic gradient descent. It removes the KL penalty and the need for adaptive update schedules. - In tests, PPO performed best on continuous control tasks and nearly matched ACER on Atari. ## Demonstration: Controllable Robots - Interactive agents trained with PPO were shown in Roboschool, where a user set new target positions for a robot via keyboard. - Although the input sequences differed from the training distribution, the agent generalized to them. ## Released Implementations - OpenAI Baselines now includes scalable, parallel implementations of PPO and TRPO that use MPI for data passing, written in Python 3 and TensorFlow. - Pre-trained policies for the robots are available in the Roboschool agent zoo. - A later update added PPO2, a GPU-enabled implementation that runs about 3x faster than the original PPO baseline on Atari. - The update also added ACER, which uses a replay buffer to perform multiple gradient updates per sample and a Q-function approximator trained with the Retrace algorithm. ## Conclusion PPO offers a practical default for policy gradient reinforcement learning: it is simpler than TRPO and ACER, performs comparably or better across continuous control and Atari, and is easier to tune. Its open-source implementations in Baselines make it straightforward to adopt.

OpenAI2017-04-202 min readCurated summary

Equivalence between policy gradients and soft Q-learning

Q-learning and policy gradient methods, two leading approaches to model-free reinforcement learning, are shown to be closely related in the entropy-regularized setting. The post argues that "soft" (entropy-regularized) Q-learning is exactly equivalent to a policy gradient method, which may partly explain why Q-learning works well despite its inaccurate Q-value estimates. Experiments on Atari support the view that these entropy-regularized variants perform comparably to, or slightly better than, the standard versions. ## Equivalence Between Soft Q-learning and Policy Gradients - The authors establish a precise equivalence between Q-learning and policy gradient updates under entropy regularization. - This suggests Q-learning may be "secretly" implementing policy gradient updates, offering a partial explanation for its effectiveness. - The post notes that Q-learning is often sample-efficient, but its estimated Q-values are typically very inaccurate, so the mechanism behind its success has been poorly understood. ## Connection to Natural Policy Gradients - The authors also identify a link between Q-learning methods and natural policy gradient methods. ## Experimental Results on Atari - Entropy-regularized versions of both Q-learning and policy gradients were evaluated on the Atari benchmark. - They performed as well as, or slightly better than, their standard counterparts. ## Practical Validation Against A3C - To show the equivalence holds in practice, the authors built a Q-learning method whose learning dynamics closely match those of A3C. - Notably, this method works without a target network or an ϵ-greedy exploration schedule, two components common in standard Q-learning. The results suggest that entropy regularization provides a principled bridge between value-based and policy-based reinforcement learning, and that some of Q-learning's practical behavior may be better understood through a policy gradient lens.