Skip to content

Aviral Kumar — Reinforcement Learning from Static Datasets

optionalcorefundamentaltalkrubric 10/122023 · Job talk (CMU CSD Apr 10 2023; Stanford RL Forum Apr 26 2023); recording from Nuro Technical Talks, Aug 2023. Now Assistant Professor, CMU CSD & MLD · ~55 min

Aviral Kumar

Read first: Reinforcement Learning: An Introduction, Ch. 3–4 — Value Functions, Bellman Equations and Dynamic Programming · Reinforcement Learning: An Introduction, Ch. 5–6 — Monte Carlo, Temporal-Difference Learning and Q-learning · Proximal Policy Optimization (PPO)

Status

What this recording is. CMU lists the April 10, 2023 event as a faculty-candidate talk. The video is the Nuro delivery of the same-titled research talk, with a closely matching abstract (computational chemistry is added), given a few months later. Identical slides or delivery are not established. The segments below are an editorial grouping of the recording; their boundaries need not match the publisher’s current chapter markers.

Talk arc of Aviral Kumar, Reinforcement Learning from Static Datasets Five stages from top to bottom, with chapter start times from the Nuro recording. Framing, 0:00 to 19:31: trial and error is expensive or dangerous in real domains, so learn from static data; terminology and why offline RL is hard. Diagnosis, 19:31: what went wrong with naive methods and prior approaches. Principled fix, 27:51: minimax optimization and conservative methods such as conservative Q-learning. Evidence, 36:30: benchmarks, why offline RL, and applications in hardware accelerator design, robotics and chemistry. Vision, 51:28: key takeaways and the link to large models. Aviral Kumar: a problem with stakes, then diagnosis before the fix Framing 0:00 – 19:31 Trial and error is expensive or dangerous: learn from static data Terminology; why offline RL is hard (distribution shift) 1 · Diagnose 19:31 What went wrong; prior approaches Why naive methods fail on static datasets 2 · Principled fix 27:51 Minimax optimization: conservative methods Conservative Q-Learning (CQL) 3 · Evidence 36:30 Benchmarks, why offline RL, applications D4RL; accelerator design, robotics, chemistry Vision 51:28 Key takeaways The link to large models
Original sketch of the talk's narrative, built from this page's segment list and key points. Times are editorial segment starts in the Nuro recording.

Conservative Q-Learning (CQL) · D4RL · later work (a present-day connection, not part of the 2023 talk): Scaling LLM Test-Time Compute Optimally

Technical preparation (from the CQL paper, not the recording)

Section titled “Technical preparation (from the CQL paper, not the recording)”

Read this before the questions below. It summarises the CQL paper; it does not claim the talk shows each step.

Prerequisites. Q-learning’s bootstrapped target, r + γ · max over a′ of Q(s′, a′), from Value functions & Bellman and Monte Carlo, TD & Q-learning. PPO alone does not cover this off-policy, value-based setting.

Why offline Q-learning overestimates. The dataset D was collected by a behaviour policy π_β. The max in the target queries Q at actions that may never appear in D for that state, that is, outside the dataset’s support. There Q is pure extrapolation by the function approximator, and the max picks exactly the actions whose errors are most positive. Online, the agent would try those actions and correct them; offline, nothing does.

The CQL regulariser. CQL(H) adds α · E_s[log Σ_a exp Q(s, a) − E_(a∼π̂_β) Q(s, a)] to the Bellman error. The log-sum-exp term is a soft maximum, so it pushes Q down hardest where Q is largest; the second term pushes Q back up on actions the data contains. α sets how strongly conservatism trades against fitting the Bellman target: too small and overestimation returns, too large and the policy collapses toward the behaviour policy.

Worked example (two actions). One state, Q = (0, 2) for (a1, a2), and the data contains only a1. The log-sum-exp is log(1 + e²) = log 8.389 ≈ 2.127, so the regulariser is 2.127 − 0 = 2.127. Its gradient is softmax(Q) − 1[a = a1] = (0.119 − 1, 0.881) = (−0.881, +0.881). Gradient descent raises the in-data action and lowers the unseen one.

What the theorems assume. The lower-bound results hold with high probability and only when α is large enough to outweigh a sampling-error term that shrinks as the dataset grows. Theorem 3.1, for example, restricts μ to the support of π̂_β. The paper proves the bounds for tabular, linear and a subset of non-linear function approximation, and leaves deep networks to future work. Treat “CQL learns a lower bound” as a result under these conditions, not a guarantee for any network and any α.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Derive / compute

    CQL(H) adds α·E_s[log Σ_a exp Q(s,a) − E_(a∼π̂_β) Q(s,a)] to the Bellman error. Take one state with three actions and Q = (1.0, 0.0, 3.0) for (a1, a2, a3). The dataset only contains a1; a3 was never tried. Compute the regulariser and its gradient with respect to each Q-value, and explain what gradient steps on it do to the greedy policy.

    What a strong answer covers
    • exp values 2.718, 1.000, 20.086; sum 23.804; log-sum-exp ≈ 3.170. Regulariser = 3.170 − 1.0 ≈ 2.170.
    • Gradient = softmax(Q) − 1[a = a1] = (0.114 − 1, 0.042, 0.844) = (−0.886, +0.042, +0.844). Descent raises Q(a1) and pushes Q(a3) down hardest.
    • The penalty concentrates where Q is largest, which is where an overestimated out-of-distribution action sits. Log-sum-exp is the maximum over μ of E_μ[Q] plus entropy, so this is the min-max form with μ = softmax(Q).
    • Before training the greedy policy picks a3, an untested action. With large enough α, the push on a3 and the pull on a1 reverse the order, keeping the policy inside the data's support.
  2. Mechanism

    Why does standard off-policy Q-learning, which works online, overestimate values when trained on a fixed dataset? Trace the error from the Bellman target to the learned policy, and explain why online interaction would have corrected it.

    What a strong answer covers
    • The target uses Q(s′, a′) for actions picked by the current policy, including actions the behaviour policy never took. There Q is pure function-approximation extrapolation.
    • Maximisation (or policy improvement) selects exactly the actions with the most positive error, so errors are biased upward, then bootstrapped back to earlier states.
    • Online, the agent would try those actions, see low returns and fix the estimates. Offline, nothing contradicts them, so the policy drifts toward them.
    • CQL's fix: learn a Q-function whose expected value under the policy lower-bounds the true value (Theorem 3.2) and that is gap-expanding between in-data and out-of-distribution actions (Theorem 3.4).
  3. What if…

    Compare three variants: (a) CQL with only the term that pushes Q down under μ (Equation 1); (b) the version that also pushes Q up on dataset actions (Equation 2); (c) that version with α far too large or far too small. Predict how conservative each value estimate is and how the resulting policy behaves.

    What a strong answer covers
    • (a) A pointwise lower bound on Q for every state-action pair (Theorem 3.1). Overly pessimistic, even on actions the data covers well.
    • (b) Only the expected value under π is lower-bounded (Theorem 3.2), a tighter bound; Q on dataset actions can be overestimated pointwise. This is the variant used in practice.
    • α too large: off-data actions are crushed and the policy collapses toward behaviour cloning, since Theorem 3.5 shows CQL penalises divergence from π̂_β by α·D_CQL. α too small: overestimation returns.
    • The paper avoids hand-tuning α in continuous control with a Lagrangian dual that adjusts α to keep the gap at a target; in discrete control α is fixed.
  4. Design

    Present-day connection (later work, not shown to follow causally from the talk): a 2024 paper on scaling LLM test-time compute which found that the best strategy depends on prompt difficulty and that compute-optimal allocation is more than 4× more compute-efficient than best-of-N. Your search agent gets queries from single-fact lookups to multi-hop research questions. Design a policy that allocates retrieval rounds, samples and verification per query, and say how you would validate it.

    What a strong answer covers
    • Estimate difficulty cheaply before spending: agreement among a few samples, a verifier score, or retrieval-score margins, binned into levels, as the paper bins questions by estimated difficulty.
    • Allocation from the paper's findings: easy questions do best with sequential revision; harder ones need a mix of sequential and parallel compute; beam search against a process verifier beats best-of-N on hard questions at low budgets.
    • Compare at matched compute (tokens plus retrieval calls) against best-of-N and a larger model. The paper found test-time compute beats a 14× larger model only where the small model already has non-trivial success; on the hardest questions more pretraining was better.
    • Validate with accuracy-versus-compute curves per difficulty bin, counting the cost of the difficulty estimator itself.
  5. Critique

    Offline RL promises learning without interaction, yet benchmark results are reported by running policies in a simulator, and hyperparameters such as α have to be chosen somehow. Identify the evaluation gap this creates and design an experiment that measures how much of a reported offline-RL gain survives a strictly offline protocol.

    What a strong answer covers
    • If α or checkpoints are chosen by online rollouts, the method uses interaction it claims not to need. In the motivating domains (drug design, hardware design, robotics) those rollouts are exactly what is expensive.
    • Offline selection needs off-policy evaluation (importance sampling, fitted Q evaluation), which is least reliable where the policy leaves the data's support, the very place CQL acts.
    • Experiment: allow zero rollouts for selection; choose α and checkpoints by OPE or held-out Bellman error only; report regret against the oracle-selected policy across datasets with different coverage.
    • Also report performance across a sweep of α, so readers see the gap between the best and a typical setting.

Done with this page?

Status