P ROVABLE B ENEFITS OF D EEP H IERARCHICAL RL
Anonymous authors
Paper under double-blind review
A BSTRACT
Modern complex sequential decision-making problem often requires both lowlevel policy and high-level planning.
Deep hierarchical reinforcement learning (Deep HRL) admits multi-layer abstractions which naturally model the policy in a hierarchical manner, and it is believed that deep HRL can reduce the sample complexity compared to the standard RL frameworks.
We initiate the study of rigorously characterizing the complexity of Deep HRL.
We present a modelbased optimistic algorithm which demonstrates that the complexity of learning a near-optimal policy for deep HRL scales with the sum of number of states at each abstraction layer whereas standard RL scales with the product of number of states at each abstraction layer.
Our algorithm achieves this goal by using the fact that distinct high-level states have similar low-level structures, which allows an efﬁcient information exploitation and thus experiences from different high-level state-action pairs can be generalized to unseen state-actions.
Overall, our result shows an exponential improvement using Deep HRL comparing to standard RL framework.
I NTRODUCTION
Reinforcement learning (RL) is a powerful tool to solve sequential decision making problems in various domains, including computer games (Mnih et al., 2013), Go (Silver et al., 2016), robotics (Schulman et al., 2015).
A particular feature in these successful applications of RL is that these tasks are concrete enough to be solved by primitive actions and do not require high-level planning.
Indeed, when the problem is complex and requires high-level planning, directly applying RL algorithms cannot solve the problem.
An example is the Atari game Montezuma’s Revenge, in which the agent needs to ﬁnd keys, kills monsters, move to correct rooms, etc.
This is notoriously difﬁculty problem that requires more sophisticated high-level planning.
Hierarchical reinforcement learning (HRL) is powerful framework that explicitly incorporate highlevel planning.
Roughly speaking, HRL divides the decision problem into multiple layers and each layer has its own state space.
States in higher layers represent more abstraction and thus higher layer states are some time named meta-states.
When number of layers of abstraction is large, we call this framework, deep hierarchical reinforcement learning (deep HRL).
In deep HRL, the agent makes decisions by looking at states from all layers.
The dependency on higher layer states represents high-level planning.
HRL has been successfully applied to many domains that require high-level planning, including autonomous driving (Chen et al., 2018), recommendation system (Zhao et al., 2019), robotics (Morimoto & Doya, 2001).
Recently, extension to imitation learning has also been studied (Le et al., 2018).
While being a practically powerful framework, theoretical understanding on HRL is still limited.
Can we provably show the beneﬁt of using HRL instead of na¨ıve RL?
In particular, what can we gain from multi-layer abstraction of deep HRL?
Existing theories mostly focus on option RL setting, which transits from the upper layer to lower layer when some stopping criterion is met (Fruit et al., 2017).
This is different from our setting requiring horizons in each layer to be the same, which is common in computer games and autonomous driving Moreover, the number of samples needed in Fruit et al.
(2017) is proportional to the total number of states and total number of actions.
In our setting, both the total number of states and number of actions can be exponentially large and hence their algorithm becomes impractical.
We initiate the study of rigorously characterizing the complexity of deep HRL and explaining its beneﬁts compared to classical RL.
We study the most basic form, tabular deep HRL in which there are total L -layers and each layer has its own state space S (cid:96) for (cid:96) ∈
[ L ] .
One can simply apply classical RL algorithm on the enlarged state space S
= S 1 × S 2 × · × S L .
The sample complexity will however depend on the size of the enlarged states space |S| = Π L(cid:96)
=1 |S (cid:96) | .
In this paper, we show because of the hierarchical structure, we can reduce the sample complexity exponentially , from ∝ poly(Π L(cid:96)
|S (cid:96) | ) to ∝ (cid:80) L(cid:96)
=
1 poly( |S (cid:96) | ) .
We achieve this via a model-based algorithm which carefully constructs conﬁdence of the model in a hierarchical manner.
We fully exploit the structure that lower-level MDPs of different high-level states share the same transition probability, which allows us to combine the information collected at different high-level states and use it to give an accurate estimator of the model for all low-level MDPs.
Due to this information aggregation, we are able to improve the sample complexity bound.
To our knowledge, this is the ﬁrst theoretical result quantifying the complexity of deep HRL and explain its beneﬁt comparing to classical RL.
Organization.
This paper is organized as follows.
In Section 2 we discuss related work.
In Section 3, we review basic RL concepts and formalize deep HRL.
In Section 4, we present our main algorithm and present its theoretical guarantees.
In Section 5, we give a proof sketch of our main theorem.
We conclude in Section 6 and defer some technical lemmas to appendix.
R ELATED W ORK
We are going to provide several related literatures on tabular MDP and hierarchical reinforcement learning in this section.
As for tabular MDP, many works focus on solving MDP with a simulator which can provide samples of the next state and reward given the current state-action pair.
These work includes Lattimore &
Hutter (2012); Azar et al. (2013); Sidford et al.
(2018b;a); Agarwal et al.
Since we do not need to consider the balance between exploration and exploitation, this setting is easier than the setting of minimizing the regret.
There are also a line of work on analysis of the regret bound in RL setting.
Jaksch et al.
and Agrawal & Jia (2017) propose a model-based reinforcement learning algorithm, which estimates the transition model using past samples and add a bonus to the estimation.
Their algorithms achieve regret bound ˜ O ( √ H 4 S 2 AT ) and ˜ O ( √ H 3 S 2 AT ) respectively.
Later, the UCBVI algorithm in Azar et al.
(2017) adds bonus term to the Q function directly, and achieves the regret bound ˜ O ( √ H 2 SAT ) , which matches the lower bound when the number of episode is sufﬁciently large.
Adopting the technique of variance reduction, the vUCQ algorithm in Kakade et al.
(2018) improves the lower order term in the regret bound.
Jin et al.
(2018) proposed a model-free Q-learning algorithm is proved to achieve regret bound ˜ O
( √ H 3 SAT ) .
Hierarchical reinforcement learning Barto & Mahadevan (2003) are also broadly studied in Dayan & Hinton (1993); Parr & Russell (1998);
Sutton et al.
; Dietterich (2000); Stolle & Precup (2002); Bacon et al.
; Florensa et al.
; Frans et al.
The option framework, which is studied in Sutton et al. (1999); Precup (2001), is another popular formulation used in hierarchical
RL.
In Fruit et al.
(2017), the regret analysis is carried on option reinforcement learning, but their analysis only applies to the setting of option RL.
To our current knowledge, there is no such work analyzing the regret bound of multi-level hierarchical RL.
P RELIMINARIES 3. E PISODIC M ARKOV D ECISION P ROCESS
In this paper, we consider ﬁnite horizon Markov decision process (MDP).
An MDP is speciﬁed by a tuple ( S , A , H, P, r ) , where S is the (possibly uncountable) state space, A is a ﬁnite action space,
H ∈ Z + is a planning horizon, P : S×A → (cid:52) ( S ) is the transition function, and r : S×A → [0 , 1] is the reward function.
At each state s ∈ S , an agent is able to interact with the MDP by playing an action a ∈ A .
Once an action a is played on state s , the agent receives an immediate reward r ( s, a ) ∈ [0 , 1] 1 , and the state transitions to next state s (cid:48) with probability P ( s (cid:48) | s, a ) .
Starting from some initial state s 1 ∈ S (draw from some distribution), the agent is able to play H steps (an episode) and then the system resets to another initial state s 1 sampled from the initial distribution.
For an MDP, our goal is to obtain an optimal (will be precise shortly) policy, π : S
→ A , which is a function that maps each state to an action.
If an agent always follows the action given by a policy π , then it induces a random trajectory for an episode: s 1 , a 1 , r 1 , s 2 , a 2 , r 2 , . . .
, s H , a H , r H where r 1 = r
( s 1 , a 1 ) , s 2 ∼ P ( ·| s 1 , a 1 ) , a 2 ∼ π ( s 2 ) , etc.
The value function and Q -function at step h of a given policy is deﬁned as V πh ( s ) =
E π (cid:104)(cid:80) Hh (cid:48)
= h r h (cid:48) (cid:12)(cid:12) s h
= s (cid:105) and Q πh ( s, a ) =
E π (cid:104)(cid:80) Hh (cid:48)
= h (cid:12)(cid:12) s h
= s, a h = a (cid:105) , where the expectation is over all sample trajectories.
Then the optimal policy, π ∗ , is deﬁned to be the policy with largest V π 1 ( s 1 ) for all s 1 ∈ S .
For any optimal policy, its value and Q -function satisfy the following Bellman equation ∀ s ∈ S ,
[Equation]
∈ A , h ∈
[ H ] :
[Equation]
We consider the MDP problem in the online learning setting, where the probability transition is unknown.
However, our goal is still to collect the maximum amount reward, i.e., play a policy that is comparable to the optimal one.
Therefore, the agent needs to learn to play through trial and error, i.e., improving the policy by learning from experiences.
Suppose we allow the agent to play in total
K ≥ 1 episodes.
For each episode, the agent is following a policy π k , which is computed based on her experiences collected from episodes 1 , 2 , . . .
, k − 1 .
To measure the performance of the agent, we use the following standard regret formulation, which compares the reward collected by the agent to the performance of an optimal policy.
[Equation]
Note that, if the agent learns nothing, we then expect R ( K ) ∝ K .
But if the agent is able to learn, then the average regret, R ( K ) /K , which measures the average error per step, goes to 0 when K becomes large.
In the online MDP literature, model based algorithms (e.g. Jaksch et al.
achieves regret R ( K ) ≤ ˜ O
(cid:16)(cid:112) H 2 |S| 2 |A| HK (cid:17) .
3. D EEP H IERARCHICAL MDP
In this section we introduce a special type of episodic MDPs, the hierarchical MDP (hMDP).
If we view them as just normal MDPs, then their state space size can be exponentially large.
Formally, each hMDP consists of L levels of episodic MDPs with the (cid:96) -th level having planning horizon H (cid:96) .
One can view the (cid:96) -th level MDP as a subtask of the ( (cid:96) +1) -th level MDP.
To transition between two state in ( (cid:96) + 1) -th level, the agent needs to play an episode in (cid:96) -th level MDP (the state transition will be deﬁned formally shortly).
Therefore, the total planning horizon of the hierarchical MDP is
H = (cid:81)
Li =1 H (cid:96)
For each step h in the hMDP, we can represent it by a tuple ( h 1 , · · · , h L ) , where h (cid:96) ∈
[ H (cid:96) ] is the step of (cid:96) -th level MDP for 1 ≤ (cid:96) ≤ L .
We use ˜ H (cid:96) =
(cid:81) Li
= (cid:96) H i to denote the effective horizon of level (cid:96) , which represents the total number of actions in A (cid:96) ∪ · · · ∪ A L needed to be played in an episode of the full hMDP.
Note that, for each h
= ( h 1 , · · · , h L ) ∈ [1 , H ] , we have h +
=
( h (cid:48) 1 , · · · , h (cid:48) L ) is the immediate next lexicographical tuple of ( h 1 , · · · , h L ) .
We now describe how the agent can interact with the full hMDP.
In fact, in each step h , only an action in one level can be played.
This level is given by the function σ : [ H ] → [ L ] , formally deﬁned as
[Equation]
It characterizes the lowest level of MPDs which does not reach the last step in its horizon.
result to
To make it formal for the state-transition, we use S (cid:96) to denote the set of states at level (cid:96) , A (cid:96) to denote the set of actions at level (cid:96) .
To be convenient, we assume for every (cid:96) ∈
[ L ] , for any H (cid:96) - length trajectory in the (cid:96) -th level MDP, the last state always falls in S (cid:48) (cid:96) ⊂
S l , which we call as the endstates in level (cid:96) .
At step h of the full hMDP, the full state is described as a length- L tuple: ( s 1 , · · · , s L ) .
For any 1 ≤ (cid:96) < σ ( h ) , we immediately have s (cid:96) ∈ S (cid:48) (cid:96) is an endstate of level (cid:96) .
Note that the total number of states of the full MDP is (cid:81) L(cid:96)
=1 |S (cid:96) | , which is exponentially larger than the average size of a level’s state space.
Now we deﬁne the transition.
At step h of the full hMDP, the agent plays an action a σ ( h )
h ∈
A σ ( h ) for the σ ( h ) -level MDP.
The state of this MDP triggers a transition at level σ ( h ) :
[Equation]
(cid:17)
Note that the probability transition is determined by the state-action-ending-state tuple ( s σ ( h ) h , a σ ( h ) h , s σ ( h ) − 1 h ) , instead of single state-action pair.
Moreover, all the MDPs with level lower than σ ( h ) will reset their state based on some initial distribution P i 0 :
[Equation]
and all the MDPs with level higher than σ ( h ) will keep their states unmoved.
For any given (cid:96) ∈
[ L ] , we use E (cid:96) to denote the state-action-ending-state tuple at level (cid:96) :
[Equation]
As for the reward, we use r ( s 1 h , · · · , s L h , a σ ( h ) h ) ∈ [0 , 1] to denote the immediate reward obtained after executing the action a σ ( h ) h .
We illustrate the hierarchical MDP model in Figure 1.
An Example: Autonomous Driving.
We here give a more concrete example.
Suppose we want our vehicle to reach the destination, while not hitting obstacles or crashing into another vehicles or pedestrians.
We use the following hierarchical MDP structure to formulate this problem.
Level 1 represents the status (e.g. position on the road, whether has an obstacle in the front) of the vehicle, and the ending state represents whether the vehicle avoids all the obstacles, other vehicles, pedestrians and arrives at the end of the road.
Level 2 represents the road map, and the ending state represents whether the vehicle reaches the desired position.
At each time step, if the vehicle does not reach the end state of level 1, that is, it still on the road and not at a crossing, then the vehicle needs to decide whether speeding up, slowing down or dodging the obstacle in the front.
If the vehicle reaches the end state of level 1, that is, it arrives at the end of a road, then it needs to decide whether going straight forward, turning left or turning right.
This process ends if and only if the vehicle reaches the desired position.
3. D EEP H IERARCHICAL R EINFORCEMENT L EARNING O BJECTIVE
Suppose the environment is an hMDP.
The hierarchical structure and the reward is known but the transition models are not known.
Similar to the classic RL setting, our agent needs to interact with the unknown hMDP while being able to accumulate the amount of rewards comparable to an optimal policy.
Our goal is design an algorithm that minimizes the regret deﬁned in Equation (2).
Since an hMDP is very special compared to a normal MDP, we redeﬁne its related quantities here.
The policy π is a mapping from S 1 × · · · × S L × [ H ] to A 1 ∪ · · · A L , where π ( s 1 , · · · , s
L , h ) ∈ A (cid:96) if and only if σ ( h ) = (cid:96), s 1 ∈ S (cid:48) 1 , · · · , s (cid:96) − 1 ∈ S (cid:48) (cid:96) − 1 and s (cid:96) ∈ S (cid:96) , · · · , s L ∈ S L .
Given a policy π , and step h , the value function and Q function are again deﬁned in Equation (1), but can be rewritten as,
[Equation]
Our objective is to ﬁnd a policy π ∗ such that the value function V πh is maximized for all states and steps in a horizon.
We use V ∗ h and Q ∗ h to denote the optimal value function and optimal Q-function, which is the value function and the Q-function when applying the optimal policy π ∗ .
A LGORITHM
In this section, we will present a model-based hierarchical reinforcement learning algorithm, together with its regret bound analysis.
4. M ODEL - BASED H IERARCHICAL R EINFORCEMENT L EARNING A LGORITHM
To formally present our algorithm, we ﬁrst explain the high-level ideas.
Note that the full model size is O (cid:16)(cid:81) L(cid:96)
=1 |S (cid:96) ||E (cid:96) | (cid:17) , where |S (cid:96) | is the number of states in level (cid:96) and |E (cid:96) | is the number of stateaction-endstate tuples in level (cid:96) .
However, we notice that there are rich structures for the algorithm to exploit: low-level MDPs corresponding to different high-level states share the same transition model.
Recall that, our eventual goal to learn the hierarchical model with number of samples much less than (cid:81) L(cid:96)
=1 |S (cid:96) ||E (cid:96) | .
To achieve this goal, we group our samples obtained from transition models by state-action-endstate tuple, and samples obtained from initial distributions by levels: even if the samples are collected at a different high-level state-action pair, they are grouped to a same set as long as they come from a same state-action-endstate pair.
We then use the samples from a level to estimate the MDP initial distribution corresponding to that level.
In effect, to estimate all the MDPs corresponding to a level accurately, we only need to visit this level a number of times proportional to the size of a single MDP in this level, which is far smaller than the model of all MDPs in this level combined.
Next, we explain how we can deploy the algorithm in the online setting, where we can only visit a state by following the trajectory of some policy.
Initially, we have no knowledge of the MDPs corresponding to each level, we just initialize each of them to an arbitrary MDP.
Suppose we play the whole game for K episodes, and for each episode, we play H = (cid:81) L (cid:96) =
1 H (cid:96) steps, where H (cid:96) is the horizon of an MDP in level (cid:96) .
Suppose at episode k ∈ [ K ] and step h ∈
[ H ] , the transition happens at level (cid:96) (which means σ ( h ) =
(cid:96) ).
We denote the full state we observed as ( s 1 h,k , · · · , s Lh,k ) and the action we take as a (cid:96)h,k .
Then we collect data samples of the form ( e (cid:96)h,k , s (cid:96)h +1 ,k ) , where e (cid:96)h,k
= ( s (cid:96)h,k , a (cid:96)h,k , s (cid:96) − 1 m,
k ) ∈ E (cid:96) is a state-action-endstate tuple at level (cid:96) , and also data samples of the form ( i, s ih +1 ,k ) for every 1 ≤ i ≤ (cid:96) − 1 .
We add them to a buffer, s (cid:96)h +1 ,k to N e h,k corresponding to state-action-endstate tuple e h,k , and s ih +1 ,k to M i corresponding to level i .
Here M i and N e h,k are multisets, i.e., their elements can be repeated.
We use N e h,k to estimate probability transition P ( ·| e (cid:96)h,k ) , and M i to estimate P i 0 ( · ) respectively.
When a new episode k starts, we ﬁrst do a model estimation based on all the samples collected and partitioned.
Using this estimated model, a value function and a Q-function is computed.
However, the estimation error always exists in the estimated model due to insufﬁcient samples from certain state-action-endstate tuples.
To account for this, we estimate the model uncertainty based on concentration inequalities.
Speciﬁcally, we add the uncertainties to our value function estimator, and use the modiﬁed value function to play for the new episode.
Note that doing so encourages exploration on unexperienced state-action pairs.
In fact, as we will show shortly, by using appropriate uncertainty estimation, the model becomes more accurate if the algorithm makes a mistake (e.g., by playing a less-optimal action).
With a pigeon hole principle argument, we can show that our algorithm achieves a low regret bound.
Our model-based algorithm is formally presented in Algorithm 1.
We denote our estimator of the initial distribution at level (cid:96) as
[Equation]
where # { s ∈ M [Equation] } and | M (cid:96) | are the number of appearance of state s in buffer M (cid:96) and the total number of states in buffer M (cid:96) , respectively.
We also denote our estimator of transition distribution at state-action-endstate tuple e as
[Equation]
where # { s ∈ N e } and | N e | are the number of appearance of state s in buffer N e and the total number of states in buffer N e , respectively.
With this these estimators, we use dynamic programming to solve for the Q -function and value functions as follows,
[Equation]
where for 1 ≤ h ≤ H, (cid:96) = σ ( h ) ,
e ∈ E (cid:96) and V kH +
( s 1 , · · · , s L ) = 0 .
Here the bonus function b ( k, h, (cid:96), e ) is used to estimate the uncertainty of the Q , V estimator, which are deﬁned as follows:
[Equation]
where δ is a constant between [0 , 1] to be speciﬁed before, and n ( k − 1 , e ) is the number of times we encountered state-action-endstate tuple before k -horizon.
These bonus functions bound the difference between the estimated Q -functions to the exact value (per-step) with high probability.
For episode k , our exploratory policy is then
[Equation]
Play action a
Q do 10:
Update
∀
˜ P k ( s e ) =
# { s ∈ N e } | N e |
∀ 1 ≤ (cid:96) ≤ L
∈ E (cid:96) s ∈ S (cid:96)
4. R EGRET B OUND FOR A LGORITHM
In this subsection we provide a formal guarantee for Algorithm 1.
We present a proof sketch in the next section, and the full proof is deferred to appendix.
Theorem 4.1.
Suppose we run Algorithm 1 for K ≥ 1 episodes on an hMDP.
For k ∈ [ K ] , let π k be policy played by the algorithm in episode k .
Then we have, with probability at least 1 − δ ,
[Equation]
where δ ∈ (0 , 1) and R ( K ) is deﬁned in Equation (2).
From this theorem, we observe that the regret bound only depends on (cid:80) L(cid:96)
=
1 (cid:112) |S (cid:96) ||E (cid:96)
| , where |E (cid:96) | = |S (cid:96) ||A (cid:96) ||S (cid:48) (cid:96) − 1 | (here |E (cid:48) (cid:96) − 1 | is the number of endstates at level (cid:96) − 1 ).
Usually, the number of actions and the number of endstates at a level are much smaller than the number of states and can be viewed as constant.
In this way our regret bound only depends on (cid:80) L(cid:96)
=1 |S (cid:96) | .
It means after K = ˜Ω (cid:18)(cid:80) L(cid:96)
=
1 H (cid:113) ˜
H (cid:96) |E (cid:96) ||S (cid:96) | (cid:19) episodes, the algorithms achieves a constant average regret
R ( K ) /K
= O (1) (this is when the agent learns a meaningful amount of information).
Let us consider the full hMDP, whose state space size is (cid:81) L(cid:96)
=1 |S (cid:96) | .
With a model based or model free algorithm like Jaksch et al.
; Jin et al.
(2019), the number of episodes needed would be K (cid:38) (cid:81)
L(cid:96)
=1 |S (cid:96) | to achieve a constant average regret.
Note that (cid:81) L(cid:96)
=1 |S (cid:96) | can be exponentially larger than poly( (cid:80) L(cid:96)
=1 | S (cid:96) | ) , therefore our algorithm achieves an exponential saving in the sample complexity for RL.
P ROOF S KETCH
The proof of Theorem 4.1 is divided into two parts.
In the ﬁrst part, we prove that with high probability, the difference between empirical expectation and true expectation of the value function can be bounded by the bonus b .
The proof of this property involves estimation of the total variation (TV) distance between a distribution on the state space S (cid:96) of level (cid:96) and its empirical estimation using n samples.
This TV distance can be bounded by ˜ O
( (cid:112) |S (cid:96) | /n ) with high probability.
The second part of proof tells that if the difference between empirical expectation and true expectation of the value function can be bounded by the bonus b , then the estimator Q k h of Q function is always an optimistic estimation to the true Q-function with high probability.
That is, for every s i ∈ S i , we have Q kh ( s 1 , · · · , s L ) ≥ Q ∗ h ( s 1 , · · · , s L ) .
Then we can show that the regret can be upper bounded by the sum of all bonuses along the sample path.
Hence we can obtain the regret bound by summing over all bonuses in each step and horizon.
We notice that at level (cid:96) there are only |E (cid:96) | distributions we need to estimate, and each one is a distribution on S (cid:96) .
Therefore applying
H¨older inequality we obtain the regret bound (cid:80) L(cid:96)
=
1 ˜ O
( (cid:112) |S (cid:96) ||E (cid:96) | K ) , where we put the dependence on H and δ into ˜ O .
C ONCLUSION
In this paper we prove the beneﬁt of hierarchical reinforcement learning theoretically.
We propose a model-based hierarchical RL algorithm which achieves a regret bound that is exponentially better than the naive RL algrorithm.
To our knowledge, this is the ﬁrst theoretical result demonstrating the beneﬁt of using deep hierarchical reinforcement learning.
Below we list two future directions.
Deep Hierarchical Reenforcement Learning with Function
Approximation The current work focuses the most basic formulation, tabular RL: When state space is large, function approximation is required for generalization across states.
Recently, a line of work gave provably polynomial sample complexity upper bound for RL with function approximation under various assumptions (Wen &
Van Roy, 2013; Du et al., 2019; Jiang et al., 2017; Yang & Wang, 2019; Jin et al., 2019).
An interesting direction is to combine our analysis with these results and obtain guarantees on deep
HRL with function approximation.
Deep Hierarchical Reenforcement Imitation Learning Imitation learning is another paradigm where expert’s trajectories are available to the agent.
Le et al.
(2018) presented a framework to combine hierarchical learning and imitation learning.
However, there is no formal statistical guarantee.
We believe our analysis can be leveraged to understand deep hierarchical imitation learning too.
A P ROOF OF T HEOREM 4. A. N OTATIONS FOR THE P ROOF
We will specify some useful notations in the proof ﬁrst.
To be convenient, we use
V h
[ K ] , Q h [ K, a ] to denote
V h ( s 1 k,h 1 , · · · , s Lk,h L ) and
Q h ( s 1 k,h , · · · , s Lk,h ; a ) .
We use V h [ k ] ⊗ (cid:96) to denote the |S 1 | × · · · × |S (cid:96) | -dimensional tensor whose ( x 1 , · · · , x (cid:96) )
-element is V h
( x 1 , · · · , x (cid:96) , s (cid:96)
+1 k,h +1 , · · · , s Lk,h +1 ) .
Given probability distribution
P i ( · ) ( 1 ≤ i ≤ (cid:96) ) over the state space S i , we use P i to denote the operator over tensors:
[Equation]
which can be understood as taking the expectation on the i -th element.
We can also deﬁne the tensor product operator P i 1 ⊗ P i 2 , · · · ⊗ P i j for different i 1 , · · · , i j as the composite operator, where each
P i j is a operator of dimension | S i j | .
A. P ROOF OF T HEOREM 4.
We present the proof of Theorem 4.1 in this subsection.
In the next we use e k,h to denote the state-action-endstate pair ( s lk,h , a lk,h , s l − 1 k,h ) .
We ﬁrst present a lemma indicating that with high probability, the difference between the empirical expectation of the value function is bounded by the bonus.
Lemma A.1.
With probability at least 1 − δ , we have
[Equation] [Equation]
for every k ≥ 1 , 1 ≤ h ≤ H, 1 ≤ (cid:96) ≤ L and e ∈ E (cid:96) .
Proof.
Given any k ≥ 1 , 1 ≤ h ≤ H, 1 ≤ (cid:96) ≤ L and e = ( s l , a l , s l − 1 )
∈ E (cid:96) , we have the following estimation of error between estimated transition model and true transition model.
[Equation]
[Table]
⊗ · · · ˜ P i − 1 k, 0 ⊗ P
i +1 k, 0 · · · ⊗ P (cid:96) − 1 k, 0 ⊗
˜ P k ( ·| e ) (cid:105) V kh +
[ k ] ⊗ (cid:96) (cid:13)(cid:13)(cid:13) ∞
+ (cid:13)(cid:13)(cid:13) ˜
P k
[Equation]
·| e ) − P k
[Equation]
·| e ) (cid:13)(cid:13)(cid:13) 1 (cid:13)(cid:13)(cid:13)(cid:104) P 1 k, 0 ⊗ · · · P (cid:96) − 1 k, 0 − P 1 k, 0 ⊗ · · · P (cid:96) − 1 k, 0 (cid:105)
V
kh +
[ k ] ⊗ (cid:96) (cid:13)(cid:13)(cid:13) ∞
[Equation]
According to Theorem 2.1 in Weissman et al.
(2003), for any 1 ≤ i ≤ (cid:96) − 1 , with probability at least 1 − δ we have
[Equation]
where we use the fact that till k horizons, we have k ˜ H i samples for the initial distribution of level i .
Similarly, with probability at least 1 − δ we have
[Equation]
where we use n ( k − 1 , e ) to denote the number of appearance of state-action-endstate tuple till k −horizons (including k − 1 horizon).
Replacing δ with δ/ (4 L 2 |S i ||E (cid:96) | k 2 ) and applying union bound on all 1 ≤ i ≤ (cid:96) , we obtain
[Equation]
with probability at least 1 − δ/ (4 L |S i ||E (cid:96) | k 2 ) .
Therefore, noticing that
[Equation]
if we choose
[Equation]
then we have
[Equation]
with probability at least 1 − δ/ (2 L |E (cid:96) | k 2 ) .
Finally, we apply the union bound on all k ≥ 1 , 1 ≤ (cid:96) ≤ L and e ∈ E (cid:96) ,
[Equation]
˜ P 1 k, 0 ⊗ · · · ⊗ ˜ P
[Table]
holds for every k ≥ 1 , 1 ≤ (cid:96) ≤ L, e ∈ E (cid:96) with probability at least 1 − δ .
Next we present a lemma indicating that if the event in Lemma A.1 holds, then V kh is always an optimistic estimation to the true value function V ∗ h .
Lemma A.2.
Suppose the event in Lemma A.1 holds, then
[Equation]
holds for every 1 ≤ h ≤ H and 1 ≤ k ≤ K .
Proof.
We will prove a stronger version of this lemma.
That is, for every ( s 1 , · · · , s L ) ∈ S 1 ×· · ·×
S L , we have
[Equation]
We will prove this result by induction.
When h = H , since V kh
=
V ∗ h = 0 , the inequality V kh [ k ] ≥
V ∗ h [ k ] already holds.
Next we assume that this inequality holds for h + 1 , and we consider the case h .
For any ( s 1 , · · · , s L ) ∈ S 1 × · · · × S L , a (cid:96)
∈
A (cid:96) , we let e =
( s (cid:96) , a (cid:96) , s (cid:96) − 1 ) .
Suppose σ ( h ) =
(cid:96) , and for every i < (cid:96) , s (cid:96) , s i are all end-state of level i .
According to the events in Lemma A.1, we have
[Equation]
· · , s L , a (cid:96)h (cid:96) )
+ (cid:104)
˜ P
1 k, 0 ⊗ · · · ⊗ ˜ P (cid:96)
[Equation]
1 k, 0 ⊗ ˜ P k ( ·| e ) (cid:105)
V
kh +
( · · · , · , s l +1 , · · · , s L )
+ b ( k, h, (cid:96), e ) ≥ r
[Equation] [Equation]
[Equation] [Equation]
[Equation]
where the ﬁrst inequality uses the event in Lemma A.1, and last inequality uses the fact that V kh +1 ≥
V ∗ h
+1 and (cid:104) P 1 k, 0 ⊗ · · · ⊗ P (cid:96) − 1 k, 0 ⊗ P k ( ·| e ) (cid:105) is a nonnegative operator.
Therefore, we have
[Equation]
This indicates that this lemma holds for h , which completes the induction.
Hence for every 1 ≤ h ≤
H , this lemma holds.
Equipped with these two lemma, we are ready to prove Theorem 4.1.
Proof.
Suppose the event in Lemma A.1 always holds (which will happen with probability at least 1 − δ ), then we can calculate the value function.
[Equation]
where the last inequality uses Lemma A.
[Equation]
and we deﬁne ξ h +1 ,k as follows:
[Equation]
Sum up this inequality for all 1 ≤ h ≤ H , and noticing that V kH =
V π k H = 0 , we get
[Equation]
which indicates that
[Equation]
As for the ﬁrst term in the above , it is easy to see that ξ h
+1 ,k is a martingale difference sequence with respect to h, k .
Since every ξ h,k is bounded by H
= H 1 · · · H L , according to Azuma-Hoeffding inequality we have
[Equation] [Equation]
with probability at least 1 − δ .
Next, we will analyze the second term in equation 11.
According to formula equation 10, we have
[Equation]
In the ﬁrst summation of the above equation
[Equation]
the one involved with (cid:112) 1 /n ( k − 1 , e k,h ) appears n ( k, e k,h ) − n ( k − 1 , e k,h ) times.
And given 1 ≤ (cid:96) ≤ L , there exists ˜ H (cid:96) − 1 − ˜ H (cid:96) choices of h such that σ ( h ) =
(cid:96) .
For given (cid:96) , there are |E (cid:96) | choices of n ( k, e ) where e ∈ E (cid:96) .
Therefore, we have
[Equation]
( k − 1 , e k,h ) (cid:41) =
K (cid:88) k
= (cid:88)
e ∈E (cid:96) ( n
[Equation]
e )) min (cid:40) 1 ,
[Equation]
S
[Equation]
E
[Equation]
|
[Equation]
/δ ))
n ( k
[Equation]
, e ) (cid:41) =
(cid:88)
e ∈E (cid:96)
K (cid:88) k
=1 ,n ( k
[Equation]
,e )
[Equation]
(cid:96) ( n (
[Equation] [Equation]
[Equation] [Equation]
+ (cid:88) e
[Equation]
k
[Equation]
1 ,n (
[Equation] [Equation]
[Equation]
( n (
[Equation] [Equation]
, e ))
[Equation]
δ ))
n
[Equation]
≤
[Equation]
H (cid:96)
[Equation] [Equation]
k
[Equation] [Equation]
[Equation]
(cid:88) e
[Equation]
( n (
[Equation] [Equation]
[Equation] [Equation]
e )) (cid:115)
[Equation] [Equation]
E
[Equation]
δ ))
n (
[Equation]
, e ) ≤
K (cid:88) k
= (cid:88)
e ∈E (cid:96) n ( k,e ) (cid:88)
j = n ( k − 1 ,e )+ (cid:115)
( |S (cid:96)
[Equation]
where the third inequality uses the fact that for any e ∈ E (cid:96) we have n ( k, e ) − n ( k − 1 , e ) ≤ ˜ H (cid:96) , and the second last equation uses the fact that (cid:80) e ∈E (cid:96) n ( K, e ) is the number of all possible state-actionendstate pair appears up to K horizons, which is K times the number of m such that σ ( h ) =
(cid:96) .
Therefore, the ﬁrst term in equation 13 has the following estimation
[Equation]
As for the second term in equation
[Equation]
we have
[Equation]
where in the last inequality we apply the H ¨ older inequality.
Combined previous two estimations together, we obtain that
[Equation]
This equation, together with equation 11 and equation 12, indicates the regret bound
R ( K ) =
K
[Equation]