NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

When does return-conditioned supervised learning work for offline reinforcement learning?

David Brandfonbrener, Alberto Bietti, Jacob Buckman, Romain Laroche, Joan Bruna

TL;DR

Return-Conditioned Supervised Learning (RCSL)—the logic behind hits like the Decision Transformer—is a stable, easy-to-scale alternative to traditional reinforcement learning. However, this paper reveals its "Achilles' heel": unlike traditional methods, RCSL requires nearly deterministic environments and high-quality data coverage to succeed, often failing where standard dynamic programming excels.

What Problem Does This Paper Address?

Offline Reinforcement Learning (RL) is notoriously difficult. Traditional "Dynamic Programming" (DP) methods, like Q-learning, are powerful because they can "stitch" together fragments of different experiences to find an optimal path. However, they are also famously unstable and sensitive to hyperparameters.

Recently, a new family of algorithms called Return-Conditioned Supervised Learning (RCSL)—including the Decision Transformer (DT) and RL via Supervised Learning (RvS)—has gained massive popularity. These methods treat RL as a supervised learning problem: "Given that I am in state $s$ and I want to achieve return $g$, what action $a$ should I take?" While these are much more stable and scale beautifully with deep learning, we haven't really understood why or when they work. This paper fills that gap by providing the first rigorous theoretical analysis of RCSL's capabilities and limitations.

Methods

The authors formalize RCSL as a two-step process:

  1. Training: Learn the conditional distribution of actions given states and returns $P(a|s, g)$ from a static dataset.
  2. Testing: Define a policy by plugging in a "target return" (a conditioning function $f(s)$) that represents the high performance we want to achieve.

The researchers derive new theoretical regret bounds for RCSL and compare them to the established bounds for DP-based offline RL. They specifically look at sample complexity—how much data you need to get a good result—and how it scales with the "horizon" (the number of steps in a task).

Datasets

The paper uses two main testing grounds:

  • Point-mass Navigation: A custom 2D environment where an agent must reach a goal. The authors created three reward variants (Ring of Fire, Sparse, and Dense) specifically designed to test how RCSL handles different levels of "return coverage" and stochasticity.
  • D4RL Benchmark: A standard suite for offline RL. They tested on AntMaze (which requires "stitching" paths together), HalfCheetah, and Adroit Pen (human demonstration data).

Key Insights and Ideas

An illustrative Markov Decision Process (MDP) used to analyze the impact of stochastic transitions and rewards on RCSL.
  • The Stochasticity Trap: RCSL struggles in stochastic (random) environments. If an agent gets a high reward just by being "lucky" in a random world, RCSL might mistakenly learn that the agent's actions were the cause of that luck. DP methods handle this better by averaging out the randomness over many transitions.
  • The "Stitching" Problem: One of RL's superpowers is taking the first half of a "good" trajectory and the second half of a different "good" trajectory to make a "great" one. The authors prove that RCSL generally cannot do this; it is fundamentally limited by the full trajectories present in the dataset.
  • Exponential Sample Complexity: In many cases, RCSL needs an amount of data that grows exponentially with the length of the task ($H$) to find the optimal policy, whereas DP methods only need a polynomial amount. This happens because RCSL needs to see many examples of trajectories that actually achieve the high target return.
  • When it does work: RCSL shines in deterministic environments where the behavior data is already relatively high-quality. In these cases, it offers a simpler, more stable path to success than complex actor-critic methods.

Key Results

  • Theoretical Bound: The authors prove that RCSL is near-optimal only if the environment is nearly deterministic and the dataset has sufficient "return coverage" (Theorem 1).
  • Point-mass Failure: In the "Ring of Fire" task—where high returns are rare and surrounded by penalties—RCSL methods (DT and RvS) failed to achieve positive returns, while DP methods (like IQL) succeeded.
  • D4RL Performance: On the AntMaze tasks, which are the ultimate test of "trajectory stitching," DP-based algorithms (TD3+BC and IQL) significantly outperformed RCSL methods. RCSL only remained competitive on tasks like Pen-Human, where the data consists of high-quality human examples that don't require much stitching.

Limitations and Future Work

The primary limitation is that RCSL is not a "universal" solution for RL. It is a specialized tool that works best when you have good data and a predictable environment.

The authors suggest that future research should focus on bridging the gap: can we find a way to give RCSL the "stitching" power of dynamic programming without losing the stability of supervised learning? Additionally, while this paper focuses on Markovian states, exploring how the history-dependence of Transformers might mitigate some of these issues is a promising next step.

Summary updated

BibTeX
@inproceedings{brandfonbrener2022when,
  author = {David Brandfonbrener and Alberto Bietti and Jacob Buckman and Romain Laroche and Joan Bruna},
  title = {{When does return-conditioned supervised learning work for offline reinforcement learning?}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=6wi3ARmUM1},
}
Figure