Offline RL and IQL: Learning Without Asking for Another Trial
Published:
Ilya Kostrikov, Ashvin Nair, Sergey Levine
Read the paper (PDF)
Replay without the next experiment
Intuition first. A warehouse robot has a month of recorded trajectories. You can train on them repeatedly, but you cannot send the robot out to test a speculative shortcut. A value function might predict that shortcut is excellent simply because no recorded transition contradicts it.
An online off-policy method can gather evidence after changing its policy. Offline learning fixes the dataset \(\mathcal D=\{(s,a,r,s',d)\}\). The distinction is not whether replay is used; it is whether new interaction can correct mistakes.
The IQL update in three lines
Let \(\bar Q\) denote a target critic and \(d\) a terminal indicator. IQL fits a state value, a critic, and a policy using
Choose \(\tau>0.5\) to favour higher recorded action values; \(\beta>0\) controls policy selectivity. Practical implementations cap the exponential weights. The Bellman target queries \(V(s')\), without proposing a fresh action for a critic to score. These are the central updates in Kostrikov, Nair, and Levine.
Worked example: an expectile is not a percentile
Suppose one state has two equally frequent recorded actions with values \(2\) and \(6\). Ordinary squared-error regression fits their mean, \(4\).
For an expectile parameter \(\tau=0.75\), and a fitted value \(v\) between the observations, the loss is proportional to
Setting its derivative to zero gives
This is a weighted squared-distance balance. It is not a claim that 75% of observations lie below five. With \(\beta=1\), the corresponding cloning weights are \(e^{-3}\) and \(e^1\): the higher-value action receives about \(e^4\approx54.6\) times as much weight. That ratio assumes no weight clipping.
A concrete dataset failure
Imagine all successful examples turn left around an obstacle. None turns right. A fitted policy might still output a right turn on an unfamiliar camera image, because a neural network maps inputs beyond its training examples. The absence of unseen-action queries in the training equations is not a hard constraint on the policy’s outputs.
Now imagine the dataset contains only failed episodes, and no transition ever reaches the desired room. Reweighting actions cannot manufacture evidence of reaching that room. Useful improvement depends on coverage, reward information, and the ability to combine supported decisions.
What to check before trusting a result
Split data by episode or collection session, so near-identical neighbouring frames do not leak across train and validation sets. Check action units, terminal flags, reward scales, and whether final observations were preserved. A normalised action interpreted as a raw joint command changes the task completely.
Behaviour cloning is a useful reference: it asks whether value-based reweighting improves on simply imitating the same data. Compare policies under a separate evaluation protocol. Held-out Bellman error alone cannot establish successful closed-loop behaviour.
For a different way to reuse recorded experience, hindsight experience replay changes the goal attached to a transition. It solves a sparse-reward problem rather than the full offline distribution-shift problem.
References
- Kostrikov, I., Nair, A., & Levine, S. Offline Reinforcement Learning with Implicit Q-Learning. ICLR 2022.
