Subprocess-Constrained Markov Decision Processes

Jiarui Gan, Debmalya Mandal

TL;DR

Standard constrained reinforcement learning only guarantees safety from the starting line, which can lead to "unsafe" behavior later in a trajectory. This paper introduces Subprocess-Constrained MDPs (S-CMDPs), which enforce safety constraints after every possible history, and provides a polynomial-time algorithm to find near-optimal, history-dependent policies.

What Problem Does This Paper Address?

In many real-world applications—like autonomous robotics or managing cloud service reliability—it isn't enough to be "safe on average" from the moment you turn the system on.

Traditional Constrained Markov Decision Processes (CMDPs) typically bound the expected cumulative cost over an entire trajectory starting from an initial state. However, this "global" view has a major flaw: a policy could burn through its entire safety budget early on, or average out a high-risk future with a low-risk past. Once a robot enters a crowded room, it doesn't matter if it was safe in the empty hallway; it needs a guarantee that its future risk remains low from its current position.

The authors tackle this by requiring onward feasibility. In an S-CMDP, the expected discounted cost of every "subprocess" (the continuation of the process from any reachable history) must satisfy a state-dependent threshold. This is a much stricter requirement that ensures the agent remains reliable no matter what path it took to get to its current state.

Methods

The shift from global to subprocess constraints fundamentally changes the math. In standard MDPs, stationary policies (which decide what to do based only on the current state) are usually optimal. The authors prove that for S-CMDPs, stationary policies are not only suboptimal but also NP-hard to optimize, even approximately.

To solve this, they embrace history-dependent policies and introduce a framework called Value-Set Iteration (VSI):

  1. Achievable Value Sets: Instead of tracking a single "value" for a state, the algorithm tracks a set of all possible (reward, cost) pairs that can be achieved from that state while remaining feasible.
  2. Set-Valued Dynamic Programming: They define a monotone operator that updates these sets. Unlike standard value iteration, this isn't a simple contraction mapping; instead, they rely on Tarski’s fixed-point theorem to guarantee convergence to the "greatest" fixed point (the largest set of feasible values).
  3. Bicriteria Approximation: To make the computation tractable, they discretize the two-dimensional value space (reward and cost) using a grid. This allows them to compute an $(\epsilon, \delta)$-optimal policy—one that is within $\epsilon$ of the optimal reward and violates cost constraints by at most $\delta$.
  4. Implicit Policy Representation: Because a history-dependent policy is too large to store explicitly (it grows exponentially with time), the algorithm represents it implicitly. For any given history, the agent solves a small Linear Program (LP) on-the-fly to determine the correct action distribution.

Datasets

This is primarily a theoretical paper focused on algorithmic foundations. The authors evaluate their implementation on synthetic MDP environments (e.g., a 4-state, 5-action instance) to visualize how the value sets evolve and how the policy trajectory stays within the safety bounds. They provide open-source code for these experiments on GitHub.

Key Insights and Ideas

  • The "History" Advantage: Counter-intuitively, allowing the policy to depend on history makes the problem easier to solve efficiently. History acts as a "memory" of the remaining budget, allowing the agent to adjust its behavior to stay safe.
  • Computational Separation: The paper establishes a clear boundary: finding the best stationary policy is NP-hard, but finding a near-optimal history-dependent policy is solvable in polynomial time.
  • Value Sets as Sufficient Statistics: The "target value" (the specific reward/cost pair the agent is currently aiming for) serves as a fixed-dimensional summary of the entire history, making the execution of complex policies practical.

Key Results

  • Hardness Proof: The authors provide a reduction from the GAP 3-SAT problem to prove the NP-hardness of optimizing stationary policies in S-CMDPs.
  • Tractability: They prove that their VSI-based algorithm runs in time polynomial to the input size, $1/\epsilon$, and $1/\delta$.
  • Practical Implementation: By using Mixed-Integer Linear Programming (MILP) for "vertex discovery" in the value sets, they created a practical version of the algorithm that avoids exhaustively checking every point on the grid.

Limitations and Future Work

  • The Curse of Dimensionality: The current approach works well for a single cost constraint (mapping to $\mathbb{R}^2$). If a system has $d$ different cost constraints (e.g., battery, heat, and collision risk), the grid-based discretization will scale exponentially with $d$.
  • Model-Based Requirement: The algorithm currently requires a known transition model ($p$) and reward/cost functions. Moving this to a model-free Reinforcement Learning setting where the agent learns from experience is a significant next step.
  • Scalability: While polynomial, the constant factors in set-valued iteration can be high. Future work could explore using neural networks to approximate these value sets, similar to how Deep Q-Learning approximates value functions.

Summary updated

Abstract

Constrained Markov decision processes (CMDPs) typically bound expected cumulative cost from an initial state. Such a guarantee can be insufficient when a policy must remain feasible after every history it may encounter. We introduce \emph{subprocess-constrained MDPs} (S-CMDPs), which require the expected discounted cost of each continuation, conditional on any reachable history, to satisfy a bound determined by the current state. This stronger requirement changes the structure and complexity of the problem: we show that stationary policies can be strictly suboptimal, and finding even an approximately optimal stationary policy is NP-hard. We adapt a recently introduced value-set iteration framework to show that history-dependent policies surprisingly overcome both obstacles. Our polynomial-time algorithm represents such a policy implicitly: its expected reward is within $ε$ of the optimal feasible value, it violates each subprocess cost bound by at most $δ$, and its action distribution can be computed in polynomial time for any given history.
BibTeX
@inproceedings{gan2026subprocess,
  author = {Jiarui Gan and Debmalya Mandal},
  title = {{Subprocess-Constrained Markov Decision Processes}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=bo3SFyQXGi},
}
Figure