P ROVABLY E FFICIENT R ISK -S ENSITIVE R EINFORCEMENT L EARNING : I TERATED CV A R AND W ORST P ATH
Anonymous authors
Paper under double-blind review
A BSTRACT
In this paper, we study a novel episodic risk-sensitive Reinforcement Learning (RL) problem, named Iterated CVaR RL, which aims to maximize the tail of the reward-to-go at each step, and focuses on tightly controlling the risk of getting into catastrophic situations at each stage.
This formulation is applicable to realworld tasks that demand strong risk avoidance throughout the decision process, such as autonomous driving, clinical treatment planning and robotics.
We investigate two performance metrics under Iterated CVaR RL, i.e., Regret Minimization and Best Policy Identification.
For both metrics, we design efficient algorithms
ICVaR - RM and ICVaR - BPI , respectively, and provide nearly matching upper and lower bounds with respect to the number of episodes K .
We also investigate an interesting limiting case of Iterated CVaR RL, called Worst Path RL, where the objective becomes to maximize the minimum possible cumulative reward.
For
Worst Path RL, we propose an efficient algorithm with constant upper and lower bounds.
Finally, our techniques for bounding the change of CVaR due to the value function shift and decomposing the regret via a distorted visitation distribution are novel, and can find applications in other risk-sensitive RL problems.
I NTRODUCTION
Reinforcement Learning (RL) (Kaelbling et al., 1996; Szepesv ´ ari, 2010; Sutton & Barto, 2018) is a classic online decision-making formulation, where an agent interacts with an unknown environment with the goal of maximizing the obtained reward.
Despite the empirical success and theoretical progress of recent RL algorithms, e.g., (Szepesv ´ ari, 2010; Agrawal & Jia, 2017; Azar et al., 2017;
Zanette & Brunskill, 2019), they focus mainly on the risk-neutral criterion, i.e., maximizing the expected cumulative reward, and can fail to avoid rare but disastrous situations.
As a result, existing algorithms cannot be applied to tackle real-world risk-sensitive tasks, such as autonomous driving (Wen et al., 2020) and clinical treatment planning (Coronato et al., 2020), where policies that ensure low risk of getting into catastrophic situations at all decision stages are strongly preferred.
Motivated by the above facts, we investigate Iterated CVaR RL, a novel episodic RL formulation equipped with an important risk-sensitive criterion, i.e., Iterated Conditional Value-at-Risk (CVaR) (Hardy & Wirch, 2004).
Here, CVaR (Artzner et al., 1999) is a popular static (single-stage) risk measure which stands for the expected tail reward.
Iterated CVaR is a dynamic (multi-stage) risk measure defined upon CVaR by backward iteration, and focuses on the worst portion of the reward-to-go at each stage.
In the Iterated CVaR RL problem, an agent interacts with an unknown episodic Markov Decision Process (MDP) in order to maximize the worst α -portion of the rewardto-go at each step, where α ∈ (0 , 1] is a given risk level.
Under this model, we investigate two important performance metrics, i.e., Regret Minimization (RM), where the goal is to minimize the cumulative regret over all episodes, and Best Policy Identification (BPI), where the performance is measured by the number of episodes required for identifying an optimal policy.
Compared to existing CVaR MDP model, e.g., (Boda & Filar, 2006; Ott, 2010; B¨auerle & Ott, 2011; Chow et al., 2015), which aims to maximize the CVaR (i.e., the worst α -portion) of the total reward, our Iterated CVaR RL concerns the worst α -portion of the reward-to-go at each step , and prevents the agent from getting into catastrophic states more carefully.
Intuitively, CVaR MDP takes more cumulative reward into account and prefers actions which have better performance in general, but can have larger probabilities of getting into catastrophic states.
Thus, CVaR MDP is suitable for scenarios where bad situations lead to a higher cost instead of fatal damage, e.g., finance.
In contrast, our Iterated CVaR RL prefers actions which have smaller probabilities of getting into catastrophic states.
Hence, Iterated CVaR RL is suitable for safety-critical applications, where catastrophic states are unacceptable and need to be carefully avoided, e.g., clinical treatment planning (Wang et al., 2019) and unmanned helicopter control (Johnson & Kannan, 2002).
For example, consider the case where we fly an unmanned helicopter to complete some task.
There is a small probability that, at each time during execution, the helicopter encounters a sensing or control failure and does not take the scheduled action.
To guarantee the safety of surrounding workers and the helicopter, we need to make sure that even if the failure occurs, the taken policy ensures that the helicopter does not crash and cause fatal damage (see Appendix C.2, C.3 for more detailed comparisons with existing risk-sensitive MDP models).
Iterated CVaR RL faces several unique challenges as follows.
(i)
The importance (contribution to regret) of a state in Iterated CVaR RL is not proportional to its visitation probability.
Specifically, there can be states which are critical (risky) but have a small visitation probability.
As a result, the regret for Iterated CVaR RL cannot be decomposed into the estimation error at each step with respect to the visitation distribution, as in standard RL analysis (Jaksch et al., 2010; Azar et al., 2017; Zanette & Brunskill, 2019).
(ii)
In Iterated CVaR RL, the calculation of estimation error involves bounding the change of CVaR when the true value function shifts to optimistic value function, which is very different from typically bounding the change of expected rewards as in existing RL analysis (Jaksch et al., 2010; Azar et al., 2017; Jin et al., 2018).
Therefore, Iterated CVaR RL demands brandnew algorithm design and analytical techniques.
To tackle the above challenges, we design two efficient algorithms ICVaR - RM and ICVaR - BPI for the RM and BPI metrics, respectively, equipped with delicate CVaR-adapted value iteration and exploration bonuses to allocate more attention on rare but potentially dangerous states.
We also develop novel analytical techniques, for bounding the change of CVaR due to the value function shift and decomposing the regret via a distorted visitation distribution.
Lower bounds for both metrics are established to demonstrate the optimality of our algorithms with respect to the number of episodes K .
Moreover, we present experiments to validate our theoretical results and show the performance superiority of our algorithm (see Appendix A).
We further study an interesting limiting case of Iterated CVaR RL when α approaches 0 , called Worst
Path RL, where the goal becomes to maximize the minimum possible cumulative reward (optimize the worst path).
This setting corresponds to the scenario where the decision maker is extremely riskadverse and concerns the worst situation (e.g., in clinical treatment planning (Coronato et al., 2020), the worst case can be disastrous).
We emphasize that Worst Path RL cannot be directly solved by taking α → 0 in Iterated CVaR RL’s results, as the results there have a dependency on 1 α in both upper and lower bounds.
To handle this limiting case, we design a simple yet efficient algorithm
MaxWP , and obtain constant upper and lower regret bounds which are independent of K .
The contributions of this paper are summarized as follows
• We propose a novel Iterated CVaR RL formulation, where an agent interacts with an unknown environment, with the objective of maximizing the worst α -percent tail of the reward-to-go at each step.
This formulation enables one to tightly control risk throughout the decision process, and is most suitable for applications where such safety-at-all-time is critical.
• We investigate two important metrics of Iterated CVaR RL, i
e., Regret Minimization (RM) and Best Policy Identification (BPI), and propose efficient algorithms ICVaR - RM and ICVaR - BPI .
We establish nearly matching regret/sample complexity upper and lower bounds with respect to K .
Moreover, we develop novel techniques to bound the change of CVaR due to the value function shift and decompose the regret via a distorted visitation distribution, which can be applied to other risk-sensitive decision making problems.
• We further investigate a limiting case of Iterated CVaR RL when α approaches 0 ,
called
Worst Path RL, where the objective is to maximize the minimum possible cumulative reward.
We develop a simple and efficient algorithm MaxWP , and provide constant regret upper and lower bounds (independent of K ).
Due to space limit, we defer all proofs and experiments to Appendix.
R ELATED W ORK
Below we review the most related works, and defer a full literature review to Appendix B.
CVaR-based MDPs (known transition).
Boda & Filar (2006); Ott (2010); B¨auerle & Ott (2011);
Chow et al.
(2015) study the CVaR MDP where the objective is to minimize the CVaR of the total cost, and show that the optimal policy for CVaR MDP is history-dependent (see Appendix C.2 for a detailed comparison with CVaR MDP).
Hardy & Wirch (2004) firstly define the Iterated CVaR measure, and Osogami (2012); Chu & Zhang (2014); B¨auerle & Glauner (2022) consider iterated coherent risk measures (including Iterated CVaR) in MDPs, and demonstrate the existence of Markovian optimal policies.
The above works focus mainly on the planning side, i.e., proposing algorithms and error guarantees for MDPs with known transition, while our work develops RL algorithms (interact with the environment) and regret/sample complexity results for unknown transition.
Risk-sensitive Reinforcement Learning (unknown transition).
Tamar et al.
; Keramati et al.
(2020) study CVaR MDP with unknown transition and provide convergence analysis.
Borkar & Jain (2014); Chow & Ghavamzadeh (2014); Chow et al.
(2017) investigate RL with CVaR-based constraints.
Heger (1994); Coraluppi & Marcus (1997; 1999) consider minimizing the worst-case cost in RL and design heuristic algorithms.
Fei et al.
(2020; 2021a;b) study risk-sensitive RL with the exponential utility criterion, which takes all successor states into account with an exponential reweighting scheme.
In contrast, our Iterated CVaR RL primarily concerns the worst α -portion successor states, and focuses on optimizing the performance under bad situations (see Appendix C. for a detailed comparison).
P ROBLEM F ORMULATION
In this section, we present the problem formulations of Iterated CVaR RL and Worst Path RL.
Conditional Value-at-Risk (CVaR).
We first introduce two risk measures, i.e., Value-at-Risk (VaR) and Conditional Value-at-Risk (CVaR).
Let X be a random variable with cumulative distribution function F ( x ) =
Pr[ X ≤ x ] .
Given a risk level α ∈ (0 , 1] , the VaR at risk level α is the α -quantile of X , i.e., VaR α ( X ) =
min { x | F ( x ) ≥ α } , and the CVaR at risk level α is defined as (Rockafellar et al., 2000):
[Equation]
where ( x ) + := max { x, 0 } .
If there is no probability atom at VaR α ( X ) , CVaR can also be written as CVaR α ( X ) =
E [ X | X ≤ VaR α
( X )] (Shapiro et al., 2021).
Intuitively, CVaR α ( X ) is a distorted expectation of X conditioning on its α -portion tail, which depicts the average value when bad situations happen.
When α = 1 , CVaR α ( X ) = E
[ X ] , and when α → 0 , CVaR α ( X ) tends to min( X ) (Chow et al., 2015).
Iterated CVaR RL.
We consider an episodic Markov Decision Process (MDP) M ( S , A , H, p, r ) .
Here S is the state space, A is the action space, and H is the length of horizon in each episode.
p is the transition distribution, i.e., p ( s ′ | s, a ) gives the probability of transitioning to s ′ when starting from state s and taking action a .
r : S × A (cid:55)→ [0 , 1] is a reward function, and r ( s, a ) gives a deterministic reward for taking action a in state s .
A policy π is defined as a collection of H functions, i.e., π = { π h : S (cid:55)→ A} h ∈ [ H ] , where [ H ] := { 1 , 2 , ..., H } .
The episodic RL game is as follows.
In each episode k , an agent chooses a policy π k , and starts from a fixed initial state s 1 , i.e., s k 1 :
=
s 1 , as assumed in many prior RL works (Fiechter, 1994;
Kaufmann et al., 2021; M´enard et al., 2021).
At each step h ∈
[ H ] , the agent observes the state s kh and takes an action a kh = π kh ( s kh ) .
After that, it receives a reward r ( s kh , a kh ) and transitions to a next state s kh +1 according to the transition distribution p ( ·| s kh , a kh ) .
The episode ends after H steps and the agent enters the next episode.
In Iterated CVaR RL, for any risk level α ∈ (0 , 1] and a policy π , we use value function V α,πh : S (cid:55)→ R and Q-value function Q α,πh : S × A (cid:55)→ R to denote the cumulative reward that can be obtained when the agent transitions to the worst α -portion states at each step, starting from s and ( s, a ) at step h , respectively.
For simplicity of notation, when the value of α is clear, we omit the superscript α and use the notations V πh and Q πh .
Formally, Q πh and V πh are recurrently defined in Eq.
(i) below.
Since
S , A and H are finite and the maximization of V πh ( s ) in Iterated CVaR RL satisfies the optimal substructure property, there exists an optimal policy π ∗ which gives the optimal value V ∗ h ( s ) =
max π V πh ( s ) for all s ∈ S and h ∈
[ H ] (Chu & Zhang, 2014).
Therefore, the Bellman equation and the Bellman optimality equation are given in Eqs.
(i),(ii) below, respectively (Chu & Zhang, 2014).
[Equation]
where CVaR αs ′ ∼ p (
[Equation]
| s,a ) ( V πh +1 ( s ′ )) denotes the CVaR value of random variable V πh +1 ( s ′ ) with s ′ ∼ p ( ·| s, a ) at risk level α .
We also provide the expanded version of value function definitions for
Iterated CVaR RL (Eqs.
(i), (ii)) in Appendix C.1.
We consider two performance metrics for Iterated CVaR RL, i.e., Regret Minimization (RM) and
Best Policy Identification (BPI).
In Iterated CVaR RL-RM, the agent aims to minimize the cumulative regret in K episodes, defined as
[Equation]
In Iterated CVaR RL-BPI, given a confidence parameter δ ∈ (0 , 1] and an accuracy parameter ε > 0 , the agent needs to use as few trajectories (episodes) as possible to identify an ε -optimal policy ˆ π , which satisfies V ˆ π 1 ( s 1 ) ≥ V ∗ 1 ( s 1 ) − ε , with probability as least 1 − δ .
That is, the performance of
BPI is measured by the number of trajectories used, i.e., sample complexity.
Worst Path RL.
Furthermore, we investigate an interesting limiting case of Iterated CVaR RL when α approaches 0 , called Worst Path RL.
In this case, the objective becomes maximizing the minimum possible reward (Heger, 1994).
The Bellman (optimality) equations become 
[Equation]
where min s ′ ∼ p ( ·| s,a ) ( V πh +1 ( s ′ )) denotes the minimum value of random variable V πh +1 ( s ′ ) with s ′ ∼ p ( ·| s, a ) .
From Eq.
(2), one sees that
[Equation]
Thus, Q πh ( s, a ) and V πh ( s ) denote the minimum possible cumulative reward under policy π , starting from ( s, a ) and s at step h , respectively.
The optimal policy π ∗ maximizes the minimum possible cumulative reward (i.e., optimizes the worst path) for all starting states and steps.
Formally, π ∗ gives the optimal value V ∗ h ( s ) = max π V πh ( s ) for all s ∈ S and h ∈
[ H ] .
For Worst Path RL, in this paper we mainly consider the regret minimization setting, where the regret is defined the same as Eq.
Note that this case cannot be directly solved by taking α →in Iterated CVaR RL, as the results there have a dependency on 1 α .
Thus, changing from CVaR ( · ) to min( · ) in Worst Path RL requires a different algorithm design and analysis.
The best policy identification setting of Worst Path RL, on the other hand, is very challenging.
This is because we cannot establish confidence intervals under the min( · ) operation, and it is difficult to determine when the estimated optimal policy is accurate enough and when the algorithm should stop.
We will further investigate this setting in future work.
I TERATED CV A R RL WITH R EGRET M INIMIZATION
In this section, we consider regret minimization (Iterated CVaR RL-RM).
We propose an algorithm
ICVaR - RM with CVaR-adapted exploration bonuses, and demonstrate its sample efficiency.
A LGORITHM ICVaR - RM AND R EGRET U PPER B OUND
We propose a value iteration-based algorithm ICVaR - RM
(Algorithm 1), which adopts Browntype (Brown, 2007) (CVaR-adapted) exploration bonuses and delicately pays more attention to rare but risky states.
Specifically, in each episode k , ICVaR - RM computes the empirical CVaR for the values of next states CVaR αs ′ ∼ ˆ p k ( ·| s,a ) ( ¯ V kh +1 ( s ′ )) and Brown-type exploration bonuses Hα (cid:113)
L n k ( s,a ) .
Here n k ( s, a ) is the number of times ( s, a ) was visited up to episode k , and
ˆ p k
( s ′ | s, a ) is the empirical estimate of transition probability p ( s ′ | s, a ) .
Then, ICVaR - RM constructs optimistic Q-value function ¯ Q kh ( s, a ) , optimistic value function ¯ V kh ( s ) , and a greedy policy π k with respect to ¯ Q kh ( s, a ) .
After calculating the value functions and policy, ICVaR - RM plays episode k with policy π k , observes a trajectory, and updates n k ( s, a ) and ˆ p k +
( s ′ | s, a ) .
The calculation of CVaR (Line 5) can be implemented efficiently, and costs O
( S log S ) computation complexity (Shapiro et al., 2021).
We summarize the regret performance of ICVaR - RM as follows.
Theorem 1 (Regret Upper Bound) .
With probability at least 1 − δ , the regret of algorithm ICVaR - RM is bounded by
[Equation]
where w π,h ( s ) denotes the probability of visiting state s at step h under policy π .
Remark 1.
The regret depends on the minimum between an MDP-intrinsic visitation factor (min π,h,s : w π,h ( s ) > 0 w π,h ( s ))
− 12 and 1 √ α H − 1 .
When α is small, the first term dominates the bound, which stands for the minimum probability of visiting an available state under any feasible policy.
Note that min π,h,s : w π,h ( s ) > 0 w π,h ( s ) takes the minimum over only the policies under which s is reachable, and thus, this factor will never be zero.
Indeed, this factor also exists in the lower bound (see Section 4.2).
Thus, it characterizes the essential problem hardness, i.e., when the agent is highly risk-adverse, her regret will be heavily influenced by exploring critical but hard-to-reach states.
When α is large, 1 √ α H − 1 instead dominates the bound.
The intuition behind the factor
[Equation]
α H − 1 is that for any state-action pair, the ratio of the visitation probability conditioning on transitioning to bad successor states over the original visitation probability can be upper bounded by 1 α H − 1 .
This ratio is critical and will appear in the regret bound (see Lemma 9 for a formal statement).
In the special case when α = 1 , our Iterated CVaR RL problem reduces to the classic RL formulation, and our regret bound becomes ˜ O
( HS √ KHA ) , which matches the result in existing classic
RL work (Jaksch et al., 2010).
This bound has a gap of √ HS to the state-of-the-art regret bound for classic RL (Azar et al., 2017; Zanette & Brunskill, 2019).
This is because our algorithm is mainly designed for general risk-sensitive cases (which require CVaR-adapted exploration bonuses), and does not use the Bernstein-type exploration bonuses (which only work for classic expectation maximization criterion).
Such phenomenon also appears in existing risk-sensitive RL works (Fei et al., 2020; 2021a).
Designing an algorithm which achieves an optimal regret simultaneously for both risk-sensitive cases and classic expectation maximization case is still an open problem, which we leave for future work.
To validate our theoretical analysis, we also conduct experiments to exhibit the influences of parameters α , δ , H , S , A and K on the regret of ICVaR - RM in practice, and the empirical results well match our theoretical bound (see Appendix A).
Challenges and Novelty in Regret Analysis.
The analysis of Iterated CVaR RL faces several challenges.
(i)
First of all, in Iterated CVaR RL, the contribution of a state to the regret is not proportional to its visitation probability as in standard RL analysis (Jaksch et al., 2010; Azar et al., 2017; Zanette & Brunskill, 2019).
Instead, the regret is influenced more by risky but hard-to-reach states.
Thus, the regret cannot be decomposed into estimation error with respect to visitation distribution.
(ii)
Second, unlike existing RL analysis (Jaksch et al., 2010; Azar et al., 2017; Jin et al., 2018) which typically calculates the change of expected rewards between optimistic and true value functions, in Iterated CVaR RL, we need to instead analyze the change of CVaR when the true value function shifts to an optimistic value function.
To tackle these challenges, we develop a new analytical technique to bound the change of CVaR due to the value function shift by conditional transition probabilities, which can find applications in other CVaR-based RL problems.
Furthermore, we establish a novel regret decomposition for Iterated CVaR RL via a distorted (conditional) visitation distribution, and quantify the deviation between this distorted visitation distribution and the original visitation distribution.
Below we present a proof sketch for Theorem 1 (see Appendix D.1 for a complete proof).
Proof sketch of Theorem 1.
First, we introduce a key inequality (Eq.
(3)) to bound the change of
CVaR when the true value function shifts to an optimistic one.
To this end, let β α,V ( ·| s, a ) ∈ R S denote the conditional transition probability conditioning on transitioning to the worst α -portion successor states s ′ , i.e., with the lowest values V ( s ′ ) .
It satisfies that (cid:80) s ′
∈S β α,V ( s ′ | s, a ) · V ( s ′ ) =
CVaR αs ′ ∼ p ( ·| s,a ) ( V ( s ′ )) .
Then, for any ( s, a ) and value functions ¯ V , V such that ¯ V ( s ′ ) ≥ V ( s ′ ) for any s ′ ∈ S , we have
[Equation]
Eq.
(3) implies that the deviation of CVaR between optimistic and true value functions can be bounded by their value deviation under the conditional transition probability, which resolves the aforementioned challenge (ii)
[Equation]
and serves as the basis of our recurrent regret decomposition.
Now, since ¯ V kh is an optimistic estimate of V ∗ h
[Equation]
we decompose the regret in episode k as ¯
[Equation]
Here w CVaR ,α,V πk kh ( s, a ) denotes the conditional probability of visiting ( s, a ) at step h of episode k , conditioning on transitioning to the worst α -portion successor states s ′ (i.e., with the lowest αportion values V π k h ′
+1 ( s ′ ) )
at each step h ′ = 1 , . . .
, h − 1 .
Intuitively, w CVaR ,α,V πk kh
( s, a ) is a distorted visitation probability under the conditional transition probability β α,V πk ( ·|· , · ) .
Inequality (b) uses the concentration of CVaR and Eq.
Inequality (c) follows from recurrently applying steps (a)- (b) to unfold ¯ V kh ( · ) − V π k h ( · ) for h = 2 , . .
, H , and the fact that w CVaR ,α,V πk kh ( s, a ) is the visitation probability under conditional transition probability β α,V πk ( ·|· , · ) .
Eq.
(4) decomposes the regret into estimation error at all state-action pairs via the distorted (conditional) visitation distribution w CVaR ,α,
V πk kh
( s, a ) , which overcomes the aforementioned challenge (i).
Summing Eq.
(4) over all episodes k ∈
[ K ] and using the Cauchy–Schwarz inequality, we have
[Equation]
Here w kh ( s, a ) denotes the probability of visiting ( s, a ) at step h of episode k , and w π,h
( s, a ) denotes the probability of visiting ( s, a ) at step h under policy π .
Equality (d) uses the facts that (cid:80) ( s,a ) w CVaR ,α,V πk kh
( s, a )
= 1 , and if the visitation probability w kh ( s, a ) = 0 , the conditional visitation probability w CVaR ,α,V πk kh
( s, a ) must be 0 as well.
Inequality (e) is due to that w CVaR ,α,V πk kh
( s, a )
/w kh
( s, a ) can be bounded by both 1 / min π,h, ( s,a ): w π,
h ( s,a ) > 0 w π,h
( s, a ) and 1 /α H − 1 .
Specifically, the bound 1 / min π,h, ( s,a ): w π,h ( s,a ) > 0 w π,h ( s, a ) follows from min π,h, ( s,a ): w π,
h
( s,a ) > 0 w π,h
( s, a ) ≤ w kh
( s, a ) , and the bound 1 /α H − 1 comes from the fact that the conditional visitation probability w CVaR ,α,V πk kh
( s, a ) is at most 1 /α H − 1 times the visitation probability w kh
( s, a ) .
Having established the above, we can use a similar analysis as that in classic
RL (Azar et al., 2017; Zanette & Brunskill, 2019) to bound (cid:80) Kk =1 (cid:80) Hh =1 (cid:80) ( s,a ) w kh ( s,a ) n k ( s,a ) , and then, we can obtain Theorem 1.
□
4. R EGRET L OWER B OUND
We now present a regret lower bound to demonstrate the optimality of algorithm ICVaR - RM .
Theorem 2 (Regret Lower Bound) .
There exists an instance of Iterated CVaR RL-RM, where min π,h,s : w π,h ( s ) > 0 w π,h ( s ) >
[Equation]
H − 1 and the regret of any algorithm is at least
[Equation]
In addition, there exists an instance of Iterated CVaR RL-RM, where α H −> min π,h,s : w π,h ( s ) > 0 w π,h ( s ) and the regret of any algorithm is at least Ω( (cid:113) AKα H − 1 ) .
Remark 2.
Theorem 2 demonstrates that when α is small, the factor min π,h,s : w π,h ( s ) > 0 w π,h ( s ) is inevitable in general.
This reveals the intrinsic hardness of Iterated CVaR RL, i.e., when the agent is highly sensitive to bad situations, she must suffer a regret due to exploring risky but hard-to-reach states.
This lower bound also validates that ICVaR - RM is near-optimal with respect to K .
[Figure]
Lower Bound Analysis.
Here we provide the proof idea of the first lower bound (Eq.
(5)) in Theorem 2, and defer the full proof to Appendix D.2 due to space limit.
We construct an instance with a hard-to-reach bandit state (which has an optimal action and multiple sub-optimal actions), and show that this state is critical for minimizing the regret, but difficult for any algorithm to learn.
As shown in
Figure 1, we consider an MDP with A actions, n regular states s 1 , . . .
, s n and three absorbing states x 1 , x 2 , x 3 , where n < 12 H .
The reward function r ( s, a ) depends only on the states, i.e., s 1 , . .
. , s n generate zero reward, and x 1 , x 2 , x 3 generate rewards 1 , 0 . 8 and 0 . 2 , respectively.
Let µ be a parameter such that 0 < α < µ < 13 .
Under all actions, state s 1 transitions to s 2 , x 1 , x 2 , x 3 with probabilities µ , 1 − 3 µ , µ and µ , respectively, and state s i ( 2 ≤ i ≤ n − 1 ) transitions to s i +1 , x 1 with probabilities µ and 1 − µ , respectively.
For the bandit state s n , under the optimal action, s n transitions to x 2 , x 3 with probabilities 1 − α + η and α − η , respectively.
Under sub-optimal actions, s n transitions to x 2 , x 3 with probabilities 1 − α and α , respectively.
In this MDP, under the Iterated CVaR criterion, the value function mainly depends on the path s
→ s 2 → · · · → s n → x 2 /x 3 , and especially on the action choice in the bandit state s n .
Thus, to distinguish the optimal action in s n , any algorithm must suffer a regret dependent on the probability of visiting s n , which is exactly the minimum visitation probability over all reachable states min π,h,s : w π,h ( s ) > 0 w π,h ( s ) .
Note that in this instance, min π,h,s : w π,h ( s ) > 0 w π,h ( s ) =
µ n − 1 , which does not depend on α and H .
This demonstrates that there is an essential dependency on min π,h,s : w π,h ( s ) > 0 w π,h ( s ) in the lower bound.
I TERATED CV A R RL WITH B EST P OLICY I DENTIFICATION
In this section, we design an efficient algorithm ICVaR - BPI , and establish sample complexity upper and lower bounds for Iterated CVaR RL with best policy identification (BPI).
5. A LGORITHM ICVaR - BPI AND S AMPLE C OMPLEXITY U PPER B OUND
Algorithm ICVaR - BPI introduces a novel distorted (conditional) empirical transition probability to construct estimation error, which effectively assigns more attention to bad situations and fits the main focus of the Iterated CVaR criterion.
Due to space limit, we defer the pseudo-code and detailed description of ICVaR - BPI to Appendix E.1.
Below we present the sample complexity of ICVaR - BPI .
Theorem 3 (Sample Complexity Upper Bound) .
The number of trajectories used by algorithm
ICVaR - BPI to return an ε -optimal policy with probability at least 1 − δ is bounded by
[Equation]
, where C := log 2 (min { 1 min π,h,s : w π,h ( s ) > 0 w π,h ( s ) ,
[Equation]
Similar to Theorem 1, min π,h,s : w π,h ( s ) > 0 w π,h ( s ) and α H − 1 dominate the bound for a large α and a small α , respectively.
When α = 1 , the problem reduces to the classic RL formulation with best policy identification, and our sample complexity becomes ˜ O
( H 3 S 2 A ε) , which recovers the result in prior classic RL work (Dann et al., 2017).
Similar to Theorem 1, this bound has a gap of HS to the state-of-the-art sample complexity for classic RL (M´enard et al., 2021).
This gap is due to the fact that the result in (M´enard et al., 2021) is obtained using the Bernstein-type exploration bonuses, which are more fine-grained for the classic RL problem but do not work for general risk-sensitive cases, because it cannot be used to quantify the estimation error of CVaR.
To validate the tightness of Theorem 3, we further provide sample complexity lower bounds Ω(
H
A
ε
α min π,h,s : w π,h ( s ) > 0 w π,h ( s ) log (cid:0) 1 δ (cid:1) ) and Ω(
A α H − 1 ε 2 log (cid:0) 1 δ (cid:1) ) for different instances, which demonstrate that the factor min { 1 / min π,h,s : w π,h ( s ) > 0 w π,h ( s ) , 1 /α H − 1 } is indispensable in general (see Appendix E.3 for a formal statement of lower bound).
W ORST P ATH RL
In this section, we investigate an interesting limiting case of Iterated CVaR RL when α → 0 , called
Worst Path RL, in which case the agent aims to maximize the minimum possible cumulative reward.
Worst Path RL has a unique feature that, the value function (Eq.
(2)) concerns only the minimum value of successor states, which are independent of specific transition probabilities.
Therefore, once we learn the connectivity among states, we can perform a planning to compute the optimal policy.
Yet, this feature does not make the Worst Path RL problem trivial, because it is still challenging to distinguish whether a successor state is hard to reach or does not exist.
As a result, a careful scheme is needed to both explore undetected successor states and exploit observations to minimize regret.
6. A LGORITHM MaxWP AND R EGRET U PPER B OUND
We design an algorithm MaxWP (Algorithm 2) based on a simple and efficient empirical Q-value function, which makes full use of the unique feature of Worst Path RL, and simultaneously explores undetected successor states and exploits the current best action.
Specifically, in episode k , MaxWP constructs empirical Q-value/value functions ˆ Q kh
( s, a ) ,
ˆ V kh ( s ) using the estimated lowest value of next states, and then, takes a greedy policy π kh ( s ) with respect to ˆ Q kh ( s, a ) in this episode.
The intuition behind MaxWP is as follows.
Since the Q-value function for Worst Path RL uses the min operator, if the Q-value function is not accurately estimated, it can only be over-estimated (not under-estimated).
If over-estimation happens, MaxWP will be exploring an over-estimated action and urging its empirical Q-value to get back to its true Q-value.
Otherwise, if the Q-value function is already accurate, MaxWP just selects the optimal action.
In other words, MaxWP combines the exploration of over-estimated actions (which lead to undetected successor states) and exploitation of current best actions.
Below we provide the regret guarantee for algorithm MaxWP .
Theorem 4.
With probability at least 1 − δ , the regret of algorithm MaxWP is bounded by
[Equation]
, where υ π ( s, a ) denotes the probability ( s, a ) is visited at least once in an episode under policy π .
Remark 3.
The factor min π : υ π ( s,a ) > 0 υ π ( s, a ) stands for the minimum probability of visiting ( s, a ) at least once in an episode over all feasible policies, and min s ′ ∈ supp ( p ( ·| s,a )) p ( s ′ | s, a ) denotes the minimum transition probability over all successor states of ( s, a ) .
Note that this result cannot be implied by Theorem 1, because the result for Iterated CVaR RL there depends on 1 α , and simply taking α → 0 leads to a vacuous bound.
Theorem 4 demonstrates that algorithm MaxWP enjoys a constant regret with respect to K .
This constant regret is made possible by the unique feature of Worst Path RL that, under the worst path metric, once the agent determines the connectivity among states, she can accurately estimate the value function and find the optimal policy.
Furthermore, determining the connectivity among states (with a given confidence) only requires a number of samples independent of K .
MaxWP effectively utilizes this problem feature, and efficiently explores the connectivity among states.
To validate the optimality of our regret upper bound, we also provide a lower bound Ω(max ( s,a ):
[Equation] [Equation]
=
[Equation]
( s )
[Equation]
)) p
[Equation]
s ′ | s,a ) ) for Worst Path RL, which demonstrates the tightness of the factors
min π : υ π ( s,a ) > 0 υ π ( s, a ) and min s ′ ∈ supp ( p ( ·| s,a )) p ( s ′ | s, a ) .
C ONCLUSION
In this paper, we investigate a novel Iterated CVaR RL problem with the regret minimization and best policy identification metrics.
We design two efficient algorithms ICVaR - RM and ICVaR - BPI , and provide nearly matching regret/sample complexity upper and lower bounds with respect to K .
We also study an interesting limiting case called Worst Path RL, and propose a simple and efficient algorithm MaxWP with rigorous regret guarantees.
There are several interesting directions for future work, e.g., further closing the gap between upper and lower bounds, and extending our model and results from the tabular setting to the function approximation framework.
R EPRODUCIBILITY S TATEMENT
To make our results reproducible we provide complete proofs for all our theoretical results in Appendix.
Moreover, we also include the code and implementation instructions for our experiments in the supplementary material.
One can easily reproduce our theoretical and experimental results by following our proofs and running our code.
A PPENDIX A E XPERIMENTS
In this section, we provide experimental results to evaluate the empirical performance of our algorithm ICVaR - RM , and compare it to the state-of-the-art algorithms EULER (Zanette & Brunskill, 2019) and RSVI2 (Fei et al., 2021a) for classic RL and risk-sensitive RL, respectively.
In our experiments, we consider an H -layered MDP with S
=
( H − 1) + 1 states and A actions.
There is a single state s 0 (initial state) in layer 1 .
For any 2 ≤ h ≤ H , there are three states s 3( h − 2)+1 , s 3( h − 2)+2 and s 3( h − 2)+3 in layer h , which induce rewards 1 , 0 and 0 .
4 , respectively.
The agent starts from s 0 in layer 1, and for each step
h ∈
[ H ] , she takes an action from { a 1 , . .
. , a A } , and then transitions to one of three states in the next layer.
For any a ∈ { a 1 , . . .
, a A − 1 } , action a leads to s 3( h − 1)+1 and s 3( h − 1)+2 with probabilities 0 .
5 and 0 . 5 , respectively.
Action a A leads to s 3( h − 1)+2 and s 3( h − 1)+3 with probabilities 0 .
001 and 0 . 999 , respectively.
We set α ∈ { 0 . 05 , 0 . 1 , 0 . 15 } , δ ∈ { 0 . 5 , 0 .
005 , 0 . 00005 } , H ∈ { 2 , 5 , 10 } , S ∈ { 7 , 13 , 25 } , A ∈ { 3 , 5 , 12 } and K ∈ [0 , 10000]
(the change of K can be seen from the X-axis in Figure 2).
We take α = 0 .
δ = 0 .
005 , H = 5 , S = 13 , A = 5 and K = 10000 as the basic setting, and change parameters α , δ , H , S , A and K to see how they affect the empirical performance of algorithm
ICVaR - RM .
For each algorithm, we perform 20 independent runs and report the average regret across runs with 95% confidence intervals.
As shown in Figure 2, our algorithm ICVaR - RM achieves a significantly lower regret than the other algorithms EULER (Zanette & Brunskill, 2019) and RSVI2 (Fei et al., 2021a), which demonstrates that ICVaR - RM can effectively control the risk under the Iterated CVaR criterion and shows performance superiority over the baselines.
Moreover, the influences of parameters α , δ , H , S , A and K on the regret of algorithm ICVaR - RM match our theoretical bounds.
Specifically, as α or δ increases, the regret of ICVaR - RM decreases.
As H, S or A increases, the regret of ICVaR - RM increases as well.
As the number of episodes K increases, the regret of ICVaR - RM increases at a sublinear rate.
B R ELATED W ORK
Below we present a complete review of related works.
CVaR-based MDPs (known transition).
Boda & Filar (2006); Ott (2010); B ¨ auerle & Ott (2011);
Haskell & Jain (2015);
Chow et al.
(2015) study the CVaR MDP problem where the objective is to minimize the CVaR of the total cost with known transition, and demonstrate that the optimal policy for CVaR MDP is history-dependent (not Markovian) and is inefficient to exactly compute.
Hardy &
Wirch (2004) firstly define the Iterated CVaR measure, and prove that it is a coherent dynamic risk measure, and applicable to equity-linked insurance.
Osogami (2012); Chu & Zhang (2014); B ¨ auerle & Glauner (2022) investigate iterated coherent risk measures (including Iterated CVaR) in MDPs, and prove the existence of Markovian optimal policies for these MDPs.
The above works focus mainly on designing planning algorithms and derive planning error guarantees for known transition, while our work develops RL algorithms (interact with the environment online) and provides regret and sample complexity guarantees for unknown transition.
Risk-Sensitive Reinforcement Learning (unknown transition).
Heger (1994); Coraluppi & Marcus (1997; 1999) consider minimizing the worst-case cost in RL, and present dynamic programming of value functions and heuristic algorithms without theoretical analysis.
Borkar (2001; 2002) study risk-sensitive RL with the exponential utility measure, and design algorithms based on actor–critic learning and Q-learning, respectively.
Di Castro et al.
; La & Ghavamzadeh (2013) investigate variance-related risk measures, and devise policy gradient and actor-critic-based algorithms with convergence analysis.
Tamar et al.
(2015) consider maximizing the CVaR of the total reward, and propose a sampling-based estimator for the CVaR gradient and a stochastic gradient decent algorithm to optimize
CVaR. Keramati et al.
(2020) also investigate optimizing the CVaR of the total reward, and design an algorithm based on an optimistic version of the distributional Bellman operator.
Borkar & Jain (2014); Chow & Ghavamzadeh (2014); Chow et al.
(2017) study how to minimize the expected total cost with CVaR-based constraints, and develop policy gradient, actor-critic and
[Figure]
stochastic approximation-style algorithms.
The above works mainly give convergence analysis, and do not provide finite-time regret and sample complexity guarantees as in our work.
To our best knowledge, there are only a few risk-sensitive RL works which provide finite-time regret analysis (Fei et al., 2020; 2021a;b).
Fei et al.
(2020) consider risk-sensitive RL with the exponential utility criterion, and propose algorithms based on logarithmic-exponential transformation and least-squares updates.
Fei et al.
(2021a) further improve the regret bound in (Fei et al., 2020) by developing an exponential Bellmen equation and a Bellman backup analytical procedure.
Fei et al.
(2021b) extend the model and results in (Fei et al., 2020; 2021a) from the tabular setting to the function approximation framework.
Our work is very different from the above works (Fei et al., 2020; 2021a;b) in formulation, algorithms and results.
The above works (Fei et al., 2020; 2021a;b) use the exponential utility criterion to characterize the risk and take all successor states into account in decision making.
They design algorithms based on exponential Bellmen equations and doubly decaying exploration bonuses.
In contrast, we interpret the risk by the Iterated CVaR criterion, which primarily concerns the worst α -portion successor states.
We develop algorithms using CVaR-adapted exploration bonuses.
The works we discuss above fall in the literature of RL with risk-sensitive criteria.
There are also other RL works which focus on state-wise safety.
Cheng et al.
(2019) utilize control barrier functions (CBFs) to ensure the agent within a set of safe sets and guide the learning by constraining explorable polices.
Fatemi et al.
(2019; 2021) define the notion of dead-end states (which lead to suboptimal terminal state with probability 1 in finite steps) and aim to avoid getting into dead-end states.
The formulations and algorithms in these works greatly differ from ours, and they do not provide finitetime regret and sample complexity analysis as us.
We refer interested readers to the survey (Garcıa & Fern´andez, 2015) for detailed categorization and discussion on safe RL.
C M ORE D ISCUSSION ON I TERATED CV A R RL
In this section, we first present the expanded value function definitions for Iterated CVaR RL.
Then, we compare Iterated CVaR RL with existing risk-sensitive MDP models, including CVaR
MDP (Boda & Filar, 2006; Ott, 2010; B ¨ auerle & Ott, 2011; Chow et al., 2015) and the exponential utility-based RL (Fei et al., 2020; 2021a).
C. V ALUE F UNCTION D EFINITIONS FOR I TERATED CV A R RL
The value function definition for Iterated CVaR RL, i
[Equation]
e., Eq.
(i) in Section 3, can be expanded as
[Equation]
Similarly
[Equation]
the optimal value function definition, e
[Equation]
g., Eq.
(ii) in Section
[Equation]
can be expanded as
[Equation]
(cid:17)(cid:19)(cid:41)
[Equation]
max
[Equation]
(cid:17)(cid:19)(cid:41) .
[Equation]
[Figure]
From the above value function definitions, we can see that, Iterated CVaR RL aims to maximize the worst α -portion tail of the reward-to-go at each step,
i
[Figure]
e., taking the CVaR operator on the rewardto-go at each step.
Intuitively, Iterated CVaR RL wants to optimize the performance even when bad situations happen at each decision stage.
C. C OMPARISON WITH CV A R MDP
The objective of CVaR MDP, e.g., (Boda & Filar, 2006; Ott, 2010; B¨auerle & Ott, 2011; Chow et al., 2015), is to maximize the worst α -portion of the total reward, which is formally defined as
[Equation]
Compared to our Iterated CVaR RL (Eq.
(6) and Eq.
(ii) in Section 3) which concerns bad situations at each step , CVaR MDP takes more cumulative reward into account and prefers actions which have better performance in general, but can have larger probabilities of getting into catastrophic states.
Thus, CVaR MDP is suitable for scenarios where bad situations lead to a higher cost but not fatal damage, e.g., finance.
In contrast, Iterated CVaR RL prefers actions which have smaller probabilities of getting into catastrophic states.
Hence, Iterated CVaR RL is most suitable for safetycritical applications, where catastrophic states are unacceptable and need to be carefully avoid, e.g., clinical treatment planning.
We emphasize that Iterated CVaR is not equivalent to simply taking the worst α H -portion of the total reward.
In fact, the good (1 − α H ) -portion of the total reward also contributes to Iterated CVaR.
This is because Iterated CVaR accounts bad situations for all states (both good and bad states) in its iterated computation, instead of just considering bad situations upon bad states.
Below we provide an example of clinical treatment planning to illustrate the difference between
Iterated CVaR and CVaR MDP.
Here we interpret the objective as cost minimization for ease of understanding, and set the risk level α = 0 . 05 .
Consider a 4-layered binary tree-structured MDP shown in Figure 3.
The state sets in layers 1, 2,and 4 are { s 1 } , { s 2 , s 3 } , { s 4 , . . .
, s 7 } and { s 8 , . . .
, s 15 } , respectively.
There are two actions a 1 , ain each state, and a 1 , a 2 have the same transition distribution in all states except the initial state s 1 .
Thus, a policy is to decide whether to choose a 1 or a 2 in state s 1 , which leads to different subsequent costs.
The agent starts from the initial state s 1 in layer 1.
If the agent takes action a 1 , she will transition to state s 2 deterministically, and goes into the left sub-tree.
On the other hand, if the agent takes action a 2 in state s 1 , she will transition to state s 3 deterministically, and enters the right sub-tree.
If the agent goes into the left sub-tree (state s 2 ) in layer 2, she will transition to s 4 and s 5 in layer 3 with probabilities 0 .
05 and 0 .
95 , respectively.
Then, if she starts from state s 4 in layer 3, she will transition to s 8 and s 9 in layer 4 with probabilities 0 . 05 and 0 .
95 , respectively.
Otherwise, if she starts from state s 5 in layer 3, she will transition to s 10 and s 11 in layer 4 with probabilities 0 . 05 and 0 .
95 , respectively.
On the other hand, if the agent goes into the right sub-tree (state s 3 ) in layer 2, she will transition to s 6 and s 7 in layer 3 with probabilities 0 . 01 and 0 . 99 , respectively.
Then, if she starts from state sin layer 3, she will transition to s 12 and s 13 in layer 4 with probabilities 0 .
01 and 0 . 99 , respectively.
Otherwise, if she starts from state s 7 in layer 3, she will transition to s 14 and s 15 in layer 4 with probabilities 0 .
01 and 0 . 99 , respectively.
The costs are state-dependent, and only the states in layer 4 produce non-zero costs.
To be concrete, we use the clinical trial example and the costs represent the patient status.
Specifically, in layer 4, sand s 12 give costs 1, which denote death .
s 13 and s 14 produce costs 0.5, which means the patient is getting better .
s 9 and s 10 induce costs 0.4, which denote that the patient gets much better .
s 11 and s 15 produce costs 0, which stand for that the patient is fully cured .
Under the CVaR criterion, we have that
[Equation]
and
[Equation]
Thus, CVaR MDP will choose action a 1 (and goes into the left sub-tree), since a 1 leads to better medium states s 9 and s 10 , which give a lower cost 0 .
4 than the cost 0 .
5 produced by the right sub-tree.
On the other hand, under the Iterated CVaR criterion, we have that
[Equation]
and
[Equation]
[Table]
Thus, Iterated CVaR RL will instead choose action a
[Table]
because a 2 has a smaller probability of going into the bad left direction (which leads to the catastrophic state s 12 )
[Table]
The above example shows that, Iterated CVaR RL prefers actions with a smaller probability of getting into catastrophic states.
In contrast, CVaR MDP favors actions with better average therapeutic effects, but has a larger probability of causing death.
Note that the above example also demonstrates that Iterated CVaR is not equivalent to the worst α H -portion of the total cost.
To see this, we have that (here we consider α 3 because there aretransition steps):
[Equation]
and
[Equation]
In addition, one can see that, the good state which gives cost 0 (i.e., s 15 ) also contributes to
Q ICVaR ,α ( s 1 , a 2 ) , which shows that the good (1 − α H ) -portion of the total cost also matters for
Iterated CVaR.
C. C OMPARISON WITH EXPONENTIAL UTILITY - BASED RISK - SENSITIVE RL
The Bellman optimality equation for risk-sensitive RL with the exponential utility criterion (Fei et al., 2020; 2021a) is defined as
[Equation]
which takes all successor states s ′ into account, i.e., all successor states s ′ contribute to the computation of the Q-value.
Here β < 0 is a risk-sensitivity parameter.
In contrast, in Iterated CVaR RL, the Bellman optimality equation is defined as
[Equation]
which focuses only on the worst α -portion successor states s ′ (i.e., with the lowest α -portion values
V ∗ h
+1 ( s ′ ) ), i.e., only the worst α -portion successor states s ′ contribute to the computation of the
Q-value.
Besides the formulation, our algorithm design and results are also very different from those in (Fei et al., 2020; 2021a).
The algorithms in (Fei et al., 2020; 2021a) are based on exponential Bellman equations and doubly decaying exploration bonuses, and their results depend on exp( | β | H ) .
In contrast, our algorithms are based on value iteration for Iterated CVaR with CVaR-adapted exploration bonuses, and our results depend on the minimum between an MDP-intrinsic visitation measure 1 / min π,h,s : w π,h ( s ) > 0 w π,h ( s ) and a risk-level-dependent factor 1 /α H − 1 .
D P ROOFS FOR I TERATED CV A R RL WITH R EGRET M INIMIZATION
In this section, we present the proofs of regret upper and lower bounds (Theorems 1 and 2) for
Iterated CVaR RL-RM.
D. P ROOFS OF R EGRET U PPER B OUND D.1. C ONCENTRATION
For any k > 0 , h ∈ [ H ] and ( s, a ) ∈ S ×A , let n kh ( s, a ) denote the number of times that ( s, a ) was visited at step h before episode k , and let n k ( s, a ) :=
(cid:80)
Hh =1 n kh ( s, a ) denote the number of times that ( s, a ) was visited before episode k .
[Table]
[Table] [Table]
[Figure]
Lemma 1 (Concentration for V ∗ ) .
It holds that
[Equation]
Proof of Lemma 1.
Using Brown’s inequality (Brown, 2007)
(Theorem 2 in (Thomas & LearnedMiller, 2019)) and a union bound over ( s, a ) ∈ S × A and n k ( s, a ) ∈
[ KH ] , we can obtain this lemma.
For any risk level α ∈ (0 , 1] , function V : S (cid:55)→ R and ( s ′ , s, a ) ∈ S × S × A , β α,V ( s ′ | s, a ) is the conditional transition probability from ( s, a ) to s ′ , conditioning on transitioning to the worst α -portion successor states s ′ (i.e., with the lowest α -portion values V ( s ′ ) ).
Let µ α,V ( s ′ | s, a ) denote how large the transition probability of successor state s ′ belongs to the worst α -portion, which satisfies that µ α,V ( s ′ | s,a ) α
= β α,V ( s ′ | s, a ) and (cid:80) s ′ ∈S
µ α,V ( s ′ | s, a ) = α .
In addition, for any risk level α ∈ (0 , 1] , function V : S (cid:55)→ R and ( s, a ) ∈ S × A ,
CVaR
[Equation]
∼
[Equation] [Equation]
s
[Equation]
= (cid:80) s
′ ∈S µ α,V ( s ′ | s, a ) · V ( s ′ )
α = (cid:88) s ′
∈S β α,V ( s ′ | s, a ) · V ( s ′ ) .
Lemma 2 (Concentration for any V ) .
It holds that
[Equation] [Equation]
Proof of Lemma 2.
As shown in Figure 4, we sort all successor states s ′ ∈ S by V ( s ′ ) in ascending order (from the left to the right).
Add a virtual line at the α -quantile, denoted by α -quantile line .
Fix the value function V ( · ) , and the transition probability changes from p ( ·| s, a ) to ˆ p k ( ·| s, a ) .
Without loss of generality, below we consider the case where as the transition probability changes from p ( ·| s, a ) to ˆ p k ( ·| s, a ) , the α -quantile line shifts from left to right (the analysis of the contrary case can also be obtained by interchanging p ( ·| s, a ) and ˆ p k ( ·| s, a ) ).
We use original α -quantile line and shifted α -quantile line to denote the α -quantile line before and after the shift, respectively.
We divide the successor states s ′ ∈ S into five subsets as follows.
Let S left and S right denote the sets of states which are always on the left and right sides of the original and shifted α -quantile lines, respectively.
Let S middle denote the set of states which are in the middle of the original and shifted α -quantile lines.
Let s line - l and s line - r denote the states which lie on the original and shifted α -quantile lines, respectively.
For any s ′ ∈ S left , we have that µ α,V ( s ′ | s, a ) =
p ( s ′ | s, a ) and ˆ µ k ; α,V ( s ′ | s, a ) =
ˆ p k
( s ′ | s, a ) .
For any s ′ ∈ S right , we have µ α,V ( s ′ | s, a ) =
ˆ µ k ; α,V ( s ′ | s, a ) = 0 .
For any s ′ ∈ S middle , we have that µ α,V ( s ′ | s, a ) =
and ˆ µ k ; α,V ( s ′ | s, a ) =
ˆ p k
( s ′ | s, a ) .
For state s line - l , we have that µ α,V ( s line - l | s, a ) =
p ( s line - l | s, a ) − ( (cid:80) s ′ ∈S
left p ( s ′ | s, a ) + p ( s line - l | s, a ) − α ) and ˆ µ k ; α,V ( s line - l | s, a ) =
ˆ p k ( s line - l | s, a ) .
For state s line - r , we have that µ α,V ( s line - r | s, a ) =
and ˆ µ k ; α,V ( s line - r | s, a ) =
α − (cid:80) s ′ ∈S left ˆ p k (
[Table]
Then
[Table]
we obtain
[Table]
[Equation] [Table] [Equation] [Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table] [Equation] [Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
, a ) − p ( s ′ | s, a ) (cid:12)(cid:12) + (cid:88) s ′
∈S middle ˆ p k ( s ′ | s, a ) + (cid:12) (cid:12)
ˆ p k
( s line - l | s, a ) − p ( s
line - l | s, a ) (cid:12) (cid:12) +   (cid:88) s ′ ∈S left p ( s ′ | s, a ) + p ( s line - l | s, a ) −
α   +   α − (cid:88) s ′ ∈S left ˆ p k ( s ′ | s, a ) − (cid:88) s ′
∈S middle ˆ p k ( s ′ | s, a ) − ˆ p k
( s line - l | s, a ) 

[Equation] [Equation]
where (a) is due to (cid:80) s ′ ∈S
[Equation]
p ( s ′ | s, a ) + p ( s line - l | s, a ) − α ≥ 0 by the definition of state s line - l .
Thus, we have
[Equation]
α (8)
Using Eq.
(55) in (Zanette & Brunskill, 2019) (originated from (Weissman et al., 2003))
[Equation]
we have that with probability at least 1 − 2 δ ′ , for any k ∈
[ K ] and ( s, a ) ∈ S × A , (cid:88)
[Equation]
Plugging Eq.
(9) into Eq.
(8), we obtain that with probability at least 1 − 2 δ ′ , for any k ∈ [ K ] , ( s, a ) ∈ S × A and function V : S (cid:55)→ [0 , H ] ,
[Equation]
For any k > 0 , h ∈ [ H ] and ( s, a ) ∈ S × A , let w kh
( s, a ) denote the probability of visiting ( s, a ) at step h of episode k .
Then, it holds that for any k > 0 , h ∈
[ H ] and ( s, a ) ∈ S×A , w kh
( s, a ) ∈ [0 , 1] and (cid:80) ( s,a ) ∈S×A w kh ( s, a ) = 1 .
Lemma 3 (Concentration of Visitation) .
It holds that
[Equation]
Proof of Lemma 3.
Applying Lemma F.4 in (Dann et al., 2017), we have that for any fixed h ∈
[ H ] ,
[Equation]
[Table]
[Equation]
By a union bound over h ∈ [ H ] , we have
[Equation]
To sum up
[Equation]
we define several concentration events which will be used in the following proof.
[Equation]
) − H log (cid:18) HSA δ ′ (cid:19) ,
∀ k
[Equation]
0 , ∀ ( s
[Equation]
a ) ∈ S × A (cid:41)
E :=
E 1 ∩ E 2 ∩ E
Lemma 4.
Letting δ ′
=
δ 5 , it holds that
Pr [ E ] ≥ 1 − δ.
Proof of Lemma 4.
This lemma can be obtained by combining Lemmas 1-3.
D.1. O PTIMISM , V ISITATION AND CV A R G AP
Recall that L := log (cid:0) KHSAδ ′ (cid:1) .
Lemma 5 (Optimism) .
Suppose that event E holds.
Then, for any k ∈ [ K ] , h ∈ [ H ] and s ∈ S , we have
[Equation]
Proof of Lemma 5.
We prove this lemma by induction.
First, for any k ∈ [ K ] , s ∈ S , it holds that ¯ V k H +
( s ) =
V ∗ H +1 ( s ) =
Then, for any k ∈ [ K ] , h ∈ [ H ] and ( s, a ) ∈ S ×A , if ¯ Q kh ( s, a ) =
H , ¯ Q kh ( s, a ) ≥ Q ∗ h ( s, a ) trivially holds, and otherwise,
[Equation]
where (a) uses the induction hypothesis and (b) comes from Lemma 1.
Thus, we have
[Equation]
which concludes the proof.
Following (Zanette & Brunskill, 2019), for any episode k > 0 , we define the set of state-action pairs which have sufficient visitations in expectation as follows.
[Equation]
Lemma 6 (Sufficient Visitation) .
Suppose that event E holds.
Then, for any k > 0 and ( s, a ) ∈
L k ,
[Equation]
Proof of Lemma 6.
This proof is the same as that of Lemma 6 in (Zanette & Brunskill, 2019).
Using Lemma
[Equation]
we have
[Equation]
where (a) uses the fact that ( s, a ) ∈ L k and the definition of L k , and (b) is due to that for any k > 0 , h ∈ [ H ] and ( s, a ) ∈ S × A , w kh ( s, a ) ∈ [0 , 1] .
Lemma 7 (Standard Visitation Ratio) .
For any K > 0 , we have
[Equation]
Proof of Lemma 7.
This proof is the same as that of Lemma 13 in (Zanette & Brunskill, 2019).
Recall that for any k > 0 , let w k ( s, a ) :
= (cid:80) ( s,a ) ∈S×A w kh ( s, a ) .
Then, we have (cid:118)(cid:117)(cid:117)(cid:116)
[Equation]
(cid:88) k
=
H (cid:88) h
= (cid:88) ( s,a ) ∈L k w kh
( s, a
[Equation]
n k ( s, a ) =
(cid:118)(cid:117)(cid:117)(cid:116) K (cid:88) k
= (cid:88) ( s,a ) ∈L k w k
( s
[Equation]
a
[Equation]
n k ( s, a ) =
(cid:118)(cid:117)(cid:117)(cid:116) K (cid:88) k
= (cid:88)
[Equation]
where (a) is due to Lemma 6.
According to the definition of L k (Eq.
(10)), for any ( s, a ) ∈ S ×A , once ( s, a ) satisfies ( s, a
) ∈
L k in some episode k , it will always satisfy ( s, a
) ∈
L k ′ for all k ′ ≥ k .
For any ( s, a ) ∈ S × A , let k 0 ( s, a ) denote the first episode k where ( s, a ) ∈
L k .
Then, for any k > 0 and ( s, a ) ∈ S × A , if ( s, a ) ∈
L k , we have
[Equation]
where (a) uses the fact
that ( s, a ) ∈
L k 0 ( s,a ) and the definition of L k (Eq.
Thus, we have
[Equation]
Let a 1 :=
w k 0 ( s,a
[Equation]
( s, a
[Equation]
, a 2 := w k 0 ( s,a )+
( s, a ) , . . .
, a K − k 0 ( s,a )+1 :
= w K ( s, a ) .
Define function
F ( x ) = (cid:80)
⌊ x ⌋ i =
1 a i + a ⌈ x ⌉ ( x − ⌊ x ⌋ ) , where 0 ≤ x ≤ K − k 0 ( s, a ) + 1 .
If x is an integer, we have
F ( x ) = (cid:80) xi
=1 a i , and otherwise, F ( x ) interpolates between the function values for integers x .
The derivative of F ( s ) is f ( x ) = a ⌈ x ⌉ .
Hence, we have
[Equation]
where (a) uses the fact that for any 0 ≤ x ≤ K − k 0 ( s, a ) + 1 , f ( x ) =
f ( ⌈ x ⌉ ) and F ( x ) ≤ F ( ⌈ x ⌉ ) , and (b) is due to that k 0 ( s, a ) ≥ 2 by the definitions of L k (Eq.
and k 0 ( s, a ) .
Therefore, we have
[Equation]
k =
H (cid:88) h
= (cid:88) ( s,a ) ∈L k w kh
( s, a ) n k
( s, a ) ≤(cid:118)(cid:117)(cid:117)(cid:116) (cid:88) ( s,a ) ∈S×A log (cid:18) KHSA δ ′ (cid:19) ≤(cid:115)
SA log (cid:18) KHSA δ ′ (cid:19)
Recall that for any ( s ′ , s, a ) ∈ S × S × A , p ( s ′ | s, a ) is the transition probability from ( s, a ) to s ′ .
For any risk level α ∈ (0 , 1] , function V : S (cid:55)→ R and ( s ′ , s, a ) ∈ S × S × A , β α,V ( s ′ | s, a ) is the conditional probability of transitioning to s ′ from ( s, a ) , conditioning on transitioning to the worst α -portion successor states s ′ (i.e., with the lowest α -portion values V ( s ′ ) ), and it holds that
CVaR αs ′ ∼ p ( s ′ | s,a ) ( V ( s ′ ))
= (cid:80) s ′
∈S β α,V ( s ′ | s, a ) · V ( s ′ ) .
For any k > 0 , h ∈ [ H ] and ( s, a ) ∈ S × A , w kh ( s, a ) is the probability of visiting ( s, a ) at step h of episode k
(under transition probability p ( ·|· , · ) ), and it holds that w kh ( s, a ) ∈
[0 , 1] and (cid:80) ( s,a ) ∈S×A w kh ( s, a ) = 1 .
For any risk level α ∈ (0 , 1] , k > 0 , h ∈ [ H ] and ( s, a ) ∈ S × A , w CV aR,α,V πk kh ( s, a ) is the conditional probability of visiting ( s, a ) at step h of episode k , conditioning on transitioning to the worst α -portion successor states s ′ (i.e., with the lowest α -portion values V π k h ′
+
( s ′ ) )
at each step h ′ = 1 , . . .
, h − 1 .
Here π k is the policy taken in episode k , and
V π k h ( · ) : S (cid:55)→ R is the value function at step h for policy π k .
Intuitively, w CV aR,α,V πk kh
( s, a ) is the probability of visiting ( s, a ) at step h of episode k under conditional transition probability β α,V πkh ′
+1 ( ·|· , · ) for each step h ′ = 1 , . .
, h − 1 .
It holds that for any risk level α ∈ (0 , 1] , k > 0 , h ∈ [ H ] and ( s, a ) ∈ S ×A , w CV aR,α,V πk kh ( s, a ) ∈ [0 , 1] and (cid:80)
[Equation]
Lemma 8.
For any risk level α ∈ (0 , 1] , k > 0 , h ∈ [ H ] and ( s, a
) ∈ S × A , if w kh ( s, a ) = 0 , then w CV aR,α,V πk kh
( s, a )
= 0 .
Proof of Lemma 8.
If w kh ( s, a ) = 0 , then the algorithm has zero probability to visit ( s, a ) at step h of episode k , which means that ( s, a ) is unreachable under transition probability p ( ·|· , · ) .
Note that for each step h ′ = 1 , . .
, h − 1 , the conditional transition probability β α,V πkh ′
+
( s ′ | s, a ) just renormalizes the transition probability and assigns more weights to the worst α -portion successor states s ′ (i.e., with the lowest α -portion values
V π k h ′ +
( s ′ ) ), but will not make an unreachable successor state reachable.
Thus, ( s, a ) is also unreachable under conditional transition probability β α,V πkh ′
+1 ( ·|· , · ) for each step h ′ = 1 , . .
, h − 1 , and therefore w CV aR,α,V πk kh
( s, a )
= 0 .
Lemma 9.
For any functions V 1 , . . .
, V H : S (cid:55)→ R , k > 0 ,
h ∈
[ H ] and ( s, a ) ∈ S ×
A such that w kh ( s, a ) > 0 ,
[Equation]
,α
[Equation]
where w CVaR ,α,V kh ( s, a ) denotes the conditional probability of visiting ( s, a ) at step h of episode k , conditioning on transitioning to the worst α -portion successor states s ′ (i.e., with the lowest αportion values V
h ′
+1 ( s ′ ) )
at each step h ′ = 1 , . . .
, h − 1 .
Proof of Lemma 9.
Since w CVaR ,α,V kh
( s, a ) is the conditional probability of visiting ( s, a ) , we have w CVaR ,α,V kh ( s, a ) ∈ [0 , 1] .
Since w kh ( s, a ) is the probability of visiting ( s, a ) at step h under policy π k and min π,h, ( s,a ): w π,h ( s,a ) > 0 w π,h
( s, a ) is the minimum probability of visiting any reachable ( s, a ) at any step h over all policies π , we have
[Equation]
Hence, we have w CVaR
[Equation]
Let s 1 be the initial state.
Since w kh ( s, a ) and w CVaR ,α,V kh ( s, a ) are the probabilities of visiting ( s, a ) at step h with policy π k under transition probability p ( ·|· , · ) and conditional transition probability β α,
V h ′
+1 ( ·|· , · ) for each step h ′ = 1 , . .
, h − 1 , respectively, we have that
[Equation]
and
[Equation]
where s 1 is the initial state, s h :
=
s , and a h ′ :
= π k
( s h ′ ) for h ′
= 1 , . .
, h − 1 .
Recall that for any risk level α ∈ (0 , 1] , function V : S (cid:55)→ R and ( s ′ , s, a ) ∈ S×S×A , µ α,V ( s ′ | s, a ) denotes how large the transition probability of successor state s ′ belongs to the worst α -portion successor states (i.e., with the lowest α -portion values V ( · ) ), which satisfies that µ α,V ( s ′ | s,a ) α = β α,V ( s ′ | s, a ) and 0 ≤ µ α,V ( s ′ | s, a ) ≤ p ( s ′ | s, a ) .
Thus, we have
[Equation]
w
[Equation]
Therefore,
[Equation]
Combining Eqs.
(11) and (12), we obtain this lemma.
Lemma 10 (Insufficient Visitation) .
It holds that
[Equation]
Proof of Lemma 10.
According to the definition of L k (Eq.
(10)), for any ( s, a ) ∈ S × A , once ( s, a ) satisfies ( s,
a ) ∈
L k in some episode k , it will always satisfy ( s, a
) ∈
L k ′ for all k ′ ≥ k .
For any ( s, a ) ∈ S × A , let ˜ k
( s, a ) denote the last episode k
where ( s, a ) / ∈
L k .
Then, we have
K (cid:88)
[Equation]
a
[Equation]
 
[Equation]

[Equation]
[Figure]
the bars denotes the worst α -portion successor states (i.e., with the lowest α -portion values V ( s ′ ) / ¯ V ( s ′ ) ).
In this example, α = 0 .
[Equation]
where (a) is due to that ( s, a )
/ ∈
L ˜ k
( s,a ) , and for any k > 0 , h ∈
[ H ] and ( s, a ) ∈ S × A , w kh ( s, a ) ∈ [0 , 1] .
For any policy π , h ∈ [ H ] and ( s, a ) ∈ S × A , let w π,h ( s, a ) and w π,h ( s ) denote the probabilities of visiting ( s, a ) and s at step h under policy π , respectively.
Then, we have
[Equation]
(cid:18) 4 SAH log (cid:18) HSA δ ′ (cid:19)
+ 5 SAH (cid:19) ,
Here (a) is due to Lemma 8.
(b) comes from Lemma 9.
(c) uses the fact that for any deterministic policy π , h ∈ [ H ] and ( s, a ) ∈ S × A , we have either w π,h ( s, a )
=
w π,h ( s ) or w π,h ( s, a ) = 0 , and thus min π,h, ( s,a ): w π,h ( s,a ) > 0 w π,h ( s, a ) =
min π,h,s : w π,h ( s ) > 0 w π,h
( s ) .
Recall that for any risk level α ∈ (0 , 1] , function V : S (cid:55)→ R and ( s ′ , s, a ) ∈ S×S×A , β α,V ( s ′ | s, a ) is the conditional probability of transitioning to s ′ from ( s, a ) , conditioning on transitioning to the worst α -portion successor states s ′ (i.e., with the lowest α -portion values V ( s ′ ) ), and it holds that
CVaR αs ′ ∼ p ( s ′ | s,a ) ( V ( s ′ ))
= (cid:80) s ′
∈S β α,V ( s ′ | s, a ) · V ( s ′ ) .
Lemma 11 (CVaR Gap due to Value Function Shift) .
For any ( s, a ) ∈ S×A , distribution p ( ·| s, a ) ∈ △ S , and functions V, ¯ V : S (cid:55)→ [0 , H ] such that ¯ V ( s ′ ) ≥ V ( s ′ ) for any s ′ ∈ S ,
CVaR
[Equation]
s
[Equation]
− CVaR
[Equation] [Equation]
p
[Equation]
s,a
[Equation]
s
[Equation]
a
[Equation]
Proof of Lemma 11.
Recall that for any risk level α ∈ (0 , 1] , function V : S (cid:55)→ R and ( s ′ , s, a ) ∈
S × S × A , β α,V ( s ′ | s, a ) is the conditional transition probability from ( s, a ) to s ′ , conditioning on transitioning to the worst α -portion successor states s ′ (i.e., with the lowest α -portion values V ( s ′ ) ), and µ α,V ( s ′ | s, a ) denotes how large the transition probability of successor state s ′ belongs to the worst α -portion, which satisfies that µ α,V ( s ′ | s,a ) α
= β α,V ( s ′ | s, a ) and (cid:80) s ′ ∈S
µ α,V ( s ′ | s, a ) = α .
Then, for any risk level α ∈ (0 , 1] , function V : S (cid:55)→ R and ( s ′ , s, a ) ∈ S × S × A ,
[Equation]
As shown in Figure 5, we sort all successor states s ′ ∈ S by their values V ( s ′ ) in ascending order (from left to right).
Fix the transition probability p ( ·| s, a ) and the value function shifts from V ( · ) to ¯ V ( · ) .
Then, below we divide all successor states s ′ ∈ S into three subsets, i.e., S up , S down and
S unch , according to how µ α,V ( s ′ | s, a ) changes to µ α, ¯ V ( s ′ | s, a ) as V ( s ′ )
shifts to ¯ V ( s ′ ) .
• For any s ′ ∈ S up , µ α, ¯ V ( s ′ | s, a ) < µ α,V ( s ′ | s, a ) , the rank of s ′ goes up, and the position of s ′ moves to the right (here “rank” means to rank all successor states s ′ ∈ S by their values V ( s ′ ) /
¯ V ( s ′ )
from highest to lowest).
• For any s ′ ∈ S down , µ α, ¯ V ( s ′ | s, a ) > µ α,V ( s ′ | s, a ) , the rank of s ′ goes down, and the position of s ′ moves to the left.
• For any s ′ ∈ S unch , µ α, ¯ V ( s ′ | s, a ) =
µ α,V ( s ′ | s, a ) , the rank and position of s ′ keep unchanged.
Then
[Equation]
it holds that
[Equation] [Equation]
Next, we have
CVaR
[Equation]
=
[Equation]
+ (cid:88)
[Equation]
+ (cid:88)
[Equation] [Equation]
Here (a) is due to that for any s ′ ∈ S up , µ α, ¯ V ( s ′ | s, a ) <
µ α,V ( s ′ | s, a )
[Equation]
and for any s ∈ S up , s
[Equation]
∈ S down , ¯ V ( s ) ≥ ¯ V ( s ′ ) .
(b) comes from Eq.
D.1. P ROOF OF T HEOREM
Proof of Theorem 1.
Suppose that event E holds.
Then, for any k ∈ [ K ] ,
[Equation]
[Table]
[Equation]
Here a h :=
π k ( s h ) for h = 2 , . . .
, H .
(a) is due to Lemma 5.
(b) uses Lemma 2 and the fact that for any k > 0 , h ∈
[ H ] and s ∈ S , ¯ V kh ( s ) ∈ [0 , H ] , and thus for any k > 0 , h ∈
[ H ] and ( s, a ) ∈ S ×A ,
CVaR αs ′ ∼ ˆ p k ( ·| s,a ) ( ¯ V kh +1 ( s ′ ))
− CVaR αs ′ ∼ p ( ·| s,a ) ( ¯ V kh +
( s ′ ))
≤ H , and also uses Lemma 11.
(c) comes from the property of min {· , ·} .
(d) and (e) follow from recurrently applying steps (a)-(c).
(f) is due to that w CV aR,α,V π k kh ( s, a ) is defined as the probability of visiting ( s, a ) at step h of episode k under the conditional transition probability β α,V πkh ′
+1 ( ·|· , · ) for each step h ′ = 1 , . .
, h − 1 .
Since the second term in Eq.
(14) can be bounded by Lemma 10, below we analyze the first term.
Recall that for any policy π ,
h ∈
[ H ] and ( s, a ) ∈ S × A , w π,h
( s, a ) and w π,h ( s ) denote the probabilities of visiting ( s, a ) and s at step h under policy π , respectively.
Summing the first term in Eq.
(14) over k ∈ [ K ] , we have
[Equation]
k =
H (cid:88) h
= (cid:88) ( s,a ) ∈L k w CVaR ,α,V πk kh
( s, a )
n k ( s, a ) · 1 { w kh ( s, a )
̸ = 0 } · √ KH =( H √ L + 4 H √ SL )
√ KH α (cid:118)(cid:117)(cid:117)(cid:116) K (cid:88) k
=
H (cid:88) h
= (cid:88) ( s,a ) ∈L k w CVaR ,α,V πk kh
( s, a ) w kh
( s, a ) · w kh ( s, a ) n k
( s, a ) ·
1 { w kh ( s, a ) ̸ = 0 } (b) ≤ ( H √ L +4 H √ SL )
√ KH
α
(cid:118)(cid:117) (cid:117)(cid:117)(cid:116) min (cid:26) min π,h, ( s,a ): w π,h ( s,a ) > 0 w π,h ( s, a ) , α H −(cid:27)
K (cid:88) k
=
H (cid:88) h
= (cid:88) ( s,a ) ∈L k w kh
( s, a ) n k
( s, a ) (c) ≤
( H √ L + 4 H √ SL ) √ KH α · 2 √ SAL · min   (cid:114) min π,h,s : w π,h ( s ) > 0 w π,h
( s ) , 1 √ α H −  ≤ 10 HSL √ KHA α · min   (cid:114) min π,h,s : w π,h ( s ) > 0 w π,h
( s ) , 1 √ α H −  .
Here (a) is due to Lemma 8 and the fact that for any k > 0 and h ∈ [ H ] , (cid:80)
[Equation]
comes from Lemma 9.
uses Lemma 7 and the fact that for any deterministic policy π , h ∈ [ H ] and ( s, a ) ∈ S × A , we have either w π,h
( s, a ) =
w π,h ( s ) or w π,h ( s, a ) = 0 , and thus min π,h, ( s,a ): w π,h ( s,a ) > 0 w π,h ( s, a ) =
min π,h,s : w π,h ( s ) > 0 w π,h
( s ) .
Then, summing the first and second terms in Eq.
(14) over k ∈ [ K ] and using Lemma 10, we have
[Equation]
When K is large enough, the first term dominates the bound, and thus we obtain Theorem 1.
D. P ROOF OF R EGRET L OWER B OUND
Below we prove the regret lower bound (Theorem 2) for Iterated CVaR RL-RM.
Proof of Theorem 2.
First, we construct an instance where min π,h,s : w π,h ( s ) > 0 w π,h ( s ) >
α H − 1 , and prove that on this instance any algorithm must suffer a Ω(
[Equation]
regret.
Consider the instance shown in Figure 6 (the same as Figure 1 in the main text):
The state space is S
= { s 1 , s 2 , . .
, s n , x 1 , x 2 , x 3 } , where s 1 is the initial state, and n = S − 3 <
S < 12 H .
The reward functions are as follows.
For any a ∈ A , r ( x 1 , a ) = 1 , r ( x 2 , a ) = 0 .
8 and r ( x 3 , a ) = 0 .
For any i ∈ [ n ] and a ∈ A , r ( s i , a ) = 0 .
The transition distributions are as follows.
Let µ be a parameter which satisfies that 0 < α < µ < 13 .
For any a ∈ A , p ( s 2 | s 1 , a ) = µ , p ( x 1 | s 1 , a ) = 1 − 3 µ , p ( x 2 | s 1 , a ) = µ and p ( x 3 | s 1 , a ) = µ .
For any i ∈ { 2 , . . . , n − 1 } and a ∈ A , p ( s i +
|
s i , a )
= µ and p ( x 1 |
s i , a ) = 1 − µ .
x 1 , x 2 and xare absorbing states, i.e., for any a ∈ A , p ( x 1 | x 1 , a ) = 1 , p ( x 2 | x 2 , a )
= 1 and p ( x 3 | x 3 , a ) = 1 .
Let a J be the optimal action in state s n , which is uniformly drawn from A .
For the optimal action a J , p ( x 2 | s n , a J ) = 1 − α + η and p ( x 3 | s n , a J ) =
α − η , where η is a parameter which satisfies 0 < η < α and will be chosen later.
For any suboptimal action a ∈ A \ { a J } , p ( x 2 | s n , a )
= 1 − α and p ( x 3 | s n , a ) = α .
For any a j ∈ A , let E j [ · ] and Pr j [ · ] denote the expectation and probability operators under the instance with a J = a j .
Let E unif [ · ] and Pr unif [ · ] denote the expectation and probability operators under the uniform instance where all actions a ∈ A in state s n have the same transition distribution, i.e., p ( x 2 | s n , a )
= 1 − α and p ( x 3 | s n , a ) = α .
Fix an algorithm A .
Let π k denote the policy taken by algorithm A in episode k .
Let N s n ,a j = (cid:80) Kk =1 1 (cid:8) π k ( s n ) = a j (cid:9) denote the number of episodes that the policy chooses a j in state s n .
Let
V s n ,a j denote the number of episodes that the algorithm A visits ( s n , a j ) .
Let w ( s n ) denote the
[Figure] [Figure]
[Figure]
probability of visiting s n in an episode (the probability of visiting s n is the same for all policies).
Then, it holds that E [ V s n ,a j ] = w ( s n
[Equation]
· E [ N s n ,a j ] .
Recall that a J is the optimal action in state s n .
According to the definition of the value function for
Iterated CVaR RL, we have that
[Equation]
and for any policy π ,
[Equation]
If J = j , for any policy π ,
[Equation]
) and summing over all episodes k ∈ [ K ] , we have
[Equation]
Therefore, we have
[Equation]
For any j ∈ [ A ] , using Pinsker’s inequality and< α < 13 , we have that
[Equation]
for some constant c 1 and small enough η .
Then, using Lemma A.1 in (Auer et al., 2002), we have that for any j ∈
[ A ] ,
[Equation]
Then, using (cid:80) Aj =1 E unif [ N s n ,a j ] = K and the Cauchy–Schwarz inequality
[Equation]
we have
[Equation]
By plugging Eq.
(17) into Eq.
(16), we have
[Equation]
Let η = c 2 (cid:113) αA w ( s n ) K for a small enough constant c 2 .
We have
[Equation]
Recall that n < 12 H and 0 < α < µ < 13 .
Thus, we have that min π,h,s : w π,h ( s ) > 0 w π,h ( s )
=
w ( s n ) = µ n − 1 > α H − 1 , and
[Equation]
Next, we construct another instance where α H − 1 > min π,h,s : w π,h ( s ) > 0 w π,h ( s ) , and prove that on this instance any algorithm must suffer a Ω( (cid:113) AKα H − 1 ) regret.
Consider the instance shown in Figure 7:
The state space is S
= { s 1 , . . .
, s n , s ′ 2 , . . .
, s ′ n , x 1 , x 2 , x 3 , x 4 } , where n = H − 1 and s 1 is the initial state.
Let 0 < α < 14 .
The reward functions are as follows.
For any a ∈ A , r ( x 1 , a ) =
r ( x 4 , a ) = 1 , r ( x 2 , a )
= 0 .
8 and r ( x 3 , a ) = 0 .
For any i ∈ [ n ] and a ∈ A , r ( s i , a ) = 0 .
For any i ∈ { 2 , . . . , n } and a ∈ A , r ( s ′ i , a ) = 0 .
The transition distributions are as follows.
For any a ∈ A , p ( s 2 | s 1 , a )
= α , p ( s ′ 2 | s 1 , a )
= γ and p ( x 1 | s 1 , a ) = 1 − γ − α .
For any i ∈ { 2 , . . . , n − 1 } and a ∈ A , p ( s i +1 | s i , a ) =
α and p ( x 1 | s i , a ) = 1 − α .
For any i ∈ { 2 , . . . , n − 1 } and a ∈ A , p ( s ′ i +1 | s ′
i , a ) = γ and p ( x 1 | s ′
i , a ) = 1 − γ .
For any a ∈ A , p ( x 4 | s ′ n , a ) = γ and p ( x 1 | s ′ n , a ) = 1 − γ .
x 1 , x 2 , x 3 and x 4 are absorbing states, i.e., for any a ∈ A and i ∈ [4] , p ( x i | x i , a )
= 1 .
Let a J be the optimal action in state s n , which is uniformly drawn from A .
For the optimal action a J , p ( x 2 | s n , a J ) = 1 − α + η and p ( x 3 | s n , a J ) =
α − η ,
1 −  −  1 −  1 −
Reward
Reward 0.
Reward 0.
Action   : 1 −  Action  ∗ : 1 −  +
Action   :  Action  ∗ :  −  … ′  ′  ′     …
Reward  1 −  where η is a parameter which satisfies 0 < η < α and will be chosen later.
For any suboptimal action a ∈ A \ { a J } , p ( x 2 | s n , a )
= 1 − α and p ( x 3 | s n , a ) = α .
According to the definition of the value function for Iterated CVaR RL, we have that
[Equation]
and for any policy π ,
[Equation]
If J = j , for any policy π ,
[Equation]
18) and summing over all episodes k ∈
[ K ] , we have
[Equation]
Therefore, we have
[Equation]
Recall that 0 < α < 14 .
For any j ∈ [ A ] , we have that KL ( p unif ( s n , a j ) ∥
p j ( s n , a j )) =
KL ( Ber ( α ) ∥
Ber ( α − η )) ≤
[Equation]
for some constant c 1 and small enough η .
Then, using Lemma A.1 in (Auer et al., 2002), we have that for any j ∈
[ A ] ,
[Equation]
Then, using (cid:80) Aj =1 E unif [ N s n ,a j ] = K and the Cauchy–Schwarz inequality
[Equation]
we have
[Equation]
By plugging Eq.
(20) into Eq.
[Equation]
we have
[Equation]
Let η = c 2 (cid:113) αA w ( s n ) K for a small enough constant c 2 .
We have
E [ R ( K )]
=
Ω (cid:32)(cid:115)
A
[Equation]
(cid:33)
[Equation]
(cid:32)(cid:115)
AK
[Equation]
w
[Equation]
n
[Equation]
(cid:33)
Recall that 0 < γ < α and n = H − 1 .
Thus, we have min π,h,s : w π,h ( s ) > 0 w π,h ( s )
=
w ( x 4 ) =
γ H − 1 < α H − 1 .
In addition, since w ( s n ) = α n − 1 = α H − 2 , we have
E [ R ( K )
[Equation]
(cid:32)(cid:114)
AK
[Equation]
(cid:33)
[Equation]
(cid:32)(cid:114)
[Equation]
(cid:33)
[Equation]
E P ROOFS FOR I TERATED CV A R RL WITH B EST P OLICY I DENTIFICATION
In this section, we present the pseudo-code and detailed description of algorithm ICVaR - BPI , and formally state the sample complexity lower bound for Iterated CVaR-BPI (Theorem 5).
We also give the proofs of sample complexity upper and lower bounds (Theorems 3 and 5).
E. A LGORITHM ICVaR - BPI
Algorithm ICVaR - BPI (Algorithm 3) constructs optimistic and pessimistic value functions, estimation error, and a hypothesized optimal policy in each episode, and returns the hypothesized optimal policy when the estimation error shrinks within ε .
Specifically, in each episode k , ICVaR - BPI calculates the empirical CVaR for values of next states CVaR αs ′ ∼ ˆ p k ( ·| s,a )
( ¯ V k h
+1 ( s ′ )) , CVaR αs ′ ∼ ˆ p k ( ·| s,a ) ( V kh +1 ( s ′ )) and exploration bonuses
else the episode k with policy π k , and update n k +1 ( s, a ) and ˆ p k +
( s ′ | s, a )
Hα (cid:113)
˜
L ( k ) n k ( s,a ) , 4 Hα (cid:113) S ˜ L ( k ) n k ( s,a ) , to establish the optimistic and pessimistic Q-value functions ¯ Q kh ( s, a ) and Q kh ( s, a ) , respectively.
ICVaR - BPI further maintains a hypothesized optimal policy π k , which is greedy with respect to ¯ Q kh ( s, a ) .
Let ˆ β k ; α,V kh +1 ( ·| s, a ) denote the conditional empirical transition probability in episode k , conditioning on transitioning to the worst α -portion successor states s ′ (i.e., with the worst α -portion values V kh +
( s ′ ) ), and it satisfies (cid:80)
s ′ ∈S
ˆ β k ; α,V kh +
( s ′ | s, a ) · V kh +1 ( s ′ ) =
CVaR αs ′ ∼ ˆ p k ( ·| s,a ) ( V kh +1 ( s ′ ))
(Line 7).
Then, ICVaR - BPI computes estimation error G kh ( s, a ) and
J kh ( s ) using conditional transition probability
ˆ β k ; α,V kh +1 ( ·| s, a ) .
Once estimation error J kh ( s ) shrinks within accuracy parameter ε , ICVaR - BPI returns the hypothesized optimal policy π k .
E. P ROOFS OF S AMPLE C OMPLEXITY U PPER B OUND E.2. C ONCENTRATION
In the best policy identification analysis, we introduce several useful lemmas and concentration events.
Different from the regret minimization analysis where the logrithmic factor log( KHSAδ ′ ) in the exploration bonuses is an universal constant, here the logrithmic factor log( 2 k 3 HSAδ ′ ) will increase as the index of the episode k increases.
Lemma 12 (Concentration for V ∗ – BPI) .
It holds that
Pr (cid:34)
[Equation]
Proof of Lemma 12.
Using the same analysis as Lemma
[Equation]
we have that for a fixed k ,
Pr
[Equation]
By a union bound over k = 1 , 2 , . . .
, we have
[Equation]
Lemma 13 (Concentration for any V – BPI) .
It holds that
Pr
[Equation]
Proof of Lemma 13.
Using the same analysis as Lemma
[Equation]
we have that for a fixed k ,
Pr
[Equation]
By a union bound over k = 1 , 2 , . . .
, we have
Pr
[Equation] [Equation]
For any risk level α ∈ (0 , 1] , function V : S (cid:55)→ R , k > 0 and ( s ′ , s, a ) ∈ S × S × A , β α,V ( s ′ | s, a ) and ˆ β k ; α,V ( s ′ | s, a ) are the conditional transition probability from ( s, a ) to s ′ and the conditional empirical transition probability from ( s, a ) to s ′ in episode k , conditioning on transitioning to the worst α -portion successor states s ′ (i.e., with the lowest α -portion values V ( s ′ ) ), respectively.
µ α,V ( s ′ | s, a ) and ˆ µ k ; α,V ( s ′ | s, a ) denote how large the transition probability of successor state s ′ and the empirical transition probability of successor state s ′ in episode k belong to the worst α -portion, respectively.
It holds that
[Equation]
and
[Equation]
Lemma 14 (Concentration for conditional transition probability) .
It holds that
[Equation]
Proof of Lemma 14.
Using the analysis of Eq.
(7), we have that for any risk level α ∈ (0 , 1] , function
V : S (cid:55)→ R , k > 0 and ( s, a ) ∈ S × A ,
[Equation] [Equation]
Using Eq.
(55) in (Zanette & Brunskill, 2019) (originated from (Weissman et al., 2003)), we have that for any fixed k , with probability at least 1 − 2 · ( δ ′ 2 k 2 ) , for any ( s, a ) ∈ S × A ,
[Equation]
s, a ) , and thus, (cid:88)
[Equation]
HSAδ
[Equation]
By a union bound over k = 1 , 2 , . . .
, we have
Pr
[Equation]
∞ (cid:88) k
=
[Equation]
To sum up
[Equation]
we define the following concentration events and recall event E 3 .
[Equation]
[Equation] [Equation]
F
[Equation]
HSAδ
[Equation]
F := F 1 ∩ F 2 ∩ F 3 ∩ E
Lemma 15.
Letting δ ′
=
δ 7 , it holds that
Pr [ F ] ≥ 1 − δ.
Proof of Lemma 15.
This lemma can be obtained by combining Lemmas 12-14 and 3.
E.2. O PTIMISM AND E STIMATION E RROR
For any k > 0 , let ˜ L ( k ) :
= log (cid:16) 2 HSAk 3 δ ′ (cid:17) .
Lemma 16 (Optimism and Pessimism) .
Suppose that event F holds.
Then, for any k > 0 , h ∈
[ H ] and s ∈ S ,
[Equation]
Proof of Lemma 16.
The proof of ¯ V kh ( s ) ≥ V ∗ h ( s ) is similar to Lemma 5.
Below we prove V kh ( s ) ≤
V π k h ( s ) by induction.
First, for any k > 0 , s ∈ S , it holds that V kH
+
( s ) =
V π k H +
( s )
= 0 .
Then, for any k > 0 , h ∈ [ H ] and ( s, a ) ∈ S × A , if Q kh ( s, a ) = 0 , Q kh ( s, a ) ≤ Q π k ( s, a ) trivially holds, and otherwise,
[Equation]
where (a) uses the induction hypothesis, and (b) comes from Lemma 2.
Thus, we have
[Equation]
which concludes the proof.
For any risk level α ∈ (0 , 1] , k > 0 , h ∈ [ H ] and ( s ′ , s, a ) ∈ S × S × A , ˆ β k ; α,V kh +1 ( s ′ | s, a ) is the conditional empirical transition probability from ( s, a ) to s ′ in episode k , conditioning on transitioning to the worst α -portion successor states s ′ (i.e., with the lowest α -portion values
V kh +
( s ′ ) ).
It holds that CVaR
[Equation]
Lemma 17 (Estimation Error) .
Suppose that event F holds.
Then, for any k > 0 ,
[Equation]
Proof of Lemma 17.
In the following, we prove by induction
that for any k > 0 , h ∈ [ H ] and s ∈ S ,
[Equation]
First, for any k > 0 and s ∈ S , it holds that ¯ V kH +1 ( s ) − V
kH
+
( s ) =
J kH +1 ( s ) = 0 .
Then, for any k > 0 , h ∈ [ H ] and ( s, a ) ∈ S ×A , if G kh ( s, a )
=
H , ¯ Q kh ( s, a ) − Q kh
( s
, a ) ≤ G kh ( s, a ) holds trivially, and otherwise,
[Equation]
where (a) uses Lemma 11 with empirical transition probability ˆ p k ( ·| s, a ) , conditional empirical transition probability ˆ β k ; α,V kh +1 ( ·| s, a ) , and values ¯ V kh +1 , V kh +1 , and (b) is due to the induction hypothesis.
Thus, ¯
[Equation]
which completes the proof of Eq.
Hence, for any k > 0 , ¯ V k 1 ( s 1 ) − V k 1 ( s 1 ) ≤ J k 1 ( s 1 ) .
Using Lemma 16, we have
V ∗
[Equation]
k
[Equation] [Equation]
≤ ¯ V k
[Equation] [Equation]
−
[Equation]
k
[Equation]
s
[Equation]
J k
[Equation]
s 1 ) .
E.2. P ROOF OF T HEOREM
Proof of Theorem 3.
Suppose that event F holds.
First, we prove the correctness.
Using Lemma 17, when algorithm ICVaR - BPI stops, we have
[Equation]
Thus, the output policy π k is ε -optimal.
Next, we prove the sample complexity.
Unfolding J k 1 ( s 1 ) , we have
J k 1 ( s 1 ) (a) =
min 
[Equation]
 
[Equation]
min
[Equation]
H
[Equation] [Equation]
(cid:40)
[Equation] [Equation]
[Equation]
(c) ≤ min (cid:40) H (1 +
[Equation]
k ) α (cid:112) n
[Equation]
( s 1 , a 1 )
+
[Equation]
[Table]
∈S
[Equation]
( s
[Equation]
a ) · H
Here (b) is due to that for any k > 0 , h ∈
[ H ] and s ∈ S , J kh ( s ) ∈ [0 , H ] .
(c) comes from Lemma 14.
(e) and (f) follow from recurrently applying steps (a)-(d).
(g) uses the fact that w CVaR ,α,V k kh ( s, a ) is defined as the probability of visiting ( s, a ) at step h of episode k under the conditional transition probability β α,
V kh ′ +1 ( ·|· , · ) for each step h ′ = 1 , . .
, h − 1 .
Let τ denote the episode in which algorithm ICVaR - BPI stops ( ICVaR - BPI will not sample any trajectory in the stopping episode τ ).
Then, for any k < τ , we have ε <
J k 1 ( s 1 ) .
Summing over k < τ , we have
[Equation]
+ min 
[Equation]
+ min
[Equation]
α
[Equation]
min
[Equation] [Equation]
where (a) is due to Lemma 10, (b) uses the fact that for any risk level α ∈ (0 , 1] , k > 0 and h ∈ [ H ] , (cid:80) ( s,a ) ∈S×A w CV aR,α,V k kh ( s, a ) = 1 , (c) comes from Lemma 8, and (d) is due to Lemma 7.
Thus, when log (cid:0) HSAδ ′ (cid:1) ≥ 1 , we have τ
[Equation]
[Equation]
π,h ( s ) > 0 w π,h ( s ) , α H −
[Equation]
 
[Equation]
log
[Equation]
ε ≤ min (cid:40) (cid:114) min π,h,s : w π,h ( s ) > 0 w π
[Equation]
h ( s ) , 1 √ α
[Equation]
(cid:41) 54 SH √ HA εα
[Equation]
+ min  
[Equation]
 
[Equation]
log
[Equation]
HSA
[Equation]
Using Lemma 24 with A = 1 , B = 0 , C = min { 1 (cid:113) min π,h,s : w π,h ( s ) > 0 w π,h ( s ) , 1 √ α H − 1 } 54 SH √ HA εα ,
D = min { 1 min π,h,s : w π,h ( s ) > 0 w π,h ( s ) , 1 α H − 1 } 9 SAH 2 ε , E = 0 , β = 2 HSAδ ′ and T = τ − 1 , and recalling that algorithm ICVaR - BPI does not sample any trajectory in the stopping episode τ , we have that the number of used trajectories is bounded by τ −
[Equation]
O (cid:32) min (cid:40) min
[Equation]
h
[Equation]
s : w
[Equation]
h ( s )
[Equation]
0 w
[Equation]
( s ) ,
[Equation]
(cid:41)
[Equation]
ε
[Equation]
· log(cid:32) min (cid:40) min π,h,s : w π,h ( s ) > 0 w π,h ( s ) , α H −(cid:41)
HSA εαδ (cid:33)(cid:33) .
E. S AMPLE C OMPLEXITY L OWER B OUND
Below we present the sample complexity lower bound for Iterated CVaR RL-BPI and provide its proof.
We say algorithm
A is ( δ, ε ) -correct if A returns an ε -optimal policy ˆ π such that V ˆ π 1 ( s 1 ) ≥ V ∗ 1 ( s 1 ) − ε with probability 1 − δ .
Theorem 5 (Sample Complexity Lower Bound) .
There exists an instance of Iterated CVaR RLBPI, where min π,h,s : w π,h ( s ) > 0 w π,h ( s ) >
α H − 1 and the number of trajectories used by any ( δ, ε ) - correct algorithm is at least
[Equation]
In addition, there also exists an instance of Iterated CVaR RL-BPI, where α H −> min π,h,s : w π,h ( s ) > 0 w π,h ( s ) and the number of trajectories used by any ( δ, ε ) -correct algorithm is at least
[Equation]
Theorem 5 corroborates that when α is small, the factor min π,h,s : w π,h ( s ) > 0 w π,h ( s ) is unavoidable in general.
This reveals the intrinsic hardness of Iterated CVaR RL, i.e., when the agent is highly risk-sensitive, she needs to spend a number of trajectories on exploring critical but hard-to-reach states in order to identify an optimal policy.
Proof of Theorem 5.
This proof uses a similar analytical procedure as Theorem 2 in (Dann & Brunskill, 2015).
First, we consider the instance in Figure 6 as in the proof of Theorem 2, where min π,h,s : w π,h ( s ) > 0 w π,h ( s ) > α H − 1 .
Below we prove that on this instance any algorithm must suffer a O ( 1 min
[Equation]
Fix an algorithm A .
Define E s n := { ˆ π ( s n ) =
a J } as the event that the output policy
ˆ π of algorithm
A chooses the optimal action in state s n .
Using the similar analysis as in the proof of Theorem 2 (Eq.
(15)), we have
[Equation]
For π to be ε -optimal, we need
[Equation]
which is equivalent to
[Equation]
Let η = 8 e 4 εα 0 .
6 c 0 ( H − n ) for some constant c 0 and small enough ε .
Then, for π to be ε -optimal, we need
[Equation]
Let ϕ := 1 − c 0 8 e 4 .
For algorithm A to be ( ε, δ ) -correct, we need
[Equation]
which is equivalent to
[Equation]
Recall that 0 < α < 13 .
For any j ∈ [ A ] , KL ( p unif ( s n , a j ) ∥ p j ( s n , a j )
[Equation]
=
KL ( Ber
[Equation]
Ber
[Equation]
α − η )) ≤
[Equation]
for some constant c 1 and small enough η .
Let V s n be the number of times that algorithm A visited state s n .
To ensure Pr[ ¯ E s n ] ≤ 1 − ϕ
+ ϕδ , we need
[Equation]
for some constant c 2 .
Let c 0 be a small constant such that c 0 8 e 4 < δ .
Let w ( s n ) denote the probability of visiting s n in an episode, and this probability is the same for all policies.
Let τ denote the number of trajectories required by A to be ( ε, δ ) -correct.
Then, τ must satisfy
[Equation]
Recall that n < 12 H and 0 < α < µ < 13 .
Thus, in the constructed instance (Figure 6), we have that min π,h,s : w π,h ( s ) > 0 w π,h ( s )
=
w ( s n ) = µ n − 1 > α H − 1 , and τ =Ω  
[Equation]
2 A ε
[Equation]
min
[Equation] [Equation]
) log (cid:18)δ (cid:19) .
Next, we consider the instance in Figure 7 as in the proof of Theorem 2, where α H − 1 > min π,h,s : w π,h ( s ) > 0 w π,h ( s ) .
Below we prove that on this instance any algorithm must suffer a
O ( 1 α H − 1 · H 3 S
A
ε 2 α 2 log( 1 δ )) regret.
Define E s n :=
{ ˆ π ( s n ) =
a J } as the event that the output policy ˆ π of algorithm
A chooses the optimal action in state s n .
Using the similar analysis as in the proof of Theorem 2 (Eq.
(18)), we have
[Equation]
For π to be ε -optimal, we need
[Equation]
which is equivalent to
[Equation]
Let η = 8 e 4 εα 0 .
6 c 0 for some constant c 0 and small enough ε .
Then, for π to be ε -optimal, we need
[Equation]
Let ϕ := 1 − c 0 8 e 4 .
For algorithm A to be ( ε, δ ) -correct, we need
[Equation] [Equation]
which is equivalent to
[Equation]
Recall that 0 < α < 14 .
For any j ∈ [ A ] , KL ( p unif ( s n , a j ) ∥ p j ( s n , a j ))
=
KL ( Ber ( α ) ∥
Ber ( α − η )) ≤
[Equation]
for some constant c 1 and small enough η .
Let V s n be the number of times that algorithm A visited state s n .
To ensure Pr[ ¯ E s n ] ≤ 1 − ϕ
+ ϕδ , we need
E [ V s n ] ≥
[Equation]
(cid:88)
[Equation]
for some constant c 2 .
Let c 0 be a small constant such that c 0 8 e 4 < δ .
Let w ( s n ) denote the probability of visiting s n in an episode, and this probability is the same for all policies.
Let τ denote the number of trajectories required by A to be ( ε, δ ) -correct.
Then, τ must satisfy
[Equation]
Recall that n = H − 1 .
Thus, in the constructed instance (Figure 7), we have that w ( s n ) =
α n − 1 = α H − 2 , and
[Equation]
F P ROOFS FOR W ORST P ATH RL
In this section, we provide the proofs of regret upper and lower bounds (Theorems 4 and 6) for Worst
Path RL.
F. P ROOFS OF R EGRET U PPER B OUND F.1. C ONCENTRATION
Recall that for any k > 0 and ( s, a ) ∈ S × A , n k ( s, a ) is the number of times that ( s, a ) was visited before episode k .
For any k > 0 and ( s ′ , s, a ) ∈ S × S × A , let n k ( s ′ , s, a ) denote the number of times that ( s, a ) was visited and transitioned to s ′ before episode k .
For any policy π and ( s, a ) ∈ S × A , let υ π
( s, a ) and υ π ( s ) denote the probabilities that ( s, a ) and s are visited at least once in an episode under policy π , respectively.
Lemma 18.
It holds that
[Equation]
Proof of Lemma 18.
For any k and ( s, a ) ∈ S × A , conditioning on the filtration generated by episodes 1 , . . .
, k − 1 , whether the algorithm visited ( s, a ) at least once in episode k is a Bernoulli random variable with success probability υ π k
( s, a ) .
Then, using Lemma F.4 in (Dann et al., 2017), we can obtain this lemma.
Lemma 19.
It holds that
[Equation]
Proof of Lemma 19.
For any k , h ∈ [ H ] and ( s, a ) ∈ S × A , conditioning on the event { s kh = s, a kh = a } , the indicator 1 (cid:8) s kh +
= s ′ (cid:9) is a Bernoulli random variable with success probability p ( s ′ | s, a ) .
Then, using Lemma F.4 in (Dann et al., 2017), we can obtain this lemma.
To summarize, we define some concentration events which will be used in the following proof.
[Equation]
∩
[Equation]
Lemma 20.
Letting δ ′
=
δ 2 , it holds that
Pr [ G ] ≥ 1 − δ.
Proof of Lemma 20.
This lemma can be obtained by combining Lemmas 18 and 19.
F.1. O VERESTIMATION AND G OOD S TAGE
Recall that in Worst Path RL, for any k > 0 , h ∈
[ H ] and ( s, a ) ∈ S × A , Q ∗ h ( s, a ) :
= r ( s, a ) + min s ′ ∼ p ( ·| s,a ) ( V ∗ h
+1 ( s ′ )) and V ∗ h ( s ) :
= max a ∈A Q ∗ h ( s, a ) .
In addition, ˆ Q kh ( s, a ) :
= r ( s, a ) + min s ′ ∼ ˆ p k ( ·| s,a ) ( ˆ V kh +
( s ′ ))
and
ˆ V kh ( s ) :
= max a ∈A ˆ Q kh ( s, a ) .
Lemma 21 (Overestimation) .
For any k > 0 , h ∈ [ H ] and ( s, a
) ∈ S × A , ˆ Q kh ( s, a ) ≥ Q ∗ h ( s, a ) and ˆ V kh ( s ) ≥ V ∗ h ( s ) .
Remark.
Lemma 21 shows that if the Q-value of some state-action pair is not accurately estimated, it can only be overestimated (not underestimated).
This feature is due to the min metric in the Worst
Path RL formulation (Eq.
Proof of Lemma 21.
We prove this lemma by induction.
For any k > 0 and s ∈ S , ˆ V k H +
( s ) =
V ∗ H +1 ( s ) =
For any k > 0 , h ∈ [ H ] and ( s, a ) ∈ S × A , since r ( s, a ) is known and
ˆ V kh +1 ( s ) ≥
V ∗ h
+1 ( s ) (due to the induction hypothesis), if ˆ p k ( ·| s, a ) has detected all successor states, then ˆ Q kh ( s, a ) ≥ Q ∗ h ( s, a ) .
Otherwise, if ˆ p k ( ·| s, a ) has not detected all successor states, due to the property of min , we also have ˆ Q kh ( s, a ) ≥ Q ∗ h ( s, a ) .
Therefore, we have ˆ V kh ( s ) ≥
V ∗ h ( s ) , which completes the proof.
Lemma 22 (Non-increasing Estimated Value) .
For any k 1 , k 2 > 0 such that k 1 ≤ k 2 , h ∈
[ H ] and ( s, a
) ∈ S × A , ˆ Q k 1 h ( s, a ) ≥
ˆ Q k 2 h ( s, a ) and ˆ V k 1 h ( s ) ≥ V k 2 h ( s ) .
Proof of Lemma 22.
We prove this lemma by induction.
For any k 1 , k 2 > 0 such that k 1 ≤ k 2 and s ∈ S , ˆ V k 1 H +1 ( s ) =
V k 2 H +
( s )
= 0 .
For any k 1 , k 2 > 0 such that k 1 ≤ k 2 , h ∈
[ H ] and ( s, a ) ∈ S × A , since r ( s, a ) is known and
ˆ V k 1 h +1 ( s ) ≥
V k 2 h +
( s ) (due to the induction hypothesis), if ˆ p k 1 ( ·| s, a ) has detected all successor states, then ˆ Q k 1 h ( s, a ) ≥
ˆ Q k 2 h ( s, a ) .
Otherwise, if ˆ p k 1 ( ·| s, a ) has not detected all successor states, due to the min metric and that ˆ p k 2 ( ·| s, a ) will detect more (or the same) successor states than ˆ p k 1 ( ·| s, a ) , we also have ˆ Q k 1 h ( s, a ) ≥ ˆ Q k 2 h ( s, a ) .
Therefore, we have ˆ V k 1 h ( s ) ≥ V k 2 h ( s ) , which completes the proof.
Remark.
Combining Lemmas 21 and 22, we have that as the episode k increases, the estimated value ˆ Q kh
( s, a ) /
ˆ V kh ( s ) will decrease to its true value Q ∗ h ( s, a ) /
V ∗ h ( s ) or keep the same.
Let S ∗ := { s ∈ S : v π ∗ ( s ) > 0 } denote the set of states which are reachable for an optimal policy.
Lemma 23 (Good Stage) .
If there exists some episode ¯ k > 0 which satisfies that for any h ∈ [ H ] and s ∈ S ∗ , ˆ V ¯ kh ( s )
=
V ∗ h ( s ) and π ¯ kh ( s ) suggests an optimal action, then we have that for any k ≥ ¯ k , h ∈
[ H ] and s ∈ S ∗ , ˆ V kh ( s )
=
V ∗ h ( s ) and π kh ( s ) suggests an optimal action, and thus for any k ≥ ¯ k , algorithm MaxWP takes an optimal policy.
Remark.
Lemma 23 reveals that if in some episode ¯ k , for any step h and state s ∈ S ∗ , algorithm
MaxWP estimates the V-value accurately and chooses an optimal action, then hereafter, algorithm
MaxWP always takes an optimal policy.
We say algorithm MaxWP enters a good stage , if starting from some episode ¯ k , for any k ≥ ¯ k , h ∈ [ H ] and s ∈ S ∗ , ˆ V kh ( s )
=
V ∗ h ( s ) and π kh ( s ) suggests an optimal action.
Proof of Lemma 23.
Suppose that in episode ¯ k , we have that for any h ∈
[ H ] and s ∈ S ∗ , ˆ V ¯ kh ( s ) =
V ∗ h ( s ) and π ¯ kh ( s ) suggests an optimal action.
This is equivalent to the statement that in episode ¯ k , for any h ∈ [ H ] and s ∈ S ∗ , for each optimal action a (such that Q ∗ h ( s, a ) =
V ∗ h ( s ) ), ˆ Q ¯ kh
( s, a ) =
Q ∗ h ( s, a ) , and for each suboptimal action a (such that Q ∗ h ( s, a ) <
V ∗ h ( s ) ), Q ∗ h ( s, a ) ≤
ˆ Q ¯ kh
( s, a ) <
V ∗ h ( s ) .
Using Lemmas 21 and 22, we have that for any h ∈
[ H ] and s ∈ S ∗ , as k increases, ˆ Q kh ( s, a ) will either decrease to the true value Q ∗ h ( s, a ) or keep the same.
Therefore, we have that for any k ≥ ¯ k , h ∈
[ H ] and s ∈ S ∗ , for each optimal action a , ˆ Q ¯ kh
( s, a ) =
Q ∗ h ( s, a ) , and for each suboptimal action a , Q ∗ h ( s, a ) ≤ ˆ Q ¯ kh
( s, a ) <
V ∗ h ( s ) , which completes the proof.
F.1. P ROOF OF T HEOREM
Proof of Theorem 4.
Suppose that event G holds.
Let
[Equation] [Equation]
(cid:18)
[Equation]
(cid:18) SA δ (cid:19) +(cid:19) .
For any ( s, a ) ∈ S × A , let
[Equation]
(cid:18)
[Equation]
(cid:18)
[Equation]
δ (cid:19) +(cid:19) .
It holds that ¯ T = (cid:80) ( s,a ) ∈S×A ¯ T ( s, a ) .
According to Lemma 23, in order to prove Theorem 4, it suffices to prove that in episode ¯ T + 1 , for any h ∈ [ H ] and s ∈ S ∗ ,
ˆ V ¯
T
+1 h
( s ) =
V ∗ h ( s ) and π ¯ T +1 h
( s ) suggests an optimal action, i.e., algorithm
MaxWP has entered the good stage in episode ¯ T + 1 .
We prove this statement by contradiction.
Suppose that in episode ¯ T + 1 , there exists some h ∈
[ H ] and some s ∈ S ∗ which satisfy that ˆ V ¯ T
+1 h
( s ) >
V ∗ h ( s ) (the value function can only be overestimated) or
π ¯ T +1 h
( s ) suggests a suboptimal action.
If the policy π ¯ T +1 taken in episode ¯ T + 1 is optimal, then there exists some h ∈
[ H ] , some s ∈ S ∗ and some optimal action a which satisfy that v π ¯ T +1 ( s ) >
and ˆ Q ¯ T
+1 h
( s, a ) > Q ∗ h ( s, a ) .
Otherwise, if the policy π ¯ T +1 taken in episode ¯ T + 1 is suboptimal, then there exists some h ∈
[ H ] , some s ∈ S ∗ and some suboptimal action a which satisfy that v π ¯ T +1 ( s ) >
and ˆ Q ¯ T
+1 h
( s, a ) > Q ∗ h ( s, a ) .
Hence, no matter which of the above cases happen, we have that there exists some h ∈
[ H ] and some ( s, a ) ∈ S ×
A which satisfy that v π ¯ T +1 ( s, a ) >
and ˆ Q ¯ T
+1 h
( s, a ) > Q ∗ h ( s, a ) .
Under the min metric in Worst Path RL, the overestimation of a Q-value comes from the following reasons: (i) Algorithm MaxWP has not detected the successor state with the lowest V-value.
(ii)
The
V-values of successor states at the next step are overestimated.
If the overestimation of ˆ Q ¯ T
+1 h
( s, a ) comes from the overestimation of the V-values at the next step (reason (ii)), then we have that at the next step, there exists some state-action pair whose Q-value is overestimated.
Then, we can trace the overestimation from ( s, a ) at step h to some ( s ′ , a ′ ) at some step h ′ ≥ h , which satisfies that ˆ Q ¯ T
+1 h ′ ( s ′ , a ′ ) >
Q ∗ h ′
( s ′ , a ′ )
and ˆ V ¯ T +1 h
′ +
( x ) =
V ∗ h
′ +
( x ) for any x ∈ S .
In other words, the overestimation of ˆ Q ¯ T
+1 h ′ ( s ′ , a ′ ) is purely due to that at ( s ′ , a ′ ) , algorithm
MaxWP has not detected the successor state x with the lowest value V ∗ h
′ +
( x ) .
For any k > 0 and ( s, a ) ∈ S × A , let T k ( s, a )
=
{ k ′ <
k : υ π k ′ ( s, a ) > 0 } denote the set of episodes where ( s, a ) is reachable before episode k .
We consider the following two cases according to whether |T ¯ T +1 ( s ′ , a ′ ) | is large enough to detect all successor states of ( s ′ , a ′ ) .
Case (1): If |T ¯ T +1 ( s ′ , a ′ )
| ≥ ¯ T ( s ′ , a ′ ) , using Lemma 18, we have
[Equation]
a
[Equation]
Then, using Lemma 19, we have that for any s ∈ supp ( p ( ·
| s ′ , a ′ )) ,
[Equation]
which contradicts that ˆ Q kh ′
( s ′ , a ′ ) is overestimated.
Case (2): If |T ¯ T +1 ( s ′ , a ′ )
| < ¯ T ( s ′ , a ′ ) , we say the overestimation in episode ¯ T + 1 is due to the insufficient visitation on ( s ′ , a ′ ) .
Then, among episodes 1 , . .
, ¯ T , we exclude the episodes contained in T ¯ T +1 ( s ′ , a ′ ) , i.e., we ignore the episodes where ( s ′ , a ′ ) is reachable and can be the source of the overestimation.
Then, the number of excluded episodes due to ( s ′ , a ′ ) is |T ¯ T +1 ( s ′ , a ′ )
| < ¯ T ( s ′ , a ′ ) .
According to Lemma 23, since episode ¯ T +1 has not entered the good stage, for any k ≤ ¯ T , episode k has also not entered the good stage.
Then, for any k ≤ ¯ T , there exists some h ∈
[ H ] and some s ∈ S ∗ which satisfy that ˆ V kh ( s ) >
V ∗ h ( s ) or π kh ( s ) suggests a suboptimal action.
This implies that there exists some h ∈
[ H ] and some ( s, a ) ∈ S ×
A which satisfy that v π k ( s, a ) > 0 and ˆ Q kh ( s, a ) > Q ∗ h ( s, a ) .
Consider the last episode k among episodes 1 , . .
, ¯ T which is not excluded.
Using the above argument, let ( s k , a k ) denote the source of overestimation in episode k which satisfies that ˆ Q kh ′
( s ′ , a ′ ) >
Q ∗ h ′
( s ′ , a ′ )
and
ˆ V kh ′
+
( x ) =
V ∗ h
′ +
( x ) for any x ∈ S .
Since we have excluded all the episodes where ( s ′ , a ′ ) is reachable among episodes 1 , . .
, ¯ T and episode k is not excluded, it holds that ( s k , a k ) ̸
=
( s ′ , a ′ ) .
We repeat the above analysis on T k
( s k , a k ) .
If Case (1) happens, i.e., |T k
( s k , a k ) | ≥ ¯ T ( s k , a k ) , then we can derive a contradiction and complete the proof.
If Case (2) happens, i.e., |T k
( s k , a k ) | < ¯ T ( s k , a k ) , we exclude episode k and the episodes contained in
T k ( s k , a k ) .
Then, the number of excluded episodes due to ( s k , a k ) among episodes 1 , . .
, ¯ T is at most |T k
( s k , a k ) | + 1 ≤ | ¯ T ( s k , a k ) | .
We repeat the above procedure.
Once Case (1) happens, we can derive a contradiction and complete the proof.
Otherwise, if Case (2) keeps happening, we will exclude the episodes due to the reachability and possible overestimation of ( s, a ) for all ( s, a ) ∈ S × A , and the total number of excluded episodes is strictly smaller than (cid:80) ( s,a ) ∈S×A ¯ T ( s, a ) =
¯ T .
Thus, there exists some episode k 0 among episodes 1 , . .
, ¯ T which satisfies that for any ( s, a ) ∈ S ×A , υ π k 0 ( s, a ) = 0 , which gives a contradiction.
F. R EGRET L OWER B OUND
In the following, we establish a regret lower bound for Worst Path RL and give its proof.
To exclude trivial instance-specific algorithms and formally state our lower bound, we first define an o ( K ) -consistent algorithm as an algorithm which guarantees an o ( K ) regret on any instance of
Worst Path RL.
Theorem 6.
There exists an instance of Worst Path RL, for which the regret of any o ( K ) -consistent algorithm is at least
[Equation]
where max ( s,a ): ∃ h, a ̸ = π ∗ h ( s ) takes the maximum over all ( s, a ) such that a is sub-optimal in state s at some step.
The intuition behind this lower bound is as follows.
For a critical but hard-to-reach state s , any o ( K ) -consistent algorithm must explore all actions a in state s , in order to detect their induced successor states s ′ and distinguish the optimal action.
This process incurs a regret dependent on factors min π : υ π ( s,a ) >
υ π ( s, a ) and min s ′ ∈ supp ( p ( ·| s,a )) p ( s ′ | s, a ) , and hence the lower bound.
Proof of Theorem 6.
Consider the instance I as shown in Figure 8:
The action space contains two actions, i.e., A = { a 1 , a 2 } .
The state space is S
= { s 1 , s 2 , . .
, s n , x 1 , x 2 , x 3 } , where n = S − 3 and s 1 is the initial state.
Let H ≫ S and 0 < α < 14 .
The reward functions are as follows.
For any a ∈ A , r ( x 1 , a ) = 1 , r ( x 2 , a ) = 0 .
8 and r ( x 3 , a ) = 0 .
For any i ∈ [ n ] and a ∈ A , r ( s i , a ) = 0 .
The transition distributions are as follows.
For any a ∈ A , p ( s 2 | s 1 , a )
=
α , p ( x 1 | s 1 , a ) = 1 − 3 α , p ( x 2 | s 1 , a )
=
α and p ( x 3 | s 1 , a )
=
α .
For any i ∈ { 2 , . . . , n − 1 } and a ∈ A , p ( s i +
|
s i , a ) =
α and p ( x 1 | s i , a ) = 1 − α .
x 1 , x 2 and x 3 are absorbing states, i.e., for any a ∈ A , p ( x 1 | x 1 , a ) = 1 , p ( x 2 | x 2 , a )
= 1 and p ( x 3 | x 3 , a )
= 1 .
The state s n is a bandit state, which has an optimal action and a suboptimal action.
Let a ∗ denote the optimal action in state s n , which is uniformly drawn from
(cid:2869) (cid:2870) (cid:3041)(cid:2879)(cid:2869) (cid:3041) (cid:2869) (cid:2870) (cid:2871)
[Figure]
Reward Reward
[Figure]
Action ∗ :
Action (cid:3046)(cid:3048)(cid:3029) :
[Figure]
(cid:3046)(cid:3048)(cid:3029) :
{ a 1 , a 2 } , and let a sub denote the other sub-optimal action in state s n .
For the optimal action a ∗ , p ( x 2 | s n , a ∗ )
= 1 .
For the sub-optimal action a sub , p ( x 2 | s n , a sub ) = 1 − α and p ( x 3 | s n , a sub ) = α .
Fix an o ( K ) -consistent algorithm A , which guarantees a sub-linear regret on any instance of Worst
Path RL.
We have that A needs to observe the transition from ( s n , a sub ) to x 3 at least once.
Otherwise, without any observation of the transition from ( s n , a sub ) to x 3 , A can only trivially choose a 1 or a 2 in state s n , and no matter A chooses a 1 or a 2 , it will suffer a linear regret in the counter instance where the unchosen action is optimal.
Thus, any o ( K ) -consistent algorithm must observe the transition from ( s n , a sub ) to x 3 at least once, and needs at least
[Equation]
episodes with sub-optimal policies.
Here π sub denotes a policy which chooses a sub in state s n , and υ π sub ( s n , a sub ) denotes the probability that ( s n , a sub ) is visited at least once in an episode under policy π sub .
Once the agent takes a sub-optimal policy in an episode, she will suffer regret 0 .
6( H − n ) in this episode.
Therefore, A needs to suffer at least
[Equation]
regret in expectation.
Since in the constructed instance (Figure 8)
[Equation]
we have that A needs to suffer at least
[Equation]
regret.
G T ECHNICAL T OOL
In this section, we present a useful technical tool.
Lemma 24 (Lemma 13 in (M´enard et al., 2021)) .
Let A, B, C, D, E and β be positive scalars such that 1 ≤ B ≤ E and β ≥ e .
If T ≥ 0 satisfies
[Equation]
then we have
[Equation]
where
[Equation]