Introduction
Offline reinforcement learning asks for the best policy that can be extracted from a fixed dataset, with no further interaction. The data in this task is narrow: whatever its source, it covers only a thin slice of the state-action space, and the policy is then deployed with no chance to correct itself. The research question is therefore one of restraint as much as of improvement: how do we extract a policy that is better than the data without querying the value function at actions the data does not support?
Two things make this hard. First, any update that evaluates a critic at an action produced by the policy, during training or at decision time, invites extrapolation error: the critic is confidently wrong exactly where it has no data, and a policy that maximises it is drawn there. Second, even an accurate value does not say how to act. A policy that is greedy in is a different algorithm from one that merely prefers advantageous actions, and on narrow data the difference decides whether the policy stays on the support.
The field's answers fall into a few families. Behaviour-regularised actor-critic methods add a cloning penalty to a deterministic policy-gradient update [1, 2, 3]. In-sample methods avoid querying unseen actions altogether: implicit Q-learning fits an upper expectile of the in-sample action values and extracts a policy by advantage-weighted regression [4, 5]. Expressive-policy methods replace the Gaussian actor with a flow or a sequence model [6, 7, 8, 9, 10] or model the value with flows [11], and model-based methods learn a dynamics model [12]. Our starting diagnosis, from reading this literature at the start of the run, was that on such data the bottleneck is often the extraction step rather than the value objective [13]. We therefore kept the in-sample value learning of implicit Q-learning and put the contribution into how the policy is extracted from it.
Method
Our method, SFE (support-filtered extraction), has one rule throughout: the critics never see an action that is not in the dataset during training, and at decision time the value is used only to filter actions that a behaviour model has already proposed.
In-sample values
We train twin critics with Polyak-averaged targets and a state value , all on dataset transitions only. With , the value is fitted by expectile regression and the critics by a Bellman target that bootstraps from rather than from any policy action:
The expectile is when the metric is a success rate and when it is a normalised return. The quantity , computed before takes its step, is detached and reused as the advantage on the return side (below). This is the value learning of implicit Q-learning [4], and nothing in it evaluates a generated action. We also switch on the fixed loop's state normalisation through the permitted configuration override.
with torch.no_grad():
next_value = self.value(next_states)
target_q = torch.minimum(
self.critic_1_target(states, actions),
self.critic_2_target(states, actions),
)
q_target = rewards + self.discount * not_done * next_value
value = self.value(states)
residual = target_q - value
actor_advantage = residual.detach()
value_loss = (torch.abs(self.expectile - (residual < 0).float()) * residual.pow(2)).mean()
self.value_optimizer.zero_grad(set_to_none=True)
value_loss.backward()
self.value_optimizer.step()
q1 = self.critic_1(states, actions)
q2 = self.critic_2(states, actions)
critic_loss = F.mse_loss(q1, q_target) + F.mse_loss(q2, q_target)
self.critic_optimizer.zero_grad(set_to_none=True)
critic_loss.backward()
self.critic_optimizer.step()
soft_update(self.critic_1_target, self.critic_1, self.tau)
soft_update(self.critic_2_target, self.critic_2, self.tau)A behaviour model that remembers the previous action
All actions the policy can take come from a learned behaviour model . When the metric is a success rate, is a mixture of tanh-squashed Gaussians conditioned on the state and the previous action , with at the start of each trajectory. In the unsquashed coordinates ,
with log-scales clamped to . It is trained by unweighted maximum likelihood on transitions drawn uniformly from the whole dataset, independently of the critics' batch. Conditioning on lets a Markov policy carry the temporally extended, multi-modal motor patterns that we measured in the data (action autocorrelation that is strong only over short lags), and the evaluator feeds the applied previous action back at every step, so the same conditioning is available at deployment.
class _MixtureDensity(nn.Module):
def __init__(self, state_dim: int, action_dim: int, max_action: float, n_modes: int = 8):
super().__init__()
self.action_dim = action_dim
self.max_action = max_action
self.n_modes = n_modes
self.trunk = nn.Sequential(
nn.Linear(state_dim + action_dim, 256), nn.ReLU(),
nn.Linear(256, 256), nn.ReLU(),
nn.Linear(256, 256), nn.ReLU(),
)
self.logit_head = nn.Linear(256, n_modes)
self.mean_head = nn.Linear(256, n_modes * action_dim)
self.scale_head = nn.Linear(256, n_modes * action_dim)
nn.init.zeros_(self.mean_head.bias)
nn.init.zeros_(self.logit_head.bias)
nn.init.constant_(self.scale_head.bias, -1.0)
def forward(self, state: torch.Tensor, previous_action: torch.Tensor):
h = self.trunk(torch.cat([state, previous_action / self.max_action], dim=-1))
logits = self.logit_head(h)
means = self.mean_head(h).view(-1, self.n_modes, self.action_dim)
scales = self.scale_head(h).view(-1, self.n_modes, self.action_dim).clamp(-5.0, 2.0)
return logits, means, scales
def log_prob(self, state: torch.Tensor, previous_action: torch.Tensor,
action: torch.Tensor) -> torch.Tensor:
logits, means, scales = self.forward(state, previous_action)
a = (action / self.max_action).clamp(-1.0 + 1e-5, 1.0 - 1e-5)
z = torch.atanh(a).unsqueeze(1)
component = -0.5 * ((z - means) / scales.exp()).pow(2) - scales
component = component - 0.5 * float(np.log(2.0 * np.pi))
component = component - torch.log(1.0 - a.pow(2) + 1e-6).unsqueeze(1)
return torch.logsumexp(
F.log_softmax(logits, dim=-1) + component.sum(-1), dim=-1
)Extraction by filtering behaviour proposals
At each step we draw proposals from , first a component from the mixture weights and then an action within it, and form the advantageous set
The executed action is drawn uniformly from ; if is empty, it is drawn uniformly from all proposals, which is a plain behaviour sample. Because the proposals are i.i.d., this rule has an exact description. Let be the behaviour mass of the advantageous region. Then the executed action is distributed as
because, conditional on at least one proposal qualifying, a uniformly chosen qualifying proposal is by exchangeability an exact draw from restricted to the advantageous set, for any . Three properties follow. The policy can only produce actions that the behaviour model assigns mass to, so the critic is asked to rank only actions that the behaviour model proposes. It uses the value only through the sign of the advantage, never its magnitude, so a critic that is miscalibrated in scale but correct in ranking still filters correctly. And it is not a second parametric policy fit: there is no weighted regression that could blur the modes of .
This differs from the policy implied by an expectile value [14], which keeps both regions with weights and ; our filter sets the weight below to zero whenever an advantageous proposal exists. The choice was made by measurement, as Section 4 records.
def eval_step(self, state: torch.Tensor, prev_action: torch.Tensor,
prev_reward: torch.Tensor, t: torch.Tensor,
carry: List[torch.Tensor]) -> Tuple[torch.Tensor, List[torch.Tensor]]:
index, best, stall, age = carry[0], carry[1], carry[2], carry[3]
improved = (prev_reward.view(1) > best + 1e-6) & (t.view(1) > 0)
best = torch.where(improved, prev_reward.view(1), best)
stall = torch.where(improved, torch.zeros_like(stall), stall + 1)
if self.commit:
replace = (t[0] == 0) | (stall[0] >= self.horizon) | (age[0] >= 3 * self.horizon)
else:
replace = torch.ones((), dtype=torch.bool, device=state.device)
logits, means, scales = self.behavior(state, prev_action)
candidates = self.behavior.max_action * torch.tanh(means)
if bool(replace):
mode = torch.multinomial(F.softmax(logits[0], dim=-1), 32, replacement=True)
sampled_means = means[0].index_select(0, mode)
sampled_scales = scales[0].index_select(0, mode).exp()
candidates = self.behavior.max_action * torch.tanh(
sampled_means + sampled_scales * torch.randn_like(sampled_means)
).unsqueeze(0)
repeated = state.expand(32, -1)
q1 = self.critic_1(repeated, candidates[0])
q2 = self.critic_2(repeated, candidates[0])
q = torch.minimum(q1, q2)
above = q >= self.value(state).expand(32)
weights = above.float()
if not bool(above.any()):
weights = torch.ones_like(q)
index = torch.multinomial(weights, 1)
best = torch.where(t.view(1) > 0, prev_reward.view(1), best)
stall = torch.zeros_like(stall)
age = torch.zeros_like(age)
action = candidates[0].index_select(0, index)
return action, [index, best, stall, age + 1]The return-metric branch: advantage-weighted Gaussian with a mean anchor
When the metric is a normalised return, is a state-only Gaussian with a tanh-bounded mean (a two-hidden-layer network with dropout ) and a state-independent log-scale. It is fitted by advantage-weighted regression on the critics' own batch, with the pre-update advantage :
where the clip appears in the code as . At decision time the candidate set is the mean plus 31 clamped samples, and the executed action maximises the expectile-weighted log-density
The mean always maximises the first term, so a sample can win only if the mean falls below , the sample lies above it, and its log-density deficit is smaller than at . For an unclamped sample that deficit is , whose expectation is half the action dimension, so except in low-dimensional action spaces the bar is rarely cleared. In our own development checks on trained policies, executing the mean alone left the development score unchanged or changed it only in the fourth or fifth significant figure, which indicates that almost every executed action was exactly the behaviour mean. In practice, therefore, this branch executes the mean of an advantage-weighted Gaussian, which is close to implicit Q-learning's own actor recipe [4, 5]; its remaining departures from the baseline, by our own comparison of the two implementations, lie in the critics' parameterisation and update scale, not in the extraction rule.
if self._n > 0 and self.success_scored:
indices = torch.randint(self._n, (states.shape[0],), device=states.device)
behavior_states = self._states[indices]
behavior_actions = self._actions[indices]
previous_actions = self._previous_actions[indices]
else:
behavior_states = states
behavior_actions = actions
previous_actions = torch.zeros_like(actions)
behavior_log_prob = self.behavior.log_prob(
behavior_states, previous_actions, behavior_actions
)
if self.success_scored:
behavior_loss = -behavior_log_prob.mean()
else:
behavior_weight = (3.0 * actor_advantage).clamp(max=4.605170185988092).exp()
behavior_loss = -(behavior_weight * behavior_log_prob).mean()
self.actor_optimizer.zero_grad(set_to_none=True)
behavior_loss.backward()
self.actor_optimizer.step()
self.actor_schedule.step() replace = torch.ones((), dtype=torch.bool, device=state.device)
_, means, scales = self.behavior(state, torch.zeros_like(prev_action))
candidates = self.behavior.max_action * means
if bool(replace):
sampled_means = means[0].expand(31, -1)
sampled_scales = scales[0].expand(31, -1).exp()
sampled = self.behavior.max_action * (
sampled_means + sampled_scales * torch.randn_like(sampled_means)
).clamp(-1.0, 1.0)
candidates = torch.cat([candidates[0], sampled], dim=0).unsqueeze(0)
repeated = state.expand(32, -1)
q1 = self.critic_1(repeated, candidates[0])
q2 = self.critic_2(repeated, candidates[0])
q = torch.minimum(q1, q2)
above = q >= self.value(state).expand(32)
weights = torch.where(
above,
torch.full_like(q, self.log_above),
torch.full_like(q, self.log_below),
)
a = candidates[0] / self.behavior.max_action
component = -0.5 * ((a - means) / scales.exp()).pow(2) - scales
log_prob = (component - 0.9189385332046727).sum(-1)
index = (log_prob + weights).argmax().view(1)
best = torch.where(t.view(1) > 0, prev_reward.view(1), best)
stall = torch.zeros_like(stall)
age = torch.zeros_like(age)
action = candidates[0].index_select(0, index)
return action, [index, best, stall, age + 1]The only branch in the method is on the kind of metric, which it reads from the same dataset identifier that the fixed training loop uses for the same decision; there are no other dataset-specific constants.
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 ↑ | |
| Kimi K3.1 Pro | 80.59 | 72.74 | 16.75 | 21.75 |
| 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
SFE does not lead on any setting. On Pen-human it scores 80.59, behind ReBRAC-v2 (84.04) and, narrowly, IQL (80.80), and ahead of the remaining published baselines. On Puzzle-4x4 it scores 21.75, behind MAC [12] (81.00), ReBRAC-v2 (29.00) and FAC (24.25), and essentially level with AWAC (21.50).
On Pen-cloned and Cube-double the result is weaker. On Cube-double SFE reaches 16.75, well behind Value Flows [11] (71.00) and below six published baselines in all, though above IQL (0.000) and ReBRAC-v2 (7.750). On Pen-cloned it reaches 72.74, below nine published baselines, with PARS [16] at 97.84.
The comparison with IQL, whose value learning SFE shares, is the most direct test of the extraction rule. SFE is clearly above IQL on Cube-double and Puzzle-4x4 (16.75 against 0.000, and 21.75 against 1.000), level with it on Pen-human, and below it on Pen-cloned (72.74 against 77.92). On every setting, at least one published baseline is ahead of us.
How we got here
SFE was reached by a long series of controlled comparisons, most of which removed something. All figures below are our own development measurements on public development datasets, recorded in the trace; they are not the evaluation's numbers.
- We started from latent motor modes and commitment. The first candidate fitted the same mixture behaviour model, selected the mixture component with the highest pessimistic , and committed to it for a horizon estimated from the data's action autocorrelation, re-selecting on reward stalls. Greedy component selection stayed near zero on one development dataset where FQL [6] already scored 14.7, which we read as greedy mode exploitation leaving the reliable support. Hard commitment was dominated by re-selecting at every step, and a later corrected version that carried the selected mode and its noise also made no progress. The horizon estimator and the commitment branch remain in the submitted file but are switched off.
- An expectile critic does not license greedy extraction. Reading the theory behind expectile-based diffusion policies [14], we noted that the policy implied by an expectile value weights behaviour actions by above and below it, rather than taking an over . We replaced greedy selection with that weighting, first as a MAP choice over proposals (behaviour log-density plus the log-weight) and then by sampling it.
- Covering rare modes made things worse. Stratifying proposals so that every mixture component is evaluated scored 0.017 against 5.315 for prior-weighted proposals on one development dataset: uniform coverage of low-prior modes lets value outliers win, whereas sampling components by the behaviour prior filters them out before the value is consulted. We kept prior-weighted proposals.
- History helps one kind of data and hurts another. Removing the previous-action input raised one development score from 0.433 to 4.214, while on other development data the history-conditioned sampler reached successes that the stateless one did not. We kept history only in the success-metric branch.
- The expectile was not controlled at first. Our candidates used everywhere while the IQL reference used on return-metric data; matching it gave a large early gain on one development dataset (9.83 at an early checkpoint), which is why differs between the branches.
- The return branch converged back to IQL's actor. Judging that an eight-component mixture overfitted narrow data, we moved to a Gaussian behaviour model. Sampling only around the mean degraded it, so we added the exact mean as a candidate. We then found that the MAP choice essentially never departed from that mean on our trained policies, and that continuous value guidance on the same weights was worse on most of the development datasets we tried it on. The last return-side change was to compute the advantage from the critics' own batch before the value step, with plain rather than self-normalised weights. This took one development dataset from 0.61 for our previous version and 1.03 for our IQL run to 3.79, and another from 2.66 and 3.22 to 5.63, while staying neutral elsewhere and near saturation on expert data.
- MAP lost to sampling, and sampling lost to filtering. On the same trained weights, sampling the expectile-implied policy beat MAP extraction on one development dataset. Replacing that two-level weighting with a hard filter (weight one above , zero below it whenever an advantageous proposal exists) was then a large further gain on frozen weights: on one development dataset it raised success from 72% to 86%. It also had a clear cost on another, lowering success from 26% to 9%. Our online diagnostic there showed the filter reaching intermediate progress faster but avoiding the temporary loss of reward that progress beyond it required. We tried to detect that regime from data, by a stagnation-triggered relaxation of the filter, an upper-confidence filter and several dataset statistics, and none separated it without hurting the others, so we kept one global rule rather than fit an exception.
- Value-side alternatives did not replace the one-step critic. A ten-step in-sample Bellman target, a semi-Markov backup ending at the next reward change, reward-conditioned critics and a multi-step ('factorised') critic were all tried, and none was adopted; the semi-Markov backup failed outright. The factorised critic made early progress on one dataset, but at full length it lowered another development score from 92% to 78%, and a cascade that consulted it only when the one-step critic found no advantageous proposal collapsed elsewhere. Behaviour-side reward conditioning added essentially no held-out predictive information. The one-step critic stayed.
The idea that a binary advantage can drive extraction is not new, and we checked the literature on binary advantage-weighted regression [18] while positioning the method. What we add is realising the advantage-restricted behaviour distribution directly by resampling proposals from a history-conditioned behaviour model, with no weighted policy fit at all.
Limitations
- SFE is not state of the art on any setting. It is behind the best published baseline everywhere, by a little on Pen-human and by a wide margin on the others, and below more than half of the published baselines on Pen-cloned. Its clearest gain is over its own ancestor, IQL, on Cube-double and Puzzle-4x4.
- The filter discards information that some problems need. Using only the sign of the advantage throws away its magnitude, and removing the below-value tail removes the actions that temporarily lose reward. In development this cost a large drop on one dataset whose progress needed exactly such actions, and we found no data-derived way to tell when to relax the filter.
- The return-metric branch is close to an existing method. In practice it executes the mean of an advantage-weighted Gaussian; its candidate-selection machinery had a negligible effect on development scores in our checks. Whatever it achieves is attributable to IQL-style value learning and advantage-weighted regression with minor update changes, not to a new extraction rule.
- The method branches on the kind of metric. The two branches differ in behaviour model, expectile, use of history and extraction rule. Each choice was justified by development measurements, but together they make SFE two related algorithms rather than one.
- The submission carries dead code. The horizon estimator, the reward- and stall-tracking carry and the commitment branch are computed or defined but have no effect on the executed action.
- Development evidence is noisy. Many of the comparisons above were made on single training runs, and the trace records large differences between periodic and fresh evaluations of the same policy; several of the decisions rest on small margins.
References
- 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.
- 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.
- Seohong Park, Qiyang Li, Sergey Levine (2025). Flow Q-Learning. ICML.
- Jongseong Chae, Jongeui Park, Yongjae Shin et al. (2026). Flow Actor-Critic for Offline Reinforcement Learning. ICLR.
- Sungyoung Lee, Dohyeong Kim, Eshan Balachandar et al. (2026). Towards Efficient and Expressive Offline RL via Flow-Anchored Noise-conditioned Q-Learning. ICML.
- 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.
- Shengchao Hu, Ziqing Fan, Chaoqin Huang et al. (2024). Q-value Regularized Transformer for Offline Reinforcement Learning. ICML.
- Perry Dong, Chongyi Zheng, Chelsea Finn et al. (2026). Value Flows. ICLR.
- Kwanyoung Park, Seohong Park, Youngwoon Lee et al. (2026). Scalable Offline Model-Based RL with Action Chunks. ICLR.
- Seohong Park, Kevin Frans, Sergey Levine et al. (2024). Is Value Learning Really the Main Bottleneck in Offline RL?. NeurIPS.
- Philippe Hansen-Estruch, Ilya Kostrikov, Michael Janner et al. (2023). IDQL: Implicit Q-Learning as an Actor-Critic Method with Diffusion Policies.
- Denis Tarasov, Alexander Nikulin, Dmitry Akimov et al. (2023). CORL: Research-oriented Deep Offline Reinforcement Learning Library. NeurIPS.
- Jeonghye Kim, Yongjae Shin, Whiyoung Jung et al. (2025). Penalizing Infeasible Actions and Reward Scaling in Reinforcement Learning with Offline Data. ICML.
- Anas Houssaini, Mohamad H. Danesh, Amin Abyaneh et al. (2026). Drift Q-Learning.
- Ziyu Wang, Alexander Novikov, Konrad Zolna et al. (2020). Critic Regularized Regression. NeurIPS.