Introduction
Reinforcement Learning (RL) has traditionally focused on maximizing a cumulative reward signal. However, as RL moves into real-world applications such as autonomous driving, robotics, and power grid management, the objective of reward maximization must be balanced against safety and operational constraints. These scenarios are formally modeled as Constrained Markov Decision Processes (CMDPs).
While theoretical research into CMDPs has grown, a significant gap remains between theory and practice. Most existing algorithms with provable guarantees rely on "batch-style" learning, which requires frequent environment resets to obtain independent and identically distributed (i.i.d.) samples. In contrast, real-world agents often learn "online" from a single, continuous trajectory. This paper provides the first finite-time global convergence analysis for an online primal-dual natural actor-critic algorithm, establishing a theoretical foundation for safe RL in continuous-stream data settings.
The Challenge of Online Learning in CMDPs
Analyzing online algorithms for CMDPs is significantly more complex than analyzing their batch counterparts. In a batch setting, the agent can be reset to a starting state to explore different policy branches. In an online setting, the agent generates a single trajectory where the data distribution is non-stationary—it changes as the policy evolves.
Furthermore, the algorithm must simultaneously manage three coupled processes:
- The Critic: Estimating the value functions for both rewards and constraints.
- The Actor: Updating the policy to improve performance while staying safe.
- The Dual Variable: Adjusting the penalty weight for constraint violations.
These components are tightly intertwined; an error in the critic's estimation affects the actor's gradient, which in turn affects the dual variable's penalty calculation. Accounting for the "mixing time" of the underlying Markov chain—the time it takes for the state distribution to stabilize—is essential for a rigorous finite-time analysis.
The Online Primal-Dual Natural Actor-Critic Algorithm
The authors investigate an algorithm that combines a Lagrangian framework with natural gradient updates. The core components include:
1. Primal-Dual Framework
The algorithm transforms the constrained optimization problem into an unconstrained minimax problem using a Lagrangian function. The dual variable acts as a dynamic safety penalty: if the agent violates a constraint, the dual variable increases, forcing the actor to prioritize safety in subsequent updates.
2. Natural Actor-Critic
The "actor" utilizes natural gradients rather than standard policy gradients. Natural gradients are generally more stable and efficient for policy optimization as they account for the geometry of the policy space. Simultaneously, the "critic" maintains estimates of the Q-functions for both the objective reward and the safety constraints.
3. Multi-Time-Scale Updates
To ensure stability amidst the coupled dynamics, the algorithm employs a multi-time-scale update rule. The components are updated at different speeds (step sizes):
- Fastest: The Critic (to ensure value estimates are as accurate as possible).
- Intermediate: The Actor (to update the policy based on the critic's feedback).
- Slowest: The Dual Variable (to provide a stable penalty signal).
4. Exploration Strategy
To ensure the agent learns the boundaries of the safety constraints, the algorithm incorporates $\epsilon$-exploration. By following a behavior policy that occasionally takes random actions, the agent ensures sufficient coverage of the state-action space, which is critical for identifying and avoiding unsafe regions.
Theoretical Results and Convergence
The primary contribution of this work is the proof of a finite-time global convergence rate. The authors demonstrate that both the optimality gap (the difference between the agent's reward and the theoretical maximum) and the constraint violation converge to zero at a rate of $\mathcal{O}(K^{-1/6})$, where $K$ is the number of iterations.
This result highlights the "cost of online learning." While batch algorithms often achieve a convergence rate of $\mathcal{O}(K^{-1/2})$, the slower $\mathcal{O}(K^{-1/6})$ rate is the theoretical price paid for learning from a single, non-stationary trajectory without the luxury of environment resets. To achieve a precision of $\delta$, the algorithm requires a sample complexity of $\mathcal{O}(1/\delta^6)$.
Despite the non-concavity of CMDP objectives and the non-convexity of constraint sets, the authors leverage the fact that the duality gap for CMDPs is zero. This property allows their local, gradient-based method to eventually reach a global optimum.
Experimental Validation
The algorithm was validated using a custom GridWorld environment. In this setup, an agent must navigate from a starting point to a goal while avoiding "unsafe" bridges. The agent is not told where the bridges are initially; it must learn the utility functions that penalize crossing them through experience.
In simulations, the online algorithm successfully identified the optimal safe path. When compared to a batch version of the same algorithm, the online version required more iterations to reach the same level of performance. However, the online version was significantly more sample-efficient in terms of total environment interactions, as it did not require the thousands of resets necessary for the batch approach to function.
Conclusion and Future Work
This paper provides a critical theoretical bridge between safety-constrained RL and practical, single-trajectory data collection. By proving a finite-time convergence rate of $\mathcal{O}(K^{-1/6})$, the authors offer a guarantee that online primal-dual natural actor-critic algorithms will eventually find safe, optimal policies.
However, several avenues for future research remain. The current analysis is limited to the tabular setting, where the state and action spaces are small and discrete. Extending this finite-time analysis to high-dimensional environments using linear function approximation or deep neural networks is a necessary next step. Additionally, investigating whether the $\mathcal{O}(K^{-1/6})$ rate can be improved toward $\mathcal{O}(K^{-1/2})$ remains an open theoretical challenge.
Summary updated