Multi-Sample Baselines for Variance-Reduced Policy Gradients

439 concepts330 papers4 proposals

Policy gradient methods, such as the classic REINFORCE algorithm, provide a mathematically elegant way to optimize non-differentiable objectives in reinforcement learning. By adjusting policy parameters in the direction of the gradient of expected rewards, these methods allow agents to learn directly from trial-and-error feedback.

However, vanilla policy gradients suffer from a notorious flaw: high variance. In complex, high-dimensional action spaces—such as generating text token-by-token or synthesizing images via multi-step diffusion trajectories—the reward signal from a single random rollout is incredibly noisy. If an agent receives a moderate reward for an action, it is unclear whether that action was genuinely good, or simply mediocre compared to what else the policy could have produced. This noise leads to unstable training trajectories, slow convergence, and extreme sensitivity to hyperparameters.

To combat this, modern reinforcement learning increasingly relies on multi-sample relative baselines. Instead of training a separate, complex neural network to predict expected rewards, these techniques draw multiple samples simultaneously to establish an on-the-fly, empirical baseline that centers the learning signal.


The Intuition of Baselining

Mathematically, we can subtract any baseline $b$ from the reward $R$ in a policy gradient update without introducing bias, provided that $b$ does not depend on the specific action chosen:

$$\nabla_\theta \mathbb{E}[R] = \mathbb{E} \left[ \nabla_\theta \log \pi_\theta(a|s) \cdot (R - b) \right]$$

The goal of the baseline is to act as a reference point. If the achieved reward $R$ is greater than $b$, the advantage is positive, and the policy is pushed to favor that action. If $R$ is less than $b$, the advantage is negative, and the policy discourages it.

Traditionally, actor-critic frameworks use a learned value network $V(s)$ as the baseline. However, training a critic introduces its own set of challenges: the critic can lag behind a rapidly changing policy, requires careful hyperparameter tuning, and adds significant computational overhead. Multi-sample baselines bypass the critic entirely by using the policy's own concurrent outputs to determine what constitutes an "average" performance.


Leave-One-Out and Group-Relative Baselines

The most prominent manifestation of this idea is the Leave-One-Out (LOO) reward baseline. For a given input or prompt, the model generates a batch of $N$ independent completions. When calculating the gradient update for the $i$-th sample, its baseline is defined as the average reward of the other $N-1$ samples in the batch.

Prompt ──┬──> Completion 1  ──> Reward 1 ──┐
         ├──> Completion 2  ──> Reward 2 ──┼──> Baseline for Comp 1 = Mean(Reward 2, 3)
         └──> Completion 3  ──> Reward 3 ──┘

This mechanism provides three distinct intuitive advantages:

  1. Perfect Tracking: The baseline perfectly reflects the policy’s exact capabilities at that specific moment in training, completely eliminating the approximation lag inherent in learned value networks.
  2. Zero Bias: Because the baseline for sample $i$ excludes sample $i$ itself, it remains statistically independent of the action being evaluated, preserving the unbiased nature of the gradient estimator.
  3. Information Maximization: Every single sample in the batch serves a dual purpose—it acts as a training signal to update the weights, and it simultaneously serves as a baseline component for every other sample.

Arash Ahmadian demonstrates the power of this approach in Back to Basics: Revisiting REINFORCE-Style Optimization for Learning from Human Feedback in LLMs, introducing the REINFORCE Leave-One-Out (RLOO) algorithm for aligning Large Language Models. By leveraging the strong initialization of pre-trained models and using a leave-one-out baseline, RLOO consistently outperforms more complex actor-critic frameworks like PPO while utilizing information from every sample in a batch to maximize sample efficiency. This framework is further validated by Zhilin Wang and Olivier Delalleau in HelpSteer3-Preference: Open Human-Annotated Preference Data across Diverse Tasks and Languages, showing that variance-reduced updates from multiple model completions provide highly stable policy alignment.

This relative centering strategy extends naturally to generative vision and diffusion models. Shashank Gupta et al. propose LOOP (Leave-One-Out PPO) in A Simple and Effective Reinforcement Learning Method for Text-to-Image Diffusion Fine-tuning, demonstrating that sampling multiple images per prompt and comparing each image's reward to the cohort average drastically reduces the gradient noise caused by volatile text-to-image reward models. Similarly, in the domain of masked Diffusion Language Models, Yair Schiff et al. develop the d2 framework in d2: Improved Techniques for Training Reasoning Diffusion Language Models. They utilize group-relative policy optimization to center rewards around a group mean, stabilizing the high variance that typically plagues policy gradient updates across complex, multi-step generative trajectories.


Self-Critical and Dual-Sampling Baselines

When generating a large batch of samples is computationally prohibitive, researchers often turn to a simplified variant: the self-critical baseline.

Instead of sampling $N$ independent trajectories, the model generates two sequences: one active prediction sampled stochastically from the current policy distribution, and one baseline sequence generated deterministically via greedy decoding (choosing the absolute highest-probability token or action at each step).

The intuition here is straightforward: the greedy rollout represents the model's current "default" behavior. If a stochastic rollout manages to beat the default behavior, it indicates that the exploratory choices made during that rollout were beneficial, yielding a positive advantage signal.

The self-critical approach has proven highly effective across structured sequence tasks:

Alternatively, a dual-sampling baseline can be constructed by drawing exactly two independent samples from the same multinomial distribution. As explored by Hui Chen et al. in Temporal-Difference Learning With Sampling Baseline for Image Captioning, evaluating the difference in rewards between two fully stochastic samples provides a lower-variance advantage signal than comparing a stochastic sample to a deterministic greedy baseline, because both trajectories originate from identical probabilistic dynamics.


Alternative Paths to Variance Reduction

While multi-sample empirical baselines offer a non-parametric solution to gradient noise, variance reduction remains a multi-faceted problem in reinforcement learning. Other notable strategies focus on modifying the underlying policy structure or optimization geometry:

  • Analytical Integration: Instead of relying entirely on Monte Carlo sampling to estimate gradients, Yijie Zhang et al. show in Deep Coherent Exploration for Continuous Control that using recursive analytical integration over the final layer of a policy network provides a mathematically precise, low-variance signal for continuous control.
  • Tree Expansion: Rather than evaluating a single action step, the policy itself can embed multi-step planning. Gal Dalal et al. demonstrate in Policy Gradient with Tree Expansion that gradient variance decays exponentially as the depth of a lookahead tree increases, smoothing the optimization landscape.
  • Control Regularization: In environments where a stable but suboptimal controller is already known, the authors of Control Regularization for Reduced Variance Reinforcement Learning show that regularizing the RL agent's behavior toward a control-theoretic prior reduces performance variance across training runs in a manner mathematically proportional to the mixing weight.

Ultimately, whether through structural constraints or multi-sample cohort comparisons, reducing variance is the key to unlocking the true potential of policy gradients. By shifting from absolute reward tracking to relative, group-centered advantages, multi-sample baselines provide a robust and elegant framework for stabilizing reinforcement learning in the most demanding generative domains.

History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_variance_reduction_in_policy_gradients_1d2549e2,
  title = {variance reduction in policy gradients},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/variance-reduction-in-policy-gradients/rdr_1d2549e246154a518e25aa55c947640d},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-23},
}

This exact version (version 1, frozen text):

@misc{lacuna_variance_reduction_in_policy_gradients_1d2549e2_v1,
  title = {variance reduction in policy gradients},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/variance-reduction-in-policy-gradients/rdr_1d2549e246154a518e25aa55c947640d/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-23},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake