Bridging Supervised and Temporal Difference Learning with Q-Conditioned Maximization

Xing Lei, Zifeng Zhuang, Shentao Yang, Sheng Xu, Yunhao Luo, Fei Shen, Xuetao Zhang, Donglin WangarXiv 2025 · DOI

Introduction

Offline Reinforcement Learning (RL) is characterized by a fundamental trade-off between two dominant paradigms: Temporal Difference (TD) learning and Supervised Learning (SL). TD-based methods, such as IQL or CQL, excel at "stitching"—the ability to combine segments of diverse experiences to discover optimal paths. However, they are often plagued by instability due to bootstrapping and overestimation. Conversely, SL-based approaches like Decision Transformers are stable and scalable but typically struggle to find optimal paths unless they have observed them in their entirety during training.

The framework GCReinSL (Goal-Conditioned Reinforced Supervised Learning) bridges this gap, imbuing supervised learning with the stitching capabilities of TD learning while maintaining its inherent stability.

The Challenge of Trajectory Stitching

The primary hurdle for standard supervised offline RL is trajectory stitching. Consider a dataset where one trajectory moves from point A to B, and another moves from B to C. A robust agent should infer how to navigate from A to C. Traditional Outcome-Conditioned Behavioral Cloning (OCBC) often fails here because it merely mimics the actions observed in the data for a given goal, regardless of their optimality.

Figure 1: Trajectory stitching comparison. (a) Example MDP. (b) Standard supervised learning (OCBC) fails to stitch sub-optimal trajectories. (c) Successful stitching of optimal actions.

As shown in Figure 1, OCBC lacks a mechanism to evaluate which actions are superior for reaching a goal, often copying sub-optimal paths present in the training data.

GCReinSL: A Two-Stage Framework

GCReinSL addresses these limitations through a two-stage pipeline that avoids the "deadly triad" of bootstrapping, off-policy learning, and function approximation.

Figure 3: Overview of the GCReinSL pipeline, illustrating Q-function estimation via Normalizing Flows and the subsequent Q-conditioned policy training and inference.
  1. Q-function Estimation via Normalizing Flows: Instead of recursive Bellman updates, GCReinSL utilizes Normalizing Flows (NFs) to estimate the probability of reaching a goal from a specific state-action pair. This provides a stable, Monte Carlo-style estimation of $Q$-values directly from the offline dataset.
  2. Q-Conditioned Policy Training: The policy is trained to predict actions conditioned on the state, the goal, and the estimated $Q$-value ($Q^\beta$).
  3. Maximization via Expectile Regression: During training, the model employs expectile regression to learn the maximum possible $Q$-value available in the data for any given state-goal pair.
  4. Inference and Stitching: At inference time, the model first predicts the maximum achievable $Q$-value for the current state and goal. This "optimal" $Q$-value is then used as a prompt for the policy, forcing it to select actions with the highest success probability, effectively stitching together the best segments of various trajectories.

Key Insights

  • Q-values as Prompts: Similar to how Decision Transformers use "Return-to-Go," GCReinSL uses $Q$-values as prompts. However, $Q$-values provide more granular, state-dependent guidance, which is crucial for local decision-making and effective stitching.
  • Avoiding the Bootstrap: By leveraging Normalizing Flows for value estimation, the method bypasses the recursive "guessing based on a guess" that destabilizes TD learning.
  • In-Distribution Maximization: Expectile regression ensures the model targets the best performance supported by the existing data, preventing the "hallucination" of impossible actions—a common failure mode in offline RL.

Experimental Results

GCReinSL was evaluated on several benchmarks, including Pointmaze, Visual-Pointmaze, and D4RL Antmaze-v2.

  • Superiority over SL Baselines: In Pointmaze-Large, GCReinSL achieved a success rate near 50%, whereas standard Decision Transformers and RvS remained near 0%.
  • Outperforming Data Augmentation: The method surpassed specialized goal-augmentation techniques like TGDA, suggesting that architectural conditioning on $Q$-values is more effective than synthetic data generation.
  • Closing the TD Gap: On D4RL Antmaze-v2, GCReinSL performed comparably to—and sometimes better than—IQL, a state-of-the-art TD-based method, achieving a total score of 338.9 across tasks.

Conclusion

GCReinSL demonstrates that supervised learning can achieve the performance of TD-based methods in complex stitching tasks by incorporating $Q$-conditioned maximization. While the method is sensitive to the accuracy of the $Q$-function estimator, it represents a significant step toward stable, scalable, and high-performing offline RL. Future research may explore integrating these techniques with advanced sequence models like Decision Mamba.

Summary updated

BibTeX
@misc{lei2025bridging,
  author = {Xing Lei and Zifeng Zhuang and Shentao Yang and Sheng Xu and Yunhao Luo and Fei Shen and Xuetao Zhang and Donglin Wang},
  title = {{Bridging Supervised and Temporal Difference Learning with Q-Conditioned Maximization}},
  year = {2025},
  eprint = {2506.00795},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.00795},
}
Figure