Single-Trajectory Distributionally Robust Reinforcement Learning

Zhipeng Liang, Xiaoteng Ma, Jose H. Blanchet, Jiheng Zhang, Zhengyuan Zhou · DOI

TL;DR

This paper introduces DRQ, a novel model-free Reinforcement Learning algorithm that learns robust policies from a single trajectory, even when the environment's dynamics shift. This is a significant step towards applying RL in real-world scenarios where training and testing conditions can differ, outperforming existing methods in robustness and sample efficiency.

What Problem Does This Paper Address?

Traditional Reinforcement Learning (RL) algorithms often assume that the environment encountered during testing is identical to the one used for training. This assumption is frequently violated in real-world applications, leading to a significant drop in performance. Distributionally Robust Reinforcement Learning (DRRL) aims to address this by optimizing for the worst-case performance across a set of possible environment distributions. However, existing DRRL methods are often model-based, requiring extensive knowledge of the environment's dynamics or access to simulators for repeated sampling. This makes them impractical for scenarios with complex dynamics or limited data. This paper tackles the challenge of developing a DRRL algorithm that can learn a robust policy from a single, non-repeating trajectory, a much more realistic data collection scenario.

Methods

The core contribution is the Distributionally Robust Q-learning with Single Trajectory (DRQ) algorithm. It builds upon the Q-learning framework but incorporates distributionally robust optimization. Key innovations include:

  • Cressie-Read Family of f-divergences: The algorithm uses a generalized framework for defining the ambiguity set of environment distributions, encompassing common divergences like KL and $\chi^2$. This allows for flexible control over the level of robustness.
  • Dual Reformulation: To handle the inherent nonlinearity of the robust optimization problem, the authors leverage a dual reformulation, which simplifies the optimization objective.
  • Three-Timescale Framework: A novel three-timescale stochastic approximation scheme is introduced. This framework allows for efficient updates of the Q-function, the dual variable (which captures robustness), and intermediate estimators, all while learning from a single trajectory. This is crucial for handling the complex, bi-level optimization nature of DRRL.
  • Model-Free Approach: Unlike many prior DRRL methods, DRQ does not require explicit modeling of the environment's transition dynamics. It learns directly from observed transitions.

Datasets

The paper evaluates its approach on simulated environments:

  • Cliffwalking: A standard benchmark for robust RL, used to visualize policy behavior under different robustness levels.
  • American Put Option Problem: A financial market simulation used to demonstrate robustness in a different domain.
  • CartPole and LunarLander: Classic OpenAI Gym environments used to test the practical implementation (DDRQ) of the algorithm against other deep RL methods.

No new benchmarks were introduced; existing ones were used to demonstrate the algorithm's performance.

Key Insights and Ideas

  • Single-Trajectory Robustness is Achievable: The paper demonstrates that it's possible to learn robust policies from a single trajectory, overcoming a major limitation of previous DRRL methods. This significantly broadens the applicability of DRRL.
  • The Power of the Three-Timescale Framework: The multi-timescale approach is critical for efficiently learning the complex, coupled objectives of the Q-function and the robustness parameter from limited data. It allows for prioritizing updates to different components of the learning process.
  • Cressie-Read Divergence Unifies Robustness: Using the Cressie-Read family of divergences provides a unified way to define and control robustness, bridging the gap between different types of ambiguity sets and offering more flexibility.
  • Robust Policies Can Outperform Non-Robust Ones Even in Nominal Conditions: Interestingly, the experiments suggest that robust policies can sometimes achieve better or comparable performance even in the nominal (non-perturbed) environment, indicating that robustness doesn't always come at a significant cost.

Key Results

  • Superior Robustness: DRQ consistently outperforms non-robust Q-learning and other robust RL baselines (like R-contamination methods) in perturbed environments across various tasks. For instance, in Cliffwalking, robust policies were shown to avoid hazards more effectively.
  • Sample Efficiency: The algorithm demonstrates competitive or superior sample efficiency compared to existing model-free and model-based DRRL methods, particularly outperforming multi-level Monte Carlo approaches. For example, in the American option problem, DRQ converges to the true DR value with significantly fewer samples than Liu's algorithm.
  • Practicality: The Deep Distributionally Robust Q-learning (DDRQ) implementation on CartPole and LunarLander shows that the algorithm can be effectively applied to more complex, deep RL tasks, maintaining robustness under action and environment perturbations.

Limitations and Future Work

  • Theoretical Guarantees for Deep RL: While asymptotic convergence is proven for the tabular case, extending these guarantees to the deep learning version (DDRQ) with function approximation remains an open challenge.
  • Hyperparameter Sensitivity: Like many RL algorithms, DRQ's performance can be sensitive to hyperparameter choices, particularly the learning rates for the three timescales and the robustness radius $\rho$.
  • Computational Cost: While more sample-efficient than some alternatives, the three-timescale framework and the optimization of the dual variable can still introduce computational overhead compared to standard Q-learning.
  • Future Work: The authors suggest exploring more advanced approximation schemes for the dual variable and investigating the algorithm's performance in more complex, real-world robotic control tasks. Further research into the theoretical underpinnings of deep DRRL is also warranted.

Summary updated

BibTeX
@inproceedings{liang2024single,
  author = {Zhipeng Liang and Xiaoteng Ma and Jose H. Blanchet and Jiheng Zhang and Zhengyuan Zhou},
  title = {{Single-Trajectory Distributionally Robust Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=3B6vmW2L80},
}
Figure