Variance-Averse n-Step Offline Reinforcement Learning for Sparse Long-Horizon Environments

Guhyeon Kang, Minhae KwonNeurIPS 2026

TL;DR

Generative AI models (like diffusion and flow-matching) make great robot controllers because they can learn complex, multi-modal behaviors from offline datasets—right up until they copy a "lucky fluke" instead of a dependable strategy. This paper introduces VAN-Flow, an offline reinforcement learning framework that looks beyond average rewards to explicitly penalize high-variance outcomes. By pairing a distributional value critic with a novel variance-averse operator, it steers expressive generative policies toward actions that are both high-performing and rock-solid reliable across long horizons.

What Problem Does This Paper Address?

In offline reinforcement learning (RL), an agent learns how to act purely by studying a static dataset of past experiences, without testing things out in the real world. Often, these datasets are messy—collected from a mix of experts, novices, and random explorers.

Recently, researchers started replacing standard Gaussian policies with expressive generative models like flow-matching, which can capture complex, multi-modal action distributions (e.g., going left OR right around an obstacle, rather than averaging the two and crashing straight into it). However, this expressiveness is a double-edged sword: a generative policy faithfully memorizes all modes in the dataset, including reckless actions that happened to get lucky once or twice.

Standard RL critics only estimate the expected (average) future reward, or $Q$-value. They can't tell the difference between an action that reliably scores 50 points every time and a gamble that scores 100 half the time and 0 the rest. This vulnerability explodes in sparse-reward, long-horizon tasks where researchers use $n$-step returns (summing rewards over $n$ steps to propagate sparse signals faster). While $n$-step returns reduce bias, they dramatically amplify variance in messy datasets, causing expressive generative policies to collapse.

Figure 1: Success rate on antmaze-large under two dataset variance regimes: (a) navigate (low- variance) and (b) explore (high-variance). In (b), the shaded bar denotes the low-variance reference, and the downward arrow indicates the performance drop.

Methods

To separate dependable skill from dumb luck, the authors propose VAN-Flow (Variance-Averse $n$-step Flow), built on three pillars:

  1. Categorical Distributional Critic (Standard): Instead of predicting a single average $Q$-value, the critic uses the C51 algorithm to output a full probability histogram over $I$ discrete return "atoms." Combine this with $n$-step Bellman targets, and the agent can suddenly see the spread (variance) of outcomes.
  2. Variance-Averse Expectation $\mathcal{E}(Z)$ (Novel): Rather than chopping off the bottom tail of the distribution (like CVaR) or subtracting a finicky variance penalty ($Q - \beta \cdot \text{Var}$), the authors introduce a smooth reweighting operator. Using each atom's survival probability $(1 - \text{CDF})^\delta$, it shifts probability mass toward lower atoms proportionally to how spread out the distribution is. A single fixed parameter ($\delta = 2$) smoothly penalizes dispersion while still favoring high returns.
Figure 2: Example of variance-averse return with vary- ing δ and return variance.
  1. Variance-Averse Flow Actor with Rejection Sampling (Novel Integration): The actor is a flow-matching network that transforms random noise into actions via lightweight Euler steps (3 to 5 steps). During training and target calculation, it generates $M$ candidate actions and uses rejection sampling to pick the one that maximizes $\mathcal{E}(Z)$. Furthermore, the actor's velocity field is directly nudged by gradients from $\mathcal{E}(Z)$ evaluated on a single-step Euler proxy, keeping training fast.

Datasets

The authors evaluate VAN-Flow across more than 40 sparse-reward, long-horizon tasks from two established benchmarks (no new datasets are introduced):

  • D4RL (AntMaze): A classic benchmark where a multi-jointed ant robot must navigate mazes of increasing size (umaze, medium, large) using play or diverse trajectory datasets.
  • OGBench: A newer, tougher suite designed specifically to stress-test long-horizon offline RL under deceptive rewards, out-of-distribution traps, and noisy/exploratory data (including giant humanoid mazes, teleportation traps, and puzzle-3x3 manipulation tasks).

Key Insights and Ideas

  • Expressiveness amplifies $n$-step variance: On low-variance navigation data, standard flow-based $n$-step RL (FQL-n) beats Gaussian RL (ReBRAC-n). Flip to a noisy, high-variance explore dataset, and FQL-n plummets by 90% (down to 1% success), whereas the less expressive Gaussian policy only drops 49%. Expressive actors desperately need variance-aware guardrails.
  • Smooth reweighting beats classic risk measures: Traditional risk-sensitive tools like CVaR throw away upper-tail information via hard truncation, which can make an agent overly timid (scoring just 2% on antmaze-large-explore vs. VAN-Flow's 93%). Smoothly reweighting across the entire categorical support finds the sweet spot between high reward and low dispersion without per-task hyperparameter tuning.
  • Critic guidance makes policies brisk, not just successful: Without direct $\mathcal{E}(Z)$ gradient guidance in the actor loss, rejection sampling alone can sometimes still solve a task—but it meanders, resulting in terrible time efficiency. Explicit value guidance teaches the flow field to head straight for the goal.

Key Results

VAN-Flow consistently outperforms Gaussian, flow-based, $n$-step, and distributional baselines across both benchmark suites:

  • Long-Horizon & Noisy Mastery (OGBench): On humanoidmaze-giant-navigate, VAN-Flow reaches 92% success (compared to 74% for BFN-n, 12% for QC, and $\le 3\%$ for 1-step methods). On the high-variance antmaze-large-explore task, VAN-Flow achieves 84%, crushing FQL-n (1%) and QC (58%).
  • Consistent Scaling (D4RL): On antmaze-large-diverse, VAN-Flow hits 88.6%, beating pure offline flow methods (FQL at 83.0%) and distributional+$n$-step baselines (D4PG at 80.6%).
  • Low Overhead: Despite sampling $M$ candidates over $K$ flow steps, single-step proxy gradients keep runtime modest—training takes 0.54 hours (1.9 ms/step) on humanoidmaze-large, faster than QC (0.83 hours) and BFN (0.60 hours).
Table 1: Performance comparison on OGBench. Each entry averages five tasks per environment. Best results are in bold.

Limitations and Future Work

  • Excessively large $n$-step horizons still degrade: Sensitivity analyses show that while VAN-Flow tolerates much larger $n$-step horizons than baselines, pushing $n$ too high (e.g., $n=16$) eventually causes diminishing returns due to extreme target variance.
  • Discretization gap: Because $\mathcal{E}(Z)$ operates on discrete C51 atoms rather than a continuous quantile function, there is a small theoretical discretization error bounded by atom concentration (though empirically, the median gap is just 0.37% of the support range, and it vanishes as atom count $I$ grows).
  • Sampling compute: Rejection sampling adds a multiplicative $M \times K$ factor to action evaluation complexity, though performance saturates nicely below 32 candidates and 3–5 flow steps. (Broader future directions are not explicitly discussed in the main text.)

Summary updated

Abstract

Generative actors are transforming offline reinforcement learning (RL) by enabling expressive policy classes that model complex action distributions. However, this expressiveness also exposes a key challenge in heterogeneous datasets: generative policies can reproduce unreliable action modes whose return distributions exhibit high variance, occasionally yielding high returns by chance but lacking consistency. Consequently, maximizing the expected Q-value alone is insufficient for identifying reliable actions. We propose VAN-Flow (Variance-Averse n-step Flow), a framework that promotes reliable actions in generative offline RL. VAN-Flow combines (i) a categorical distributional critic, (ii) a variance-averse expectation operator that smoothly reweights atom probabilities to favor actions with both high returns and low dispersion, and (iii) a flow-matching generative actor guided via rejection sampling. Unlike CVaR or mean--variance objectives, the operator redistributes probability mass over the categorical return distribution without hard truncation or auxiliary penalty terms. Across more than 40 tasks from D4RL and OGBench, VAN-Flow consistently outperforms strong baselines, with the largest gains in long-horizon and high-variance regimes where reliable action selection becomes critical.
BibTeX
@inproceedings{kang2026variance,
  author = {Guhyeon Kang and Minhae Kwon},
  title = {{Variance-Averse n-Step Offline Reinforcement Learning for Sparse Long-Horizon Environments}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=AytpRK1tDD},
}
Figure