Unit 10 of 11 · about 3 hours · explain, measure

Unsupported actions, impossible counterfactuals and offline model selection

The most expensive offline mistake is a confident claim about an action nobody ever took. This unit makes unsupported mean unsupported, and selection honest.

You'll be able to

  • Prove a counterfactual impossible from support alone, before any estimator runs.
  • Select policies with rank correlation and regret on held-out logged data, never on hidden online returns.
  • State what an offline study can and cannot establish about deployment.

Covers

Unsupported actions and impossible counterfactualsOffline model selection without online feedback
1

Read

In this order, only the parts listed

0 of 3 done

  1. Lecture 17: the counterfactual questionBerkeley CS 185/285 Deep Reinforcement Learning (Spring 2026) - Imitation and Offline RL

    PDF pp. 10-11: training data versus what the policy wants to do, and why unseen actions have no honest offline answer

  2. DOPE: selection protocol with reserved ground truthBenchmarks for Deep Off-Policy Evaluation

    Sections 3.1-3.2 of arXiv:2103.16596v1: task properties that stress coverage, the policy pools with values from at least 1000 episodes each, and rank correlation plus regret as the selection metrics

  3. Evaluation and benchmarks without online accessOffline Reinforcement Learning: Tutorial, Review and Perspectives

    Section 6.1 of arXiv:2005.01643v3: how offline work should be evaluated and benchmarked, read as the constraints your selection procedure must satisfy

2

Focus on

  • Support is a yes-or-no question per state and action: if the logging policy never takes an action there, its importance weight is undefined, not large. No estimator, robust or fitted, manufactures the missing outcome.
  • Thin support is the quantitative sibling: weights exist but concentrate on a few trajectories, so estimates inherit their noise. Report the concentration; the previous unit's diagnostics are the evidence.
  • Offline model selection ranks candidates on held-out logged data with rank correlation and regret. Online returns, including benchmark ground-truth values, audit the procedure after the fact and must never guide a choice.
  • An offline study establishes ordering among supported candidates and bounds under stated assumptions. Deployment safety for unsupported regions is out of scope here; the next unit builds the guards.
Common mistakes · 3
  • Smoothing the behavior-policy estimate to fix zero support. Adding mass makes the weights finite, but no logged sample ever took that action, so its outcome still never enters the estimate; the number is silently biased, not identified.
  • Tuning on the benchmark's ground-truth returns while calling the study offline. Reserved truth that guides selection is just online tuning with extra steps; keep it sealed until the audit.
  • Presenting the selected policy as deployment-safe. Selection picks the best-supported candidate; unsupported regions remain unidentified and need the fallback machinery of the next unit.
3

Try it yourself

Closed-book, before checking anything

Closed-book, construct a one-state two-action log where the second action never appears, show the target policy that always takes it has an undefined weight, and write the candidate-by-estimator selection table with rank correlation left for the mini-project to fill.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.What distinguishes an impossible counterfactual from a hard one?Answer

    Zero support makes the weight undefined, so no weighting estimator exists; thin support gives huge but finite weights, so estimates exist with variance the diagnostics must show.

  2. 2.Why rank correlation instead of absolute error for selecting among three candidates?Answer

    Selection needs the right order and the right winner. An estimator with larger point errors that orders all three correctly has zero selection regret; error alone cannot see that.

  3. 3.The benchmark ships ground-truth values from 1000-plus episodes. When may you open them?Answer

    After selection is frozen, to audit the estimators and the procedure. Opening them earlier turns the study into online selection wearing an offline label.

  4. 4.Your estimator ranks every candidate correctly but every point estimate is 30 percent low. Deploy?Answer

    Selection succeeded but the level is unknown, so any threshold-based safety claim still fails. Ranking does not certify absolute performance.

You're done when

You can exhibit an undefined weight on demand, run a sealed selection procedure, and state in writing what your study does not establish.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 11 more in the section
  • Berkeley CS 185/285 Deep Reinforcement Learning (Spring 2026) - Imitation and Offline RLUC Berkeley · required

    Slides are public at https://rail.eecs.berkeley.edu/deeprlcourse/static/slides/lec-N.pdf; current videos are not, and the public Fall 2023 playlist numbers lectures differently. Study Lectures 2 and 3 (behavioral cloning) and Lectures 17 and 18 (offline RL). Homework 1 (MSE and flow-matching action-chunk policies) runs on a laptop CPU; Homework 5 (SAC+BC, IQL and FQL on OGBench) needs a GPU, so debug on the smallest task and treat full 1M-step sweeps as optional.

  • Offline Reinforcement Learning: Tutorial, Review and PerspectivesLevine et al. · required

    Study the problem definition, distribution-shift failure, policy constraints, uncertainty and model-based/model-free taxonomy. Use it to state which offline assumptions each implementation relies on.

  • Benchmarks for Deep Off-Policy EvaluationFu et al. (ICLR 2021) · support

    Read the evaluation protocol and the metrics for estimator quality and offline model selection (rank correlation, regret of the selected policy). Use them to judge your estimators instead of one point error.

Also in this section

  • Stanford CS224R Spring 2026 - Imitation and Offline RLStanford University · primary

    Study Lecture 02 (imitation: behavior cloning, covariate shift, DAgger) and Lecture 07 (offline RL). Homework 1 (behavior cloning, flow matching and DAgger on a small Flappy Bird environment) runs on CPU; Homework 3 (AWAC, IQL and a stitching study) runs on cloud GPUs, so read it for the losses. Follow the Stanford honor code for course materials.

  • Implicit Q-LearningKostrikov et al. · required

    Derive the expectile value loss, Q target and advantage-weighted policy update. Implement fixed-batch loss tests and compare IQL with behavior cloning across dataset quality and coverage.

  • Conservative Q-Learning for Offline Reinforcement LearningKumar et al. (NeurIPS 2020) · support

    Read the conservative regularizer and the lower-bound argument. Implement the regularizer on a fixed batch and show how it lowers Q-values on actions the dataset does not contain.

  • DAggerRoss, Gordon and Bagnell · support

    Read the no-regret reduction and interactive data-aggregation loop. Demonstrate compounding error in a controlled imitation task, then show exactly what additional expert queries change.

  • Generative Adversarial Imitation LearningHo and Ermon (NeurIPS 2016) · support

    Read the occupancy-measure view of imitation and the discriminator-as-reward construction. State what GAIL needs that behavior cloning does not (environment interaction) and what it recovers instead of a reward.

  • Cal-QL: Calibrated Offline RL Pre-Training for Efficient Online Fine-TuningNakamoto et al. (NeurIPS 2023) · support

    Read why conservative values cause an initial dip when online fine-tuning starts and how calibration bounds the values. Measure the first online episodes after offline training with and without the fix.

  • Doubly Robust Off-policy Value Evaluation for Reinforcement LearningJiang and Li (ICML 2016) · support

    Read the per-decision importance-sampling estimator, the doubly robust form and its variance analysis. Implement ordinary, weighted and doubly robust estimates on logged trajectories from a small MDP whose true value you can compute.

  • Batch Policy Learning under Constraints (Fitted Q Evaluation)Le, Voloshin and Yue (ICML 2019) · support

    Read the Fitted Q Evaluation algorithm and its role inside the constrained learner. Implement FQE on your logged data and compare it with the importance-sampling estimates against the true value.

  • Minari Offline DatasetsFarama Foundation · support

    Use Minari as the dataset source for offline experiments: it serves Gymnasium-native datasets that download without login (start with a small MuJoCo set such as mujoco/invertedpendulum/expert-v0). Record the dataset id and version with every result.

  • Hands-on Modern RL - Offline RL and Imitation ConceptsWalking Labs · support

    Use the offline data and distribution-shift page and the imitation chapter as pre-reading for BCQ, CQL, IQL, behavior cloning, DAgger and GAIL. They have no runnable offline or imitation scripts and no off-policy evaluation. Pin commit 9231bab of walkinglabs/hands-on-modern-rl; its code/chapterNN folders do not follow the site chapter numbers.

  • Reinforcement Learning Control Laboratory - Offline StretchRoadmap-Final · support

    Add the project offline-data stretch only after online control passes. Calibrate importance or fitted-value estimates against simulator truth and expose one support-mismatch failure before hiding online access.