Robust Peak-cost Constrained Reinforcement Learning

Shilpa Mukhopadhyay, Sourav Ganguly, Santosh Mohan Rajkumar, Honghao Wei, Debdipta Goswami, Arnob GhosharXiv 2026

TL;DR

Standard safe reinforcement learning minimizes average accumulated cost, which can allow dangerous, catastrophic spikes in cost. This paper introduces Robust Peak-cost Constrained Reinforcement Learning (RP-CRL) to strictly bound the absolute maximum cost along a trajectory, even under transition dynamics uncertainty. The authors prove that peak-cost constraints break the zero-duality-gap guarantees of standard safe RL, and they overcome this by developing a novel surrogate optimization framework with robust value estimation.

What Problem Does This Paper Address?

Most safe reinforcement learning (RL) relies on the Constrained Markov Decision Process (CMDP) framework. In a standard CMDP, safety is enforced by ensuring that the expected cumulative cost stays below a certain threshold. However, in safety-critical applications like autonomous driving or robotics, a single large safety violation can be catastrophic. An agent that behaves safely on average but occasionally experiences a massive failure is unacceptable.

To address this, we need to constrain the peak cost—the maximum cost incurred at any single timestep along a trajectory. While prior work has applied Lagrangian (primal-dual) methods to peak-cost constraints, it remained unknown whether these problems actually exhibit strong duality. Furthermore, existing methods assume perfect knowledge of the environment's dynamics. When a policy trained in a simulator encounters real-world mismatches (the sim-to-real gap), its peak-cost guarantees can completely fall apart.

This paper addresses two major gaps:

  1. Theoretical: Does a peak-cost constrained MDP admit a zero duality gap?
  2. Practical: How do we design an algorithm that guarantees peak-cost safety under model uncertainty?

Methods

The authors first analyze the mathematical structure of peak-cost constraints. They prove via a simple two-state MDP counterexample that peak-cost constraints make the optimization problem non-convex with respect to the state-action occupancy measure. As a result, the problem suffers from a strict duality gap, meaning standard Lagrangian primal-dual methods are not guaranteed to find the true optimal policy.

To bypass this limitation, the authors introduce a surrogate optimization framework. Instead of a standard Lagrangian, they propose a minimax surrogate objective:

$$\min_\pi \max \left\{ \frac{\max_P J_r^{\pi,P}}{\beta}, \left( \max_{P,s} V_{c,\text{peak}}^{\pi,P}(s) - b \right) \right\}$$

Here, $\beta$ is a hyperparameter that balances reward and safety. When the policy violates the safety budget $b$, the objective forces the algorithm to focus entirely on minimizing the peak cost. They mathematically prove that if $\beta$ is chosen large enough, the optimal solution to this surrogate problem achieves the same reward as the original problem while limiting constraint violation to at most a small $\epsilon$.

To handle the sim-to-real gap, they define a rectangular uncertainty set around the transition dynamics using Integral Probability Metrics (IPM). Under linear function approximation, this formulation yields a robust Bellman operator with an elegant $L_2$-regularization term ($\rho \|w\|_2$) that penalizes model uncertainty. They implement this framework into a practical actor-critic algorithm called RP-CRL, utilizing Proximal Policy Optimization (PPO) for the policy updates.

Datasets

The authors evaluated their approach on two main simulation setups:

  • Constrained CartPole: A modified version of the classic OpenAI Gym environment featuring continuous actions. The safety constraint requires the cart to stay within a safe zone ($|x| \le 1.0$). To simulate transition uncertainty, gravity is perturbed during training and inference ($g' = g + \mathcal{N}(0, \sigma)$).
  • MuJoCo Benchmarks: Four continuous control environments—Ant, HalfCheetah, Humanoid, and Swimmer. Costs are defined based on exceeding action torque thresholds or energy consumption limits. Environmental dynamics are perturbed using gravity variations (up to 2.0) or viscosity variations.

Key Insights and Ideas

  • The Death of Convexity: The most surprising theoretical finding is that changing the constraint from an accumulated sum to a trajectory-wise maximum completely destroys the nice convex structure that safe RL relies on. Because the feasible set becomes non-linear and non-standard, the dual problem can be strictly loose.
  • Surrogate over Dual: Since primal-dual methods are fundamentally broken for peak-cost objectives, direct policy-space optimization via a minimax surrogate is a much more robust alternative, providing provable $\epsilon$-safety guarantees.
  • Robustness Stabilizes Training: Incorporating IPM-based robust regularization doesn't just bridge the sim-to-real gap during deployment; it also acts as a regularizer that smoothens training curves and reduces variance across different seeds.

Key Results

  • CartPole Performance: In environments with perturbed gravity, the proposed RP-CRL method successfully keeps the peak cost below the baseline budget, eventually achieving a peak cost of zero during inference. In contrast, standard Primal-Dual (PD) methods fail to adapt and consistently violate the safety threshold.
Fig. 1: Comparison of Primal Dual(PD) and Surrogate Ob- jective trained in non-perturbed environment, and RP-CRL trained in perturbed CartPole environment. Here we want to maximize return while restrict peak-cost below baseline. RP- CRL has learned peak-cost constraint and has higher rewards than PD.
  • MuJoCo Generalization: Across all four MuJoCo environments, RP-CRL achieves smoother learning curves with lower variance than non-robust baselines. Under severe test-time perturbations, RP-CRL maintains persistent safety and delivers higher rewards, demonstrating excellent safety generalization.
Training and inference performance across MuJoCo environments

Limitations and Future Work

While the surrogate framework provides strong practical performance and safety bounds, the formal convergence rate guarantees for the robust natural policy gradient are currently limited to finite state-spaces. Extending these formal convergence proofs to continuous deep RL settings (like the PPO implementation used in the experiments) remains an open challenge. Additionally, the authors note that validating this framework on physical, high-dimensional real-world robotic systems is an important next step.

Summary updated

BibTeX
@misc{mukhopadhyay2026robust,
  author = {Shilpa Mukhopadhyay and Sourav Ganguly and Santosh Mohan Rajkumar and Honghao Wei and Debdipta Goswami and Arnob Ghosh},
  title = {{Robust Peak-cost Constrained Reinforcement Learning}},
  year = {2026},
  eprint = {2607.15457},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.15457},
}
Figure