Distributionally Robust Constrained Reinforcement Learning under Strong Duality

Zhengfei Zhang, Kishan Panaganti, Laixi Shi, Yanan Sui, Adam Wierman, Yisong Yue

Training agents that are simultaneously safe (constrained) and reliable under environmental uncertainty (distributionally robust) is a critical frontier in reliable AI. This research, presented at the Reinforcement Learning Conference (RLC) 2024, introduces the first algorithmic framework for Distributionally Robust Constrained Reinforcement Learning (DRC-RL) with end-to-end convergence guarantees.

The Challenge: Constraints and Distribution Shifts

In real-world applications, reinforcement learning (RL) agents must navigate two primary hurdles:

  1. Constraints: Policies must adhere to safety requirements or budget limits (e.g., collision avoidance in robotics).
  2. Distribution Shifts: The test environment often differs from the training simulator due to modeling inaccuracies or dynamic conditions.

While progress has been made in Constrained RL (C-RL) and Distributionally Robust RL (DR-RL) independently, their combination—DRC-RL—is mathematically complex. A significant unknown was whether "strong duality" holds for this joint problem. Strong duality is essential for designing efficient algorithms, as it allows complex optimization problems to be solved via their dual versions.

Theoretical Framework and the "Greedy" Impossibility

The authors develop a systematic framework based on the proof that Strong Duality holds when considering "mixed policies" (probabilistic combinations of deterministic policies). They frame DRC-RL as a two-player primal-dual game where a policy player maximizes a Lagrangian function while a multiplier player adjusts penalties for constraint violations.

A key theoretical contribution is a negative result: for general uncertainty sets, there is no "greedy" operator capable of solving the policy improvement step. This implies that standard approaches like Q-learning or Policy Iteration, which rely on selecting the best action according to a current value function, are insufficient for DRC-RL.

The R-Contamination Solution

For a specific class of uncertainty known as R-contamination—where the environment may transition to a "fail-state" with some probability—the authors demonstrate a practical simplification. In this setting, robustness is mathematically equivalent to shortening the effective planning horizon (reducing the discount factor $\gamma$). By planning for a shorter horizon, the agent reduces its reliance on long-term transitions that may be modeled inaccurately.

Empirical Evaluation

The framework was evaluated using the Car Racing benchmark. Agents were tasked with traversing a track quickly while satisfying two constraints: "Slow driving" (requiring specific braking actions) and "Edge driving" (staying near the lane center). Robustness was tested by introducing environmental shifts during testing, such as variations in engine power, vehicle inertia, braking magnitude, and steering sensitivity.

Constraint satisfaction and performance under environmental shifts in the Car Racing benchmark.

As shown in the experimental results, the proposed robust algorithm significantly outperformed non-robust baselines. While the baseline frequently violated safety constraints when environmental parameters (like steering sensitivity) shifted, the proposed method maintained constraint satisfaction and stable performance.

Key Insights and Future Directions

  • Antagonistic Synergy: Constraints and distributional robustness are inherently antagonistic to standard RL solvers. Robustness cannot simply be "bolted on" to existing constrained algorithms without addressing the breakdown of standard greedy updates.
  • Robustness as Short-sightedness: The R-contamination instantiation provides an efficient path forward by leveraging modified versions of standard tools like Fitted Q-Iteration (FQI).
  • Foundational Theory: By proving strong duality for mixed policies, this work provides a rigorous foundation for future DRC-RL research, moving beyond heuristic-based safety methods.

Future work remains to address more complex uncertainty sets (e.g., KL-divergence or Wasserstein distance) and to develop computationally tractable "non-greedy" policy improvement operators for high-dimensional environments using neural network function approximation.

Summary updated

Abstract

We study the problem of Distributionally Robust Constrained RL (DRC-RL), where the goal is to maximize the expected reward subject to environmental distribution shifts and constraints. This setting captures situations where training and testing environments differ, and policies must satisfy constraints motivated by safety or limited budgets. Despite significant progress toward algorithm design for the separate problems of distributionally robust RL and constrained RL, there do not yet exist algorithms with end-to-end convergence guarantees for DRC-RL. We develop an algorithmic framework based on strong duality that enables the first efficient and provable solution in a class of environmental uncertainties. Further, our framework exposes an inherent structure of DRC-RL that arises from the combination of distributional robustness and constraints, which prevents a popular class of iterative methods from tractably solving DRC-RL, despite such frameworks being applicable for each of distributionally robust RL and constrained RL individually. Finally, we conduct experiments on a car racing benchmark to evaluate the effectiveness of the proposed algorithm.
BibTeX
@inproceedings{zhang2024distributionally,
  author = {Zhengfei Zhang and Kishan Panaganti and Laixi Shi and Yanan Sui and Adam Wierman and Yisong Yue},
  title = {{Distributionally Robust Constrained Reinforcement Learning under Strong Duality}},
  booktitle = {RLC},
  year = {2024},
  url = {https://openreview.net/forum?id=f0mWjxSKUO},
}
Figure