Paper commentary
Offline Reinforcement Learning: Tutorial, Review, and Perspectives on Open Problems
Tutorial and review explain why offline reinforcement learning struggles with distributional shift
- Problem Offline reinforcement learning learns from a fixed dataset, so learned policies drift into states and actions the data never covered. Function approximators are vulnerable to this distributional shift, and expressive ones more so.
- Method The authors survey offline methods and trace how each family handles distributional shift. They start with behavioral cloning, then cover importance sampling, dynamic programming, policy constraints and model-based methods.
- Results The authors show that without new on-policy data, behavioral cloning's error bound grows quadratically in the horizon H, not linearly.
Why learning from a fixed log is hard
Reinforcement learning normally alternates between collecting experience with the latest policy and improving that policy. That loop is hard to run in robotics, healthcare or driving, where each trial can be costly or dangerous. Offline RL instead learns from a dataset gathered once by some unknown behavior policy and never changed during training.
The catch is distributional shift, where a policy drifts into states and actions the data never covered. Function approximators are vulnerable to this shift, and expressive ones are more so. The authors treat this as the central obstacle to making offline RL as dependable as supervised learning on large datasets.
How far imitation drifts without new data
The authors start with behavioral cloning, which fits a policy to labeled states with supervised learning. Assuming optimal action labels, the bound on expected mistakes is a constant plus H squared times the generalization error. The squared term comes from the learned policy entering states far outside its training distribution, where errors keep accumulating.
If the learner gathers labels on the states its own policy visits, the bound becomes a constant plus H times the error. The gap between the two cases is the authors' reason for why offline imitation is harder than on-policy imitation. This analysis concerns imitation rather than offline RL, so the authors present it as a warning.
Reweighting old trajectories to estimate return
Importance sampling reweights trajectories from the behavior policy by the ratio of target to behavior action probabilities. The plain estimator is unbiased, but its variance grows with the product of weights over the horizon. Self-normalizing the weights gives the weighted estimator, which is biased but has much lower variance.
The per-decision estimator drops the weights of future steps, because a reward does not depend on later actions. Even so, many practical problems keep too much variance for the estimator to be useful. Adding an approximate Q-model as a control variate gives the doubly robust estimator. That estimator is unbiased if either the behavior policy is known or the model is correct.
Weights degenerate when the learned policy moves far from the behavior policy, which is the usual offline case. So the authors say the reliable gain from importance sampling is limited by the behavior policy's suboptimality, the state and action dimensionality and the horizon.
Why Q-learning on logged data unlearns
Dynamic programming methods learn a value function with Bellman backups, so they can in principle run on a fixed buffer. QT-Opt learned vision-based grasping from about 500,000 logged trials, yet online fine-tuning still improved it. Logged data can therefore work, but the gap shows what is missing when no new data arrives.
The authors trained SAC on HalfCheetah-v2 from fixed datasets with n from 1000 to 1000000 points. Return first rose and then fell as Q-function training continued. The decline persisted at larger dataset sizes, so the authors treat it as distinct from classic overfitting. They attribute it to target values becoming more erroneous the longer the Q-function trains.
The target value uses actions drawn from the current policy, and those actions can fall outside the dataset. The policy is optimized to choose the actions where the Q-function is highest, so it tends to find the Q-function's errors. Online RL corrects such errors by trying the actions, but offline the policy can't correct them. Fujimoto et al.
noted that restricting Q-value evaluation to actions in the dataset avoids errors from extrapolation.
Keeping the policy near the data
Policy constraint methods keep the learned policy close to the behavior policy under a chosen divergence D. Policy penalty methods instead subtract a scaled divergence from the reward or the target Q-values. The most common choice of divergence in the penalty view is KL-divergence.
The f-divergence family covers KL-divergence, chi-squared divergence and total-variation distance as special cases. A tight constraint can cost final performance, because the behavior policy may be much worse than the best policy learnable from the data. The authors note that the KL-based bound on state shift is very loose in practice.
Learned models and their errors
A learned model can be used for planning or to train a policy, and both query it on the learned policy's state distribution. A policy optimized under the model can exploit its errors and visit states where the model is wrong. Uncertainty estimates such as ensembles are the usual remedy in the online setting.
Janner et al. bound the true policy value using model error and policy shift. The bound suggests that short rollouts branched from data states, as in Dyna, reduce compounding error. Yu et al. reported that MBPO reached reasonable offline performance without modification, whereas SAC without policy constraints failed to learn meaningful policies.
Open problems
Importance sampling works best when the policy stays near the behavior policy, which offline data seldom enforces. The behavioral cloning bound requires optimal action labels on the dataset states. The authors note that no known non-trivial sufficiency conditions on the dataset guarantee near-optimal policies.
Paper info
- Authors
- Sergey Levine, Aviral Kumar, George Tucker, Justin Fu
- Venue
- arXiv · Preprint
- First published
- 2020-5-4
- Added
- 2026-11-12
- Updated
- 2020-11-1
- Version
- v3
- arXiv
- 2005.01643
- Category
- cs.LG · cs.AI · stat.ML
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Sergey Levine, Aviral Kumar, George Tucker, Justin Fu (2020). Offline Reinforcement Learning: Tutorial, Review, and Perspectives on Open Problems. arXiv:2005.01643v3. https://arxiv.org/abs/2005.01643v3
BibTeX
@misc{levine2020offline,
title = {{Offline Reinforcement Learning: Tutorial, Review, and Perspectives on Open Problems}},
author = {Sergey Levine and Aviral Kumar and George Tucker and Justin Fu},
year = {2020},
eprint = {2005.01643},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2005.01643v3}
}