potentialpaper

Constrained MDPs with Trajectory Constraints

Martino Bernasconi, Matteo Castiglioni, Alberto Marchesi

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. We introduce a framework that models constrained MDPs subject to trajectory-wise safety constraints. These constraints require that expected future costs remain below zero conditioned to any possible trajectory---not merely in expectation from the initial state. This captures stronger and more realistic safety guarantees, which are crucial in high-stakes applications. We characterize the structure of optimal policies, and show that Markovian policies are in general suboptimal. Moreover, we show that computing approximately-safe optimal policies is NP-hard when the number of constraints can be arbitrarily large. Despite all these challenges, we provide an exact algorithmic characterization of optimal history-dependent (non-Markovian) policies, by exploiting a suitable recursive formulation of the sets of reachable reward-cost values. Then, we employ it to design a polynomial-time approximation algorithm that computes approximately-safe optimal policies by dynamic programming, when assuming a constant number of constraints.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
4 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]PDF[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:44 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

Summary: This paper considers a constrained MDP setup with a trajectory-wise safety constraint that ensures that the constraint is satisfied for every state and for every step of the episodes rather than satisfying the constraint only from the beginning to the end of the trajectory. The paper argues that it is a much stronger safety requirement compared to traditional CMDP. The paper then develops an algorithm to find policies that satisfy the trajectory-wise constraints.

Strengths:

  1. The reviewers agreed upon the technical contributions of the paper. In particular, they appreciate the result that the Markovian policy on the original state space can be suboptimal, and one needs a history-dependent policy.

  2. The reviewers also found that the NP-hardness result when the number of constraints is arbitrarily large is quite useful.

  3. The proposed algorithm is shown to have a reward and a safety guarantee.

Weaknesses:

  1. The reviewer 8rjv has pointed out the SauteRL paper, and the reviewer 1YVM also found that Mcmahan and Zhu have considered a similar objective and have considered a state augmentation to achieve an optimal policy. Can the authors please comment on that? On a recent results search, the AE also found the following paper: https://arxiv.org/pdf/2511.07486. Though it has the robust CMDP flavor, it also pointed out the issue that the current state cannot distinguish the total incurred cost.

  2. Reviewer 8rjv also made an important observation that the paper relies on the assumption that there exists a safe policy at every state and the time-step which might not be possible in general. Can the authors comment on that?

  3. The most positive reviewer nMtG has also raised important concerns; the authors should address those as well in the rebuttal.

After Rebuttal:

The rebuttal indeed resolved the concerns of the reviewers nMtG and 1YVM. On the other hand, reviewer 8rjv was against accepting the paper because of the assumption that there must exist a safe policy at every state and at every time-step of the trajectory. The AC agrees that the assumption is indeed restrictive; for example, immediately before a crash, there might not exist any safe action to avoid a crash; in health care, one might not have enough actions to navigate safely. The paper should make it clear what the scope of this work is. The reviewers also agreed that the computational complexity (even though proved to be polynomial order for a fixed mm) is huge. It requires to solve a O(H∣S∣H2/ϵ)m)O(H|S|H^2/\epsilon)^{m}) number of LPs, each with O(∣S∣∣A∣(H2/ϵ)m)O(|S||A|(H^2/\epsilon)^m) dimension for ϵ\epsilon-feasibility. Also, the complete Appendix B is missing from the paper.

There was an extensive discussion among the reviewers where the other reviewers pointed out the positives of the work. The AC also sees the positive aspects of the paper, such as the fact that this is the first work that considers the expected cumulative cost below a certain threshold from every step rather than only from the initial step. The paper has provided an algorithm to solve the problem, which should inspire a new set of works on safe RL algorithms.

There was also debate on the validity of some results. The reviewers converged on the view that Lemma 6.1 is true, but that its proof does not establish it — in particular the argument at lines 586–587, which was discussed at length.

That argument asserts that za,s′z_{a,s'} is a convex combination of Mh+1(s′,⌊wa,s′⌋δ)M_{h+1}(s',\lfloor w_{a,s'}\rfloor_\delta) and Mh+1(s′,⌈wa,s′⌉δ)M_{h+1}(s',\lceil w_{a,s'}\rceil_\delta). This is not established, and is false in general — already at m=1m=1. Take δ=0.5\delta=0.5 and a terminal state s′s' with three actions of (reward, cost) ∈{(0,−0.5), (0.9,0), (1,0.5)}\in \{(0,-0.5),\,(0.9,0),\,(1,0.5)\}; Algorithm 2 then yields M(0)=1M(0)=1, M(−0.5)=0.9M(-0.5)=0.9, M(−1)=0M(-1)=0. Mixing the hull points (1,0)(1,0) and (0,−1)(0,-1) equally gives (z,w)=(0.5,−0.5)(z,w)=(0.5,-0.5), so ⌊w⌋δ=⌈w⌉δ=−0.5\lfloor w\rfloor_\delta=\lceil w\rceil_\delta=-0.5 and the claim would force z=M(−0.5)=0.9≠0.5z=M(-0.5)=0.9\neq 0.5. The issue is that zz is a convex combination of values at the source vertices of the mixture, which need not be the grid points bracketing ww. At m≥2m\ge 2 there is a further obstruction: ⌊w⌋δ\lfloor w\rfloor_\delta and ⌈w⌉δ\lceil w\rceil_\delta are opposite corners of a hypercube, and active vertices are frequently incomparable to ⌈w⌉δ\lceil w\rceil_\delta, so monotonicity does not order them.

Only the upper bound za,s′≤Mh+1(s′,⌈wa,s′⌉δ)z_{a,s'}\le M_{h+1}(s',\lceil w_{a,s'}\rceil_\delta) is needed for Eq. (3f); ⌊w⌋δ\lfloor w\rfloor_\delta plays no role and could be dropped. The upper bound does hold, via a different argument: with φ:=Mh+1(s′,⋅)\varphi := M_{h+1}(s',\cdot) concave and componentwise nondecreasing, for any (z,w)=∑jλj(φ(c~ j),c~ j)∈co(V)(z,w)=\sum_j\lambda_j(\varphi(\tilde c^{\,j}),\tilde c^{\,j})\in\mathrm{co}(\mathcal V),

z=∑jλjφ(c~ j)  ≤  φ(w)  ≤  φ(⌈w⌉δ),z=\sum_j\lambda_j\varphi(\tilde c^{\,j})\;\le\;\varphi(w)\;\le\;\varphi(\lceil w\rceil_\delta),

by Jensen and then monotonicity — dimension-free. (In the example above this chain holds: 0.5≤0.90.5\le 0.9.) Concavity is straightforward in the extended-variable form of the per-cell problem, where all constraints are linear and the budget appears only in the right-hand side. We ask the authors to state this as a standalone lemma and invoke it at lines 586–587; the same lemma also yields that ⌈w⌉δ\lceil w\rceil_\delta never indexes an undefined table entry at Line 7 of Algorithm 3 (the feasible-budget set is convex and upward-closed). While revising this passage, note also that the justification of Eq. (3b) states the induction hypothesis reversed.

The AC has put as a Borderline Accept putting everything together given the novelty of the problem formulation and the theoretical contribution. I would strongly urge the authors to revise the paper accordingly.

Final justification

The AC is recommending acceptance of the paper where the positives *slightly' outweigh the negatives. Please see the after-rebuttal discussion, which the AC summarizes. The AC urges the authors to redefine the scope of this work according to the argument of reviewer 8rjv. Also, the authors should clarify the algorithm and the complexity by taking into account reviewer 1YVM's comment. The paper should also check the proof, especially of Lemma 6.1.

Area Chair snPC · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

Summary: This paper considers a constrained MDP setup with a trajectory-wise safety constraint that ensures that the constraint is satisfied for every state and for every step of the episodes rather than satisfying the constraint only from the beginning to the end of the trajectory. The paper argues that it is a much stronger safety requirement compared to traditional CMDP. The paper then develops an algorithm to find policies that satisfy the trajectory-wise constraints.

Strengths:

  1. The reviewers agreed upon the technical contributions of the paper. In particular, they appreciate the result that the Markovian policy on the original state space can be suboptimal, and one needs a history-dependent policy.

  2. The reviewers also found that the NP-hardness result when the number of constraints is arbitrarily large is quite useful.

  3. The proposed algorithm is shown to have a reward and a safety guarantee.

Weaknesses:

  1. The reviewer 8rjv has pointed out the SauteRL paper, and the reviewer 1YVM also found that Mcmahan and Zhu have considered a similar objective and have considered a state augmentation to achieve an optimal policy. Can the authors please comment on that? On a recent results search, the AE also found the following paper: https://arxiv.org/pdf/2511.07486. Though it has the robust CMDP flavor, it also pointed out the issue that the current state cannot distinguish the total incurred cost.

  2. Reviewer 8rjv also made an important observation that the paper relies on the assumption that there exists a safe policy at every state and the time-step which might not be possible in general. Can the authors comment on that?

  3. The most positive reviewer nMtG has also raised important concerns; the authors should address those as well in the rebuttal.

After Rebuttal:

The rebuttal indeed resolved the concerns of the reviewers nMtG and 1YVM. On the other hand, reviewer 8rjv was against accepting the paper because of the assumption that there must exist a safe policy at every state and at every time-step of the trajectory. The AC agrees that the assumption is indeed restrictive; for example, immediately before a crash, there might not exist any safe action to avoid a crash; in health care, one might not have enough actions to navigate safely. The paper should make it clear what the scope of this work is. The reviewers also agreed that the computational complexity (even though proved to be polynomial order for a fixed mm) is huge. It requires to solve a O(H∣S∣H2/ϵ)m)O(H|S|H^2/\epsilon)^{m}) number of LPs, each with O(∣S∣∣A∣(H2/ϵ)m)O(|S||A|(H^2/\epsilon)^m) dimension for ϵ\epsilon-feasibility. Also, the complete Appendix B is missing from the paper.

There was an extensive discussion among the reviewers where the other reviewers pointed out the positives of the work. The AC also sees the positive aspects of the paper, such as the fact that this is the first work that considers the expected cumulative cost below a certain threshold from every step rather than only from the initial step. The paper has provided an algorithm to solve the problem, which should inspire a new set of works on safe RL algorithms.

There was also debate on the validity of some results. The reviewers converged on the view that Lemma 6.1 is true, but that its proof does not establish it — in particular the argument at lines 586–587, which was discussed at length.

That argument asserts that za,s′z_{a,s'} is a convex combination of Mh+1(s′,⌊wa,s′⌋δ)M_{h+1}(s',\lfloor w_{a,s'}\rfloor_\delta) and Mh+1(s′,⌈wa,s′⌉δ)M_{h+1}(s',\lceil w_{a,s'}\rceil_\delta). This is not established, and is false in general — already at m=1m=1. Take δ=0.5\delta=0.5 and a terminal state s′s' with three actions of (reward, cost) ∈{(0,−0.5), (0.9,0), (1,0.5)}\in \{(0,-0.5),\,(0.9,0),\,(1,0.5)\}; Algorithm 2 then yields M(0)=1M(0)=1, M(−0.5)=0.9M(-0.5)=0.9, M(−1)=0M(-1)=0. Mixing the hull points (1,0)(1,0) and (0,−1)(0,-1) equally gives (z,w)=(0.5,−0.5)(z,w)=(0.5,-0.5), so ⌊w⌋δ=⌈w⌉δ=−0.5\lfloor w\rfloor_\delta=\lceil w\rceil_\delta=-0.5 and the claim would force z=M(−0.5)=0.9≠0.5z=M(-0.5)=0.9\neq 0.5. The issue is that zz is a convex combination of values at the source vertices of the mixture, which need not be the grid points bracketing ww. At m≥2m\ge 2 there is a further obstruction: ⌊w⌋δ\lfloor w\rfloor_\delta and ⌈w⌉δ\lceil w\rceil_\delta are opposite corners of a hypercube, and active vertices are frequently incomparable to ⌈w⌉δ\lceil w\rceil_\delta, so monotonicity does not order them.

Only the upper bound za,s′≤Mh+1(s′,⌈wa,s′⌉δ)z_{a,s'}\le M_{h+1}(s',\lceil w_{a,s'}\rceil_\delta) is needed for Eq. (3f); ⌊w⌋δ\lfloor w\rfloor_\delta plays no role and could be dropped. The upper bound does hold, via a different argument: with φ:=Mh+1(s′,⋅)\varphi := M_{h+1}(s',\cdot) concave and componentwise nondecreasing, for any (z,w)=∑jλj(φ(c~ j),c~ j)∈co(V)(z,w)=\sum_j\lambda_j(\varphi(\tilde c^{\,j}),\tilde c^{\,j})\in\mathrm{co}(\mathcal V),

z=∑jλjφ(c~ j)  ≤  φ(w)  ≤  φ(⌈w⌉δ),z=\sum_j\lambda_j\varphi(\tilde c^{\,j})\;\le\;\varphi(w)\;\le\;\varphi(\lceil w\rceil_\delta),

by Jensen and then monotonicity — dimension-free. (In the example above this chain holds: 0.5≤0.90.5\le 0.9.) Concavity is straightforward in the extended-variable form of the per-cell problem, where all constraints are linear and the budget appears only in the right-hand side. We ask the authors to state this as a standalone lemma and invoke it at lines 586–587; the same lemma also yields that ⌈w⌉δ\lceil w\rceil_\delta never indexes an undefined table entry at Line 7 of Algorithm 3 (the feasible-budget set is convex and upward-closed). While revising this passage, note also that the justification of Eq. (3b) states the induction hypothesis reversed.

The AC has put as a Borderline Accept putting everything together given the novelty of the problem formulation and the theoretical contribution. I would strongly urge the authors to revise the paper accordingly.

Final justification

The AC is recommending acceptance of the paper where the positives *slightly' outweigh the negatives. Please see the after-rebuttal discussion, which the AC summarizes. The AC urges the authors to redefine the scope of this work according to the argument of reviewer 8rjv. Also, the authors should clarify the algorithm and the complexity by taking into account reviewer 1YVM's comment. The paper should also check the proof, especially of Lemma 6.1.

1 comment
Authors · CommentOpenReview ↗

We provide a high-level summary of our response here, with detailed answers addressed point-by-point below. The primary source of concern appears to be the framing of our work within the broader safety MDP literature. Our model serves as an intermediate setting between two distinct paradigms:

  • MDPs constrained in expectation: Require safety only in expectation from the initial state, relying on relatively weak assumptions.
  • Almost-sure or pathwise formulations (including McMahan and Zhu [2024]): require the realized constraint to hold on every trajectory. This is appropriate for irreversible failures, but may be overly restrictive or yield no feasible policy.
  • Our formulation lies between these extremes: after every partial trajectory, the conditional expected remaining cost must satisfy the constraint. Thus, unfavorable histories cannot be compensated by unrelated histories, but temporary positive costs may still be compensated by future negative costs.

The important point is that the appropriate regime depends on the application; none universally dominates the others.

This taxonomy also explains why our method is not a standard cumulative-cost state augmentation. Sauté RL, McMahan, and Zhu [2024] and the paper suggested by the AE augment the state with information from the past, such as incurred cost or remaining realized budget. Instead, our “augmented variable” is not the cumulative cost incurred so far, but a recursively defined target for the conditional expected future cost. We refer to the rebuttal for a more detailed discussion on the difference among these settings.

Our framework does not address histories from which satisfying the chosen constraint is physically impossible. In such irreversible-failure applications, a stricter formulation may be preferable. However, our model permits substantially more policies than pathwise safety whenever temporary deviations can be recovered through future behavior. For example, in fuel, energy, or resource-management problems. We already position the model as intermediate in the introduction, but we agree that the recoverable-versus-irreversible distinction should be emphasized more explicitly.

The feasibility assumption should be understood in the same three-regime comparison. Our assumption is weaker than most used in almost-sure formulations, but stronger than is required in the expectation regime. Again, it is useful to think about three regimes.

  • constrained MDPs, where the constraints must be satisfied in expectation and assumptions are weaker.
  • trajectory safety, where the constraints must be satisfied deterministically, and assumptions are strong (deterministic feasibility)
  • our model, which lies between deterministic and expected constraint satisfaction, relying on assumptions that are intermediate between these two settings (conditional on partial trajectories, future expectation can be conserved).

We thank all reviewers and the Area Chair for the valuable discussion. In the revision, we will clarify the three safety regimes, add explicit comparisons with state augmentation techniques such as Sauté RL and McMahan and Zhu [2024], explain the robust CMDP work suggested by the Area Chair, clarify the past-cost versus future-continuation distinction, and sharpen the feasibility assumption and its scope.

Reviewer 8rjvOpenReview ↗
Rating
2/6
Confidence
4/5
Quality
1/4
Clarity
2/4
Significance
2/4
Originality
2/4
Contribution type
theory
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper is on finite-horizon constrained MDPs under a trajectory-wise safety. Instead of requiring only that expected cumulative costs from the initial distribution satisfy constraints, the paper requires that, after every partial trajectory, the conditional expected future cost remains below a constraint threshold. The authors show that Markovian policies are generally suboptimal, establish NP-hardness when the number of constraints is arbitrary, and propose a dynamic-programming approximation algorithm for the case where the number of constraints is constant.

Strengths and weaknesses

Strengths

  • S1: The paper considers a new safety notion. Standard CMDPs can hide severe trajectory-level violations by averaging over initial-state trajectories, while the conventional almost-surely safety can be restrictive. The proposed conditional future-cost constraint is an intermediate point between these two extremes.

  • S2: The observation that Markovian policies are insufficient is compelling. The example in Figure 1 clearly demonstrates that two histories reaching the same state may require different future behavior in order to maintain safety, which motivates the use of history-dependent policies.

Weaknesses

  • W1: The paper assumes that there exists at least one trajectory-safe history-dependent policy, i.e., ΠHD≠∅\Pi^\text{HD} \ne \emptyset Combined with the definition of trajectory safety, this means that after every partial trajectory under consideration, the future conditional expected costs must be satisfiable by some continuation policy. This assumption can be very strong in realistic safety-budget problems. For example, consider a battery-constrained drone that must return to its base. If the drone encounters an unexpectedly strong headwind and consumes far more battery than expected, it may reach a state where the remaining battery is insufficient for return. From that history, no feasible continuation policy exists, regardless of how conservative the future policy is. In such a case, the paper’s trajectory-wise feasibility assumption fails. This suggests that the framework is mainly applicable to recoverable safety-budget problems, where unfavorable histories can still be compensated for by future behavior, but not to hard safety problems where some bad histories are physically unrecoverable. The paper should discuss this limitation explicitly. As currently written, the formulation may appear to cover safety-critical applications such as robotics or autonomous systems, but in many such domains the most important failures are precisely those from which recovery is impossible.

  • W2: The paper contains no experiments, and the theoretical development is not yet strong or polished enough to fully compensate for their absence. The lack of experiments is not automatically a problem, since the submission is primarily theoretical and studies a planning setting rather than a learning problem. The authors explicitly leave sample-complexity questions for future work. However, for a theory-only submission, the theoretical contribution needs to be especially clean, complete, and well positioned. For example, there is little discussion on the relationship to safety-state augmentation methods such as Sauté RL. This omission is important because the proposed algorithm also appears to maintain a safety-related summary variable and execute a policy over an augmented state. The key distinction from Sauté-style approaches seems to be that the paper tracks promised future expected costs rather than realized remaining safety budgets, and enforces trajectory-wise conditional expectation constraints rather than almost-sure path-wise constraints. However, this distinction is not clearly discussed making the novelty and positioning of the proposed framework less convincing. In addition, some parts of the theoretical development would benefit from a more careful presentation: the quantification over trajectories is ambiguous, the feasibility assumption is not discussed in depth, and several proof and notation issues make the approximation algorithm difficult to verify. The paper also ends without a conclusion section, which further contributes to the impression that the submission is not yet fully polished.

Questions

Please see my comments in Weaknesses

Limitations

This paper does not clearly address the limitations.

Final justification

I believe my intent has been conveyed to the authors. I continue to view the required revisions as substantial, and my assessment remains unchanged (i.e., 2: Reject).

Formatting concerns

N/A

6 comments
Authors · RebuttalOpenReview ↗
Rebuttal

Answer to W1: The appropriate safety notion may vary depending on the application. If the application requires never crossing the threshold on all trajectories, then the formulation of McMahan and Zhou [2024] (or other works that treat almost-sure feasibility constraints such as Castellano et al., 2022) is more appropriate. However, these approaches might not return a policy at all when there is no way to ensure that one exists. Our framework targets a broader intermediate regime, in which we allow temporary path-wise deviations provided that the expected future costs compensate for them, and make the conditional expected remaining cost non-positive. This also makes apparent that our assumption of ΠHD≠∅\Pi^{HD}\neq\varnothing is weaker than almost-sure feasibility assumed by McMahan and Zhou [2024]: every almost-sure safe policy is feasible under our notion, whereas the converse need not hold. Our intermediate regime is well motivated by applications such as energy management or fuel consumption, where a temporary excess can be offset by future savings. In such settings, forbidding every small temporary violation from the threshold is unnecessarily conservative, while conditioning only on the initial state (i.e., maintaining the expected future costs below zero from the beginning) is too weak. The drone example instead describes a genuinely unrecoverable failure, where no continuation can restore feasibility. No trajectory-wise method can produce a safe policy in that case. We will clarify that our framework is designed for recoverable constraints, not irreversible physical failures.

Answer to W2: The similarity with safety-state augmentation methods such as Sauté RL is only apparent and superficial: both methods may be implemented using an augmented state, but the augmented variables encode fundamentally different objects. Like all state-augmentation approaches, Sauté-RL tracks a realized remaining budget determined by costs incurred in the past. This is a directly observable variable which is updated deterministically after each transition. On the other hand, our algorithm tracks a promise on the conditional expected cost in the future. This quantity cannot be updated in a simple manner. After each action, the algorithm must select a new continuation that is feasible and achievable by some continuation policy. This distinction is precisely why our algorithm is substantially more involved than standard state augmentation techniques. We must recursively characterize the set of attainable future reward vs costs pairs, while recursively maintaining the representation of these sets efficiently. Crucially, a standard augmentation does not capture these continuation feasibility constraints and would not yield our guarantees. We therefore respectfully disagree that the novelty is merely an instance of known state augmentation. The augmented-state interpretation is an implementation consequence; the technical contribution lies in identifying and computing the correct future-looking sufficient statistic and its recursive feasible continuation set. We acknowledge that the current presentation does not make this distinction forcefully enough, partly because the algorithmic objects are necessarily complex. We will substantially revise the exposition and add a direct comparison with Sauté RL and related methods. (See also the answer to Reviewer 1YVM)

Reviewer 8rjv · CommentOpenReview ↗

Thank you for the clarification. I appreciate the response, but my main concerns remain.

W1

The assumption Π0HD≠∅\Pi^{\mathrm{HD}}_0 \neq \emptyset seems quite strong for the high-stakes domains used to motivate the paper (e.g., Introduction), including autonomous driving, healthcare, and safety-critical robotics. In healthcare, for example, there may be histories after which even an oracle policy cannot save the patient or restore feasibility. Similar situations can arise in autonomous driving or robotics when a collision or mechanical failure is no longer avoidable. These are not unusual corner cases; they are often exactly the failures that make these domains safety-critical.

The rebuttal now states that the framework is intended for recoverable constraints rather than irreversible failures. This is a useful clarification, but I do not view it as a minor correction. It changes the scope of the paper and affects the motivation and contribution as currently presented. The rebuttal also introduces energy management and fuel consumption as motivating examples. These are reasonable examples of recoverable resource constraints, where a temporary excess can be offset by future savings. However, this is a narrower setting than the broad class of high-stakes applications emphasized in the current manuscript. I believe the paper would need to revise its framing accordingly.

W2

From the initial review, I did not claim that Sauté RL and the proposed method are the same. My point was that they are based on a related idea: history dependence is summarized through a safety-related augmented variable. As the authors explain in the rebuttal, Sauté RL tracks a realized budget based on past costs, while the proposed method tracks a target for the conditional future cost and must characterize feasible continuation reward-cost pairs. This is an important distinction, and discussing it clearly would help readers understand the contribution.

At present, however, this comparison is largely missing from the manuscript. The paper should clearly explain its relationship to Sauté RL and McMahan and Zhu [2024], including what is stored in the augmented state or why cumulative-cost augmentation is not sufficient.

More generally, the current presentation of the algorithm is difficult to follow, and the positioning relative to these closely related approaches is not yet clear. Addressing these points would require substantial changes to both the exposition and the related-work discussion. I therefore still believe that the necessary revisions go beyond minor corrections.


These issues affect the scope and positioning of the main contribution, rather than only the presentation. In the submitted version, it is not yet clear that the proposed framework supports the broad safety-critical motivation claimed by the paper, or how its technical contribution differs from closely related augmented-state approaches. I therefore do not think the paper is ready for acceptance in its current form.

Authors · CommentOpenReview ↗

We appreciate the reviewer's continued participation in the discussion of the paper. However, we respectfully disagree with the reviewer's assessment that these concerns fundamentally affect our paper.

The appropriate safety notion necessarily depends on the application. In settings with irreversible failures, such as unavoidable collisions or unrecoverable clinical states, a stricter almost-sure formulation may indeed be preferable. The current manuscript already makes this distinction: it motivates the limitations of expectation-only constraints in high-stakes settings (Line 19), while also stating that almost-sure requirements are appropriate for “extremely safety-critical” applications but may be overly restrictive more generally (Line 24-25). Our contribution is explicitly positioned as an intermediate model between these two extremes, not as a formulation that dominates existing safety notions or applies uniformly to every safety-critical problem (Line 26).

However, thanks to the discussion in the rebuttal, we think this point could be emphasized more strongly, and a broader discussion of it is indeed needed in the final version. We believe this clarification is straightforward and does not affect the formulation, algorithms, or theoretical results.

The same holds for the comparison with Sautè RL (and related). We can definitely (and easily) add a paragraph discussing the relationship to state augmentation techniques and why they are ineffective in our formulation. We thank the Reviewer and Reviewer 1YVM for identifying an opportunity to make both the technical novelty and the relationship to prior work substantially clearer.

Reviewer 1YVMOpenReview ↗
Rating
5/6
Confidence
2/5
Quality
3/4
Clarity
3/4
Significance
2/4
Originality
3/4
Contribution type
theory
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This work studies Constrained MDPs with Trajectory Constraints. In this paper trajectory constraints means non-positive expected future costs conditioned to any possible trajectory/history (up to time h). The paper shows that this problem is NP hard if one wants to solve it. However, it suggests an alternative approximate algorithm that can find a near optimal policy (in fact, it can attain an objective value better than the optimal policy) in the polynomial time at the cost of epsilon feasibility (epsilon constraint violation might happen). The main idea of the approximate algorithm is that the space of possible cumulative costs is exponential with respect to the horizon H. However, if one discretizes this space with proper grid size, the space complexity becomes polynomial. The second important challenge is related to the expectation form of the cost. Although expectation relaxes the constraint, it means that stochastic policies could potentially be the only feasible optimal solution to the problem. The authors handle this issue in Algorithm 2 by constructing the H-representation of the convex hull of the all possible future reward and costs (in the discretized space). In fact, they first discretize the space of cumulative costs, and then (in algorithm 2), through a backward fashion, compute the value of the optimal policy, the action selection mechanism, and the discretized future costs for every possible state, and the discrete cumulative cost. Next, they build this H-representation of the convex hull for calculating the bellman-backup- equation for the previous time step. In the end, they show that the optimization problem in Algorithm 2 for finding the feasible optimal policy can be solved using a suitable relaxed LP problem.

Strengths and weaknesses

The paper is well written. The problem formulation is novel, and the idea of using approximation Fh+1(s)\mathcal{F}_{h+1}(s) (H-representation of the convex hull) in Algorithm 2 is important (it affects the proof of Lemma 6.1- 6.3, through the feasibility of the optimal solution in Equation 2).

Despite these strengths, it is still hard to understand the importance of the problem formulation. While McMahan and Zhu [2024] formulate any time constrained RL using almost surely constraints, this paper formulates the problem using conditional expectation. However, it seems that the toy example in Section 3 can be solved using the problem formulation in McMahan and Zhu [2024]. Moreover, the idea of discretization for the approximate algorithm has been introduced in McMahan and Zhu [2024]. Therefore it seems the most important contribution of this paper is related to the problem formulation and handling the randomization part using H-representation of the convex hull (equation 2) and the relaxed LP problem (appendix for Theorem 6.5).

One other important point is that despite the fact that the paper emphasizes the trajectory and training a policy conditioned on the full history, it seems the policy is mostly conditioned on the state and expected cumulative cost (similar to McMahan and Zhu [2024] that augmented the state space with the cumulative cost). In fact, in both Algorithms 2 and 3 the only part that is affected by the trajectory is the cost; however, it seems just keeping the cumulative cost is enough. In the proofs I did not find a place where access to the trajectory τ\tau is required. This may be related to Equation 1.b, where the step wise cost at time step hh only depends on the pair (s,a)(s,a) rather than the whole trajectory.

The paper would benefit from including a conclusion section. Definition 2.1 appears to be missing this: ∀h∈[H]\forall h \in [H].

Questions
  1. In Algorithms 2 and 3, do we need to keep any part of the trajectory other than the discretized cumulative cost?

  2. Can the problem formulation of McMahan and Zhu [2024] solve the toy example in Section 3?

  3. Please see Strengths And Weaknesses

Limitations

Yes.

Final justification

The authors carefully addressed my concerns regarding the differences from the previous work by McMahan and Zhu [2024] and the fact that, in their work, the cost depends on the previous trajectory.

Formatting concerns

None.

8 comments
Authors · RebuttalOpenReview ↗
Rebuttal

In Algorithms 2 and 3, do we need to keep any part of the trajectory other than the discretized cumulative cost?

No, operationally the algorithms only need the current state shs_h and the (discretized) continuation cost vector cc. Thus, the implemented policy is history-dependent through this sufficient statistic, not through the raw trajectory itself. Intuitively, the full trajectory is only used to define how cc evolves.

 

Can the problem formulation of McMahan and Zhu [2024] solve the toy example in Section 3?

We introduced the example precisely to highlight this difference. We will do a better job explaining the differences in the final version. McMahan and Zhu require the realized cumulative cost to remain within the budget at every time. In the example, the path through s3s_3 incurs a cost of +1+1 before compensating it with a negative loss of −1-1, so the setting of McMahan and Zhu would reject the instance, saying that it is unfeasible. Our formulation allows that path because it constrains the conditional expected future cost after the partial trajectory. Hence, the later negative cost can compensate for the current positive cost. This difference is precisely what the toy example is meant to illustrate.

 

General Weaknesses

We are going to explain here why in our model we cannot augment the state as in McMahan and Zhu [2024]. The key distinction is that our “augmented variable” is not the cumulative cost incurred so far, but a recursively defined target for the conditional expected future cost. This is the key distinction. The state augmentation based on past costs is relatively simple because the realized cumulative cost is a single observed quantity that can be updated deterministically. Looking at the future is harder because, at each history, the algorithm must determine which continuation reward-cost vectors are still achievable under future randomization and stochastic transitions. These achievable continuations form a recursively defined convex set, not a single value. This is why our algorithm must propagate and convexify sets of attainable future reward-cost pairs through the H\mathcal{H} definition. (See also the answer to Reviewer 8rjv)

Reviewer 1YVM · CommentOpenReview ↗

Thank you for your rebuttal. I have a few more questions:

1. Is it correct to say that McMahan considers the accumulated cost up to time h and constrains that quantity, but your problem formulation does the opposite by requiring the cost from time h onward to remain below the threshold?

2. If 1 is correct, then why does the paper emphasize on history-dependent policies when it only uses the future cost and future reward, without retaining anything from the past other than the state?

3. If 1 is correct, can we say that by augmenting the state space with the cost from time h onward, there exists a Markovian policy that helps the problem formulation you introduced?

4. Lastly, do you think the following method could also solve your problem?

1. Compute $Q^r_h(s,a) Q^c_h(s,a)$, which are the Q-functions for reward and cost, respectively.

2. Then, at each step h, maxizie $Q^r_h(s,a)$ subject to the constraint $Q^c_h(s,a)<0$.

- Note that when computing $Q^c_h(s,a)$, we can use your idea of discretizing the cost space.
- Could you please let me  whether this method can solve your problem, and if so, how it compares with your method? 
- In fact, I am trying to compare your work with other methods in constrained RL like [1]

Please note that I am not necessarily pointing out the weaknesses of the paper. I am just trying to understand the paper’s contribution deeply so I can be more active during the AC reviewer discussion.

[1] Ghosh, A., Zhou, X. and Shroff, N., 2022. Provably efficient model-free constrained rl with linear function approximation. Advances in Neural Information Processing Systems, 35, pp.13303-13315.

Authors · CommentOpenReview ↗

Thank you for the continued engagement with the discussion. These questions will precisely highlight the key points.

  1. Yes, this is precisely what is going on. McMahan and Zhu consider the augmented MDP in which the extra state is the cumulative cost. Note that in this case the transitions from an augmented state (s’,c+c’)(s’,c+c’) from a state (s,c)(s,c) can be easily reconstructed by the product of the two transitions from ss to s’s’ and the probability of collecting a cost of c’c’ in that transition. However, the complexity of our method lies precisely in computing these transitions, which must be done with the dynamic programming procedure of Algorithm 2. The need to do so by backward induction is precisely linked to the fact that we need to compute the expected cost from the current history onward.

  2. We do not need the entire raw history, but nonetheless it is true that the current state is not enough to know all the relevant quantities: the expected cost the policy is allowed to incur from the current time onward, conditional on the history observed so far. In the toy example, both histories reach s4s_4, but each induces a different target. After the s2s_2 branch, target 00 allows action a4a_4 to be played, while after the s3s_3 branch, target −1-1 is needed, forcing the policy to play a5a_5. Hence, the policy is non-Markovian on the original state space.

  3. Yes, the reviewer is right. After Algorithm 2 terminates, the resulting policy is indeed Markovian on the augmented state. We describe Algorithm 3 to make the online implementation explicit: it shows that one need not store or query the full trajectory, but only the current state and the future-cost target computed by Algorithm 2. It also specifies how this target is updated after observing the next state, which is needed to define the actual history-dependent policy and prove its safety and reward guarantees. Thus, Algorithm 2 performs the difficult planning step, while Algorithm 3 is just the efficient execution.

  4. A greedy rule based only on Qhr(s,a)Q_h^r(s, a) and Qhc(s,a)Q_h^c(s, a) is not sufficient in general. A single pair Qhr(s,a)Q_h^r(s, a) and Qhc(s,a)Q_h^c(s, a) would assign one reward and one cost value to the state-action pair. But in our problem, the correct action can depend on how much expected future cost is allowed from that point onward. In the toy example, at the same state s4s_4, action a4a_4 is optimal when future cost up to 00 is allowed, while a5a_5 is required when future cost must be at most −1-1. Therefore, the QQ-values must also depend on these expected future costs. Skipping all the technical difficulties (such as convexification of the continuation sets), once this extra variable is added and its transitions are computed (by backward induction), the method will be essentially our dynamic program.

We remain available for further clarifications. Thank you again for your interest in the discussion

Reviewer nMtGOpenReview ↗
Rating
5/6
Confidence
3/5
Quality
4/4
Clarity
4/4
Significance
4/4
Originality
3/4
Contribution type
theory
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper explores the idea of finding optimal policies that obey trajectory-level safety constraints in a constrained Markov decision process (CMDP). It motivates the idea behind trajectory-safety as more prudent than constraints imposed on expected statistics of agent rollouts. The paper begins by showing how the notion of constraints on expected statistics cannot obliviate unsafe trajectories and how the Markovian policies that only consider current state to make safe decisions perform poorly against the non-Markovian policies. The paper particularly works with history-dependent (HD) policies. The paper then delves into the question of how hard is to find optimal trajectory-safe non-Markovian policies; it answers by demonstrating that even finding approximately safe and approximately optimal policies when the constraints are arbitrary in number is NP-hard. Further, they show an algorithm (though not computationally feasible) could recover the optimal HD policies. Furthermore, discretizing the costs, the paper shows that a dynamic programming solution can be derived that achieves 1) an approximately safe HD policy that 2) performs at least as good as the best fully trajectory-safe policy. The contributions are mainly theoretical and construction of a CMDP (figure 1) is done for proving deficiency of Markovian policies.

Strengths and weaknesses

Strengths:

  1. The paper is generally very well written. The writing flows through different sections logically and is easy to understand.

  2. It nicely motivates the use of trajectory-safety instead of existing safety constraints using an intuitive use-case. The theory developed here can surely become the foundations for further AI safety research that tackles safety on per-rollout basis.

  3. The result on the NP-hardness of solving CMDP with trajectory constraints is neat, essentially pointing out to the underlying difficulties when we try to achieve safe AI policy that is safe on constraints defined arbitrarily according to the demonstrated behavior.

  4. The practical algorithm provided has desired theoretical guarantees and opens up scope for practical algorithm built upon the paper's methodology that scale to real-world domains.

Weaknesses:

  1. The work is submitted under theory, so I guess there is no mandatory experimentation. However, worked out examples with a few CMDPs with trajectory constraints and proposed algorithms would really make the case stronger. I am not taking this point in the account for the final rating though.

  2. There are some clarification questions asked in Questions section.

  3. Minor writing issues:

    (i) line 216, "deifne"

    (ii) line 280, "an history-..."

    (iii) line 379, "...Lines 2 and 2."

Questions

Questions/suggestions:

  1. The paper suggests keeping track of how much safety budget already spent until the decision making time-step tt. What happens in the case when there is no possibility to keep the cost lower than ϵ\epsilon until tt, but down the line the agent can receive some incentives, i.e., negative costs that compensate for the already spent budget? How does the exact/approximate DP algorithm account for this scenario?

  2. Doesn't the CMDP by definition have fixed number of constraints mm? In that case, what is the significance of NP-hardness in the arbitrarily large number of constraints? If in the case when mm is fixed, it happens so that the problem is not NP-hard, do we still use a dynamic programming solution or does there exist a polynomial time algorithm? Maybe clarifying whether for a given fixed set of constraints the problem is NP-hard or not would resolve this confusion.

  3. There is some confusion about how the set Th\mathcal{T}_h is defined. Is it the hh-length history prior to any given tt or is it the hh-length partial trajectory starting from a state sampled from the initial state distribution? While reading, I have assumed the best plausible version in as per the context.

Looking at the potential impact of this idea, I am recommending the work for acceptance. However, I was not able to go through the theoretical proofs deeply and hence I cannot vouch for the correctness of the contributions fully (also reflected in my confidence score).

Limitations

There is no separate "Limitations" section in the paper, however the writing is clear enough to convey the scope of theorems.

Final justification

I believe that the paper provides a new mechanism for safe RL and the findings are important enough for the community that this work deserves acceptance.

Formatting concerns

N/A

2 comments
Authors · RebuttalOpenReview ↗
Rebuttal

The paper suggests keeping track of how much safety budget already spent until the decision making time-step . What happens in the case when there is no possibility to keep the cost lower than until , but down the line the agent can receive some incentives, i.e., negative costs that compensate for the already spent budget? How does the exact/approximate DP algorithm account for this scenario?

This is exactly the kind of structure that our algorithm exploits. More formally: the algorithm keeps the total conditional expected cost from the current step onward below ϵ\epsilon and not all the intermediary instantaneous costs. Thus, a positive current cost is allowed if sufficiently negative future costs compensate for it. Eq. (1b), includes the current cost plus future costs, and the propagated quantity is therefore a bound on remaining expected cost, not the budget already spent.

 

Doesn't the CMDP by definition have fixed number of constraints ? In that case, what is the significance of NP-hardness in the arbitrarily large number of constraints? If in the case when is fixed, it happens so that the problem is not NP-hard, do we still use a dynamic programming solution or does there exist a polynomial time algorithm? Maybe clarifying whether for a given fixed set of constraints the problem is NP-hard or not would resolve this confusion.

The reviewer is correct. Here, arbitrarily large means that the number of constraints is part of the input and may grow with the instance size. The NP-hardness result applies to this regime. If, on the other hand, mm is a fixed constant, our approximate DP algorithm runs in polynomial time in the instance size and 1/ϵ1/\epsilon. Thus our result shows a separation between a small number of constraints and a large number of constraints, giving an efficient algorithm in the first setting, and an impossibility result in the second.

 

There is some confusion about how the set ThT_h is defined. Is it the hh-length history prior to any given tt or is it the hh-length partial trajectory starting from a state sampled from the initial state distribution? While reading, I have assumed the best plausible version in as per the context.

ThT_h is the set of all length-hh partial trajectories of the form (s1,a1,…,sh−1,ah−1,sh)(s_1,a_1,\ldots,s_{h-1},a_{h-1},s_h) and not a generic history segment preceding an arbitrary time tt.

Reviewer nMtG · CommentOpenReview ↗

Thanks for the useful clarifications. I keep my score in the light of the potential positive impact of the theory presented in this paper.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…