Action-Quantized Offline Reinforcement Learning for Robotic Skill Learning

Jianlan Luo, Perry Dong, Jeffrey Wu, Aviral Kumar, Xinyang Geng, Sergey Levine

Introduction

Offline Reinforcement Learning (RL) provides a framework for learning high-performing policies from fixed datasets, such as human demonstrations or historical logs, without the need for costly or dangerous environment interaction. However, a primary obstacle in offline RL is distributional shift. When an agent encounters a state-action pair not well-represented in the training data, the value function (Q-function) often produces over-optimistic estimates. This leads the agent to select "hallucinated" high-value actions that fail in practice.

In continuous action spaces, standard mitigation strategies like Conservative Q-Learning (CQL) or Implicit Q-Learning (IQL) rely on constraints or regularizers that require approximating complex integrals or expectations. These approximations are often noisy and sensitive to hyperparameters, particularly on narrow, expert-level datasets. This paper introduces State-conditioned Action Quantization (SAQ), a method that transforms continuous-action offline RL into a discrete-action problem, enabling exact computation of these critical constraints.

State-conditioned Action Quantization (SAQ)

The core innovation of SAQ is the use of a Vector Quantized-Variational Autoencoder (VQ-VAE) to learn a state-dependent discretization of the action space. Unlike naive discretization, which suffers from the curse of dimensionality as the number of robot joints increases, SAQ identifies a small set of "sensible" actions relevant to the current state.

Overview of the SAQ architecture, showing the VQ-VAE training (left) and the discrete policy inference (right).

The process involves two main components:

  1. The Quantizer: A VQ-VAE is trained where the encoder maps a state-action pair $(s, a)$ to a discrete code $\hat{a}$ from a learned codebook. The decoder then reconstructs the continuous action $\tilde{a}$ based on the code and the state.
  2. State-Conditioning: By conditioning the discretization on the state $s$, the model can effectively "zoom in" on the relevant regions of the action space. This allows for a very small discrete action space (typically 16–128 codes) to represent complex, high-dimensional robot movements without losing precision.

Enabling Exact Offline RL

Once the action space is discretized via SAQ, the approximations typically required in continuous offline RL become exact computations. This shift significantly improves training stability and performance:

  • SAQ-CQL: The sampled log-integral-exp used in continuous CQL is replaced with a precise log-sum-exp over all discrete actions in the codebook.
  • SAQ-IQL: Discretization allows for a closed-form solution for policy extraction, removing the need for complex sampling.
  • SAQ-BRAC: The KL-divergence between the learned policy and the behavior policy can be calculated exactly.

Experimental Evaluation

The researchers evaluated SAQ across two major benchmark suites: D4RL (locomotion, dexterous manipulation) and Robomimic (long-horizon robotic tasks). On the challenging Robomimic tasks, which utilize human demonstrations, SAQ-based versions of IQL and CQL outperformed their continuous counterparts by 2-3x. For instance, in the "Square" task, continuous CQL failed to achieve significant success, while SAQ-CQL reached a success rate of approximately 44%.

Comparison of average return between continuous and discrete (SAQ) CQL, highlighting the stability and performance gains from exact discretization.

Key Insights

  • Stability through Exactness: Performance degradation in continuous offline RL is often a result of inexact constraint enforcement rather than the algorithms themselves. As shown in the training curves, SAQ-CQL maintains a stable average return, whereas continuous versions often diverge or collapse as the estimated penalty becomes inaccurate.
  • The Importance of State-Conditioning: State-agnostic discretization performs poorly because it cannot adapt to the specific action distributions required at different states. Conditioning on $s$ is mandatory for effective quantization.
  • Robustness to Codebook Size: SAQ is remarkably robust to the number of discrete codes used. Whether the codebook contains 16 or 128 entries, the VQ-VAE effectively captures the primary modes of the behavior data.

Conclusion and Future Work

SAQ demonstrates that discretizing the action space in a state-conditioned manner is a powerful technique for overcoming the limitations of continuous offline RL. By enabling exact computation of conservative regularizers, SAQ provides significant gains in both performance and stability, particularly on narrow, expert-level datasets. Future work includes exploring how these learned discretizations can be adapted for online fine-tuning and validating the approach on physical robotic hardware with real-world sensor noise.

Summary updated

BibTeX
@inproceedings{luo2023action,
  author = {Jianlan Luo and Perry Dong and Jeffrey Wu and Aviral Kumar and Xinyang Geng and Sergey Levine},
  title = {{Action-Quantized Offline Reinforcement Learning for Robotic Skill Learning}},
  booktitle = {Conference on Robot Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=n9lew97SAn},
}
Figure