A Sample-Efficient Algorithm for Episodic Finite-Horizon MDP with Constraints

Krishna Chaitanya Kalagarla, Rahul Jain, Pierluigi Nuzzo

TL;DR

Researchers from USC have developed UC-CFH, one of the first online algorithms for constrained reinforcement learning that provides provable "Probably Approximately Correct" (PAC) guarantees. By leveraging an optimistic linear programming approach, the algorithm ensures that an agent can learn to minimize costs while strictly respecting safety or resource constraints, even when the environment's transition dynamics are initially unknown.

What Problem Does This Paper Address?

In standard Markov Decision Processes (MDPs), an agent aims to maximize a single reward signal. However, real-world applications—like autonomous driving or clinical trials—often involve multiple conflicting objectives. For instance, a self-driving car must reach its destination quickly (cost minimization) while staying within safety and fuel consumption limits (constraints). These are modeled as Constrained MDPs (CMDPs).

The challenge lies in online learning: the agent doesn't know the environment's transition probabilities beforehand. It must explore to learn the model while simultaneously trying to satisfy constraints. Previous research often focused on "regret" (how much total cost is lost during learning), but few provided "sample complexity" or PAC guarantees—specifically, a bound on how many episodes it takes before the agent starts playing a near-optimal, constraint-satisfying policy with high probability.

Methods

The authors introduce the Upper-Confidence Constrained Fixed-Horizon (UC-CFH) algorithm. It operates on the principle of Optimism in the Face of Uncertainty.

  1. Confidence Sets: The algorithm maintains estimates of transition probabilities and builds "confidence sets" (statistically plausible models) based on how often it has visited specific state-action pairs. It uses the empirical Bernstein inequality to create tighter bounds than standard methods.
  2. Optimistic Planning via LP: Unlike standard MDPs, CMDPs cannot be solved using simple Bellman equations because constraints couple decisions across time. The authors formulate the planning step as an Extended Linear Program (LP) using occupancy measures (the expected number of visits to a state-action pair). The LP searches for the "best-case" transition model and policy within the confidence set that satisfies the constraints.
  3. Phase-based Execution: The agent executes the optimistic policy until it gains enough new information about a state-action pair to significantly improve its model, at which point it enters a new phase and re-plans.

Datasets

This is a theoretical paper focused on proving mathematical guarantees for a new algorithm. Consequently, no empirical datasets or benchmarks were used for evaluation. The results are validated through rigorous mathematical proofs of sample complexity.

Key Insights and Ideas

  • Occupancy Measures as a Bridge: The use of occupancy measures allows the authors to transform a complex, constrained reinforcement learning problem into a solvable linear program. This bypasses the issues where standard dynamic programming fails in the presence of global constraints.
  • Quadratic Horizon Dependence: A major contribution is achieving a sample complexity that scales quadratically ($H^2$) with the time horizon. Previous regret-based formulations often resulted in cubic ($H^3$) dependencies when converted to PAC bounds.
  • Successor State Efficiency: The algorithm's complexity depends on $C$, the maximum number of possible successor states for any state-action pair. In many real-world environments, $C$ is much smaller than the total state space size ($|S|$), making the algorithm significantly more efficient in sparse environments.
  • Handling Unknown Transitions: While some prior work assumed known transitions but unknown costs, this paper tackles the harder problem of unknown transition dynamics, which is the primary bottleneck in RL exploration.

Key Results

The authors prove that with probability at least $1 - \delta$, the number of episodes in which the agent follows a policy that is not $\epsilon$-optimal (either in cost or constraint violation) is at most: $$\tilde{O}\left(\frac{|S||A|C^2H^2}{\epsilon^2} \log_2 \frac{1}{\delta}\right)$$

  • $|S|, |A|$: The bound scales linearly with the number of states and actions.
  • $H^2$: It scales quadratically with the episode length.
  • $C^2$: It scales quadratically with the number of possible next states.
  • $\epsilon^{-2}$: Standard PAC scaling for convergence.

This result establishes that UC-CFH is sample-efficient, meaning the amount of data required to learn a safe, optimal policy grows polynomially with the complexity of the environment.

Limitations and Future Work

  • Known Cost Functions: The current analysis assumes cost functions are known to the agent, though the authors note that extending this to unknown costs is straightforward using optimistic lower bounds.
  • Tabular Setting: The algorithm is designed for discrete (tabular) state and action spaces. Scaling these PAC guarantees to continuous spaces (using function approximation like neural networks) remains a significant open challenge.
  • Stationary Transitions: While the algorithm can handle time-dependent planning, the underlying theory assumes the true environment has stationary transitions.
  • Future Directions: The authors suggest exploring more complex constraint types, such as "chance constraints" (e.g., "the probability of a crash must be less than 0.1%") or risk-sensitive objectives, and extending the work to infinite-horizon settings.

Summary updated

BibTeX
@inproceedings{kalagarla2021sample,
  author = {Krishna Chaitanya Kalagarla and Rahul Jain and Pierluigi Nuzzo},
  title = {{A Sample-Efficient Algorithm for Episodic Finite-Horizon MDP with Constraints}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i9.16979},
}
Figure