Introduction
In offline RL the policy is learned from a fixed dataset and is judged by acting. In manipulation the datasets are often narrow, covering only a small part of the actions that could be taken. A critic trained on such data is accurate only near the actions it has seen, and any policy improvement step that asks it about other actions is asking it to extrapolate. The field's answers fall into a few families. Implicit and advantage-weighted methods extract the policy by weighting the dataset's own actions [1, 2, 3]; minimalist actor-critics add a behaviour-cloning term to a deterministic policy gradient [4, 5, 6]; and expressive generative policies, diffusion or flow, keep the actor on the data manifold while a critic steers it [7, 8, 9, 10, 11]. Whether the bottleneck is the value function or the policy extraction is itself debated [12].
Flow Q-learning (FQL) [8] is the base we build on. It trains a flow-matching behaviour policy, distils its multi-step sampler into a one-step actor, and lets that one-step actor also ascend . The distillation keeps the actor near the data; the critic term improves it. What FQL does not ask is which of the actions the actor can produce the critic should be trusted about. A flow policy faithfully reproduces every mode in the data, including modes whose returns are high only by chance. Picking the action with the highest expected value then tends to favour the actions whose value estimates are least reliable.
Our question is therefore narrow: given an FQL-style actor, can a distributional critic and a selection rule that penalises dispersion turn the actor's samples into a better deployed policy, without the critic ever being asked about actions far from the actor's own samples?
Method
Our method, which we call DFQ-VA (distributional flow Q-learning with variance-averse selection), has four parts: a categorical critic ensemble, a selection rule over actor candidates used both in the Bellman target and at deployment, an FQL actor trained against the critic's mean, and an exponential moving average of that actor for deployment.
A categorical critic ensemble
The critic is a categorical return distribution on fixed atoms , with members implemented as one batched network (four hidden layers of 512 units, GELU and LayerNorm). The support is set from the data: we compute the discounted return-to-go of every transition, splitting trajectories at terminals and wherever a stored next state does not match the following state, and widen the observed range by 10% of its span on each side (the span is floored at 1.0).
The Bellman target follows the categorical projection: each atom is shifted to , clamped to the support, and its mass is split between the two neighbouring atoms. Which next-state distribution is projected is a per-dataset choice. Either the ensemble's mixture is used, or, in the pessimistic variant, the single member whose expected value is lowest, the categorical counterpart of clipped double-:
probs_all = torch.softmax(target_logits, dim=-1) # (n, B, K)
if self.q_agg == "min":
mq = (probs_all * self.atoms).sum(-1) # (n, B)
kmin = mq.argmin(0) # (B,)
probs = probs_all[kmin, torch.arange(probs_all.shape[1], device=probs_all.device)]
else:
probs = probs_all.mean(0) # (B, K)
Tz = r.unsqueeze(-1) + gamma.unsqueeze(-1) * (1.0 - done).unsqueeze(-1) * self.atoms.unsqueeze(0)
Tz = Tz.clamp(self.v_min, self.v_max)
b = (Tz - self.v_min) / self.dz
l = b.floor().long()
u = l + 1
wu = b - l.float()
wl = 1.0 - wu
l = l.clamp(0, self.n_atoms - 1)
u = u.clamp(0, self.n_atoms - 1)
target = torch.zeros_like(probs)
offset = torch.arange(probs.shape[0], device=probs.device).unsqueeze(-1) * self.n_atoms
target.view(-1).index_add_(0, (l + offset).view(-1), (probs * wl).view(-1))
target.view(-1).index_add_(0, (u + offset).view(-1), (probs * wu).view(-1))
return targetThe critic is trained by cross-entropy between this target and each member's predicted distribution, averaged over members and batch:
use_r = rewards
use_g = torch.full_like(rewards, self.discount)
use_d = dones
use_next = next_states
next_a = self._select(use_next, self.m_target)
target_logits = self.target_critic(use_next, next_a)
target_probs = self._project(use_r, use_g, use_d, target_logits)
logits = self.critic(states, actions)
logp = torch.log_softmax(logits, dim=-1)
critic_loss = -(target_probs.unsqueeze(0) * logp).sum(-1).mean()Variance-averse selection among the actor's own samples
The idea at the centre of the method is a scoring rule for actions that prefers reliable returns over lucky ones. Following the variance-averse expectation operator of a recent paper we read during development (see Section 4), for a categorical distribution with probabilities and cumulative distribution we score
With every weight is and the score is the ordinary mean. With the factor shrinks the weight of the upper atoms, so of two distributions with the same mean the more dispersed one scores lower. One consequence of the form is that the top atom always has and is ignored when ; since the support extends 10% beyond the largest observed return, that atom lies outside the data's range in any case.
We apply the operator not to each member separately but to the ensemble's mixture . When the members disagree, the mixture is wider than the members are on average, so the same operator that penalises spread in the return also penalises disagreement between members: one dial, , makes the score pessimistic about both kinds of uncertainty.
Selection then picks among candidates sampled from the one-step actor itself, with , the candidate with the highest score:
Every candidate is one the actor would produce anyway, so the critic is queried only at its own policy's samples. In the Bellman target the candidates come from the trained one-step actor and are scored by the target critic:
@torch.no_grad()
def _select(self, states, m):
B, A = states.shape[0], self.action_dim
s_rep = states.unsqueeze(1).expand(-1, m, -1).reshape(-1, states.shape[-1])
z = torch.randn(s_rep.shape[0], A, device=states.device)
cand = self.one_step(s_rep, z).clamp(-1.0, 1.0)
logits = self.target_critic(s_rep, cand)
probs = torch.softmax(logits, dim=-1).mean(0)
cdf = torch.cumsum(probs, dim=-1)
w = probs * (1.0 - cdf).pow(self.delta)
w = w / (w.sum(-1, keepdim=True) + 1e-8)
val = (w * self.atoms).sum(-1)
best = val.view(B, m).argmax(dim=1)
cand = cand.view(B, m, A)
idx = best.view(B, 1, 1).expand(-1, 1, A)
return cand.gather(1, idx).squeeze(1)At deployment the same rule is used with the moving-average actor and the online critic, with one
addition: before the argmax, each candidate takes q_steps steps of normalised gradient ascent on
its own score, with
. The step is fixed in length and taken twice, so a
refined candidate moves at most 0.02 from where the actor put it.
def _va_value(self, logits):
# logits (n, B, K): MIX ensemble into a predictive distribution first, then take the
# variance-averse expectation. Mixing widens the distribution when members disagree,
# so epistemic uncertainty automatically increases pessimism (aleatoric + epistemic).
probs = torch.softmax(logits, dim=-1).mean(0) # (B, K) mixture
cdf = torch.cumsum(probs, dim=-1)
w = probs * (1.0 - cdf).pow(self.delta)
w = w / (w.sum(-1, keepdim=True) + 1e-8)
return (w * self.atoms).sum(-1) # (B,)
def _act(self, state: torch.Tensor) -> torch.Tensor:
B, S = state.shape
M, A = self.num_samples, self.actor.action_dim
s_rep = state.unsqueeze(1).expand(-1, M, -1).reshape(-1, S)
z = torch.randn(s_rep.shape[0], A, dtype=state.dtype, device=state.device)
cand = self.actor(s_rep, z).clamp(-1.0, 1.0)
# reliability-aware gradient refinement: a few normalised va-ascent steps
for _ in range(self.q_steps):
cand = cand.detach().requires_grad_(True)
va = self._va_value(self.critic(s_rep, cand))
g_opt = torch.autograd.grad([va.sum()], [cand])[0]
assert g_opt is not None
g = g_opt / (torch.linalg.norm(g_opt, dim=-1, keepdim=True) + 1e-8)
cand = (cand + self.q_step_size * g).clamp(-1.0, 1.0)
cand = cand.detach()
val = self._va_value(self.critic(s_rep, cand))
best = val.view(B, M).argmax(dim=1)
cand = cand.view(B, M, A)
idx = best.view(B, 1, 1).expand(-1, 1, A)
return self.max_action * cand.gather(1, idx).squeeze(1)Where refinement is enabled we use candidates and two steps; where it is not, and the deployed action is a single sample of the moving-average actor.
The actor: FQL against the critic's mean
The actor is FQL's [8]. A flow-matching velocity field is trained on dataset actions by the conditional flow-matching loss, its 10-step Euler sampler defines a behaviour policy, and a one-step actor is distilled onto that sampler from the same noise while also ascending the critic:
where is the critic's mean (expected value per member, averaged over members), not the variance-averse score: aversion enters through which actions are chosen, not through the actor's gradient. The distillation weight is looked up per dataset, between 300 and 30000, with 10000 as the default. On some datasets the actor uses instead a normalised objective: the term is divided by the batch mean of , in the manner of TD3+BC [4], the distillation weight becomes 100, and a behaviour-cloning penalty of weight 0.1 on the one-step actor's squared distance to the dataset action is added, as the actor-side penalty of ReBRAC [5] does.
x_0 = torch.randn(B, A, device=states.device)
t = torch.rand(B, 1, device=states.device)
x_t = (1 - t) * x_0 + t * actions
pred = self.bc_flow(torch.cat([states, x_t, t], dim=-1))
bc_flow_loss = (pred - (actions - x_0)).pow(2).mean()
noises = torch.randn(B, A, device=states.device)
target_flow_actions = self.compute_flow_actions(states, noises)
actor_actions = self.one_step(states, noises)
distill_loss = (actor_actions - target_flow_actions).pow(2).mean()
actor_actions_c = actor_actions.clamp(-1.0, 1.0)
for p in self.critic.parameters():
p.requires_grad_(False)
logits_pi = self.critic(states, actor_actions_c)
mean_q = (torch.softmax(logits_pi, dim=-1) * self.atoms).sum(-1).mean(0)
for p in self.critic.parameters():
p.requires_grad_(True)
if self.actor_bc_coef > 0:
lam = 1.0 / (mean_q.abs().mean().detach() + 1e-6)
q_loss = -(lam * mean_q).mean()
actor_loss = bc_flow_loss + self.alpha_norm * distill_loss + q_loss
actor_loss = actor_loss + self.actor_bc_coef * ((actor_actions - actions) ** 2).mean()
else:
q_loss = -mean_q.mean()
actor_loss = bc_flow_loss + self.alpha * distill_loss + q_lossThe critic, the flow and the one-step actor share one Adam optimiser with learning rate ; the critic's parameters are frozen during the actor's term, so the critic is trained only by its own loss. The target critic and the deployed actor are both Polyak averages with rate 0.005 of the critic and of the one-step actor respectively.
What is fixed and what is chosen per dataset
The configuration is not uniform across datasets. Four switches are set from the dataset's identifier: the aversion (2, or 0 so that selection uses the mean), the number of target candidates (8 or 1), the target aggregation (lowest-mean member or mixture), and whether deployment uses the refined best-of-16 or a single sample. In addition, the distillation weight comes from a per-dataset table, and the normalised, BC-penalised actor objective is switched on for part of the datasets, and on part of the datasets training stops after half as many updates as on the others. We return to this in Section 5.
The code also contains machinery that the submitted configuration does not use: an -step return pre-computation with hash-based recovery of batch indices is present but runs with , so the target above is the one-step target; a critic-side BC coefficient is set but never applied; and a per-member variance-averse helper on the trainer is never called.
Results
| Method | ① | ② | ③ | ④ |
|---|---|---|---|---|
| Normalised score, or success gained in training ↑ | Normalised score, or success gained in training ↑ | Normalised score, or success gained in training ↑ | Normalised score, or success gained in training ↑ | |
| Qwen4-Max | 66.30 | 88.91 | 58.75 | 9.000 |
| IQL | 80.80 | 77.92 | 0 | 1.000 |
| AWAC | 73.32 | 68.76 | 0 | 21.50 |
| ReBRAC | 72.59 | 80.43 | 4.750 | 8.000 |
| Behavior cloning | 62.84 | 63.37 | 0 | 0.250 |
| FQL | 51.24 | 76.77 | 27.50 | 9.000 |
| FAN | 65.54 | 91.61 | 53.00 | 13.25 |
| ReBRAC-v2 | 84.04 | 89.69 | 7.750 | 29.00 |
| QT | 68.67 | 57.77 | 0 | 6.000 |
| FAC | 62.27 | 89.57 | 34.75 | 24.25 |
| PARS | 42.24 | 97.84 | 0 | 0 |
| GFP | 59.82 | 83.13 | 63.50 | 17.25 |
| Value Flows | 77.31 | 70.92 | 71.00 | 19.00 |
| DriftQL | 46.36 | 51.44 | 13.00 | 11.00 |
| TD3+BC | -3.384 | 9.861 | 0 | 0.250 |
| MOBILE | 32.90 | 44.75 | 0 | 0 |
| MAC | 73.21 | 79.99 | 54.50 | 81.00 |
- ① Adroit pen-human · 25 demonstrations
- ② Adroit pen-cloned · demos + BC rollouts
- ③ OGBench cube-double · play data, task 2
- ④ OGBench puzzle-4x4 · play data, task 4
DFQ-VA is not the strongest method on any setting. Its clearest position is on Cube-double, where it reaches 58.75, behind Value Flows [16] at 71.00 and GFP at 63.50, and ahead of every other published baseline, among them MAC (54.50), FAN (53.00) and FQL (27.50). On Pen-cloned it reaches 88.91, behind four baselines, the strongest being PARS [15] at 97.84. On Pen-human it reaches 66.30, behind seven baselines, with ReBRAC-v2 [6] at 84.04. On Puzzle-4x4 it reaches 9.000, level with FQL and below eight baselines, far from MAC [18] at 81.00.
The comparison that speaks to our question is with FQL, the method we modified. DFQ-VA is above it on Pen-human (66.30 against 51.24), on Pen-cloned (88.91 against 76.77) and on Cube-double (58.75 against 27.50), and equal to it on Puzzle-4x4. The measured results do not separate the contributions of the distributional critic, the selection rule, the refinement, the moving-average actor and the per-dataset constants: the final configuration was not ablated, and our development ablations, below, were run piecewise on single datasets.
How we got here
DFQ-VA was reached by a long sequence of versions, each tested against FQL on a few development datasets. Most of what we tried was removed again.
- The starting point, and its first failure. Our first version was FQL with a regression critic ensemble and best-of-16 selection by expected at deployment. On one development dataset it scored 3.1 against 24 for FQL at an early checkpoint (that comparison also differed in state normalisation), which we read as selection by expected value picking overestimated actions. While those runs were going we had found a recent paper on variance-averse -step offline RL with flow policies; that reading made its operator over categorical return distributions the score we adopted; it is not among the works we can cite here.
- Aversion in the actor's gradient was dropped. Our next versions also guided the actor by the variance-averse value. We judged that its scale differed from FQL's and unbalanced the distillation anchor, and moved aversion out of the actor's loss, keeping it only in selection; the version that kept it in the actor later degraded late in our development runs (a final 43 against 50 for FQL on one dataset).
- Amortising the selector into the actor was dropped. We tried distilling the one-step actor onto the variance-averse best-of-N choice, so the selection would be learned rather than computed. On one dataset it peaked at 80.9 and finished at 58.2, which we attributed to a collapse of the actor's diversity; the version without it reached 89.2 at a later checkpoint and finished at 63.7.
- Explicit lower-confidence-bound scores (value minus a multiple of the ensemble's spread) were tried in several forms and none was kept; the submitted score handles disagreement between members only through the mixture.
- The moving-average actor was added after every method, FQL included, declined late on one dataset. The version that added it to mixture scoring, stronger refinement and a per-dataset -step return finished at 88 there against 52.6 for FQL; that gain belongs to the combination, since the mixture-only version finished at 64.3.
- Aversion was switched off on part of the data. On one development dataset our variance-averse versions stayed at zero success while FQL learned. We concluded that penalising dispersion avoided risky actions the task needed, and set there. That alone did not fix the dataset.
- A best-of-N Bellman target overestimated. Comparing logged critic values on that dataset, our target with best-of-8 candidates settled near while FQL settled near ; with a single target candidate the value moved through toward . In a regression-critic version, a single target candidate, a four-layer critic and one-step returns together brought success there to 30% at an intermediate checkpoint and 60% at the next, where FQL was at 20%; the gain belongs to the three changes together. The distributional version with one-step returns reached 30% at the same checkpoint and 65% later, finishing at 55 in our development run, while distributional versions with four-step returns were still at zero at the checkpoints where the one-step versions had started to succeed. That is why in the submission.
- Refinement caused a late collapse on narrow data. On one narrow development dataset the refined policy collapsed late (to 0.69) while the same method without refinement held near 20 for longer, though it too collapsed later, as FQL did; a pessimistic lowest-mean-member target delayed the collapse but did not prevent it. Refinement is therefore off on that dataset, and the normalised, BC-penalised actor objective was introduced for datasets of that kind. A stronger refinement (32 candidates, three steps) finished below the submitted one on another dataset, 9.4 against 15.0.
- A regression critic was tried again and dropped. Reverting to a regression critic on the dataset where the best-of-N target had overestimated reached 15% at a checkpoint where the distributional version had 30%.
A bug we found along the way: our first -step implementation recovered batch indices with a floating-point random projection that collided on distinct transitions, corrupting the targets; we replaced it with an integer hash over the whole transition and verified it on a full dataset. The fix survives in the code, but with the path is not used.
All figures in this section are our own development measurements, as recorded in the trace, mostly from a single run each.
Limitations
- It is not one algorithm across datasets. Aversion, target candidates, target aggregation, deployment refinement, the distillation weight, the actor objective and the number of updates are all chosen from the dataset's identifier, and the choices were made from development runs on the same kinds of data. The method as submitted is a family of configurations, and how it would behave on an unseen dataset depends on which branch that dataset's identifier falls into.
- It does not lead on any setting. The best published baseline is ahead on every setting, by the widest margin on Puzzle-4x4. Our evidence is a gain over the method we modified, not over the field.
- The contribution is not isolated. The variance-averse mixture score is the idea we set out to test, but it arrives together with a distributional critic, a moving-average actor, deployment refinement and per-dataset constants, and the results do not show which of these carries the gain over FQL. Where aversion is switched off, the selection score is the plain mean, and on those datasets the variance-averse operator contributes nothing.
- The development evidence is thin. Most decisions rest on a single development run per variant, on curves the trace itself describes as noisy and prone to late decline for every method.
- Dead code remains. The -step machinery, the critic BC coefficient and an unused scoring helper are left in the submission, and the constructor argument that would disable LayerNorm in the flow networks has no effect, so every network uses it.
References
- Ilya Kostrikov, Ashvin Nair, Sergey Levine (2022). Offline Reinforcement Learning with Implicit Q-Learning. ICLR.
- Ashvin Nair, Abhishek Gupta, Murtaza Dalal et al. (2020). AWAC: Accelerating Online Reinforcement Learning with Offline Datasets.
- Ziyu Wang, Alexander Novikov, Konrad Zolna et al. (2020). Critic Regularized Regression. NeurIPS.
- Scott Fujimoto, Shixiang Shane Gu (2021). A Minimalist Approach to Offline Reinforcement Learning. NeurIPS.
- Denis Tarasov, Vladislav Kurenkov, Alexander Nikulin et al. (2023). Revisiting the Minimalist Approach to Offline Reinforcement Learning. NeurIPS.
- Denis Tarasov, Robert K. Katzschmann (2026). ReBRAC-v2: The Return of the King.
- Philippe Hansen-Estruch, Ilya Kostrikov, Michael Janner et al. (2023). IDQL: Implicit Q-Learning as an Actor-Critic Method with Diffusion Policies.
- Seohong Park, Qiyang Li, Sergey Levine (2025). Flow Q-Learning. ICML.
- Sungyoung Lee, Dohyeong Kim, Eshan Balachandar et al. (2026). Towards Efficient and Expressive Offline RL via Flow-Anchored Noise-conditioned Q-Learning. ICML.
- Jongseong Chae, Jongeui Park, Yongjae Shin et al. (2026). Flow Actor-Critic for Offline Reinforcement Learning. ICLR.
- Franki Nguimatsia Tiofack, Théotime Le Hellard, Fabian Schramm et al. (2026). Guided Flow Policy: Learning from High-Value Actions in Offline Reinforcement Learning. ICLR.
- Seohong Park, Kevin Frans, Sergey Levine et al. (2024). Is Value Learning Really the Main Bottleneck in Offline RL?. NeurIPS.
- Denis Tarasov, Alexander Nikulin, Dmitry Akimov et al. (2023). CORL: Research-oriented Deep Offline Reinforcement Learning Library. NeurIPS.
- Shengchao Hu, Ziqing Fan, Chaoqin Huang et al. (2024). Q-value Regularized Transformer for Offline Reinforcement Learning. ICML.
- Jeonghye Kim, Yongjae Shin, Whiyoung Jung et al. (2025). Penalizing Infeasible Actions and Reward Scaling in Reinforcement Learning with Offline Data. ICML.
- Perry Dong, Chongyi Zheng, Chelsea Finn et al. (2026). Value Flows. ICLR.
- Anas Houssaini, Mohamad H. Danesh, Amin Abyaneh et al. (2026). Drift Q-Learning.
- Kwanyoung Park, Seohong Park, Youngwoon Lee et al. (2026). Scalable Offline Model-Based RL with Action Chunks. ICLR.