Q-WSL:Leveraging Dynamic Programming for Weighted Supervised Learning in Goal-conditioned RL

Xing Lei, Zifeng Zhuang, Xuetao Zhang, Donglin Wang

TL;DR

Goal-Conditioned Weighted Supervised Learning (GCWSL) is a stable way to solve sparse-reward robotic tasks, but it fundamentally cannot "stitch" together different sub-optimal trajectories to reach unseen goals. The authors introduce Q-WSL, a hybrid framework that merges the dynamic programming strengths of Q-learning with the stability of weighted supervised learning. This combination enables trajectory stitching, achieving state-of-the-art success rates and dramatically higher sample efficiency on challenging multi-goal robotic benchmarks.

What Problem Does This Paper Address?

In Goal-Conditioned Reinforcement Learning (GCRL), an agent must learn to reach arbitrary target states under sparse, binary reward signals. Recently, Goal-Conditioned Weighted Supervised Learning (GCWSL)—which relabels past rollouts in hindsight and imitates them with advantage-based weighting—has gained popularity because it avoids unstable value function updates.

However, GCWSL suffers from a fundamental weakness: it lacks the ability to "stitch" trajectories. If state $s_0^a$ reaches intermediate state $s_t$, and a separate trajectory shows $s_t$ reaching goal $g^b$, supervised imitation cannot easily discover that the agent can traverse from $s_0^a$ to $g^b$. In contrast, standard Temporal-Difference (TD) methods like Q-learning naturally stitch trajectories via Bellman dynamic programming, but often diverge or fail to backpropagate values across long horizons under sparse rewards.

Methods

Q-WSL bridges this gap by unifying Q-value maximization and advantage-weighted behavior cloning into a single optimization framework:

  • Dual-Objective Policy Optimization: Inspired by offline RL formulations like TD3+BC, Q-WSL optimizes an actor objective that directly maximizes the goal-conditioned Q-value while penalizing deviations from relabeled transitions: $$\mathcal{J}_{Q-WSL}(\pi) = \mathbb{E}_{(s, a, g) \sim \mathcal{B}_r} \left[ Q(s, \pi(s, g), g) - \eta f(A) \|\pi(s, g) - a\|_2^2 \right]$$ Here, the Q-learning term steers actions toward globally stitched, optimal paths, while the weighted behavior cloning term provides a data-driven constraint that stabilizes training.

  • Advantage-Weighted Regression (AWR) Weighting: The imitation term uses an exponential advantage weight $f(A)$, calculated using TD errors derived from the learned Q-network (similar to WGCSL).

  • Theoretical Grounding: The authors formally link GCWSL to goal-conditioned AWR and prove that under indicator rewards, the optimization lower bound of Q-WSL strictly dominates that of prior weighted imitation algorithms: $$\mathcal{J}_{Q-WSL}(\pi) \ge \mathcal{J}_{WGCSL}(\pi) \ge \mathcal{J}_{GCSL}(\pi)$$

Datasets

The authors evaluate on five standard continuous control multi-goal benchmarks from OpenAI Gym Robotics (built on MuJoCo):

  • Fetch Manipulator Tasks (4): FetchReach, FetchPush, FetchSlide, and FetchPickAndPlace.
  • Shadow Dexterous Hand (1): HandReach.

No new benchmark environments were introduced, but the authors designed modified testing protocols to assess robustness:

  • Adding zero-mean Gaussian noise ($\sigma \in [0.2, 1.5]$) to actions in FetchPush to evaluate environmental stochasticity.
  • Switching between default offset-based sparse rewards ($r \in \{0, -1\}$) and strict indicator rewards ($r \in \{0, 1\}$).

Key Insights and Ideas

  • Why GCWSL Fails at Stitching: Supervised relabeling evaluates $(s, a, g)$ tuples that co-occurred within the same trajectory. When older policies produce disjoint paths through a shared "hub" state, supervised learning cannot connect the dots, whereas dynamic programming propagates value across trajectories via the shared hub state.
  • Mutual Reinforcement: Q-learning guides the policy toward optimal stitched actions, while weighted behavior cloning acts as an adaptive regularizer that prevents the policy from selecting out-of-distribution actions.
  • Robustness to Stochasticity: Purely self-supervised methods (GoFar, DWSL, WGCSL) assume deterministic transitions or struggle with variance in stochastic dynamics. Incorporating Bellman value updates makes the policy significantly more resilient to environmental noise.

Key Results

  • Higher Benchmark Performance: Across the five robotic tasks, Q-WSL achieves an average success rate of 81.16%, outperforming standard DDPG+HER (75.68%) and strongly outperforming GCWSL baselines such as WGCSL (61.52%), GoFar (57.64%), and DWSL (21.44%).
  • Challenging Tasks: On the difficult FetchSlide task, Q-WSL achieves 50.6% success (compared to 30.2% for DDPG+HER and 29.0% for WGCSL). On FetchPickAndPlace, it reaches 96.0%.
  • Sample Efficiency: In the high-dimensional HandReach environment, Q-WSL achieves a 10% success rate in just 1,000 samples, compared to 2,000 for WGCSL, 3,000 for DDPG+HER, and 16,400 for GoFar (an average 6.8× speedup over baselines).
  • Hyperparameter & Relabeling Robustness: Ablations show that Q-WSL performs stably across diverse weighting parameters $\eta \in [0.1, 3.0]$ and varying hindsight relabeling ratios.

Limitations and Future Work

  • Computational Overhead: Because Q-WSL maintains both a full TD-based critic network and an advantage-weighted regression objective, it inherits the training complexity of actor-critic methods rather than the compute simplicity of purely supervised models.
  • HandReach Absolute Performance: While Q-WSL is dramatically more sample-efficient on HandReach, its final success rate (59.8%) still slightly trailed vanilla DDPG+HER (64.8%), suggesting room for improvement in high-dimensional dexterous control.
  • Future Work: The authors highlight investigating whether purely supervised learning frameworks can incorporate trajectory stitching through alternative dynamic programming forms or specialized data augmentation techniques.

Summary updated

BibTeX
@misc{lei2024q,
  author = {Xing Lei and Zifeng Zhuang and Xuetao Zhang and Donglin Wang},
  title = {{Q-WSL:Leveraging Dynamic Programming for Weighted Supervised Learning in Goal-conditioned RL}},
  year = {2024},
  eprint = {2410.06648},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.06648},
}
Figure