A learner trained on a fixed dataset fails exactly where it leaves the data: a copy of the expert drifts into states the data never showed (compounding error), and a value maximiser picks actions the data never tried (extrapolation error). Every method on this page is a way of keeping the learner where the data can vouch for it, or of getting new data where it cannot.
Fig. 1 · two ways off the data: along the state axis (imitation) and along the action axis (offline RL)
The state axis and the band's shape are a sketch (illustrative); the action slice in steps 4 to 6 is section 6's toy, computed in the page (seed 1). Drag the figure to turn it.
You need: Q-learning, off-policy learning and importance sampling from Model-free prediction and control; overestimation bias and replay from Value-based deep RL; TD3, SAC and TRPO from Policy gradients and actor-critic (the offline methods are built on them). The vocabulary (state, action, return, value, policy) is on the parent Topic: rl.
| Method | Learns from | Needs during training | Answer to the failure | Section |
|---|---|---|---|---|
| Behaviour cloning | Expert (state, action) pairs | Nothing else | None: errors compound, up to T²ε over T steps | 2 |
| DAgger | Expert labels on the learner's own states | An expert to query, environment | Train on the states the learner actually reaches: Tε plus recovery | 3 |
| Inverse RL (max-margin, MaxEnt) | Expert trajectories | Environment or model (an RL inner loop) | Recover the reward, then plan: the whole trajectory is judged, not each step | 4 |
| GAIL, AIRL | Expert trajectories | Environment (on-policy RL) | Match the expert's state-action distribution with a discriminator as reward | 4 |
| Learning from preferences | Comparisons between behaviours | A rater, environment | Fit a reward to the comparisons, then RL: the road to RLHF | 5 |
| BCQ, BEAR, TD3+BC | (s, a, r, s′) with rewards | Nothing else | Keep the policy on the data's actions | 7 |
| CQL | (s, a, r, s′) | Nothing else | Push values down off the data: a lower bound | 8 |
| IQL, AWR | (s, a, r, s′, a′) | Nothing else | Never evaluate an action outside the data | 9 |
| Decision Transformer, RvS | Trajectories with returns | Nothing else | No value function: predict the action given the return asked for | 10 |
| Cal-QL, RLPD | A dataset, then interaction | Environment, later | Start from the data, then fix the mistakes online | 11 |
Rows jump to their section. The parent's Taxonomy tab sets online, off-policy and offline side by side, and its Method atlas places behaviour cloning, GAIL, CQL, IQL and Decision Transformer among 47 methods. The two replays below (Fig. 2, behaviour cloning against DAgger; Fig. 3, one dataset through four offline learners) are computed exactly in the page and equal an independent Python implementation on 32,948 values (src/recompute.py); the D4RL results tab holds the benchmark's numbers as printed.
An offline (or batch) learner receives a dataset D = {(si, ai, ri, s′i)} collected by a behaviour policy πβ and must output a policy without collecting anything more (Levine, Kumar, Tucker and Fu 2020; the older name "batch RL" and fitted Q iteration go back to Ernst, Geurts and Wehenkel 2005). Why bother: in medicine, driving, robotics on expensive hardware and recommendation, trying random actions is dangerous, slow or costly, while logs of past decisions are plentiful; offline RL is the attempt to give decision-making deep learning's recipe of large fixed datasets.
Three distinctions are easy to blur. Off-policy means learning about one policy from data produced by another; Q-learning and DQN are off-policy but still online, because they keep collecting data with their current policy (Model-free prediction and control, Value-based deep RL). Offline removes the collection entirely: the policy that would fix its own mistakes by trying them never gets to. And imitation differs from offline RL in what the data must contain: imitation needs good behaviour and no reward; offline RL needs rewards and can use poor behaviour, in principle stitching pieces of mediocre trajectories into a better one (which D4RL's maze datasets were built to test; Fu et al. 2020).
Behaviour cloning maximises Σi log π(ai | si) over expert pairs (or minimises squared error for continuous actions). It is the oldest method here: ALVINN steered a vehicle from camera images with a small network trained on a person's driving (Pomerleau 1988). It is also the most used: supervised fine-tuning of a language model on demonstrations is behaviour cloning on tokens (Alignment: SFT, RLHF, DPO Family, RLVR), and large robot policies are mostly BC with expressive models: RT-1 was trained on about 130,000 demonstration episodes collected by 13 robots over 17 months and performs over 700 training instructions at 97% success (Brohan et al. 2022); Diffusion Policy reports an average improvement of 46.9% over prior methods across 12 manipulation tasks by modelling multimodal action distributions (Chi et al. 2023).
The trouble: supervised learning assumes test inputs come from the training distribution. Training states come from the expert's distribution dπ*; at test time the learner visits dπ, the states its own actions lead to. NVIDIA's end-to-end driving paper says it plainly: "Training with data from only the human driver is not sufficient. The network must learn how to recover from mistakes. Otherwise the car will slowly drift off the road" (Bojarski et al. 2016, §5). Their fix was data augmentation: images from left and right cameras, and synthetic shifts and rotations, labelled with the steering that would return to the lane.
A number first. A learner wrong on 2% of the expert's own states (ε = 0.02) over T = 60 steps: if its errors did not change its inputs, it would expect 60 × 0.02 = 1.2 bad steps. Because each slip moves it off the data, the bound is T²ε = 72, and the exact cost on the task below is 25.5 steps out of lane.
That is Ross and Bagnell's bound for behaviour cloning (Ross, Gordon and Bagnell 2011, Theorem 2.1; first proved in Ross and Bagnell 2010). The intuition is a sum: a first mistake at step t happens with probability about ε and can cost up to T − t afterwards, so the total is about Σt ε (T − t) ≈ εT²/2. A learner whose errors did not change its inputs (ordinary classification) would pay only Tε.
Predict, then watch. Both learners in Fig. 2 make the same 2% of mistakes on the expert's states. After DAgger's five rounds, will its cost at T = 60 be about half of behaviour cloning's 25.5, or a tenth?
Fig. 2 · the same slip: behaviour cloning drifts off the road, DAgger has labels for where the slip leads and comes back
Set DAgger rounds to 2: one round of the learner's own data covers only the side it happened to drift to, and the cost barely falls (21.9 against 25.5 at ε = 0.02, T = 60); from round 3 it is 2.4. The ball is one sampled car (the same draws for both learners). The task is illustrative; how it is built is in the closed block below.
Nine lanes, the car's own lane in the middle; each step the action turns the heading left, keeps it, or turns it right, and the car moves one lane per step of heading. The expert steers back to its lane and straightens up, so its own data never leaves the centre state and its cost is 0. Cost: 1 for every step outside the car's lane. The learner predicts the expert's label at the nearest state it has data for and is wrong with probability ε at every step (ε is exactly its error on the expert's states). DAgger: round 1 is the expert's data (so its policy is behaviour cloning); each later round rolls out the current learner 5 times, has the expert label every state visited, and retrains on everything (Ross et al. 2011, Algorithm 3.1 with βi = I(i = 1)). The state distribution is propagated exactly (seed fixed for the sampled car and the DAgger rollouts); the page's engine equals an independent Python implementation on 32,948 values (src/recompute.py).
The same failure in language models is exposure bias: a model trained to predict the next token given the true previous tokens must, at generation time, condition on its own outputs, "as errors may accumulate along the way" (Ranzato et al. 2015). On-policy distillation is the DAgger answer: the student generates, the teacher labels the student's own sequences (Agarwal et al. 2023, GKD). RL fine-tuning after SFT is another, since the model is then trained on its own samples (RL for LLMs).
Ross, Gordon and Bagnell give a problem where J(π̂) = (1 − εT) J(π*) + T²ε, so no better guarantee is possible for behaviour cloning in general: the quadratic is the real price of training on the expert's states and testing on the learner's.
If training states come from the expert and test states from the learner, train on the learner's states. DAgger (Dataset Aggregation; Ross, Gordon and Bagnell 2011) does this iteratively; Fig. 2 runs it:
The guarantee changes from quadratic to linear: J(π̂) ≤ J(π*) + uTεN + O(1), where εN is the error on the learner's own state distribution and u bounds how much worse the cost-to-go gets after one non-expert action (the cost of recovering; Theorems 3.1 and 3.2). In Super Tux Kart, behaviour cloning did not improve with more expert laps, "because most of the training laps are all very similar and do not help the learner to learn how to recover from mistakes", while DAgger's policy "never falls off the track after 15 iterations of training" (§5.1).
Its price is the expert. DAgger needs an expert who can be asked "what would you do here?" in states the expert would never have reached, and needs the environment to run the learner. That is cheap for a planner, a search procedure or a stronger model (teacher-student distillation), and awkward for people: labelling while not in control is unnatural, so variants let the human take over only when needed and learn from the takeovers (HG-DAgger, Kelly et al. 2018). When the learner predicts something the recording already holds, the recording can be the expert. WorldTUI, a 360M model trained to imitate a terminal, rolls out 1 to 4 events on its own screens from a point in a recorded session and trains on the edit from its wrong screen back to the recorded one, keeping a correction only if its words had already appeared on screen or in the typing, so it is never rewarded for inventing what it could not know (one author's small tests; WorldTUI). When neither the expert nor the environment is available again, the remedies are offline: augment the data with perturbed states labelled by recovery actions (NVIDIA's shifted cameras), inject noise into the expert's actions while collecting so the data shows recoveries (DART, Laskey et al. 2017), or reason about the whole trajectory (section 4).
With enough rounds (N of order T up to log factors), some policy in the sequence has error εN on its own state distribution, the best achievable by the policy class on the aggregated data. Each round is a new loss function (the new states), and training on all data so far is Follow-The-Leader, a no-regret algorithm; no-regret over the rounds is what turns the per-round errors into the linear bound.
Exact expected cost J at ε = 0.02 (log-log) of behaviour cloning and of DAgger after 8 rounds (rollouts of length T), against the lines εT² (Ross and Bagnell's bound, with J* = 0 here) and εT. From T = 5 to T = 40 behaviour cloning's cost rises 44 times for 8 times the horizon, then bends back to slope 1 once almost every remaining step is out of the lane. DAgger stays at about 2εT: each slip costs about two steps out of lane before the correction (Ross et al.'s recovery constant u ≈ 2).
Behaviour cloning copies actions one step at a time. Inverse reinforcement learning asks what reward the expert is optimising. Given that reward, planning or RL produces a policy that judges whole trajectories, so a learner that has drifted still knows where it should be heading; the reward is also the more transferable thing, describing the task rather than one way of doing it in one environment.
The problem is ill-posed. Ng and Russell (2000) set it up for a known MDP and observed optimal behaviour and noted the degenerate answer first: R = 0, under which every policy is optimal, explains any behaviour. Their fix was a heuristic: among the rewards that make the expert optimal, pick the one that makes the expert's action beat the next-best action by the largest margin, with a penalty favouring simple rewards. Every IRL method since is a choice of which reward to prefer, run inside the same loop (right):
Because GAIL matches distributions over whole trajectories rather than single actions, it does not compound errors the way behaviour cloning does: on Humanoid, behaviour cloning never exceeded 60% of expert performance while GAIL matched the expert at every dataset size tested; on Reacher, behaviour cloning was the more data-efficient. But GAIL is not offline: its environment interaction "was comparable to the number needed for TRPO to train the expert policies from reinforcement signals", against behaviour cloning's zero (§6 and §7). The cost of the whole family is that inner RL problem, which is why inverse RL is mostly used where dynamics are known or cheap to simulate (route planning, robot footstep planning, driver modelling).
Apprenticeship learning alternates a max-margin step (find the w with ‖w‖ ≤ 1 under which the expert most beats the policies so far) with an RL step (find the best policy for that w). Maximum margin planning (Ratliff, Bagnell and Zinkevich 2006) casts the same idea as structured prediction: the expert's path must beat every other path by a margin that grows with how different that path is.
MaxEnt IRL's likelihood gradient is the expert's feature counts minus the model's expected feature counts, which needs a soft planning pass (a soft-max version of value iteration) per gradient step. The causal-entropy version handles stochastic dynamics and is the form later deep methods build on. Deep IRL replaces the planning pass with sampling from a policy that is itself being optimised: guided cost learning (Finn, Levine and Abbeel 2016), which leads directly to the adversarial methods.
GAIL's objective, with the Jensen-Shannon form of the regulariser, is the JS divergence between the two occupancy measures minus λH(π) (their Equation 15); ρπ(s, a) = π(a|s) Σt γt P(st = s | π). The paper found GAIL "generally quite sample efficient in terms of expert data"; the parent's Method atlas lists its data as "On-policy (TRPO steps) plus fixed demonstrations".
Successors fix one weakness each. AIRL structures the discriminator so that it recovers a reward that still works when the dynamics change (Fu, Luo and Levine 2017). ValueDICE rewrites the distribution-matching objective so that it can be optimised off-policy, from replay data (Kostrikov, Nachum and Tompson 2019). IQ-Learn learns a single soft Q-function from which both the reward and the policy follow, avoiding the adversarial game (Garg et al. 2021).
The expert's demonstrations are fixed. Each outer step fits a reward (or a discriminator) that separates the expert from the current policy, then improves the policy against it, which needs the environment or a model of it. The methods differ in what is compared: feature expectations (apprenticeship learning), the likelihood of paths under a maximum-entropy model (MaxEnt IRL), or a classifier's output (GAIL).
Inverse RL infers a reward from what an expert does; preference learning infers it from what a person prefers between two behaviours, which is easier to give and possible for tasks the rater cannot perform. Christiano et al. (2017) showed a non-expert two short clips, asked which was better, fitted a reward model with the Bradley-Terry model, and trained the policy by RL on it while collecting more comparisons on its newest behaviour. It solved Atari games and MuJoCo locomotion "while providing feedback on less than one percent of our agent's interactions with the environment", and taught the Hopper to backflip from 900 queries in less than an hour, a behaviour no one had a reward function for.
That recipe with a language model as the policy is RLHF (InstructGPT); DPO removed the RL loop by training on the preference pairs directly, which makes it an offline preference method in exactly this page's sense (DPO). This page stops at the bridge: the reward model's loss and its failure modes are on Alignment: SFT, RLHF, DPO Family, RLVR (section 2, Reward models), PPO, GRPO and verifiable rewards on RL for LLMs, and over-optimising a learned reward on Reward Hacking.
Supervised fine-tuning is behaviour cloning (section 2), with exposure bias as its compounding error. A reward model fitted to preferences is preference-based reward learning (this section). DPO is offline learning from fixed preference pairs; online RLHF and RLVR are online RL. Rejection sampling and best-of-n fine-tuning (train on the model's own highest-scoring samples) are filtered behaviour cloning, the same idea as the "10% BC" baseline in section 10.
For two segments σ¹ and σ², the probability that σ¹ is preferred is exp Σ r̂ over σ¹ divided by the sum of that and exp Σ r̂ over σ²; r̂ is trained by cross-entropy on the human's choices.
Offline RL keeps the rewards and asks for more than imitation: a policy better than the one that collected the data. The natural tool is off-policy Q-learning, which in principle learns the optimal Q from any data. In practice it fails, and the reason is in its target:
Online, a wrongly high value gets tried, disappoints and is corrected. Offline it never gets tried. The max picks out exactly the actions whose errors happen to be positive, bootstrapping copies those values into every state that leads there, and the policy heads for actions nobody has tested. Fujimoto, Meger and Precup (2019) called this extrapolation error, "introduced by the mismatch between the dataset and true state-action visitation of the current policy": an off-policy actor-critic (DDPG) trained on a million transitions collected by a trained expert "quickly learns to take non-expert actions, under the guise of optimistic extrapolation. As a result, the value estimates rapidly diverge and the agent fails to learn". Kumar et al. (2019) named the propagated version bootstrapping error, which "accumulates via the Bellman backup operator". It is overestimation bias (Value-based deep RL has Double DQN's version) in its worst form: online, the noise is around actions that are tried; offline, around actions that never will be.
Predict, then play. The data in Fig. 3 holds 30 actions, all near a = −0.35; the best action is at 0.15 and worth 10. After 40 iterations of plain fitted Q iteration, where will the policy act, and will its believed value be above or below 10? Then watch.
Fig. 3 · naive fitted Q iteration
One state, an action a in [−1, 1], reward r(a) = 1 − 2(a − 0.15)², γ = 0.9, so always taking a is worth r(a)/(1 − γ) (dashed curve; best 10 at a = 0.15). The 30 data actions come from a narrow behaviour policy N(−0.35, 0.12²). Depth is the iteration of fitted Q iteration (square-root spacing, the newest in front); for the other learners the grey line is the naive learner at the same iteration. Each learner's steps are in its own section; a click on one switches the figure. The task is illustrative; its construction is in the closed block below.
The rewards in the data carry noise of s.d. 0.1. Q is a ReLU network with its first layer frozen (21 fixed features, ridge 10⁻³), so every fit is solved exactly and the extrapolation outside the data is linear, as a ReLU network's is. Each iteration fits targets ri + γ·(value of the next state). The value of the next state is the policy's expected Q, where the policy is ∝ exp(β Q) over all actions (naive, CQL), over actions within two standard deviations of the data's mean (BCQ-style, the shaded band; a fitted Gaussian stands in for BCQ's generative model), or, for IQL, the τ-expectile of Q over the dataset's own actions, with the policy extracted by advantage weights exp(β(Q − V)) on those actions. CQL adds α·((1/β) log Σ exp(β Q) − mean of Q on the data) to every fit: CQL(H), with its soft maximum taken at the policy's temperature so that the distribution pushed down is the policy itself (μ = π, the case of CQL's Theorem 3.2). Checked against an independent Python implementation (src/recompute.py).
In Fujimoto et al.'s experiments, even an agent trained on exactly the data of a behavioural agent learning alongside it ("concurrent") did much worse than that agent: the same data, without the ability to try its own actions, is not enough.
The first family attacks the max directly: if the policy only ever chooses actions the data contains, Q is only ever queried where data can correct it. BCQ (batch-constrained Q-learning; Fujimoto, Meger and Precup 2019) fits a generative model of the data's actions (a conditional VAE), samples n actions from it in each state, lets a small perturbation network nudge each within [−Φ, Φ], and takes the one with the highest Q (their Equation 11). The two knobs interpolate between imitation and RL: "If Φ = 0, and the number of sampled actions n = 1, then the policy resembles behavioral cloning and as Φ → amax − amin and n → ∞, then the algorithm approaches Q-learning". The BCQ-style learner in Fig. 3 is this idea with a Gaussian in place of the VAE.
Fig. 3 · the BCQ-style learner (section 7)
TD3+BC (Fujimoto and Gu 2021) asks how little needs to change. Its whole method is one line in the actor's loss of the online algorithm TD3, plus normalising the states:
It "compares favorably against many offline RL algorithms, while being significantly easier to implement and more than halving the required computation cost". The lesson the field took: much of offline RL's progress was tuning and implementation, and a strong simple baseline is required in any comparison. ReBRAC (Tarasov et al. 2023) revisited this minimalist approach with a handful of further design choices and is the strongest average performer in CORL's reruns (D4RL results tab).
The limit of every constraint is that it ties the policy to the behaviour: the tighter, the safer and the less improvement. When the data has to be stitched, a policy kept near each state's logged actions cannot follow the joined route. In CORL's reruns on AntMaze's medium and large mazes, TD3+BC scores between 0 and 0.25, against 20.5 to 67.25 for CQL and 30.25 to 73.75 for IQL (normalised score of the last policy, 4 seeds; Tarasov et al., Table 1).
BEAR (Kumar et al. 2019) argues that matching the behaviour policy's distribution is too strict when the data comes from a poor, noisy policy, and constrains only its support: "restrict the support of the learned policy, but not the probabilities of the actions lying within the support", enforced with a sampled maximum mean discrepancy (MMD) penalty. BRAC (Wu, Tucker and Nachum 2019) puts the divergence to the behaviour policy either into the value target or into the policy loss and compares the choices. TD3+BC's Table 1 lists the many changes other offline methods make to their base algorithms, each with its own hyperparameters.
Instead of restricting the policy, Conservative Q-learning changes what Q means: it learns a Q-function whose values are a lower bound on the true ones, so maximising it is safe because nothing is overestimated (Kumar, Zhou, Tucker and Levine 2020). Fig. 3 runs it (switch to CQL; its steps are below the theorem). The regulariser is added to the ordinary Bellman error:
With both terms, Q is not a pointwise lower bound (values of the data's own actions can be too high), but the policy's value Eπ[Q̂] is a lower bound on its true value when μ = π (Theorem 3.2). CQL reported "2-5 times higher final return" than prior offline methods, especially on datasets mixing several policies. Set α to 10 in Fig. 3 and the policy collapses onto the behaviour, both numbers settling at its 5.5: over-conservatism is CQL's failure mode, and α cannot be tuned without evaluating policies somewhere. CORL's reruns found "CQL is extremely sensitive to the choice of hyperparameters and implementation details", needing, for example, five hidden layers in the critic on AntMaze but not elsewhere (Tarasov et al. 2022, Observation 3).
Fig. 3 · CQL (section 8)
The paper proves two bounds. With only the push-down term (its Equation 1), the learned Q is below the true Qπ at every state and action, for α large enough relative to the sampling error (Theorem 3.1). With both terms (Equation 2), the bound holds for the policy's value only, and is tighter (Theorem 3.2). In Fig. 3 the Theorem 3.2 bound holds in every run at β = 1 and at the defaults, by construction of the setting (the soft maximum is taken at the policy's temperature); at α = 10 it is within the noise of 30 rewards (up to about 0.3 above).
The idea scales: Q-Transformer trains a Transformer Q-function offline on real robot data with a conservative regulariser that "pushes down the Q-values Q(s, a) for any action a outside of the dataset" (Chebotar et al. 2023). A model-based relative uses the same pessimism with a learned dynamics model: MOPO subtracts an uncertainty penalty from the model's rewards, and MOReL builds a pessimistic MDP that ends episodes where the model is unsure (Yu et al. 2020; Kidambi et al. 2020). Learned models and their exploitation are on Model-based RL and planning.
The third family never asks about an action outside the data at all. The simplest version is SARSA on the dataset: bootstrap from the action actually taken next, Q(s, a) ← r + γQ(s′, a′), which evaluates the behaviour policy without extrapolating; one step of policy improvement on top of that value is already a strong method (Brandfonbrener et al. 2021, "Offline RL Without Off-Policy Evaluation"). The question is how to get more than one step of improvement without leaving the data.
Implicit Q-learning (Kostrikov, Nair and Levine 2021) answers with expectile regression. The τ-expectile of a set of numbers minimises an asymmetric squared loss, L2τ(u) = |τ − 1(u < 0)| u²: at τ = 0.5 it is the mean, and as τ → 1 it approaches the maximum.
Dots: Q (vertical) at each of the 30 data actions (horizontal) of Fig. 3, from the IQL learner's final fit (seed 1, τ = 0.9, β = 3), each drawn at its action. The line is the τ-expectile of those 30 numbers, computed exactly. Predict before dragging: where is the line at τ = 0.5, and can any τ lift it to the true optimum of 10, which sits at an action off the data?
IQL fits a state value V(s) to that upper expectile of Q(s, a) over the dataset's actions, then fits Q(s, a) to r + γV(s′). At τ = 0.5 this is SARSA; as τ → 1 it approaches Q-learning's max restricted to actions the data contains (their Equation 4), so it "never needs to evaluate actions outside of the dataset". The policy is extracted afterwards by advantage-weighted regression: behaviour cloning in which each logged action is weighted by exp(β(Q(s, a) − V(s))), so better-than-average actions are copied more; small β is plain cloning, large β approaches the best in-data action. The paper's settings: τ = 0.7 and β = 3 on locomotion, τ = 0.9 and β = 10 on AntMaze, where the larger expectile is "crucial" for stitching.
Fig. 3 runs IQL on the same data (switch to IQL; its steps are below). Every loss is a regression on dataset samples, so these methods inherit the stability of supervised learning; in CORL's reruns IQL, AWAC and ReBRAC are "the strongest offline baselines on average" (Observation 1).
Fig. 3 · IQL (section 9)
The weighting comes from AWR (Peng et al. 2019), two supervised regressions (a value function, then weighted action regression), and AWAC (Nair et al. 2020), which uses a Q-function critic and was designed for fine-tuning online after offline training.
Decision Transformer (Chen et al. 2021) drops value functions entirely. Each trajectory becomes a sequence of triples (R̂t, st, at), where R̂t = Σt′ ≥ t rt′ is the return-to-go, and a causal GPT-style Transformer predicts each action from the last K triples (K = 30 on Atari). At test time you ask for a return: feed the desired R̂ first, act, subtract each reward received, and continue (right).
It "matches or exceeds the performance of state-of-the-art model-free offline RL baselines on Atari, OpenAI Gym, and Key-to-Door tasks", and longer contexts helped (K = 1 was "significantly worse"). Four results then narrowed what return conditioning buys:
The working summary: sequence models are a strong way to imitate selectively from large, mostly good, near-deterministic data, and a weak way to improve on data that must be recombined, where dynamic programming (CQL, IQL) still wins. Kumar et al. (2022) draw the same line between offline RL and behaviour cloning generally: offline RL wins with sparse rewards, "critical" states where a few decisions matter, long horizons and noisy data, and "policies trained on sufficiently noisy suboptimal data can attain better performance than even BC algorithms with expert data".
Conditioning an action model on an outcome came earlier as upside-down RL and reward-conditioned policies, and Trajectory Transformer (Janner, Li and Levine 2021) modelled whole trajectories and planned with beam search. RvS found that what matters is model capacity and what to condition on (a goal or a return), not the Transformer. Brandfonbrener et al.'s assumptions are near-deterministic dynamics and data that actually reaches the return being asked for.
Top: one logged trajectory as tokens; the Transformer sees everything to the left of each action token and is trained to predict that action. Bottom: at test time the first token is the return asked for (90 here, illustrative), and after each reward the next token is what is still owed. The model only interpolates among returns the data reached: asking for more than the data contains does not make the policy better.
The purest offline setting is rare; more often a dataset exists and some interaction is allowed later. Pretraining offline then fine-tuning online is less natural than it looks: Nakamoto et al. (2023) note the "counter-intuitive trend: policy initializations obtained from more effective offline RL methods tend to exhibit worse online fine-tuning performance", and identify an unlearning dip: a conservative Q-function's values are too low, so the first online updates spend themselves raising them and the policy gets worse before it gets better. Cal-QL keeps CQL's lower bound but stops values from falling below a reference policy's (the behaviour policy's) value: "calibrated", "a one-line code change" to CQL, better than prior methods on 9 of 11 fine-tuning tasks.
The opposite route also works: run an ordinary online off-policy method with the offline data mixed in. RLPD (Ball, Smith, Kostrikov and Levine 2023) trains SAC from scratch with "symmetric sampling", each batch half offline data and half online replay, plus layer normalisation in the critic (which "can bound the extrapolation of networks" without constraining the policy to the data) and large ensembles, reporting "a 2.5× improvement over existing approaches" with no offline pretraining at all.
On AntMaze (6 datasets, 1 million offline then 1 million online steps), the average normalised score moved from 48.4 to 95.6 for CQL, 56.3 to 78.5 for IQL, 53.0 to 97.3 for Cal-QL and 18.1 to 16.5 for AWAC (Tarasov et al., Table 3; per-dataset values in the D4RL results tab).
D4RL (Fu et al. 2020) is the benchmark nearly every paper above reports: locomotion datasets of graded quality, mazes that need stitching, a dexterous hand with few human demonstrations, and multitask kitchen data (the closed block below lists them). Scores are normalised so that 0 is a uniformly random policy and 100 a domain expert (a SAC agent on Gym-MuJoCo):
Two numbers that look the same often are not. The same method on the same dataset differs by dataset version (v0 against v2), by whether the last or the best policy during training is reported (CORL: BC averages 50.4 last and 70.2 best across Gym-MuJoCo), and by hyperparameters chosen with online evaluation, which breaks the offline assumption. Compare within one table; the D4RL results tab shows five printed tables side by side without splicing them, and the closed block lists the pitfalls with their evidence. D4RL itself is no longer maintained: its environments moved to Gymnasium and its datasets to Minari.
The datasets probe specific difficulties: Gym-MuJoCo locomotion with "medium" (1 million samples from a SAC policy stopped early), "medium-replay" (the replay buffer up to that point) and "medium-expert" (medium and expert data mixed); Maze2D and AntMaze for stitching undirected data with sparse rewards; Adroit's 24-degree-of-freedom hand with a small number of human demonstrations; Franka Kitchen for multitask data.
Off-policy evaluation (OPE) is the offline answer to "how good is this policy?", needed for model selection and deployment decisions. Importance sampling reweights logged returns by the product of π/πβ along each trajectory: unbiased, with variance that grows exponentially with the horizon (the off-policy Monte Carlo section of Model-free prediction and control shows the blow-up). Doubly robust estimators add a learned value model as a control variate, "guaranteed to be unbiased and can have a much lower variance" (Jiang and Li 2016). Fitted Q evaluation (FQE) runs fitted Q iteration for the fixed policy and reads off its value (Le, Voloshin and Yue 2019); it is biased by the same extrapolation as section 6 when the policy leaves the data. Paine et al. found that, controlled carefully, offline estimates "can reliably rank policies across hyperparameter choices"; a benchmark of these estimators on D4RL-style tasks is DOPE (Fu et al. 2021). Healthcare shows what goes wrong when they are not controlled (next section).
Coverage: no method can learn the value of something the data never does; offline RL can only recombine and reweight what is there, and the best policy within the data's support (the glass strip in Fig. 3) is the ceiling. Confounding: if the people who produced the data acted on information the data does not record (a clinician's bedside impression), the logged actions are correlated with outcomes for reasons the learner cannot see, and every estimate inherits the bias. Evaluation: without interaction, the policy's quality is itself an estimate, with the problems of section 12. Non-stationarity: the world that produced the logs may not be the one the policy is deployed in, and deploying the policy changes it.
"Off-policy means offline." Off-policy is about which policy the values describe; offline is about whether the agent may collect data. DQN and SAC are off-policy and online; naive off-policy algorithms fail offline for the reason in section 6, even on expert data (Fujimoto et al.'s "imitation" batch).
"More expert demonstrations will fix behaviour cloning." More data from the expert's state distribution lowers ε but does not cover the states the learner drifts into; Ross et al.'s Super Tux Kart learner did not improve with more expert laps. Coverage of recovery states (DAgger, noise injection, augmentation) is what helps.
"Offline RL beats behaviour cloning." Not on clean expert data, and not always on D4RL: in CORL's reruns 10% BC averages 69.3 on Gym-MuJoCo against CQL's 78.3, and BC beats both on pen-human (71.0 against −3.9 for TD3+BC and 13.7 for CQL). Offline RL wins when rewards are sparse, data is noisy or must be stitched (Kumar et al. 2022).
"A conservative value is a pessimistic estimate of every action." CQL's practical form (Equation 2) bounds the policy's value, not every Q-value: actions that are frequent in the data can be overestimated. Only the push-down-only form (Equation 1) is a pointwise lower bound.
Comparing D4RL scores across papers. Check the dataset version (v0 against v2), last against best checkpoint, the number of seeds, and whether hyperparameters were chosen by online evaluation. Compare within one table where possible, as the D4RL results tab does.
Asking a Decision Transformer for a return far above the data. Return conditioning interpolates among returns the data reached; asking for more does not make the policy better, and in stochastic environments the returns it was trained on may reflect luck rather than skill.
"GAIL is offline imitation." GAIL needs on-policy rollouts in the environment, comparable in number to training the expert with RL. Its demonstrations are fixed; its own data is not.
Trusting an importance-sampled value of a learned treatment policy. With long horizons and a deterministic learned policy, few logged trajectories match it, the weights explode, and the estimate rests on a handful of patients. Report the effective sample size and use several estimators.
Six tables from five papers, each shown exactly as its authors printed it. Nothing is averaged across tables, renormalised or filled in from another source: a score depends on the dataset version, the checkpoint reported, the seeds and the implementation, so numbers from two tables are not one series. The last panel puts one method on one dataset side by side across the tables, so the differences can be seen rather than spliced.
Normalised score = 100 × (score − random) / (expert − random), with D4RL's reference returns: 0 is a uniformly random policy, 100 a domain expert (a SAC agent on Gym-MuJoCo; the data-collecting controller on Maze2D; an estimate of the maximum on AntMaze and Kitchen; a BC-then-RL policy on Adroit) (Fu et al. 2020, §5). Scores above 100 are possible. How the methods work is in the Reading tab (sections 7 to 11).
Pick a method and a dataset. Each line is one table's printed value with its version and protocol; they are not averaged or joined. The CQL paper calls medium-replay "mixed"; its rows are matched by D4RL's own values for the same baselines.
The CQL paper's Table 1 and the D4RL paper's Table 2 both print CQL(H) on the original (v0) Gym datasets with the same baselines (taken from D4RL). On hopper-medium-expert the CQL paper prints 111.0 and D4RL 98.7; on walker2d-medium-expert the CQL paper prints 98.7 and D4RL 111.0: the two values are swapped. The CQL paper's walker2d-medium-expert row also repeats the baselines of its walker2d-mixed row (BC 11.3, BEAR 10.8, BRAC-p −0.3, BRAC-v 0.9), where D4RL prints BC 6.4, BEAR 40.1, BRAC-p 76.9, BRAC-v 81.6. Which CQL value belongs to which dataset is unconfirmed; both are shown, side by side, in the panel above.
Behaviour cloning is strong wherever the data is good (medium-expert, Adroit expert), and filtering the data helps it: in CORL's runs 10% BC lifts BC's Gym-MuJoCo average from 50.4 to 69.3. Only methods that do dynamic programming (CQL, IQL, ReBRAC) score more than a few points on AntMaze's medium and large mazes, where trajectories must be stitched. The ensemble methods are, in CORL's words, "the strongest baselines for Gym-MuJoCo and Maze2d, but they perform poorly on both AntMaze and Adroit domains" (SAC-N and EDAC score 0 on every AntMaze dataset with their last policy). And with its last policy no method reaches 10 on Adroit's human and cloned door, hammer and relocate datasets.
Sources: Tarasov et al., CORL, arXiv 2210.07105v4 (NeurIPS 2023 Datasets and Benchmarks), Tables 1 to 3; Kostrikov, Nair and Levine, IQL, arXiv 2110.06169, Table 1; Kumar et al., CQL, arXiv 2006.04779, Table 1; Fu et al., D4RL, arXiv 2004.07219v4, Table 2. Text extracted with pdftotext and parsed by src/parse_tables.py, which also checks each table's printed averages against its rows: CORL's averages agree with the mean of its rows to within 0.007 (rounding); IQL's locomotion total for IQL is 692.4 printed against 692.6 summed from its rows, within the rounding of nine values.
The Reading tab (33 minutes, plus 9 in closed details) goes from behaviour cloning and its compounding error through DAgger, inverse RL, GAIL and preferences, then from extrapolation error through the offline RL families to evaluation and real uses. Links open in a new tab, with reading times (estimated for external resources).
Six printed benchmark tables (CORL's reruns, last and best policy and offline-to-online; the IQL, CQL and D4RL papers), one at a time, with versions, and one method on one dataset across all of them.
The short intuitive overview of RL. Its Taxonomy tab sets online, off-policy and offline side by side; its Method atlas tab places behaviour cloning, GAIL, CQL, IQL and Decision Transformer among 47 methods with their lineage; its Milestones and benchmarks tab shows where imitation started famous RL systems (AlphaGo's 30 million expert positions, AlphaStar's human replays). (17 min, plus 2 in closed details)
The trade-off this page's agents are denied; contextual bandits learned from logs in recommendation. (27 min, plus 9 in closed details)
Planning with a known model; the linear-programming view and occupancy measures that GAIL and offline RL reuse. (39 min, plus 11 in closed details)
SARSA and Q-learning, on- and off-policy learning, and importance sampling, whose variance is off-policy evaluation's problem. (34 min, plus 9 in closed details)
DQN, replay and overestimation bias: the online version of this page's extrapolation error. (34 min, plus 16 in closed details)
TD3 and SAC, the online algorithms TD3+BC, CQL and RLPD are built on; TRPO, which GAIL uses for its policy steps. (45 min, plus 9 in closed details)
Learned models and their exploitation, the problem MOPO and MOReL solve with pessimism. (41 min, plus 9 in closed details)
This page: the seventh of the eight.
RLHF with PPO, GRPO and RLVR: the online RL that follows SFT, and why language-model post-training moved to it. (53 min, plus 13 in closed details)
SFT (behaviour cloning on tokens), reward models from preferences, DPO and its family, online against offline. (33 min, plus 4 in closed details)
What happens when a policy optimises a learned reward too hard. (33 min, plus 12 in closed details)
Christiano et al.'s preference recipe applied to a language model. (26 min read)
Preference learning without an RL loop: offline, from fixed pairs. (24 min read)
Preferences from an AI model instead of people (RLAIF).
Article page: DAgger-style self-repair with the recording as the expert, and the rule that keeps it from rewarding hallucinations (section 3). (10 min, plus 3 in closed details)
The standard survey: why offline RL is hard, importance sampling, dynamic programming with constraints, model-based methods, open problems. (about 2h 30m)
The reduction to no-regret learning, the T² and T bounds, and the Super Tux Kart and Mario experiments. (about 1h)
From maximum-causal-entropy IRL to occupancy matching to the adversarial algorithm, in nine pages. (about 1h)
The penalty, both lower-bound theorems, and the variants. (about 1h 30m)
Expectile regression in eight pages, with the clearest discussion of v0 against v2 results. (about 45 min)
TD3+BC, and a table of how much other methods change their base algorithms. (about 40 min)
Return-conditioned sequence modelling, with the %BC comparison that started the debate. (about 1h)
The conditions, and the counterexamples, for Decision Transformer-style methods. (about 1h)
Single-file implementations of BC, TD3+BC, CQL, IQL, AWAC, ReBRAC, SAC-N, EDAC, DT, Cal-QL, with logged benchmark runs; the paper's tables are on the D4RL results tab. (about 30 min for the README and one file)
Clean implementations of BC, DAgger, GAIL, AIRL and preference comparisons. (about 30 min)
On the current schedule, Lecture 2 (behavioural cloning, DAgger) and Lectures 17 and 18 (offline RL), with slides and videos. (about 4h)
How offline evaluation misleads in practice, with worked examples on sepsis data. (about 1h)
Built from the repository's source (src/). Figs. 2 and 3 and the expectile slider run on an exact engine checked value for value against an independent Python implementation (src/recompute.py, src/check_engine.mjs); the D4RL tables are parsed from the papers' text (src/parse_tables.py, src/inputs/). Read 4 October 2026.