Stationary Distribution Correction for Off-Policy Learning

This direction is merged into another direction: stationary distribution correction. Its last version stays readable and citable here.

Version 1 of 139 papers45 conceptsfrozen 2026-10-04

In reinforcement learning, we often want to learn about a "target" policy while using data generated by a different "behavior" policy. This is the essence of off-policy learning, and it is notoriously difficult. While standard importance sampling can correct for the different actions the two policies might take, it fails to account for a deeper discrepancy: the policies visit different parts of the environment with different frequencies.

Recent research has converged on stationary distribution correction as a principled solution to this problem. By estimating the ratio of state-visitation frequencies between policies, researchers are finding ways to stabilize off-policy evaluation, prevent divergence in deep RL, and make offline learning safer.

The Hidden Bias of Off-Policy Data

When an agent learns from a replay buffer or a static dataset, it is looking at a "behavior distribution" $d_\mu$. However, if the agent were to actually follow its current target policy $\pi$, it would encounter a different "stationary distribution" $d_\pi$.

As Assaf Hallak and Shie Mannor point out in Consistent On-Line Off-Policy Evaluation, standard algorithms like Temporal Difference (TD) learning converge to biased solutions because they ignore this shift. They update the value of a state based on how often the behavior policy visits it, rather than how important that state is to the target policy. This mismatch is a primary driver of the "Deadly Triad"—the combination of off-policy learning, function approximation, and bootstrapping that often leads to divergent or unstable training.

Correcting the "Where" Not Just the "What"

Traditional importance sampling only looks at the immediate action: "How much more likely was the target policy to take this action than the behavior policy?" Distribution correction goes further by asking: "How much more likely is the target policy to be in this state at all?"

Early foundational work by Ashique Rupam Mahmood, Richard S. Sutton, and colleagues introduced Emphatic TD (Emphatic Temporal-Difference Learning), which uses an "emphasis" trace to reweight updates. This trace accumulates the product of importance sampling ratios over time, effectively prioritizing updates for states that the target policy is likely to visit.

More recently, researchers have moved toward explicitly estimating the density ratio $w(s) = d_\pi(s) / d_\mu(s)$. If we can learn this ratio, we can reweight our training samples so that the agent learns as if it were experiencing the world through the eyes of the target policy. Jiachen Li and Qinxun Bai demonstrate in Off-policy Reinforcement Learning with Optimistic Exploration and Distribution Correction that this allows agents to treat off-policy replay data as if it were sampled directly from the target policy's execution, bridging the gap between historical data and current exploration.

The DICE Family: Stability Through Convexity

A major breakthrough in this area is the DICE (DIstribution Correction Estimation) framework. Rather than trying to track traces or solve unstable nested loops, DICE methods frame the estimation of these ratios as a stable optimization problem.

In OptiDICE, Jongmin Lee and Joelle Pineau show that offline RL can be transformed into a convex optimization problem. Instead of estimating value functions (which are prone to overestimating out-of-distribution actions), OptiDICE directly estimates the stationary distribution of the optimal policy. By reweighting the offline dataset to match this optimal distribution, the agent can learn to mimic high-performance trajectories without ever needing to bootstrap values for states it hasn't seen.

Other variations have expanded this toolkit:

  • SR-DICE: Scott Fujimoto and Doina Precup leverage the Successor Representation in SR-DICE to scale these ratios to high-dimensional tasks like Atari.
  • COptiDICE: Jongmin Lee and Daniel J. Mankowitz applied these corrections to constrained RL in COptiDICE, ensuring that agents stay within safety limits by estimating the "cost-visitation" density of a policy before ever running it.

Fixing the "Math-to-Code" Gap

Perhaps the most surprising application of distribution correction is in fixing "on-policy" algorithms like PPO and TRPO. In Correcting discount-factor mismatch in on-policy policy gradient methods, Fengdi Che and Rupam Mahmood identify a fundamental flaw: while the Policy Gradient Theorem assumes states are sampled from a discounted distribution, practitioners almost always sample from an undiscounted one (the actual sequence of states in a trajectory).

By introducing an "averaging correction"—a learned ratio that represents the expected discount factor at a given state—they align practical implementations with theory. This simple reweighting of state importance significantly improves the stability and data efficiency of standard policy gradient frameworks, proving that even "on-policy" methods suffer from a form of distribution shift that requires correction.

Why It Works: Restoring the Contraction

The mathematical intuition for why these methods work lies in the Bellman operator. In standard off-policy learning, the update doesn't necessarily behave as a "contraction"—it can cause values to spiral out of control.

As Nathan Kallus and Lars van der Laan demonstrate in Stationary Reweighting Yields Local Convergence of Soft Fitted Q-Iteration, reweighting the regression objective to match the stationary distribution of the current policy restores the contraction property. By aligning the "norm" of our updates with the actual visitation frequency of the policy, we ensure that the learning process remains stable and converges to the correct fixed point, even when using imperfect neural network approximations.

Papers in this version

History & citationVersion 1 · 2026-10-04

Merged into another direction · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_stationary_distribution_correction_for_o_4736b351,
  title = {Stationary Distribution Correction for Off-Policy Learning},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/stationary-distribution-correction-for-off-policy-learning/rdr_4736b351cb5944d6ac6877d3df710aa2},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-12-05},
}

This exact version (version 1, frozen text):

@misc{lacuna_stationary_distribution_correction_for_o_4736b351_v1,
  title = {Stationary Distribution Correction for Off-Policy Learning},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/stationary-distribution-correction-for-off-policy-learning/rdr_4736b351cb5944d6ac6877d3df710aa2/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-12-05},
}