■ Change #62 · wiki.edited
Offline reinforcement learning: Normalize Markdown to canonical form
body
## The setting− In offline (batch) RL the agent receives a dataset $\mathcal{D}$ of transitions collected by some behaviour policy and must output a policy with no environment access. Off-policy algorithms such as DQN or DDPG fail here: their value estimates overestimate actions absent from the data, and the policy then exploits those errors. Fujimoto, Meger and Precup (2018) named this *extrapolation error* and proposed Batch-Constrained Q-learning (BCQ), restricting the policy to actions near the data.+ In offline (batch) RL the agent receives a dataset $\mathcal{D}$ of transitions collected by some behaviour policy and must output a policy with no environment access. Off-policy algorithms such as DQN or DDPG fail here: their value estimates overestimate actions absent from the data, and the policy then exploits those errors. Fujimoto, Meger and Precup (2018) named this _extrapolation error_ and proposed Batch-Constrained Q-learning (BCQ), restricting the policy to actions near the data.## Main algorithm families- **Policy constraint methods** (BCQ, BEAR, TD3+BC) keep the learned policy close to the behaviour policy.- **Conservative value methods** such as Conservative Q-Learning (Kumar et al., 2020) add a regulariser that lowers Q-values for out-of-distribution actions, so the learned value lower-bounds the true one.- **Implicit methods** such as Implicit Q-Learning (Kostrikov et al., 2021) avoid evaluating out-of-dataset actions by fitting value functions with expectile regression.- **Sequence-model approaches** such as Decision Transformer (Chen et al., 2021) treat RL as conditional sequence prediction on returns-to-go.Levine et al. (2020) give the standard tutorial and list open problems, including offline hyperparameter selection and evaluation.## BenchmarksD4RL (Fu et al., 2020) provides datasets for locomotion, navigation (AntMaze), manipulation and driving with normalised scores, and became the default benchmark. CORL provides single-file reference implementations. Evaluating a policy without running it requires off-policy evaluation; the DOPE benchmark (Fu et al., 2021) tests this. Paine et al. (2020) study offline hyperparameter selection and report that, with the algorithm and Q-estimator controlled, policies can be ranked well enough to choose close to the best of a set.## TheoryPessimism, subtracting an uncertainty penalty from value estimates, is the theoretical principle. For tabular MDPs, Li et al. (2022) show that a pessimistic model-based method attains minimax-optimal sample complexity under single-policy clipped concentrability, of order $H^4 S C^\star_{\text{clipped}}/\varepsilon^2$ in the finite-horizon case. For linear MDPs, Xiong et al. (2022) give a computationally efficient algorithm nearly matching a lower bound up to logarithmic factors. Beyond linear function approximation the picture is less complete.## PracticeOffline pretraining followed by online fine-tuning, offline data in robotics, and logged-feedback learning in recommendation are the main uses. Unlike online RL, results are sensitive to dataset quality and to choosing hyperparameters without environment access.
explainer.student
**What it is for.** Ordinary RL learns by trying things, including bad things. A hospital cannot try random drug doses on patients and a self-driving car cannot crash in order to learn, but both have large logs of past decisions and outcomes. Offline RL learns a policy from such a fixed dataset, with no new interaction allowed.**Example.** A dataset holds a million recorded steps of a walking robot, collected by an earlier, mediocre controller. Can a better controller be learned from those records alone?**Why the obvious method fails.** Q-learning estimates $Q(s,a)$, the expected future reward of taking action $a$ in state $s$ (an expected value: a probability-weighted average of outcomes), and then picks the action with the highest $Q$. Its update is− $$Q(s,a)\leftarrow r+\gamma\max_{a'}Q(s',a'),$$+ $Q(s,a)\leftarrow r+\gamma\max_{a'}Q(s',a'),$the reward just received plus the discounted value of the best next action. The $\max$ looks at every possible next action, including ones that never appear in the data. For those, the network's estimate is pure extrapolation, and some extrapolated values are too high by chance. The max picks exactly those errors, the policy follows them, and no new data ever corrects them. Fujimoto, Meger and Precup (2018) called this extrapolation error; the general name for the mismatch between the data's actions and the learned policy's actions is distribution shift.**The fix: pessimism.** Successful methods stay cautious where data is thin.− - *Policy constraints* (BCQ, TD3+BC) keep the new policy close to the actions in the data.− - *Conservative Q-Learning* (CQL, 2020) adds a penalty that pushes down $Q$ for actions outside the data, so the learned value underestimates rather than overestimates.− - *Implicit Q-Learning* (IQL, 2021) never evaluates actions outside the data at all.− - *Decision Transformer* (2021) treats the problem as predicting the next action in a sequence, conditioned on the return wanted.+ - _Policy constraints_ (BCQ, TD3+BC) keep the new policy close to the actions in the data.+ - _Conservative Q-Learning_ (CQL, 2020) adds a penalty that pushes down $Q$ for actions outside the data, so the learned value underestimates rather than overestimates.+ - _Implicit Q-Learning_ (IQL, 2021) never evaluates actions outside the data at all.+ - _Decision Transformer_ (2021) treats the problem as predicting the next action in a sequence, conditioned on the return wanted.+Theory backs the idea: for small (tabular) problems, a pessimistic model-based method needs the fewest samples possible up to constant factors (Li et al., 2022), provided the data covers the states a good policy visits.**Benchmarks and the open gap.** D4RL (2020) provides standard datasets for simulated robots and mazes, scored so that 0 is a random policy and 100 an expert. A persistent practical problem is choosing hyperparameters (settings such as learning rate or penalty strength) without testing candidates in the real environment, which defeats the purpose of going offline. That requires off-policy evaluation, estimating how well a policy would do from logged data alone, which has no general guarantee when the policy takes actions the log rarely contains.
hash a5b6dc069babca9f9da37ce497d9ec84c085a52cbd453cc28a126caf1e2ff04d
previous 838c42cd6ed783f2ade57ab14682e3a4bc757e93586bcf39110054c685efe30e