Robot Wiki

Offline Reinforcement Learning for Robotics

CQL, IQL, TD3+BC and Q-Transformer under the support constraint, with a decision rule for when behavior cloning is the stronger baseline.

Last reviewed
Reading time
8 min
Citations
8

Offline reinforcement learning asks a useful but dangerous question: can a robot improve beyond the behavior in a fixed log without collecting another transition? The attraction is obvious when every rollout consumes hardware time. The danger is equally basic. A learned value function can assign high value to actions the dataset never tested, and there is no live environment to correct it.

The right starting point is therefore not an algorithm. It is an evidence audit: what behavior is covered, which outcomes are labelled, and whether improvement requires choosing actions outside that support.

Try the check below. Choose the dataset in which offline RL has the clearest reason to outperform a strong behavior-cloning baseline.

Self-check

Which fixed robot dataset gives offline RL the most credible advantage over behavior cloning?
Read the reasoning
  • Mixed-quality trajectories with successes, failures and rewardsThe reward can distinguish better behavior from worse behavior, while failed and partial trajectories give a value learner evidence that cloning would imitate indiscriminately.
  • Short, clean expert demonstrations with no reward signalBehavior cloning directly fits this evidence. A critic adds estimation error without failures or long-horizon tradeoffs from which to learn.
  • Large logs from unrelated robots with incompatible actionsVolume does not repair an undefined action mapping or missing task coverage. The support problem exists before the learning objective is chosen.

Offline RL earns its complexity when reward-bearing data contains meaningful quality variation or long-horizon fragments, not simply because the dataset is large.

The fixed-data bargain

In online RL, a policy can try an uncertain action and observe the result. Offline RL cannot. It learns from a static collection of transitions (observation, action, reward, next observation, termination) generated by one or more behavior policies. Its optimization may propose a new policy, but its evidence never changes.

That bargain removes the collection loop and introduces a distribution-shift problem. Standard value learning bootstraps: an estimated value becomes part of the target for another estimate. If the policy selects an unsupported action whose value was accidentally overestimated, the error can reinforce itself. The foundational offline-RL tutorial identifies this mismatch between the learned policy and the dataset distribution as the central difficulty Levine 2020.

For robots, support is more specific than “similar images.” It includes the commanded frame, controller mode, action magnitude, contact regime, task stage and recovery behavior. A dataset rich in free-space motion may offer almost no support for the forces encountered after contact. An action that looks numerically close can still cross a controller or safety boundary.

Audit the dataset before choosing a method

An offline-RL project should begin with four maps.

Behavior coverage

Identify who or what generated each episode: expert teleoperator, novice, scripted controller, older policy or exploration process. Plot action distributions by task stage rather than only over the full corpus. Measure coverage near contacts, failures and resets. If all successful trajectories occupy one narrow mode, extrapolating away from it is a claim, not an automatic benefit.

Outcome coverage

Count successes, partial progress, recoverable failures and terminal failures. Check whether the reward distinguishes them at the time scale used for learning. A single final binary label can be enough for some long-horizon objectives, but it makes credit assignment harder and can hide reward ambiguity.

Transition integrity

Verify timestamp alignment, episode boundaries, termination semantics and action units. A missing timeout flag can turn an administrative truncation into a learned terminal state. A logged command is not necessarily the action the robot executed; saturation, command gating and low-level control may change it.

Deployment overlap

State what the deployed robot, task and controller share with the logs. Dataset support should be evaluated in the representation the policy actually consumes and in physical operating variables. A camera, gripper or control-rate change can matter more than the nominal task label.

The datasets guide covers corpus selection, and the robot-learning stack defines the provenance needed to make this audit repeatable.

Four ways to remain close to evidence

Offline-RL algorithms differ mainly in how they stop policy improvement from exploiting unsupported value estimates.

Conservative value estimation

Conservative Q-Learning penalizes high values on actions sampled outside the dataset while preserving values for observed actions. Its objective is designed to learn a conservative estimate of policy value rather than the optimistic estimate produced by ordinary off-policy learning Kumar 2020. The tradeoff is deliberate pessimism: excessive conservatism can prevent a policy from combining useful behavior already present in the data.

Avoiding unseen-action queries

Implicit Q-Learning fits a state value through expectile regression over dataset actions, then extracts a policy by weighting observed actions according to their estimated advantage. It never needs to evaluate the critic on a new action during value fitting Kostrikov 2022. That makes the support constraint structurally clear, though performance still depends on reward quality and value estimation.

Regularizing the policy toward behavior

TD3+BC combines an off-policy actor-critic objective with a behavior-cloning term and simple state normalization. Its result is important precisely because the modification is small: a well-tuned regularized baseline can match more elaborate offline algorithms Fujimoto 2021. The regularization strength is a practical dial between imitation and estimated improvement.

Discretizing and scaling the value function

Q-Transformer predicts Q-values autoregressively across discretized action dimensions. This lets a transformer train on large, diverse robot logs while choosing actions one dimension at a time Chebotar 2023. Discretization makes the action search tractable, but the semantic contract of each action dimension still has to be stable across the dataset.

These are not interchangeable labels on a benchmark table. They encode different assumptions about how much extrapolation is acceptable and where to impose the constraint.

When behavior cloning is the better tool

Behavior cloning is the correct default for clean expert demonstrations. It optimizes the action labels the dataset actually contains, has no bootstrapped critic and is easy to validate with held-out prediction and real rollouts. The burden is on offline RL to demonstrate an advantage over that baseline.

The robomimic study found recurrent behavior cloning consistently strong on human demonstration datasets, while the tested batch-RL methods struggled there Mandlekar 2021. A separate analysis of offline RL versus cloning found the conditions more favorable to offline RL: sparse rewards, suboptimal or noisy data, and long horizons where useful parts of different trajectories can be composed Kumar 2022.

That evidence produces a practical decision rule:

  • use behavior cloning first for short-horizon, high-quality demonstrations;
  • test offline RL when the corpus includes reward-labelled failures or broad quality variation;
  • give offline RL a stronger prior on long-horizon tasks where partial trajectories contain complementary progress;
  • do not expect either method to solve missing task or action support.

The behavior-cloning guide explains the baseline in depth. Match its architecture, observations, action representation and data split before attributing any difference to the RL objective.

An evaluation protocol that does not flatter the critic

Offline policy selection is difficult because the learned objective is not trustworthy outside the dataset. Do not select checkpoints by the same Q-values they are maximizing.

1. Lock the data split by deployment factor

Hold out the environments, objects, operators or time periods across which the policy is supposed to generalize. Random transition splits leak adjacent frames and make a dataset look much larger than its independent evidence.

2. Establish three baselines

Train behavior cloning, a sequence-aware or recurrent cloning model when history matters, and the simplest regularized offline-RL method appropriate to the action space. Keep encoders and capacity comparable.

3. Report support-aware diagnostics

Alongside return or task success, report action distance from the dataset, critic disagreement, saturation rate and performance by behavior-source cohort. These diagnostics do not prove safety, but they reveal when an apparent improvement depends on unsupported commands.

4. Use simulation only where it is predictive

Simulation can reject obviously unstable policies and test perturbations at scale. It should not rank close checkpoints on contact-rich tasks unless that ranking has been shown to correlate with hardware. Preserve the simulator version and scenario seeds with the result.

5. Run blinded physical trials

Choose the final protocol before seeing policy identities. Randomize conditions, include failure recovery, report uncertainty and count interventions. Evaluate not only nominal success but collision, force, deadline miss and reset burden.

6. Keep a fixed canary set

Maintain a small, repeatable physical suite for every candidate and a broader suite for promotion. Store episode IDs so every aggregate can be inspected and recomputed.

An offline result is credible when the selection rule can be explained without referring to the candidate critic's own confidence.

From a fixed dataset to controlled online improvement

Offline training need not be the final stage. It can initialize a policy and replay buffer before carefully bounded online interaction. RLPD mixes offline data into off-policy online learning without requiring a separate conservative pretraining objective, improving sample efficiency from the start Ball 2023.

The transition changes the risk model. Before online fine-tuning:

  • put action bounds and command validation outside the learned policy;
  • define human intervention and autonomous reset behavior;
  • cap the amount of new experience per review gate;
  • retain offline data in replay so early online failures do not dominate;
  • compare every promotion against the frozen offline checkpoint;
  • log whether improvements come from new task success or from narrowing the test conditions.

The RL fine-tuning guide covers this online phase. Offline RL supplies a starting policy and value estimate; it does not remove the need for guarded exploration.

A compact go/no-go checklist

Proceed with an offline-RL experiment when all of the following are true:

  1. actions, rewards, terminations and timing are trustworthy;
  2. the dataset contains behavior or outcomes that cloning should not imitate uniformly;
  3. the deployment task lies substantially inside the data's physical and action support;
  4. a strong cloning baseline is already reproducible;
  5. checkpoint selection does not depend only on learned Q-values;
  6. physical evaluation includes interventions, safety events and uncertainty;
  7. any later online phase has external command limits and rollback.

If those conditions do not hold, collect or repair evidence before adding a critic. Offline RL is a way to extract preference from fixed experience. It is not a way to manufacture experience the robot never had.

See also

  • RL for Robotics

    Sample efficiency decides which reinforcement learning algorithms a robot can actually be trained with, from PPO in simulation to offline learning on a fixed dataset.

  • Behavior Cloning Foundations

    Covariate shift and compounding error: why naive imitation breaks in closed loop, with DAgger as the standard fix.

  • Major Datasets

    Open X-Embodiment, DROID, BridgeData V2, AgiBot World, RoboMIND: five datasets compared.

  • RL Fine-Tuning of Policies

    DPPO, ConRFT, Recap, pi_RL, residual RL, and HIL-SERL: closing the reliability gap with on-policy experience.

References

  1. Sergey Levine, Aviral Kumar, George Tucker, Justin Fu, 2020.

    https://arxiv.org/abs/2005.01643

  2. Aviral Kumar, Aurick Zhou, George Tucker, Sergey Levine, NeurIPS 2020.

    https://arxiv.org/abs/2006.04779

  3. Ilya Kostrikov, Ashvin Nair, Sergey Levine, ICLR 2022.

    https://arxiv.org/abs/2110.06169

  4. Scott Fujimoto, Shixiang Shane Gu, NeurIPS 2021.

    https://arxiv.org/abs/2106.06860

  5. Yevgen Chebotar, Quan Vuong, Alex Irpan, Karol Hausman, Fei Xia, Yao Lu, Aviral Kumar, Tianhe Yu, and 17 more, CoRL 2023.

    https://arxiv.org/abs/2309.10150

  6. Aviral Kumar, Joey Hong, Anikait Singh, Sergey Levine, ICLR 2022.

    https://arxiv.org/abs/2204.05618

  7. Ajay Mandlekar, Danfei Xu, Josiah Wong, Soroush Nasiriany, CoRL 2021.

    https://arxiv.org/abs/2108.03298

  8. Philip J. Ball, Laura Smith, Ilya Kostrikov, Sergey Levine, ICML 2023.

    https://arxiv.org/abs/2302.02948

Spot a factual error or missing qualification? Report a content correction.