<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Towards Achieving Sub-linear Regret and Hard Constraint Violation inModel-free RL</title></titleStmt>
			<publicationStmt>
				<publisher>Proceedings of The 27th International Conference on Artificial Intelligence and Statistics, PMLR 238:1054-1062, 2024.</publisher>
				<date>05/02/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10531571</idno>
					<idno type="doi"></idno>
					
					<author>A Ghosh</author><author>X Zhou</author><author>N B Shroff</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[We study the constrained Markov decision processes (CMDPs), in which an agent aims to maximize the expected cumulative reward subject to a constraint on the expected total value of a utility function. Existing approaches have primarily focused on soft constraint violation, which allows compensation across episodes, making it easier to satisfy the constraints. In contrast, we consider a stronger hard constraint violation metric, where only positive constraint violations are accumulated. Our main result is the development of the first model-free, simulator-free algorithm that achieves a sub-linear regret and a sub-linear hard constraint violation simultaneously, even in large-scale systems. In particular, we show that Õ( p d 3 H 4 K) regret and Õ( p d 3 H 4 K) hard constraint violation bounds can be achieved, where K is the number of episodes, d is the dimension of the feature mapping, H is the length of the episode. Our results are achieved via novel adaptations of the primal-dual LSVI-UCB algorithm, i.e., it searches for the dual variable that balances between regret and constraint violation within every episode, rather than updating it at the end of each episode. This turns out to be crucial for our theoretical guarantees when dealing with hard constraint violations.* OptPess-LP achieves zero violation, however, they assume that a safe policy is known.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>In many practical applications of online reinforcement learning (RL) (e.g., safety, resource constraints), there exist additional constraints on the learned policy in the sense that it also needs to ensure that the expected total utility (cost, resp.) exceeds a given threshold (is below a threshold, resp.). Such problems are formulated as constrained Markov Decision Processes (CMDPs) <ref type="bibr">(Altman, 1999;</ref><ref type="bibr">Efroni et al., 2020)</ref> where the agent gets a reward (r) and utility (g) depending on the state and action. In an episodic CMDP, starting from initial state x 1 , the goal is to maximize &#8673; V &#8673; r,1 (x 1 ) subject to V &#8673; g,1 (x 1 ) b, where V &#8673; r,1 (x 1 ) is the cumulative reward value function (defined in (3)) and V &#8673; g,1 (x 1 ) is the cumulative utility value function respectively when the agent follows the policy &#8673;.</p><p>To develop provably efficient model-free algorithms for CMDPs, most of the prior works <ref type="bibr">(Wei et al., 2021b;</ref><ref type="bibr">Ghosh et al., 2022;</ref><ref type="bibr">Liu et al., 2021a;</ref><ref type="bibr">Ding et al., 2020</ref><ref type="bibr">Ding et al., , 2021) )</ref> seek to minimize the following metrics</p><p>where V &#8676; r,1 (x 1 ) is the optimal reward value function. Prior works <ref type="bibr">(Ghosh et al., 2022;</ref><ref type="bibr">Liu et al., 2021a)</ref> have shown that &#213;( p T ) regret and zero constraint violation are achievable with high-probability. An astute reader may note that in the violation metric defined in (1), a large violation (V &#8673; k g,1 (x 1 ) &lt; b) at an episode can be offset by a strictly feasible policy (V &#8673; k g,1 (x 1 ) &gt; b) at another episode. In particular, consider the sequence of policies {&#8673; k } K k=1 , V &#8673; k g,1 (x 1 ) = b + 1 at odd episode k, and V &#8673; k g,1 (x 1 ) = b 1 at even episode. Then</p><p>g,1 (x 1 )) &#63743; 0, even though such a sequence of policies violates the constraints in half of the episodes. Thus, the number of episodes where employed policies are not close to satisfying the constraint can grow sub-linearly even when they achieve zero violation by (1).</p><p>Clearly, the above is not a desired setting. Thus, in this paper, we seek to minimize the regret along with the following hard constraint violation:</p><p>(2) Subsequently, we denote the violation metric in (1) as soft violation. The example we provided in the previous paragraph shows that even zero soft violation may lead to hard constraint violation that grows linearly with the number of episodes. However, if the hard constraint violation grows sub-linearly, then the number of episodes where the policy violates the constraint by any fixed non-zero amount which is independent of K can only grow sub-linearly with the number of episodes. <ref type="bibr">Efroni et al. (2020)</ref> seeks to minimize such hard constraints defined in (2). However, they consider the tabular set-up and proposed algorithms which are linear programming (LP)-based and model-based. The regret and violation scale polynomially with the number of states in the paper. Thus, those results would not be useful for large-scale RL applications, where the number of states could be infinite. To address this curse of dimensionality, modern RL has adopted function approximation techniques to approximate the (action-)value function of a policy, which greatly expands the potential reach of RL, especially via deep neural networks. Model-based and LP-based algorithms are computationally difficult to extend to large-scale systems <ref type="bibr">(Chen et al., 2021)</ref>. Motivated by this, we aim to address the following open question:</p><p>Can we design a model-free algorithm with sub-linear regret and sub-linear hard constraint violation for CMDPs with function approximation?</p><p>Contribution: To answer the above question, we consider CMDPs with linear function approximation, where the transition dynamics and the reward function can be represented as a linear function of some known feature mapping. Our main contributions are as follows.</p><p>&#8226; We show that our proposed algorithm achieves &#213;( p d 3 H 3 T ) regret and &#213;( p d 3 H 3 T ) (hard) constraint violation bounds with a high probability, where d is the dimension of the feature mapping, H is the length of the episode, and T is the total number of steps.</p><p>&#8226; Our bounds are attained without explicitly estimating the unknown transition model or requiring a simulator, and they depend on the state space only through the dimension of the feature mapping. To the best of knowledge, these sub-linear bounds for regret and hard constraints are the first such results for model-free online RL algorithms for CMDPs with function approximations. Since linear CMDP contains tabular setup, as a by-product, our result also provides the first sub-linear regret and sub-linear hard constraint bounds even for the tabular setup under the model-free setup or using primal-dual approach.</p><p>&#8226; This is the first result that shows that &#213;( p T ) regret and hard violation can be achieved using primal-dualbased approach since all the existing primal-dual approaches give soft constraint violation bound. Our main results are achieved by a novel approach of tuning the dual variable within each episode rather than updating at the end of the episodes (as done in existing approaches). In particular, we tune the dual variable within each episode to achieve a policy such that the estimated utility value function would exceed b by a small amount indicating the perfect trade-off between reward and utility maximization. This turns out to be the key to achieving hard-constraint violation bound.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1">Related Work</head><p>Model-based RL algorithms have been proposed for the CMDP <ref type="bibr">(Efroni et al., 2020;</ref><ref type="bibr">Singh et al., 2020;</ref><ref type="bibr">Brantley et al., 2020;</ref><ref type="bibr">Zheng and Ratliff, 2020;</ref><ref type="bibr">Kalagarla et al., 2020;</ref><ref type="bibr">Liu et al., 2021a;</ref><ref type="bibr">Ding et al., 2021)</ref>. Apart from <ref type="bibr">Efroni et al. (2020)</ref> and <ref type="bibr">Liu et al. (2021a)</ref> (OptPess-LP), none of the other papers considered the hard constraint bound in (2). Both the papers assumed finite state-space. Naturally, the proposed algorithms there achieved regret bound which scales polynomially with the cardinality of the state-space. Hence, such results cannot cope with the large state space observed in many MDP problems. Moreover, both <ref type="bibr">Efroni et al. (2020)</ref> and <ref type="bibr">Liu et al. (2021a)</ref> consider LPbased approaches. Further, <ref type="bibr">Liu et al. (2021a)</ref> assumes the knowledge of a strictly feasible policy in order to bound which we do not assume. In Section 3, we detail the limitations of existing LP-based approaches for unconstrained linear MDP <ref type="bibr">(Neu and Pike-Burke, 2020;</ref><ref type="bibr">Neu and Okolo, 2023;</ref><ref type="bibr">Lakshminarayanan et al., 2017;</ref><ref type="bibr">Bas-Serrano et al., 2021)</ref> and the advantages of our approaches compared to a potential extension of those LP-based approaches to linear CMDP. In the bandit setup, <ref type="bibr">Chen et al. (2022)</ref>; <ref type="bibr">Pacchiano et al. (2021)</ref> consider hard violation for linear bandit setup. Note that the bandit setting can be viewed as a degenerate single-state RL, and bandit settings do not have a state transition kernel associated with them. Hence, the approaches for the linear bandit setup cannot be extended to the linear MDP setup. Furthermore, the approaches in the above paper are not primal-dual based. Recently, <ref type="bibr">Guo et al. (2022)</ref> proposed a primal-dual algorithm that obtains sublinear regret and hard constraint violation bound in the bandit setup. However, such an approach cannot be extended to the episodic RL setup (Appendix I). <ref type="bibr">Ding et al. (2020)</ref>; <ref type="bibr">Xu et al. (2021)</ref> proposed policygradient based model-free approaches. However, they require 'simulator' or generative model <ref type="bibr">Azar et al. (2012)</ref>. Recently, model-free RL algorithms without simulators have also been proposed <ref type="bibr">(Wei et al., 2021b;</ref><ref type="bibr">Ghosh et al., 2022)</ref> to solve CMDP. Only <ref type="bibr">Ghosh et al. (2022)</ref> considered the large state-space scenario in the linear CMDP setting. However, all the aforementioned works consider soft constraint violation (cf.( <ref type="formula">1</ref>)) rather the hard constraint violation (cf.( <ref type="formula">2</ref>)). Since the focus is different our algorithm and analysis are significantly different. Please see Section 4 for more details. We do not assume Slater's condition (i.e., a stirctly feasible policy exists), unlike all the existing approaches. Thus, our analysis does not rely on strong duality. <ref type="bibr">Amani et al. (2021)</ref> proposed a RL algorithm for the scenario where a constraint needs to be satisfied at each step of an episode. We consider a constraint where the cumulative utility over an episode must exceed a threshold. Hence, the set of constraints is fundamentally different. Further, unlike in <ref type="bibr">Amani et al. (2021)</ref>, we do not assume that a safe policy is known.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Problem Formulation</head><p>We consider an episodic constrained MDP, denoted by (S, A, , H, r, g) where S is the state space, A is the action space, H is the fixed length of each episode, = { h } H h=1 is a collection of transition probability measures, r = {r h } H h=1 is a collection of reward functions, and g = {g h } H h=1 is a collection of utility functions. We assume that S is a measurable space with possibly infinite number of elements, A is a finite action set. h (&#8226;|x, a) is the transition probability kernel which denotes the probability to reach a state when action a is taken at state x. r h : S &#8677; A ! [0, 1], and g h : S &#8677;A ! [0, 1] and are assumed to be deterministic. However, one can readily extend to settings when r h and g h are random.</p><p>Each episode k 2 [K] starts with a fixed state x 1 . It can be readily generalized to the setting where x 1 is drawn from a distribution. At each step h 2 [H] in episode k, the agent observes state x k h 2 S, picks an action a k h 2 A, receives a reward r h (x k h , a k h ), and a utility g h (x k h , a k h ). The MDP evolves to</p><p>The episode terminates at step H + 1. Without loss of generality, we assume that r H+1 = g H+1 = 0. In this paper, we consider the challenging scenario where the agent only observes the bandit information r h (x k h , a k h ) and g h (x k h , a k h ) at the visited state-action pair (x k h , a k h ). The policy-space of an agent is (A|S, H);</p><p>Here (A) is the probability simplex over the action space. For any</p><p>denote the expected value of the total reward function starting from step h and state x when the agent selects action using the policy</p><p>where is taken with respect to the policy &#8673; and the transition probability kernel . Let Q &#8673; r,h (x, a) denote the expected value of the total reward starting from step h and the state-action pair (x, a) and follows the policy</p><p>Similarly, we define the value function for the utility V &#8673; g,h (x), and the action-value function for the utility Q &#8673; g,h (x, a). We denote V &#8673; j,h (x), and Q &#8673; j,h (x, a) for j = r, g. We observe</p><p>) for j = r, g. Using this notation, Bellman's equation associated with the policy &#8673; becomes</p><p>The objective of the learning agent is to find an optimal solution to the following problem maximize &#8673; V &#8673; r,1 (x 1 ), subject to V &#8673; g,1 (x 1 ) b.</p><p>(5) Note that even though we have only one constraint, it can be readily generalized to the scenario with multiple constraints. Further, constraints like V &#8673; g,1 (x 1 ) &#63743; b can also be accommodated. In order to avoid trivial solutions, we consider b 2 (0, H]. We denote the optimal policy as &#8673; &#8676; which solves the above optimization problem. Since &#8673; &#8676; is obtained by having complete information, it is denoted as the best policy in hindsight. The CMDP setup is standard <ref type="bibr">(Efroni et al., 2020)</ref>.</p><p>Without any constraint information a priori, an agent cannot know the policies that satisfy the constraint. Instead, we allow the policy to violate the constraint and minimize the regret while minimizing the total constraint violations over the K episodes. We now define the performance metric that we seek to minimize.</p><p>Performance Metric: Let the policy employed by the agent at episode k be &#8673;</p><p>The performance metric we consider is the following</p><p>where</p><p>b, then there is no violation. Thus, we define the total violation as the cumulative sum of all constraint violations over all the episodes. Note the difference with the constraint violation metric (cf. ( <ref type="formula">1</ref>)) considered in the existing literature <ref type="bibr">(Ghosh et al., 2022;</ref><ref type="bibr">Ding et al., 2020</ref><ref type="bibr">Ding et al., , 2021;;</ref><ref type="bibr">Wei et al., 2021a)</ref>. In (1), if V &#8673; k g,1 (x 1 ) b it can negate the violation V &#8673; k g,1 (x 1 ) &lt; b in metric (1). As we have shown in the introduction, a sub-linear (even zero) violation defined in (1) does not guarantee that policies that violate the constraint by a fixed amount (independent of K) are selected for a sub-linear number of episodes. On the other hand, if the violation metric defined in (6) grows only sub-linearly with K, it implies that the number of episodes where such policies are selected scales at most sub-linearly with K.</p><p>Linear Function Approximation: To handle a possible large number of states, we consider the following linear MDP.</p><p>Assumption 1. The CMDP is a linear MDP with feature map : S &#8677; A ! R d , if for any h, there exists d unknown signed measures</p><p>|x, a) = h (x, a), &#181; h (x 0 )i and there exists vectors &#10003; r,h , &#10003; g,h 2 R d such that for any (x, a) 2 S &#8677; A, r h (x, a) = h (x, a), &#10003; r,h i g h (x, a) = h (x, a), &#10003; g,h i. This is similar to the setting considered in <ref type="bibr">Ghosh et al. (2022)</ref> and is based on the definition of linear MDP <ref type="bibr">(Jin et al., 2020;</ref><ref type="bibr">Yang and Wang, 2019)</ref>. By the above definition, the transition model, the reward, and the utility functions are linear in terms of the feature map . We remark that despite being linear, h (&#8226;|x, a) can still have infinite degrees of freedom since &#181; h (&#8226;) is unknown. Note that tabular MDP is a subset of linear MDP <ref type="bibr">(Jin et al., 2020)</ref>. A recent study <ref type="bibr">(Zhang et al., 2022)</ref> showed that policies for linear MDPs can achieve better results than state-of-the-art approaches for benchmark databases. Linear MDPs are also viewed as a critical step toward studying large-scale RL problems, particularly those with infinite state space. Further, as demonstrated in numerous other settings, analyzing linear MDPs can provide insights that can be used to generalize to other settings. Thus, unconstrained linear MDP is extensively studied <ref type="bibr">(Jin et al., 2020</ref><ref type="bibr">(Jin et al., , 2021;;</ref><ref type="bibr">He et al., 2021b,a;</ref><ref type="bibr">Wang et al., 2020;</ref><ref type="bibr">Hu et al., 2022)</ref>. Similar to Proposition 1 in <ref type="bibr">Jin et al. (2020)</ref>, we can show that for a linear MDP and for any policy &#8673; there exists {w &#8673; j,h } H h=1 such that Q &#8673; j,h (x, a) = hw &#8673; j,h , (x, a)i for any (x, a, h) 2 S &#8677; A &#8677; [H]. We, thus, focus on the linear action-value function.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Note that</head><p>Dual Variable: We also use dual variable to consider a composite function.</p><p>, where Y is the dual variable.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Our Approach</head><p>We now describe our proposed Algorithm 1.</p><p>Algorithm 1 Model Free Algorithm with Linear Function Approximation for hard-constraint violation</p><p>for step h = H, H 1, . . . , 1 do 6:</p><p>break //Found the ideal dual variable 15:</p><p>for step h = 1, . . . , H do 19:</p><p>) for all a using w k j,h and Y k .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>20:</head><p>Take action a k h &#8672; &#8673; h,k (&#8226;|x k h ) and observe x k h+1 .</p><p>Note that at each episode k, Algorithm 1 can be divided into two steps: i) the dual variable finding step (Lines 4-17), and ii) the policy execution step (Lines 18-20).</p><p>The dual variable finding step can be divided into two main steps: i) the policy finding step (Lines 5-12), and ii) the constraint checking step for a given value of Y k (Lines 13-15). We now describe the steps in detail.</p><p>In order to obtain V k g,1 (x 1 ), we need to first find the policy and Q-functions. For a given dual variable Y k , lines 6-12 consist of updating the parameters w k r,h , w k g,h and &#8676; k h which are used to update the Q k j,h and V k j,h at episode k. &#8676; k h is the Gram-matrix for the regularized least square problem (see (7), later). Note that the lines 9-12 (i.e., Q, V , and policy) are not evaluated for each state, rather, they are evaluated only for the encountered states till episode k 1. Hence, we do not need to iterate over a potentially infinite number of states. For the first episode, since k 1 = 0 and &#8999; = 1, we have w k j,h = 0, 8j and &#8676; k h = I. We note that Q k j,H+1 (&#8226;, &#8226;) = 0 for j = r, g. Q function and Value function Estimation: We need to estimate the value-function and Q-function with respect to the policy &#8673; k for a given value of Y k . However, there are challenges. We do not know h in Bellman's equation ( <ref type="formula">4</ref>), rather h V &#8673; k j,h+1 should be replaced by the empirical samples. Further, since</p><p>The intuition is to obtain w k j,h from Bellman's equation (cf.( <ref type="formula">4</ref>)) using the regularized least-square regression. We obtain w k j,h for j = r, g according to the following equation</p><p>Then, an additional bonus term <ref type="bibr">Jin et al. (2020)</ref>, where is a constant which we will characterize in the next section. Such an additional term is used for the upper confidence bound in LSVI-UCB <ref type="bibr">(Jin et al., 2020)</ref>. The same bonus term is used for both Q k r,h and Q k g,h . Policy: The value functions are updated based on the Q function and the policy (line 13). The policy is based on a soft-max policy (line 12) unlike the greedy one in the unconstrained case <ref type="bibr">Jin et al. (2020)</ref></p><p>for any vector X 2 R |A| is a |A|-dimensional vector with parameter &#8629; where the i-th component</p><p>At step h, &#8673; h,k (a|x) is computed based on the softmax policy with the composite Q-function vector</p><p>x, a)} a2A . When &#8629; = 1, this becomes equal to the greedy policy. As shown in <ref type="bibr">Ghosh et al. (2022)</ref>, the greedy policy is not Lipschitz. Hence, it does not provide a uniform concentration bound for each individual value function, an essential step in proving the regret and violation bound. Note that for different values of Y k , the policy is different, hence V k j,h would also be different. We also use the Lipschitz property of soft-max to obtain Y k that satisfies certain characteristics which we discuss in the following.</p><p>Finding Y k : Once we compute Q k g,1 and compute policy according to soft-max, we obtain V k g,1 (x 1 ). If V k g,1 (x 1 ) &lt; b, we increase the dual variable by &#8984; and repeat the steps (lines 5-12). We continue this process till Y k reaches p K or we obtain V k g,1 (x 1 ) b. Once we are out of the inner loop, we use Y k , and w k j,h to compute the policy in the execution phase.</p><p>In summary, at every episode, we identify Y k such that one of the following three cases holds:</p><p>x 1 ) b, thus, one can focus on maximizing the reward only.</p><p>) by proper choice of step-size &#8984; and &#8629; (temp. co-efficient) of the soft-max policy ensuring the right balance. Intuitively, if we select a higher Y k such that V k g,1 (x 1 ) exceeds b by a large amount, it would put a smaller weight on reward maximization. Hence, the regret increase.</p><p>&#8226; Y k = p K, and V k g,1 (x 1 ) &lt; b which means that we reach the upper bound of the dual variable. We show that an upper bound of p K is the enough to obtain &#213;( p K) regret and &#213;( p K) hard constraint violation.</p><p>Execution: The last part includes the execution of the policy for episode k (lines 22-24). The policy is again based on the soft-max policy with w k j,h and Y k obtained in the dual variable finding step.</p><p>Difference with other approaches: <ref type="bibr">Ghosh et al. (2022)</ref>; <ref type="bibr">Ding et al. (2021</ref><ref type="bibr">Ding et al. ( , 2020))</ref>; <ref type="bibr">Liu et al. (2021a)</ref> (OptPess-PrimalDual) also proposed primal-dual type algorithm. However, their focus was on minimizing the soft violation (cf.(1)) rather than the hard violation. The major difference is that at every episode, we find Y k such that it has the property characterized above. Since in the soft-constraint violation, one can negate violation at one episode by selecting a strictly feasible policy at the other episode, hence searching for such a dual-variable at every episode was not required there. Rather, updating the dual variable at the end of the episode was enough since if the current policy is infeasible one can increase the dual variable to choose a feasible policy in the subsequent episode to negate the violation. However, because of stricter requirements, we need to find the perfect dual variable at every episode. Our analysis is also different compared to those (see Section 4.2).</p><p>Space complexities: We remark that Algorithm 1 only needs to store r</p><p>hence, it takes O(d 2 H + dAT ) space which is the same as the unconstrained setup <ref type="bibr">Jin et al. (2020)</ref>. For the tabular setup, using the approach presented in Appendix H, the space complexity is at most O(|S| 2 |A|H) which is the same as the model-based approach in <ref type="bibr">Efroni et al. (2020)</ref>. We do not need to invert (&#8676; k h ) 1 for the tabular case. Comparison with LP-based approach: Efroni et al. ( <ref type="formula">2020</ref>) and <ref type="bibr">Liu et al. (2021a)</ref> proposed LP-based approach to obtain the state-action occupancy measure for tabular setup in order to bound the hard constraint violation. From the state-action occupancy measure, they obtain the policy. However, solving LP for large state-space is challenging as the decision variables scale with the state-space. <ref type="bibr">Neu and Okolo (2023)</ref>; Lakshminarayanan et al. ( <ref type="formula">2017</ref>); Neu and Pike-Burke (2020); Bas-Serrano et al. ( <ref type="formula">2021</ref>) proposed an LP-based approach for linear MDP for the unconstrained problem. One may ask why not extending that approach to the constrained case. However, apart from <ref type="bibr">Neu and Okolo (2023)</ref>, the above formulations still rely on the finite state space assumption and the decision variables still consist of state-action occupancy measure which can be large for large state space. <ref type="bibr">Neu and Okolo (2023)</ref> reduces the number of decision variables by assuming that a core set of state-action pairs is known which essentially means that a low dimensional state-action occupancy measure is enough to represent the rewards for all state-action pairs. However, finding the core set is difficult in general <ref type="bibr">Neu and Okolo (2023)</ref>. Also, all the above still rely on a model-based approach and need to estimate the transition probability. <ref type="bibr">Neu and Okolo (2023)</ref> also proposed a model-free algorithm, however, that relies on the simulator. In summary, all the above approaches either rely on finite state-space assumptions or rely on a simulator and a core-set assumption to obtain a policy.</p><p>Instead, we propose a primal-dual-based algorithm and thus, we do not rely on any LP solver. Our algorithm is also model-free and does not need any simulator. Further, our algorithm works for infinite state space and we do not rely on core-set assumption as in <ref type="bibr">Neu and Okolo (2023)</ref>. Moreover, we would like to point out that since our approach is model-free, our algorithmic approach can be certainly extended to a larger class of RL problems. As described in our approach, we need to estimate the value function (we can use neural-network to estimate the value function) and then tune the dual variable till we achieve</p><p>Assumption of strict feasibility: All the primaldual-based approaches which focus on minimizing the soft-constraint violation relies on strict feasibility assumption (aka Slater's condition). In particular, all the primal-dual based approaches (model-free or modelbased) rely on strong duality <ref type="bibr">(Paternain et al., 2019)</ref> in order to achieve soft-constraint violation. This is the first result that shows that sub-linear regret and constraint violation (even soft) is achievable without assuming Slater's condition for a primal-dual-based approach. Naturally, our analysis is significantly different (Section 4.2). If we assume the existence of a strictly feasible policy, we can set a lower upper bound for the dual-variable (Appendix J).</p><p>Value of &#8984;: We obtain theoretical results for</p><p>However, in practice, we observe that &#8984; = O(1/( p KH)) works well, hence, the algorithm can be faster in practice. The characterization of a more computationally efficient algorithm with theoretical bound is left for the future work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Analysis</head><p>We now state the main result. We prove that Algorithm 1 achieves the regret and hard constraint violation which are sublinear in T = KH where T is the total number of steps.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Main Results</head><p>Theorem 1. Fix any p 2 (0, 1). If we set = 1, = C 1 dH p &#9670; in Algorithm 1 where &#9670; = log(log(|A|)4dT /p) for some absolute constant C 1 . With probability 1 2p, we have</p><p>for some absolute constants C, and C 0 .</p><p>To the best of our knowledge, this is the first result that achieves &#213;( p T ) regret and hard constraint violation bound for linear CMDP. Since linear CMDP contains a tabular setup, as a by-product, our result also provides the hard-constraint violation bound for tabular setup using the model-free algorithm. As we mentioned earlier, existing primal-dual type algorithms only consider soft-constraint violation, rather, we show that it is possible to achieve &#213;( p T ) regret and hard constraint violation bound using primal-dual type approach. Our bound with respect to T matches the bounds attained in the tabular model-based and LP-based approach in <ref type="bibr">Efroni et al. (2020)</ref> and <ref type="bibr">Liu et al. (2021a)</ref> (OptPess-LP). * Note that our bounds are (nearly) optimal. It is shown that &#8998;(d p H 2 T ) regret is unavoidable for the unconstrained setup. We can easily construct an example where only one policy is feasible. For example, consider the setup where g = r, and b = V &#8676; r,1 (x 1 ), (in this case, we are forcing an unconstrained problem to be constrained) then only the optimal policy is feasible. Thus, &#8998;(d p H 2 T ) is also a lower bound for hard constraint violation as well when there is no strictly feasible policy.</p><p>Note that our regret bound matches the same order (with respect to T ) as in the unconstrained case <ref type="bibr">(Jin et al., 2020)</ref> and in the linear CMDP setup with softconstraint violation <ref type="bibr">(Ghosh et al., 2022)</ref>. <ref type="bibr">Ghosh et al. (2022)</ref> achieves zero soft-constraint violation when Slater's condition holds. Whether it is possible to reduce our violation bound further for the setup when the Slater's condition holds remains open.</p><p>Tabular Case: If we consider the tabular case with the following representation (x, a) = e x,a where e x,a is a |S||A| dimensional vector and e x,a = 1 when (s, a) = (x, a) and 0 otherwise, then plugging in d = |S||A| we obtain the regret and hard constraint violation bound as &#213;( p</p><p>However, since we can trivially obtain &#9999;-covering number for a value function when the state-space is bounded, we can obtain a tighter result by modifying the bonus term . In particular, in Theorem 3 (Appendix H) we obtain the regret and hard constraint violation bounds as &#213;( p |S| 2 |A|H 3 T ). This matches the result of <ref type="bibr">Efroni et al. (2020)</ref>. This is the first work which shows that it is possible to achieve &#213;( p |S| 2 |A|H 3 T ) regret and hard constraint violation bound using primal-dual based approach matching the result from model-based LP-based approach <ref type="bibr">(Efroni et al., 2020)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Proof Outline</head><p>We start by highlighting the main differences with the existing approaches.</p><p>Novelty in Analysis techniques: Existing primaldual approaches that focus on bounding the softconstraint violation <ref type="bibr">(Ghosh et al., 2022;</ref><ref type="bibr">Ding et al., 2021;</ref><ref type="bibr">Efroni et al., 2020)</ref> seek to bound for any Y 0</p><p>In order to prove regret, they then bound</p><p>using the fact that dual variable is updated based on the gradient descent step in the dual direction. Since our dual update is different, the regret analysis is significantly different. Further, we can not rely on strong duality result to bound the hard constraint violation unlike obtaining the soft constraint violation bound.</p><p>Rather, to prove the regret and the hard constraint violation bound, we first show that if the dual variable differs by &#9999; amount, the estimated value function for utility (V k g,1 ) can also differ by at</p><p>This turns out to be essential to bound the regret and hard constraint violation. Such a guarantee is not required to obtain an upper bound for the soft-constraint violation as considered in the other papers. To bound the total soft constraint violation, one only needs to update the dual variable at the end of the episode k.</p><p>To prove that if the dual variable differs by &#9999; amount, the estimated value function for utility (V k g,1 ) can also differ by at most O(K 1.5H d H &#9999;) amount; we use the fact that our policy is a soft-max to show that if the dual variable differs by an &#9999; amount, then the value function at the h-th step only differs by at most O(&#9999; p KH) (Lemma 15). However, as the policy for the h-th step changes, the parameter for the h 1-th step would also change to fit Bellman's equation. Here, we use the linearity property to show that the parameter value w k j,h 1 (obtained via solving the linear regression problem) also differs by O(dK&#9999;) (Lemma 16). Using the above, we show that the value function at the h 1-th step would differ by at most O(d&#9999;K p KH) (Lemma 14). We obtain the final result by induction. Please see Appendix C for details. We now provide the main ideas behind bounding Regret and Hard constraint violation.</p><p>Regret Bound: We decompose the regret in the following manner:</p><p>In order to bound both T 1 and T 2 we need to obtain uniform concentration bound for each individual value function. In particular, we need to show that the log &#9999;covering number of (estimated) reward and utility value function must scale as log(K). As discussed in <ref type="bibr">Ghosh et al. (2022)</ref>, the greedy policy with respect to the composite state-action value function fails to achieve such bound since the greedy policy is not Lipschitz. Instead, the soft-max policy based on the composite state-action policy function achieves the above (Lemma 10).</p><p>We, first, discuss how to bound T 1 . We observe that</p><p>where we have used the fact that V &#8676; g,1 (x 1 ) b and Y k 0. We now bound T 3 and T 4 .</p><p>Readers should note that T 3 is similar to the optimism term with respect to the composite value function. However, since we use soft-max instead of the greedy policy, we cannot bound the above by zero. Rather, using the property of soft-max, we obtain Lemma 1. For any k, with probability 1 p,</p><p>When &#8629; = log(|A|) p K/(4H), the above can be bounded by O(H 2 /K 1/2 ). Also, note that it shows that a large value of &#8629; would degrade the regret. Now, we provide an upper bound for T 4 .</p><p>We, first, define the set of episodes where Y k = p K, and V k g,1 (x 1 ) &lt; b,</p><p>x 1 ) &lt; b}. Thus, for these episodes V k g,1 (x 1 ) b &#63743; 0. Hence, for these episodes, T 4 is trivially upper bounded by 0. Hence, we now need to obtain an upper bound on T 4 on the set of episodes which are not in I b , i.e., when they belong to the set I C b . As we have discussed, by the choice of &#8984;, when we obtain Y k &gt; 0 such that V k g,1 (x 1 ) b, we also obtain</p><p>Intuitively, we strike the balance between reward maximization and utility maximization for V k r,1 (x 1 ) and V k g,1 (x 1 ) (as even if V k g,1 (x 1 ) &gt; b, it would only exceed by O(HK 1 )). Hence, we can upper bound T 4 by O(HK 1/2 ). Thus, summing over the expressions in Lemmas 1 and 2 we obtain with probability 1 p,</p><p>We obtain the bound of T 2 using Azuma-Hoeffding inequality and the uniform concentration bound,</p><p>Hard constraint Violation Bound: We decompose the violation as the following:</p><p>We, further, decompose T 5 as the following</p><p>By the definition of I b , for episodes in</p><p>In order to bound the second term in the right-hand side of (13) note that</p><p>Finally, we bound T 6 . Since we add bonus term to obtain Q k g,h , thus, Lemma 5. With probability 1 p, V k g,1 (x 1 ) V &#8673; k g,1 (x 1 ).</p><p>Thus, we can rewrite</p><p>). Thus, from Azuma-Hoeffding inequality and uniform concentration bound, we obtain</p><p>From Lemma 4 and 6 we obtain the bound on violation in Theorem 1.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Experiments</head><p>We evaluate Algorithm 1 on a simulated model (same as in <ref type="bibr">Ghosh et al. (2022)</ref>, details in Appendix K.1) to validate our theoretical results. We run Algorithm 1 for 3 &#8677; 10 5 episodes (K). We use &#8984; = 1/ p KH. Thus, we are using a larger &#8984; proposed in Algorithm 1 as it decreases the time complexity. We observe that such &#8984; is enough to achieve sub-linear regret and hard constraint violation. We use the feature-space representation similar to tabular setup (Appendix H). We compare our algorithm with two state-of-the-art algorithm: i) the algorithm proposed in <ref type="bibr">Ghosh et al. (2022)</ref>, and ii) OptPess-PrimalDual proposed in Liu et al. (2021a). Our empirical results (Figure <ref type="figure">1</ref>) suggest that our algorithm significantly reduces the hard constraint violations as compared to both the algorithms.</p><p>As predicted by our theory, the hard constraint violation scales much smaller than O( p K) (Figure <ref type="figure">1</ref>). In fact, our algorithm selects feasible policy after 1.5 &#8677; 10 5 episodes. However, the constraint violations grow for the other two algorithms which indicate that those algorithms are unable to find feasible policy. Obviously, infeasible policies can give higher rewards, thus, the average reward achieved by the other two algorithms are slightly higher compared to our approach. Nevertheless, our algorithm indeed achieves optimal reward. Thus, the empirical result shows the efficacy of our approach in achieving sub-linear hard constraint violation and regret. In Appendix K, we observe similar traits in our empirical results on the OpenAIGym control suite <ref type="bibr">(Brockman et al., 2016)</ref> and other CMDP setups.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Conclusion and Future Work</head><p>We propose a model-free RL-based algorithm for linear CMDP which achieved &#213;( p d 3 H 3 T ) regret and &#213;( p d 3 H 3 T ) hard constraint violation bound. To the best of our knowledge, this is the first result which shows &#213;( p T ) regret and &#213;( p T ) constraint violation bound using primal-dual model-free setup. We achieve our result by finding the dual variable that balances between regret and constraint violation within an episode, rather than only updating it at the end of each episode.</p><p>Whether we can tighten the dependence on d and H remains an important future research direction. Extending the work to the setup where the feature space needs to be learnt or non-linear MDP setup is also important. Recent works <ref type="bibr">(Modi et al., 2021;</ref><ref type="bibr">Zhang et al., 2022;</ref><ref type="bibr">Agarwal et al., 2020)</ref> on feature-space learning for unconstrained MDPs may provide some insights. Wei, C.-Y., Jahromi, M. J., Luo, H., and Jain, R. (2021a). Learning infinite-horizon average-reward mdps with linear function approximation. In International Conference on Artificial Intelligence and Statistics, pages 3007-3015. PMLR. Wei, H., Liu, X., and Ying, L. (2021b). A provablyefficient model-free algorithm for constrained markov decision processes. arXiv preprint arXiv:2106.01577. Xu, T., Liang, Y., and Lan, G. (2021). Crpo: A new approach for safe reinforcement learning with convergence guarantee. In International Conference on Machine Learning, pages 11480-11491. PMLR. Yang, L. and Wang, M. (2019). Sample-optimal parametric q-learning using linearly additive features. In International Conference on Machine Learning, pages 6995-7004. PMLR. Zhang, X., Song, Y., Uehara, M., Wang, M., Agarwal, A., and Sun, W. (2022). Efficient reinforcement learning in block mdps: A model-free representation learning approach. In International Conference on Machine Learning, pages 26517-26547. PMLR. Zheng, L. and Ratliff, L. (2020). Constrained upper confidence reinforcement learning. In Learning for Dynamics and Control, pages 620-629. PMLR. Zhou, D., He, J., and Gu, Q. (2021). Provably efficient reinforcement learning for discounted mdps with feature mapping. In International Conference on Machine Learning, pages 12793-12802. PMLR. Checklist 1. For all models and algorithms presented, check if you include: (a) A clear description of the mathematical setting, assumptions, algorithm, and/or model. [Yes/No/Not Applicable] Yes, (please see Section 3). (b) An analysis of the properties and complexity (time, space, sample size) of any algorithm. [Yes/No/Not Applicable] Yes, (please see Section 3). (c) (Optional) Anonymized source code, with specification of all dependencies, including external libraries. [Yes/No/Not Applicable] Yes. We have described all the hyperparameters required to rerun the simulations. The source code will be published for the camera-ready version. 2. For any theoretical claim, check if you include: (a) Statements of the full set of assumptions of all theoretical results. [Yes/No/Not Applicable] Yes, (please see Section 4). (b) Complete proofs of all theoretical results. [Yes/No/Not Applicable] Yes, (please see Appendix). (c) Clear explanations of any assumptions. [Yes/No/Not Applicable] Yes. 3. For all figures and tables that present empirical results, check if you include: (a) The code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL). [Yes/No/Not Applicable] Yes, (in Section 5 and Appendix K). (b) All the training details (e.g., data splits, hyperparameters, how they were chosen). [Yes/No/Not Applicable] Not applicable. (c) A clear definition of the specific measure or statistics and error bars (e.g., with respect to the random seed after running experiments multiple times). [Yes/No/Not Applicable] Not applicable. (d) A description of the computing infrastructure used. (e.g., type of GPUs, internal cluster, or cloud provider). [Yes/No/Not Applicable] Not applicable. 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets, check if you include: (a) Citations of the creator If your work uses existing assets. [Yes/No/Not Applicable] Not applicable. (b) The license information of the assets, if applicable. [Yes/No/Not Applicable] Not applicable. (c) New assets either in the supplemental material or as a URL, if applicable. [Yes/No/Not Applicable] Not applicable. (d) Information about consent from data providers/curators. [Yes/No/Not Applicable] Not applicable. (e) Discussion of sensible content if applicable, e.g., personally identifiable information or offensive content. [Yes/No/Not Applicable] Not applicable. 5. If you used crowdsourcing or conducted research with human subjects, check if you include: (a) The full text of instructions given to participants and screenshots. [Yes/No/Not Applicable] Not applicable. (b) Descriptions of potential participant risks, with links to Institutional Review Board (IRB) approvals if applicable. [Yes/No/Not Applicable] Not applicable. (c) The estimated hourly wage paid to participants and the total amount spent on participant compensation. [Yes/No/Not Applicable] Not applicable.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Organization of Appendix:</head><p>In Section A, we state some results which we use throughout. In Section B, we prove Lemma 1. In Section B.1, we state and prove base results Lemmas 10, 11, and 12 which are necessary to prove the Lemma 1. Subsequently, we prove Lemma 1. In Section C, we prove Lemma 2. In Section D, we prove Lemmas 4 and 5. In Section E, we prove Lemmas 3 and 6. In Section F we prove Lemma 10 (the uniform concentration result) which is essential to prove all the previous results. In Section G, we state some results proved in the existing literature which we have used in proving our results. In Section H, we detail our algorithm for tabular setup. In Section I, we describe why the approach for Bandit setup can not be applied to our CMDP setup. In Section J, we show that when a strictly feasible policy exists (aka Slater's condition holds) upper bound of H/ for the dual variable is enough to obtain &#213;( p K) regret and hard constraint violation instead of an upper bound of p K . Finally, in Section K, we provide empirical results of our algorithm for various CMDP setups including OpenAI Gyms suite <ref type="bibr">Brockman et al. (2016)</ref>.</p><p>Notations: Throughout the rest of this paper, we denote</p><p>, as the Q-value, value-function, and the parameter values estimated respectively at the episode k for a given dual variable Y (inside the while loop in Algorithm 1). Note that policy depends on Y , hence, for different Y , V k,Y j,h would be different. Naturally, w k,Y j,h and Q k,Y j,h would be different (cf.( <ref type="formula">7</ref>)). We denote</p><p>, as the Q-value, value-function, and the parameters chosen for the determined Y k (i.e., after the While loop in Algorithm 1 terminates). Hence,</p><p>Here, &#8673; h,k (&#8226;) depends on the dual variable. Thus, the dependence is implicit. Sometimes, we also use the notation &#8673; Y to make the dependence on the dual variable explicit.</p><p>To simplify the presentation, we denote k</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A Preliminary Results</head><p>Lemma 7. Under Assumption 1, for any fixed policy &#8673;, let w &#8673; h be the corresponding weights such that Q &#8673; j,h = h (x, a), w &#8673; j,h i, for j 2 {r, g}, then we have for all h 2 [H],</p><p>Proof. From the linearity of the action-value function, we have</p><p>where</p><p>Thus, the result follows.</p><p>Lemma 8. For any (k, h, Y ), the weight w k,Y j,h satisfies</p><p>Proof. For any vector v 2 R d we have</p><p>here &#8673; h,k (&#8226;|x) is the Soft-max policy. Note that &#8673; h,k (&#8226;|x) implicitly depends on the dual-variable Y .</p><p>Note that Q k,Y j,h+1 (x, a) &#63743; H for any (x, a). Hence, from (18) we have</p><p>Hence, the result follows.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B Proof of Lemma 1</head><p>We prove a more general result. Lemma 9. For any episode k and 0 &#63743; Y &#63743; p K, with probability 1 p,</p><p>Note that since the above holds for 0 &#63743; Y &#63743; p K, it will hold for Y k chosen value by Algorithm 1 at episode k when the While loop terminates. Thus, Lemma 1 readily follows.</p><p>In order to prove the above result, we prove some base results in Section B.1. Subsequently, we prove Lemma 9 in Section B.2.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.1 Proof of Base Results</head><p>We state and prove Lemmas 10,11, and 12.</p><p>First, we state the concentration lemma which is essential in controlling the fluctuations in the least square value iteration for individual value function. Lemma 10. There exists a constant C 2 such that for any fixed p 2 (0, 1), if we let E be the event that We now, recursively bound the difference between the value function maintained in Algorithm 1 (without the bonus term) and the value function for any policy for both the reward and utility value functions. We bound this using the expected difference at the next step plus an error term. This error term can be upper bounded by the bonus term with a high-probability. Lemma 11. There exists an absolute constant = C 1 dH p &#9670;, &#9670; = log(log(|A|)4dT /p), and for any fixed policy &#8673;, on the event E defined in Lemma 10, we have</p><p>Proof. We only prove for j = r, the proof for j = g is similar. For notational simplicity, we also remove Y from the superscript in w k,Y j,h for the remainder of this proof. Note that Q &#8673; r,h (x, a) = h (x, a), w &#8673; r,h i = r h (x, a) + h V &#8673; r,h+1 (x, a). Hence, we have</p><p>Now, we bound each term in the right hand side of expression in ( <ref type="formula">22</ref>). We call those terms as q 1 , q 2 , and q 3 respectively.</p><p>First, note that |h (x, a),</p><p>Second, from Lemma 10, for the event in E, we have</p><p>where = log(4(C 1 + 1) log(|A|)dT /p). Third, h (x, a),</p><p>The last term in (25) can be bounded as the following</p><p>, q 1 + q 2 + q 3 i. Since = 1, we have from ( <ref type="formula">23</ref>), <ref type="bibr">(24,(26)</ref>, and ( <ref type="formula">27</ref>)</p><p>for some constant C 3 which is independent of C 1 . Finally, note that</p><p>where &#9670; = log(4 log(|A|)dT /p). The last inequality follows from the fact that &#9670; 2 [log 4, 1) as |A| 2, and C 3 is independent of C 1 . Hence, we can always pick C 3 p log 4 + log(C 1 + 1) &#63743; C 1 p log 4 which satisfies ( <ref type="formula">29</ref>) for all values of &#9670; 2 [log 4, 1).</p><p>Next, using the above lemma, we bound the difference between the composite value function maintained by the algorithm and the composite value function for a policy with the Lagrangian Y k .</p><p>Lemma 12. With prob. 1 p, (for the event in E) and any 0</p><p>Proof. Note the fact that |Q &#8673; r,h |&#63743; H. Thus, from Lemma 11 on the event E and for any Y 2 [0,</p><p>where the last equality follows from the definition of Q k,Y r,h . Similarly, for the event E,</p><p>Hence, for the event E,</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B.2 Proof of Lemma 1</head><p>First, we show that for a given Y , the gap between the maximum value attained by any composite (estimated) value function and our (estimated) composite value function are close for the parameters w k,Y j,h which we use to show Lemma 9 by controlling the parameter &#8629;.</p><p>is the value function corresponds to the greedy-policy with respect to the composite Q-function attained by our estimated value function.</p><p>where</p><p>Denote</p><p>where the last inequality follows from Proposition 1 in <ref type="bibr">Pan et al. (2019)</ref>.</p><p>We are now ready to show Lemma 9.</p><p>Proof. We prove the lemma by Induction.</p><p>First, we prove for the step H.</p><p>. Under the event in E as described in Lemma 10 and from Lemma 11, we have for j = r, g,</p><p>Hence, from the definition of V k,Y h</p><p>for any policy &#8673;. Thus, it also holds for &#8673; &#8676; , the optimal policy. Hence, from Lemma 13, we have</p><p>Now, suppose that it is true till the step h + 1 and consider the step h.</p><p>Since, it is true till step h + 1, thus, for any policy &#8673;,</p><p>From ( <ref type="formula">30</ref>) in Lemma 12 and the above result, we have for any (x, a)</p><p>Now, again from Lemma 13, we have</p><p>Now, since it is true for any policy &#8673;, it will be true for &#8673; &#8676; . From the definition of V &#8673;,Y , we have</p><p>Hence, the result follows by summing over K and considering h = 1.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C Proof of Lemma 2</head><p>Before proving Lemma 2, we prove the following result.</p><p>Lemma 14. Let V k,Y g,1 be the estimated value function computed by the Algorithm 1 when the dual-variable is Y , then</p><p>We first show that because of the soft-max property, the difference between</p><p>Hence, by the property of the soft-max <ref type="bibr">(Theorem 4.4 in Epasto et al. (2020)</ref>)</p><p>Since &#8629;H 1, thus, we have the result.</p><p>Since &#8629; = log(|A|) p K, then, we have from ( <ref type="formula">43</ref>), and</p><p>We are now ready to prove Lemma 14.</p><p>Proof. We prove the above by induction. In particular, we show that if</p><p>First, consider h = H. Since V k j,H+1 = 0, thus, we have</p><p>Hence, by Lemma 15 (identifying &#9999; 0 = &#8984;, and plugging &#8629; = log(|A|)/(4H)) we have</p><p>for all x. Hence, the statement is true for h = H.</p><p>In order to prove this for h, we need to show the following.</p><p>Proof. We show that for j = r. Note that</p><p>Hence,</p><p>where in the penultimate step we use Lemma 24. In the last inequality, we use the fact that (&#8676; K h ) I,</p><p>|| (x, a)||&#63743; 1. Hence, we have</p><p>for all (x, a).</p><p>Thus, we have from Lemma 15</p><p>, Thus, plugging &#8629; = log(|A|)/(4H), we have for any x,</p><p>Thus, by induction we have the result by plugging in h = 1. Now, we are ready to prove Lemma 2.</p><p>Proof. First, if Y k = 0, the result is trivially true. Now, consider that the while loop terminates at some value</p><p>(x 1 ) &lt; b (otherwise, the loop would have terminated at Y k &#8984;). Now, from Lemma 14,</p><p>for any x. Hence, the result follows.</p><p>D Proof of Lemmas 4 and 5</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.1 Proof of Lemma 4</head><p>Recall the definition of I b which is the set of episodes where Algorithm 1 returns</p><p>From Lemma 1 and the value of &#8629;, we obtain</p><p>where the last inequality follows from the fact that for all the episodes in</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.2 Proof of Lemma 5</head><p>Proof. We prove via induction. Since V k j,H+1 (x) = 0 for all x, thus, from Lemma 11</p><p>Recall that Y k is the selected dual variable at episode k.</p><p>Thus,</p><p>).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E Proof of Lemmas 3 and 6</head><p>In order to prove the Lemma 3 and 6, we state and prove the following result. In this section, we obtain bounds for the selected value Y k , hence, we use Q k j,h , w k j,h and V k j,h . First, we introduce a notation. Let</p><p>Lemma 17. On the event defined in E in Lemma 10, we have</p><p>Proof. By Lemma 11, for any x, h, a, k</p><p>Thus,</p><p>Thus, from (64), we have</p><p>Hence, by iterating recursively, we have</p><p>The result follows.</p><p>We, are now ready to prove Lemmas 3 and 6.</p><p>Proof. Note from Lemma 17, we have</p><p>We, now, bound the individual terms. First, we show that the first term corresponds to a Martingale difference.</p><p>For any (k, h) 2 [K] &#8677; [H], we define F k h,1 as -algebra generated by the state-action sequences, reward, and constraint values,</p><p>. Similarly, we define the F k h,2 as the -algebra generated by</p><p>for any k 2. Let F 1 0,2 be empty. We define a Martingale sequence</p><p>where t(k, h, m) = 2(k 1)H + 2(h 1) + m is the time index. Clearly, this martingale is adopted to the filtration</p><p>, and particularly</p><p>From the Azuma-Hoeffding inequality, we have</p><p>With probability 1 p/2 at least for any j = r, g,</p><p>Now, we bound the second term. Note that the minimum eigen value of</p><p>Now, by Cauchy-Schwartz inequality, we have</p><p>Note that = C 1 dH p &#9670;.</p><p>Thus, we have with probability</p><p>Hence, the result follows.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F Proof of Lemma 10</head><p>To simplify the notation, we remove h and Y from the subscript and superscript from w k,Y j,h , Q k,Y j,h and V k,Y j,h in this Section.</p><p>Note that the proof follows the similar direction as in <ref type="bibr">Ghosh et al. (2022)</ref> (Lemma 8 there). However, there is a major difference. In <ref type="bibr">Ghosh et al. (2022)</ref>, the upper bound of the dual variable Y was 2H/ (Appendix J), in our case, the upper bound of Y is p K. However, we show that it only adds to the constant term C 1 .</p><p>In order to prove the Lemma 10, we first compute the &#9999;-covering number for the class of value functions (Lemma 18).</p><p>In order to compute that we first compute the &#9999;-covering number of the individual Q-functions (Lemma 19) which is essential to compute the covering number for composite Q-functions (Corollary 1). Subsequently, we show that if the two Q-functions and the Lagrange multipliers are close, the policies are also close (Lemma 20).</p><p>We first introduce the set of Q-functions.</p><p>The set Q is parameterized by w j , and &#8676;. We have ||w j ||&#63743; 2H p dk/ (from Lemma 8). The minimum eigen value of &#8676; satisfies min 1. Hence, the Frobenius norm of &#8676; 1 is bounded. Note that Q k j 2 Q j for j = r, g. We now introduce the class of value function for j = r, g.</p><p>where &#8672; = p K.</p><p>The class of value function V j is parameterized by w r , w g , &#8676;, and Y 2 [0, &#8672;]. Note that even the individual value function depends on the Q-functions for both the reward and utility since the policy depends on the composite Q-function.</p><p>First, we need to see whether</p><p>We now bound the &#9999;-covering number for the class of value function Lemma 18. There exists a &#7804;j 2 V j parameterized by ( wr , wg , &#732; , &#8676;, &#7928; ) such that DIST (V j , &#7804;j ) &#63743; &#9999; where</p><p>Let N Vj &#9999; be the &#9999;-covering number for the set V j , then,</p><p>where</p><p>where &#8672; = 2 p K covering number for the set Q j . Towards this end, we first, introduce some notations.</p><p>} with respect to the Frobenius norm. Lemma 19.</p><p>The &#9999;-covering number for the set Q j , for j = r, g, N Qj &#9999; of the set Q j for j = r, g satisfies the following</p><p>The distance metric is the</p><p>Proof. For notational simplicity, we represent A = 2 &#8676; 1 , and reparamterized the class Q j by (w j , A). Now, p dk/ } with respect to the 2-norm. Also recall that</p><p>For any Q j 2 Q j , there exists a Qj parameterized by (w 2 , A 2 ) where w 2 2 C &#9999; w and</p><p>, which gives the result since log(&#8226;) is an increasing function.</p><p>Since the class of Q-function is independent of the policy we do not have &#8672; and &#8629; in the &#9999;-covering number.</p><p>From the above lemma and since Y k &#63743; &#8672;, we have the following,</p><p>Proof. Note that Qj 2 Q j belongs to the &#9999; 0 covering of the set Q.</p><p>where the first inequality follows from the property of supremum and the norm. The second inequality follows from the norm, and the fact that | &#7928;k Y k |&#63743; &#9999; 0 , and |Q k g (x, a)|&#63743; H. The third inequality follows from the fact that dist(Q j , Qj ) &#63743; &#9999; 0 .</p><p>We now show that if the there exist Qj , and &#7928;k which are close to Q j and Y k , then the soft-max policy is also close.</p><p>Lemma 20. Suppose that &#8673; is the soft-max policy (temp. coefficient 1/&#8629;) corresponding to the composite</p><p>&#8673; is the soft-max policy vector with the same temp. coefficient 1/&#8629; corresponding to the composite Q-function ( Qr + &#7928;k Qg ), i.e, 8a 2 A,</p><p>then, for any state x,</p><p>where &#8673;(&#8226;|x) = {&#8673;(a|x)} a2A and &#8673;(&#8226;|x) = {&#8673;(a|x)} a2A when dist(Q k j,h , Qj ) &#63743; &#9999; 0 for j = r, g, and</p><p>Proof. Let Exp &#8629; (P ) be a soft-max corresponding to the vector P , i.e., the i-th component of Exp &#8629; (P ) is</p><p>.</p><p>Note from Theorem 4.4 in Epasto et al. ( <ref type="formula">2020</ref>) then, we have</p><p>for two vectors P 1 and P 2 . Now note that in our case for a given state x, &#8673; is equivalent to</p><p>, and &#8673; is equivalent to Exp &#8629; ( Qr (x, &#8226;) + &#7928;k Qg (x, &#8226;)). Then from (85) and the fact that dist(Q</p><p>Hence, the result follows.</p><p>Based on the above two lemmas we show that when the Q-functions are close, the value functions in the class V j are also close.</p><p>Lemma 21. There exists &#7804;j 2 V j such that</p><p>where dist( Qj , Q j ) &#63743; &#9999; 0 , Qj 2 Q j for all j;</p><p>Proof. For any x,</p><p>where we use the fact that dist(Q k j , Qr ) &#63743; &#9999; 0 , and P a &#8673;(a|x) = 1 for the first term and the Holder's inequality in the second term for the second last inequality. For the last inequality, we use Lemma 20, and the fact that Qj (x, a) &#63743; H for any (x, a). Hence, we have the result.</p><p>Note that when &#8629; = log(|A|) p K/H as we have in Algorithm 1, the right hand side in (87) becomes</p><p>We introduce one more notation which we use to prove Lemma 18.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#9670;</head><p>Note that C &#9999; &#8672; consists of points which is &#9999;-close to any point within the interval [0, &#8672;]. Since we have defined &#9999;-cover for all the parameters, we are now ready to prove Lemma 18.</p><p>, then from Lemma 21, we have DIST(V k j , e V j ) &#63743; &#9999;. Thus, we only need to find parameters in the &#9999; 0 -covering of the Q-functions as described in Lemma 19 in order to obtain &#9999;-close value function.</p><p>Recall the Definition 6. Then, there exists wr , wg 2 C &#9999; 0 w such that || wr w r ||&#63743;</p><p>1 , for some &#8676;, and Y k , &#7928;k such that |Y k &#7928;k |&#63743; &#9999; 0 . Then we obtain Qj parameterized by ( wj , , &#8676;) for j = r, g, such that dist(Q j , Qj ) &#63743; &#9999; 0 (by Lemma 19). Now define e V j = P a &#8673;(a|&#8226;) Qj , where</p><p>Thus, from Lemma 21, we have DIST(V k j , &#7804;j ) &#63743; &#9999;. Hence, there exists &#7804;j parameterized by wr , wg , &#7928;k , &#195;, such that Dist( &#7804;j , V k j ) &#63743; &#9999;. Hence,</p><p>Thus, from Lemma 19 and Definition 7, the &#9999;-covering number N Vj &#9999; for the set V j satisfies the following</p><p>Hence, the result follows.</p><p>From Lemma 18, note that we need &#9999; 0 covering for the Q-functions where &#9999; 0 = &#9999; (H2&#8629;(1 + &#8672;) + 1)</p><p>if we need to bound DIST (V j , &#7804;j ) by &#9999;.</p><p>Now, we are ready to prove Lemma 10.</p><p>Proof. By Lemma 18, we know that there exists &#7804;j in the &#9999;-covering for V j such that for every x,</p><p>where</p><p>The last expression is bounded by 8k 2 &#9999; 2 . Now, we bound the first term. Note from Lemma 18 that in order to obtain &#7804;j which satisfies (90), we need to obtain we need N V &#9999; number of elements to obtain such ( wr , wg , , &#8676;, &#7928; ). Such &#7804;j is independent of samples. Hence, we can use the Elliptical lemma for self-normalization (Theorem 2). From Theorem 2 and the union bound we obtain</p><p>where N V &#9999; is upper bounded in (79). is equal to C 1 dH p &#9670; for some constant C 1 , and &#9670; = log(log(|A|)4dT /p). Further, &#8672; = p K . We obtain from ( <ref type="formula">92</ref>)</p><p>where</p><p>. Plugging in the above, and putting &#8629; = log(|A|) p K/H, we obtain from ( <ref type="formula">93</ref>)</p><p>for some constant C 2 . Hence, the result follows.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>G Supporting Results</head><p>The following result is shown in <ref type="bibr">Abbasi-Yadkori et al. (2011)</ref> and in Lemma D.2 in <ref type="bibr">Jin et al. (2020)</ref>.</p><p>Lemma 22. Let { t } t 0 be a sequence in &lt; d satisfying sup t 0 || t ||&#63743; 1. For any t 0, we define &#8676; t = &#8676; 0 + P t j=0 j T j j . Then if the smallest eigen value of &#8676; 0 be at least 1, we have log</p><p>Theorem 2. [Concentration of Self-Normalized Process Abbasi-Yadkori et al. ( <ref type="formula">2011</ref>)] Let {&#9999; t } 1 t=1 be a real-valued stochastic process with corresponding filtration {F t } 1 t=0 . Let &#9999; t |F t 1 be a zero mean and sub-Gaussian, i.e., [&#9999; t |F t 1 ] = 0, and</p><p>Let { t } 1 t=1 be a &lt; d -valued Stochastic process where t 2 F t 1 . Assume &#8676; 0 2 &lt; d&#8677;d is a positive-define matrix, let, &#8676; t = &#8676; 0 + P t j=0 j T j . Then for any &gt; 0 with probability at least 1 , we have</p><p>The next result characterizes the covering number of an Euclidean ball (Lemma 5.2 in Vershynin ( <ref type="formula">2010</ref>)). The following lemma is similar to Lemma C.4 in <ref type="bibr">Jin et al. (2020)</ref>.</p><p>Lemma 24. Let {&#9999; &#8999; } be any sequence so that |&#9999; &#8999; |&#63743; B for any &#8999; . Then, we have for any (h, k) 2 [H] &#8677; [K] and any 2 &lt; d :</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>H Tabular Setup</head><p>In this section, we describe the tabular setup in detail. First, we describe a structure for the tabular setup where one does not need to take the inverse of &#8676; k h . Further, we note that &#8984;</p><p>). We can revert back to the tabular case by setting (s, a) = e s,a where e s,a is a d-dimensional (here d = |S||A|) vector where e s,a = 1 for state-action pair (s, a) and zero for other values of state and action. The w r,h vector update becomes as the following</p><p>where n k h (x, a) is the number of times the state-action pair (x, a) has been encountered at step h till episode k. The Q k,Y r,h update will be</p><p>In a similar manner, we can update Q k g,h . We further remark that if we maintain n k h (x, a, x) to be the number of times the state-action-next state (x, a, x) has been encountered at step h till episode k. Then</p><p>A .</p><p>In this case, we do not need to go through all samples at each iteration and do not even need to store the old samples. The memory complexity of maintaining the counts {n h (x, a, x)} is O H|S| 2 |A| , which matches model-based algorithms for tabular settings such as <ref type="bibr">Efroni et al. (2020)</ref>.</p><p>Proof. We prove the result via induction. For</p><p>where we have used the fact that &#9999; 00 = 1 log(|A|) H K H+1 , and &#8629; = log(|A|) p K/(4H). Now, let us assume that the result is true for h+1. We have</p><p>where &#9999; 00 = 1 log(|A|) H K H+1 , and &#8629; = p K/(4H) Hence, the result follows after putting h = 1.</p><p>Hence, for tabular case, &#8984; = O(1/K H+1 ) is enough. Thus, the maximum number of times the while loop may continue is O(K H+1.5 ) since Y k &#63743; p K.</p><p>Improved Bounds for Tabular Case Using the finite state-space, we obtain a better bound for the regret and hard constraint violation. Theorem 3. Fix any p 2 (0, 1). If we set = 1, = C 4 p |S|log(4|S||A|log(|A|)T /p) for tabular case in Algorithm 1 for some absolute constant C 4 . With probability 1 2p, we have Proof. In order to prove the above result, we show that new bonus term is enough for optimisim.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Let us recall the difference</head><p>Now, note that w &#8673; r,h = &#10003; j,h + P s 0 P h V &#8673; r,h+1 (s 0 ) for tabular case. Hence ||w &#8673; r,h ||&#63743; H p |S|. For the third term, note that</p><p>The last term in ( <ref type="formula">101</ref>) can be bounded as the following</p><p>The first term in ( <ref type="formula">101</ref>) is equal to</p><p>We have to bound the second term in (100). Note that</p><p>We now bound the above. First, we express V r,h+1 = &#7804;h+1 + V j where | V j |&#63743; &#9999; for &#7804;j in the &#9999;-covering set of V j . Since the upper bound for the value function is H, one can trivially obtain the &#9999;-covering number for the value function as</p><p>From Theorem 2, we obtain with probability 1 for a specific (x, a) 2</p><p>Hence, using the union bound where = p/(N &#9999; V |S||A|), we obtain with probability 1 p/2 for any (x, a)</p><p>Using &#9999; = H/K, we obtain from ( <ref type="formula">104</ref>) and ( <ref type="formula">105</ref>) as</p><p>Hence, we can write</p><p>for some constant C 4 and C 5 .</p><p>Hence, in Lemma 11, we can use the value as C 4 H p |S|log(|S||A|4T /p). Recall equation ( <ref type="formula">67</ref>)</p><p>Hence, following the same arguments as in Lemmas 3, and 6, we obtain</p><p>where we use (76) to bound the above. The above is enough to obtain the improved regret and hard constraint violation bound as the rest of the argument will follow the same logic.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I Difference from the Bandit-setup</head><p>Recently, <ref type="bibr">Guo et al. (2022)</ref> proposed an algorithm which achieves &#213;( p T ) regret and hard-constraint violation in various bandit setups using primal-dual approach. The episodic RL-setup with H = 1 is equivalent to the bandit setup. Thus, our approach is applicable to the bandit setup as well. However, unfortunately, the approach in <ref type="bibr">Guo et al. (2022)</ref> can not be extended to the episodic CMDP setup. We will describe the main issue next. In <ref type="bibr">Guo et al. (2022)</ref>, a dual variable &#374;k p K is used (hence, the dual variable is always greater than or equal to p K). Since there is no need of multiple steps in bandit setup, there is no need of value function. Rather, one only needs to estimate the reward and utility function f and g respectively. <ref type="bibr">Guo et al. (2022)</ref> estimated an optimistic reward function f (a) and utility function &#285;(a) for each a. Then, <ref type="bibr">Guo et al. (2022)</ref> proposed an algorithm according to the greedy policy a = arg max a 0 ( f (a 0 ) &#374;k (&#285;(a 0 )) + )</p><p>Note that if &#285;(a 0 ) is positive, then it negates the reward which means that such an action would be avoided.</p><p>From the optimism, one can show that f (a 0 ) Y k (&#285;(a 0 )) + f (a &#8676; ) Y k (g(a &#8676; )) + where a &#8676; is the optimal solution. Using the above, <ref type="bibr">Guo et al. (2022)</ref> obtained the regret and hard constraint violation bound.</p><p>The regret and violation bound obtained by <ref type="bibr">Guo et al. (2022)</ref> is &#213;( p T ) which is the same as ours. However, the computation complexity is much less. In particular, there is no need to obtain the dual-variable Y k at every episode to balance between the reward and the utility maximization which we proposed. Rather, any &#374;k p K would be sufficient.</p><p>It is natural to ask whether we can extend the above approach for the RL setup. Readers would note that in the RL one would replace the f and g with Q r,h and Q g,h respectively. In particular, one would be tempted to take action according to the greedy policy</p><p>However, the above would not work. The state space consists of location, speed, angle, and angular velocity. We discrete each in evenly-spaced 15 states, thus, the state space is 15 4 . Even though the state space is large, we observe that our approach learns to achieve the optimal policy. It shows that our approach can be applied to continuous state space as well. Further, our approach also learns to satisfy constraints.</p><p>From Figure <ref type="figure">2</ref>, we observe that the hard constraint violation in our approach grows on a much smaller scale compared to both <ref type="bibr">Ghosh et al. (2022)</ref> and OptPess-PrimalDual. In fact, even the reward achieved by our approach is higher. The highest achievable reward is 200 and as we can see our approach indeed approaches the optimal reward as K increases.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>K.3 A paradoxical CMDP</head><p>This MDP is proposed by <ref type="bibr">Moskovitz et al. (2023)</ref>. If one takes action a = 0, one would stay in state s 0 and gets a reward 1. However, taking action a = 1 would take the agent to state s 1 and reward 0. At state s 1 , the action a = 1 would get the agent to state s 0 and reward 1. On the other hand, the agent will remain in state s 1 if the action a = 0 and the reward will be 0 (see Figure <ref type="figure">3a</ref>). The length of the horizon H = 10. The utility g = r. The CMDP problem is maximize V r,1 (s 0 ) s.t V g,1 (s 0 ) &#63743; 5 (115)</p><p>Hence, the agent should be in state s 0 half of the time and state s 1 for the rest. Though the maximum cumulative reward can be 10 where the agent can remain in state s 0 . However, such a strategy is not feasible.</p><p>From Figure <ref type="figure">3</ref> it is evident that the hard-constraint violation in our approach scales at most O( p K) and scales at a much smaller scale compared to <ref type="bibr">Liu et al. (2021a)</ref> and <ref type="bibr">Ghosh et al. (2022)</ref>. Hence, it shows that our algorithm is able to achieve feasible policy at a faster scale compared to the existing state-of-the-art approaches who have only focused on reducing the soft constaint violation. Figure <ref type="figure">3</ref> also shows that initially, the reward is higher than 5 as our algorithm still explores. Hence, the algorithm chooses infeasible policies more frequently. Finally, the reward decreases the reward converges to the optimal value of 5 as our algorithm chooses feasible optimal policies more frequently.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>K.4 Experiment on Frozen Lake</head><p>We also simulated our method on the frozen lake environment of OpenAIgym <ref type="bibr">Brockman et al. (2016)</ref>. We consider 4 &#8677; 4 grid. The agent gets a reward 1 when it reaches the goal state. We consider an episode length of H = 9. The agent stays in the goal state once it reaches there. The agent is also permanently in the hole if it reaches a hole. In this case, the reward will be 0.</p><p>In the original frozen-lake experiment, there are two optimal ways to get to the goal. We add a constraint to ensure that one of the paths is infeasible. In particular, we add a utility function where the agent gets a utility of 1 except when the agent falls into a hole or goes to any of the blocks on the extreme left-hand column (Figure <ref type="figure">4a</ref>). This will ensure that the optimal path of the left-hand side is infeasible. We set b to 8 which ensures that only one path is feasible and optimal.</p><p>Our simulation result shows that our approach indeed identifies the optimal path (Figure <ref type="figure">4</ref>). The violation  S, g=1 F, g=1 F, g=1 F,g=1 F, g=0, H, g=0 F, g=1 H,g=0 F, g=0 F, g=1 F, g=1 H, g=0 H, g=0 F, g=1 F, g=1 G, g=1</p><p>The optimal solution-Move rightward for 2 steps, and downward for 3 steps, and then rightward for 1 step to reach the goal state.  becomes almost 0 after 1000 episodes (Figure <ref type="figure">4b</ref>). Hence, our algorithm indeed achieves the feasible optimal policy. The hard constraint violation achieved by Ghosh et al. ( <ref type="formula">2022</ref>) is much higher compared to ours and is unable to obtain feasible policy. The hard constraint violation achieved by <ref type="bibr">Liu et al. (2021a)</ref> is higher compared to even <ref type="bibr">Ghosh et al. (2022)</ref>.Further, the reward achieved by our approach converges to the optimal one (3) after only 1000 episodes (Figure <ref type="figure">4c</ref>). Again, it shows that our algorithm is able to identify optimal policy even within smaller number of episode while the other algorithms are unable to find feasible policy.</p></div></body>
		</text>
</TEI>
