Generative Value Classifier

Alexander Swerdlow,  Perry Dong,  Chelsea Finn
Stanford University

Overview. How GVC scores one action: the likelihood of the action under each return, times a return prior, is normalized over returns into a return distribution whose mean is \(Q(s,a)\). (65 s, silent.) Download (MP4, 70 s)

TL;DR

We recast value learning as a generative classification problem: a return-conditioned flow policy scores each action under a set of returns, and these scores yield an implicit Q-function, so the critic learns from actions as well as returns.

Abstract

Q-learning is premised on learning a function to predict the value of a state-action pair, with the goal of using such a function to guide policy improvement. Most approaches learn this function from scratch using scalar or distributional return targets. This discriminative approach leaves another source of supervision for learning representations unused: the actions themselves. Rather than directly predict the return of a state-action pair, we ask the reverse question: how likely is the action under each possible return? This perspective provides a critic whose generative component is a return-conditioned policy, which can share the actor’s architecture. Training this policy supervises the critic with every action rather than with returns alone, and a squared-error loss anchors the critic’s Q-value to the bootstrapped target. We evaluate our approach on both offline and online RL tasks and show gains over leading discriminative methods, including distributional RL methods.

Method

A distributional critic predicts the return distribution \(p(z\mid s,a)\) over a fixed set of return bins \(z_1,\dots,z_K\). The Generative Value Classifier (GVC) recovers it from the likelihood of the action under each bin, with Bayes’ rule:

\[ p(z_i\mid s,a)=\frac{p_\theta(a\mid s,z_i)\,p_\psi(z_i\mid s)}{\sum_j p_\theta(a\mid s,z_j)\,p_\psi(z_j\mid s)}, \qquad Q(s,a)=\sum_i p(z_i\mid s,a)\,z_i. \]
(a) A conventional critic maps a state and an action to Q(s,a), trained on a target y. (b) GVC combines a return-conditioned action model p(a|s,z) and a return prior p(z|s) to produce Q(s,a).

Action data provides additional supervision. A conventional critic fits \(Q(s,a)\) to a scalar target \(y\). GVC instead learns a return-conditioned action model \(p(a\mid s,z)\) and a return prior \(p(z\mid s)\), i.e., a distributional state-value function, and normalizes their product over returns to obtain \(Q(s,a)\).

The critic has two parts. The action model \(p_\theta(a\mid s,z)\) is a flow-matching policy conditioned on a return bin, and it can share the actor’s architecture. The return prior \(p_\psi(z\mid s)\) predicts the return distribution from the state alone. Flows do not give exact likelihoods, so we use the conditional flow-matching error of \(a\) under each bin as a surrogate for \(-\log p_\theta(a\mid s,z_i)\) and put tuned exponents on the two factors. A shared trunk encodes the state, the noised action, and the flow time, and each bin adds a learned embedding before a shared head, so one forward pass scores all \(K\) bins.

GVC at inference time: candidate actions from the actor, per-bin action likelihoods multiplied by the return prior and normalized, and the action with the highest Q selected.

GVC at inference time. The actor proposes candidate actions (left). For each action, we compute the return-conditioned action likelihood, along with the return prior. Normalizing their product over return bins (center) provides a return distribution whose mean gives \(Q(s,a)\), which we use to rank the action candidates (right).

Training. Both parts of the critic learn from the same TD target. Let \(\widehat p\) be the distribution of \(r+\gamma Z'\) projected onto the return bins, where \(Z'\) is the target critic’s return distribution at the next state and action. The flow-matching loss on the dataset action is weighted across bins by \(\widehat p\), and the return prior is fit to \(\widehat p\) with a cross-entropy loss:

\[ \begin{aligned} \mathcal L_{\mathrm{flow}}&=-\sum_i\widehat p_i\log p_\theta(a\mid s,z_i),\\ \mathcal L_{\mathrm{return}}&=-\sum_i\widehat p_i\log p_\psi(z_i\mid s). \end{aligned} \]

Because the flow error is only a surrogate, with unknown scale and bin-dependent offsets, these two losses do not ensure that \(Q(s,a)\) matches the target mean \(y=\sum_i\widehat p_i z_i\). A squared-error value anchor, \(\mathcal L_{\mathrm{anchor}}=\big(Q(s,a)-y\big)^2\), penalizes this error directly. The full objective is \(\mathcal L=\mathcal L_{\mathrm{actor}}+\lambda_F\mathcal L_{\mathrm{flow}}+\lambda_R\mathcal L_{\mathrm{return}}+\lambda_V\mathcal L_{\mathrm{anchor}}\).

Acting. The actor is a separate flow policy trained by behavior cloning on dataset or replay actions. At each step it proposes \(N\) candidate actions, GVC scores them, and we execute the one with the highest \(Q(s,a)\). The next action \(a'\) in the TD target is chosen the same way.

Online RL on RoboMimic

We follow the training recipe of QC on four RoboMimic manipulation tasks with sparse task-completion rewards and change only the critic. Lift, Can, and Square are eventually solved by GVC, QC, and IDQL, with small sample-efficiency gains for GVC. Tool Hang, a long-horizon task in which the robot inserts a hook into a base and then hangs a wrench from it, is where the critics diverge: GVC reaches about 85% success within 0.5M steps, whereas QC and RLPD only reach about 50% at 1M steps.

Success rate versus environment steps on Lift, Can, Square, and Tool Hang for GVC, QC, RLPD, IDQL, FQL, QAM, and QSM.

Success rate versus environment steps. Shaded regions show one standard deviation across seeds.

Offline RL on OGBench

We evaluate on 35 tasks across seven OGBench domains, with 8 seeds per task. The closest comparison is BFN (from QC), which uses the same flow actor and best-of-\(N\) selection as GVC but a regression critic. On the two largest puzzles, GVC reaches 92% and 48% on the first task of puzzle-4x5 and puzzle-4x6, against 83% and 22% for BFN. It leads BFN by 12 points on the sparse scene tasks, mostly on task5 (97% vs. 45%), and the two are nearly tied on cube-double (65% vs. 66%). Compared with Value Flows, the strongest distributional baseline, GVC is ahead on puzzle-4x4, puzzle-4x5, and puzzle-4x6 by 8 points on average and behind on cube-double and cube-triple by 4.

Gaussian PoliciesFlow Policies
EnvironmentBCIQLReBRACFBRACIFQLFQLC51IQNCODACValue FlowsBFNGVC
scene-sparse501586725368682948698
puzzle3x3-sparse20624398992192219798
puzzle4x4071413251702720273241
puzzle4x50306171101810131718
puzzle4x60023040624510
cube-double261215142924261696665
cube-triple01000406214610

Success rate (%) averaged over the five tasks of each domain. Bold: within 95% of the best result.

Show results for all 35 tasksHide per-task results
Gaussian PoliciesFlow Policies
EnvironmentTaskBCIQLReBRACFBRACIFQLFQLC51IQNCODACValue FlowsBFNGVC
scene-sparsetask119±60±09±8100±196±365±1619±699±2100±1100±1100±199±1
task21±10±066±1986±1083±552±122±298±298±399±1100±199±2
task31±10±00±094±856±860±22±293±672±3889±594±699±2
task42±20±00±077±3472±1269±164±482±1576±3092±1090±498±3
task50±00±00±075±1952±819±51±257±3066±2091±745±1497±3
avg.501586725368682948698
puzzle3x3-sparsetask15±21±198±275±1999±1100±06±337±295±478±1599±1100±0
task21±10±066±1535±3799±2100±03±313±181±15±797±5100±0
task31±10±025±1621±2298±297±40±141±481±110±595±597±4
task41±10±055±1341±3498±298±20±12±21±28±698±398±1
task51±00±068±1843±4097±4100±01±11±20±14±496±296±4
avg.20624398992192219798
puzzle4x4task11±112±226±432±949±934±80±041±237±3236±362±1076±4
task20±07±412±45±34±416±50±012±410±1027±520±719±12
task30±09±315±320±1050±1418±50±045±733±2930±441±863±12
task40±05±210±35±121±1111±30±023±212±1028±521±628±11
task50±04±17±32±22±27±30±016±610±813±214±619±9
avg.071413251702720273241
puzzle4x5task10±014±70±132±3086±853±190±090±551±1067±483±492±4
task20±00±00±00±00±00±00±00±11±20±11±10±0
task30±00±00±00±00±00±00±00±00±10±10±00±0
task40±00±00±00±00±00±00±00±00±00±000±0
task50±00±00±00±00±00±00±00±00±00±00±00±0
avg.0306171101810131718
puzzle4x6task10±02±38±716±200±022±50±030±1410±1122±2522±848±16
task20±00±10±10±10±00±10±00±12±20±11±10±0
task30±00±00±00±00±00±00±00±00±00±00±00±0
task40±00±00±00±00±00±00±00±00±00±00±00±0
task50±00±00±00±00±00±00±00±00±00±000±0
avg.0023040624510
cube-doubletask18±327±545±647±1135±961±99±070±1480±1197±173±488±21
task20±01±17±322±129±536±60±024±963±476±778±471±12
task30±00±04±14±28±522±50±025±666±973±477±774±26
task40±00±01±10±11±15±20±010±113±230±523±619±6
task50±04±34±22±217±619±100±081±882±469±579±675±19
avg.261215142924261696665
cube-tripletask11±14±41±20±02±220±61±029±29±559±1228±1349±30
task20±00±00±00±00±01±20±00±01±00±01±11±1
task30±00±00±00±00±00±00±01±00±07±32±02±3
task40±00±00±00±00±00±00±00±00±00±00±00±0
task50±01±10±00±00±00±00±00±00±02±10±00±0
avg.01000406214610

Success rate (%), mean ± standard deviation over 8 seeds. Bold: within 95% of the best result for each task.

Offline-to-Online RL

On six OGBench tasks, we train offline for 1M updates and then finetune online for 1M environment steps. GVC has the highest average success at the end of both phases: it rises from 67.1% to 98.9%, about 19 points above Value Flows and 26 above FQL, and finishes within 95% of the best method on all six tasks. BFN finishes second at 88.7% but scores 45.4% after offline training, and two of its eight seeds collapse on puzzle-4x4. RLPD, which learns only online, reaches 99–100% on three tasks but stays near zero on the other three.

Average success rate over six OGBench environments during 1M offline updates followed by 1M online steps.
TaskIQNIFQLFQLRLPDIQLValue FlowsBFNGVC
antmaze-large55±5→91±111±3→3±287±7→100±10±0→99±241±5→45±572±4→96±166±19→99±177±9→97±2
humanoidmaze-medium23±3→14±256±12→82±712±7→22±120±0→8±321±5→16±329±6→86±332±8→89±494±2→99±1
cube-double29±4→42±712±3→41±240±11→92±30±0→0±00±0→0±065±7→79±679±7→90±764±21→98±1
cube-triple25±5→14±62±1→7±54±1→83±120±0→0±03±1→0±029±8→70±721±10→90±1746±21→100±0
puzzle-4x422±2→6±123±2→19±128±3→38±520±0→100±05±1→0±014±3→51±1224±6→68±3925±8→100±1
scene0±0→0±00±0→60±1482±11→100±10±0→100±015±4→10±392±23→100±051±16→97±496±9→100±0

Success rate (%) after offline training → after online finetuning, mean ± standard deviation over 8 seeds. Bold: within 95% of the best final result.

Ablations

We ablate the generative loss, which is what distinguishes GVC from a discriminative critic, and the noise sampling used to score actions. All runs are on Tool Hang with 8 seeds per variant.

Tool Hang ablations: flow loss coefficient, flow loss variants, and number of scoring timesteps with and without shared noise.
  • (a) Action loss. Success decreases as we reduce the weight \(\lambda_F\) on the flow loss, from about 85% at \(\lambda_F=1\) to 80% at 0.1, 65% at 0.01, and 45% at 0.001 or with the loss removed.
  • (b) Flow loss. Weighting all return bins uniformly, so that the flow loss still trains the action model but no longer links actions to returns, recovers about 70%. Roughly half of the benefit comes from the generative supervision itself and the rest from conditioning it on the return.
  • (c) Scoring. With noise shared across candidate actions, a single noise timestep (\(T=1\)) reaches about 80%, and \(T\geq2\) adds a few points. Without sharing, \(T=1\) falls to about 60%.

Value anchor. The anchor is required: without it, success stays below 10% on Square, Tool Hang, and puzzle-4x4. Square is insensitive to its weight \(\lambda_V\). In this sweep on Tool Hang, 0.1× the default ends close to 1× (88% vs. 86%), while 10× ends at 77% and 0.01× at 57%.

Value-anchor coefficient sweep on Square, Tool Hang, and puzzle-4x4.
More ablations: Square, and a distilled actorHide additional ablations

Ablations on Square

Square ablations: flow loss coefficient, flow loss variants, and scoring.

Square is easier than Tool Hang and separates the variants far less. Every flow-loss coefficient and every flow-loss variant, including removing the loss, ends near 95%. Scoring follows the same pattern as on Tool Hang: without shared noise, \(T=1\) learns more slowly and ends several points lower.

Best-of-\(N\) versus a distilled actor

Best-of-N selection compared with one-step actors distilled with Q-gradients for a range of coefficients.

GVC can also drive an explicit one-step actor trained by gradient ascent on \(Q\), following the extraction recipe of FQL. On Square, the distilled actor matches best-of-\(N\) by 1M steps but learns more slowly. On Tool Hang, no distillation coefficient makes progress, while best-of-\(N\) reaches 91%. On puzzle-4x4, the distilled actors peak near 30% and then decline, while best-of-\(N\) improves to 40%. All main results therefore use best-of-\(N\).

Compute Cost

GVC spends more compute per scored action than a regression critic. Scoring one candidate takes eight forward passes of the action model (\(T=4\) flow times, each with an antithetic noise pair), and each pass returns all \(K\) bins. On puzzle-4x4 on a single H100, a GVC update takes 15.6 ms, comparable to Value Flows (13.5 ms) and IQN (13.1 ms), the two distributional critics that also evaluate many return bins or quantiles per transition, and 5–9× the 1.8–3.4 ms of the scalar regression critics. Splitting the critic into two models and discretizing the return space also add implementation complexity.

Wall-clock time per gradient update on puzzle-4x4 for each offline method.

Paper

Generative Value Classifier
Alexander Swerdlow, Perry Dong, Chelsea Finn

PDF

Citation

If you find our work useful, please consider citing the paper as follows:

@misc{swerdlow2026gvc, title={Generative Value Classifier}, author={Alexander Swerdlow and Perry Dong and Chelsea Finn}, year={2026}, eprint={2610.22497}, archivePrefix={arXiv}, primaryClass={cs.LG}, url={https://arxiv.org/abs/2610.22497} }