Primal-Dual Representation Learning for Low-Rank Constrained MDPs

Chenhao Zhou, Chao Zhang, Wensong Bai, Hanbin Zhao, Hui Qian

TL;DR

This paper introduces the first theoretically grounded framework for representation learning in Constrained Markov Decision Processes (CMDPs) with unknown low-rank structures. By integrating maximum-likelihood feature learning with primal-dual optimization, the authors provide algorithms that achieve optimal regret and safety violation bounds in continuous-state environments without requiring prior knowledge of transition features.

What Problem Does This Paper Address?

Reinforcement Learning (RL) in safety-critical domains—like robotics or autonomous driving—is often modeled using Constrained MDPs (CMDPs), where an agent must maximize rewards while satisfying safety constraints (e.g., "don't collide").

While we have efficient algorithms for CMDPs with a small number of states (tabular) or those where transitions are linear combinations of known features, real-world continuous-state environments rarely provide these features for free. Representation learning aims to discover these latent features from raw data. However, doing this in a constrained setting is notoriously difficult: errors in the learned representation don't just lead to lower rewards; they can lead to catastrophic safety violations. Existing work either assumes the features are known or focuses only on unconstrained settings, leaving a significant gap in provably safe representation learning.

Methods

The authors propose two primary algorithms tailored to different safety requirements:

  1. REP-PD-TEG (for Soft Violations): This algorithm targets "soft" cumulative violations, where safety is measured by the total shortfall across all training episodes. It uses a Tertiary decaying-$\epsilon$-greedy (TEG) probing strategy to explore the environment. It learns transition features using a Maximum Likelihood Estimation (MLE) oracle and constructs uncertainty bonuses (Mahalanobis norms) to guide exploration. Planning is performed using an optimistic Lagrangian objective that balances reward, safety, and exploration.
  2. REP-PD-H-TEG (for Hard Violations): This version handles "hard" violations, where safety must be certified episode-by-episode. It introduces a lower-confidence utility certificate—a pessimistic estimate of safety—to ensure a policy is likely safe before it is ever executed. It also employs a stabilized dual search to find the optimal balance between reward and safety.

A key technical contribution is the merged-covariance uncertainty bonus, which allows the algorithms to rigorously account for uncertainty across different data-collection streams (primary, secondary, and tertiary probes).

Datasets

The paper evaluates the proposed methods on two fronts:

  • Simulated Job Scheduling: A toy discrete-state environment used to visualize how learned representations and primal-dual updates interact.
  • Safety Gym: A standard benchmark for safe RL featuring complex continuous state-action spaces. The authors implemented a neural network variant, REP-PD-NN, and tested it on tasks like PointGoal1, PointPush1, and PointPush2.

Key Insights and Ideas

  • The Probing Trade-off: There is a fundamental tension between exploring to learn a good representation (which requires taking diverse, potentially unsafe actions) and staying safe. The authors show that a decaying-$\epsilon$ schedule can balance this, eventually converging to an optimal "return policy" while controlling the "execution policy" cost.
  • Representation Error vs. Safety: The authors prove that representation learning error affects reward optimization and constraint evaluation symmetrically. By bounding this error through MLE, they can provide the first joint guarantees for both.
  • Tertiary Probing is Necessary: A major "aha moment" in the appendix (Proposition D.1) reveals that simple two-level exploration isn't enough to guarantee optimism in low-rank CMDPs. The "Tertiary" probe in their TEG strategy is a specific technical fix required to close the theoretical gap.

Key Results

The paper provides strong theoretical guarantees, summarized in the provided tables:

  • Optimal Rates: For soft constraints, REP-PD-TEG achieves the optimal $\widetilde{O}(\sqrt{K})$ regret and violation bounds for the final return policy.
  • Execution Efficiency: When accounting for the cost of exploration actions, the algorithms achieve a sample complexity of $\widetilde{O}(K^{3/4})$ for soft violations and $\widetilde{O}(K^{7/8})$ for hard violations.
Table 1: Comparison of soft-violation bounds. The two REP-PD-TEG rows report the complexity of the best return policy specialization and the best execution policy specialization, respectively.
Table 2: Comparison of hard-violation bounds. The two REP-PD-H-TEG rows report the complexity of the best return policy specialization and the balanced execution policy specialization, respectively.
  • Empirical Gains: In Safety Gym experiments, the representation-learning variant (REP-PD-NN) significantly outperformed a "raw-state" baseline, achieving higher returns with lower safety costs, demonstrating that learning the underlying structure is beneficial even in complex neural RL settings.

Limitations and Future Work

  • Realizability: The theory assumes "finite realizability"—that the true environment dynamics actually lie within the chosen function class.
  • Computational Complexity: The theoretical algorithms require exact MLE and exact planning, which are often computationally intractable. While the neural variant (REP-PD-NN) works well in practice, bridging the gap between the practical heuristic and the formal theory remains an open challenge.
  • Single Constraint: While the method can be extended to multiple constraints, the current analysis focuses on a single safety requirement for simplicity.

Summary updated

Abstract

Representation learning has substantially improved the efficiency of unconstrained continuous-state Markov Decision Processes (MDPs), but its extension to Constrained MDPs (CMDPs) is difficult because the transition representation must be learned while constraint violation is controlled. In this paper, we study representation learning for low-rank CMDPs with continuous state spaces, and propose REP-PD-TEG for the soft cumulative-violation setting. In the feature learning period, the algorithm interacts with the environment using a decaying-$ε$-greedy mixture execution policy, and uses the collected samples to learn transition features by maximum likelihood. Based on the learned features, it constructs uncertainty bonuses and plans with an optimistic Lagrangian objective to obtain the return policy. We prove regret and soft-violation guarantees for the return policies, and quantify the influence of the decaying-$ε$-greedy exploration. In particular, REP-PD-TEG achieves the optimal $\widetilde O(\sqrt K)$ return policy bound, and gives a $\widetilde O(K^{3/4})$ overall sample bound when exploratory actions are charged. For the stricter hard cumulative violation, where feasibility must be verified episode by episode, we propose REP-PD-H-TEG. It plans under a bonus-corrected lower-confidence utility certificate with the learned representation, and performs a stabilized dual search to obtain the return policy, yielding regret and hard-violation bounds. Together, these results give the first theoretically guaranteed representation-learning method for low-rank continuous-state CMDPs with both soft cumulative guarantees and certified hard-violation control.
BibTeX
@inproceedings{zhou2026primal,
  author = {Chenhao Zhou and Chao Zhang and Wensong Bai and Hanbin Zhao and Hui Qian},
  title = {{Primal-Dual Representation Learning for Low-Rank Constrained MDPs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=ZKslJI2cOt},
}
Figure