Understanding Deep Neural Function Approximation in Reinforcement Learning via ϵ -Greedy Exploration
Abstract
This paper provides a theoretical study of deep neural function approximation in reinforcement learning (RL) with the ϵ -greedy exploration under the online setting.
This problem setting is motivated by the successful deep Q-networks (DQN) framework that falls in this regime.
In this work, we provide an initial attempt on theoretical understanding deep RL from the perspective of function class and neural networks architectures (e.g., width and depth) beyond the “linear” regime.
To be specific, we focus on the value based algorithm with the ϵ -greedy exploration via deep (and two-layer) neural networks endowed by Besov (and Barron) function spaces, respectively, which aims at approximating an α -smooth Q-function in a d -dimensional feature space.
We prove that, with T episodes, scaling the width m = (cid:101) O
( T d 2 α + d ) and the depth L =
O (log T ) of the neural network for deep RL is sufficient for learning with sublinear regret in Besov spaces.
Moreover, for a two layer neural network endowed by the Barron space, scaling the width Ω( √ T ) is sufficient.
To achieve this, the key issue in our analysis is how to estimate the temporal difference error under deep neural function approximation as the ϵ -greedy exploration is not enough to ensure “optimism”.
Our analysis reformulates the temporal difference error in an L 2 (d µ ) -integrable space over a certain averaged measure µ , and transforms it to a generalization problem under the non-iid setting.
This might have its own interest in RL theory for better understanding ϵ -greedy exploration in deep RL.
Introduction
Efficient reinforcement learning (RL) under the large (or even infinite) state space and action space setting is increasingly important and relevant challenge [1, 2, 3].
One of the first successful approaches towards this problem is the deep Q-network (DQN) [4, 5] framework, which deploys powerful nonlinear function approximation techniques via Deep Neural Networks (DNNs) [6] to concisely approximate state and action spaces.
Despite its impressive practical success, there is still a gap between practical uses and theoretical understanding on deep RL with regard to the function class and the employed ϵ -greedy policy.
In the perspective of function class, many theoretical works center around linear function approximation [7, 8] and linear mixtures [9, 10].
Existing non-linear function approximation results on RL are largely based on neural tangent kernel (NTK) [11, 12], Bellman rank [13, 14], and Eluder dimension [15, 16, 17].
Nevertheless, these approaches fail in truly capturing the highly non-linear properties of deep RL.
For example, NTK (or lazy training [18]) essentially works in a “linear” regime [19, 20, 21], and can not efficiently learn even a single ReLU neuron [22, 23, 24] as it requires Ω( ε − d ) samples to achieve ε approximation error, where d is the (original) or transformed feature dimension input; the Bellman rank is normally difficult to be estimated for neural networks as suggested by [25]; the
Eluder dimension is at least in an exponential order [26, 27] even for two-layer neural networks.
The above general function approximation schemes appear difficult to fully demonstrate the success of practical deep RL both theoretically and empirically.
In the perspective of exploration schemes, DQN is directly equipped with the ϵ -greedy policy instead of confidence-bound based scheme that are commonly used in RL theory.
The ϵ -greedy exploration is theoretically demonstrated to have exponential sample complexity in the worst case [28] but is still popular in practical deep RL due to its simple implementation.
In this case, theoretical analyses of ϵ -greedy in deep RL are still required.
Besides, to ensure a sublinear regret, under the NTK regime, the width of neural networks is required to be m = Ω( T 13 ) [12], where T is the number of episodes.
This does not match deep RL in practice with small width/depth under large episodes [4, 29].
To bridge the large theory-practice gap, we study the value iteration algorithm with deep neural function approximation and the ϵ -greedy policy under the online setting, which broadly captures the key features of DQN.
Our analysis framework is based on DNNs (as well as two-layer neural networks) where the target Q function lies in the Besov space [30] or the Barron space [31], respectively.
These function classes can fully capture the properties of Q-functions, e.g., smoothness by neural networks.
Our results demonstrate that the sublinear regret can be achieved for deep neural function approximation under the ϵ -greedy exploration with reasonably finite width and depth in practice.
Besides, the relationship between the problem-dependent smoothness of Q-function and regret bounds is also developed.
These results could also motivate practitioners to consider different architectures of implementations of deep RL.
1.1 Technical challenges and contributions
Most previous RL theory results on function approximation in the online setting work with “optimism in the face of uncertainty” principle for exploration, leading to a series of upper confidence bound (UCB)-type algorithms to ensure the temporal difference (TD) error smaller than zero.
Conceptually, optimism is sometimes too aggressive and UCB-style algorithms can suffer exponential sample complexity even for nonlinear bandits [27].
Technically, UCB-type algorithms in linear/kernel function approximation [7, 12, 32] depend on a known feature mapping or the NTK kernel, which appears invalid for deep neural function approximation beyond the “linear” regime.
This is because, the used confidence ellipsoid and elliptical potential lemma are not applicable for data-dependent feature mapping of DNNs.
To avoid explicitly designing a bonus function, Thompson sampling [33, 34] appears promising in a Bayesian perspective by using randomized (i.e., perturbed) versions of the estimated model or value function [35].
Nevertheless, the bonus function is still implicitly included in confidence estimate of perturbations.
In this work, we center around deep neural function approximation with the ϵ -greedy exploration.
Since this exploration scheme is not enough to ensure the TD error smaller than zero, the technical challenge in our analysis is how to estimate it to ensure the sublinear regret.
In our proof framework, by a measure transform, the TD error is analysed in an L 2 (d¯ µ ) -integrable space, where ¯ µ is the averaged measure wrt a mini-batch of historical state-action pairs.
To break the dependence between the episodes for neural networks training, we utilize the experience replay scheme [36] from DQN, and then transform the TD error estimation to generalization error under the independent but nonidentically distributed data setting and approximation error in the respective function spaces.
Note that in practice, experience replay makes observations to be (nearly) iid, but our analysis only requires the independence of observations, that is weaker than iid.
Such generalization problem can be addressed by uniform convergence via (local)
Rademacher complexity of the Besov/Barron spaces under the averaged measure.
This considered function spaces in this work is more general than Hölder spaces used in offline RL [37].
Our results show that ( i ) the problem-dependent smoothness of Q-function affects the efficiency of learning with deep RL, which can be improved by increasing the model capacity (width and depth).
We use α as a parameter indicating the smoothness degree of Q-function.
A larger α indicates smoother functions, easier RL tasks, and smaller exploration times, which coincides with our theory.
( ii ) for deep neural networks under the Besov space, the width m = (cid:101) O
( T d 2 α + d ) and the depth L = (cid:101) O (1) are enough for sublinear regret under the ϵ -greedy policy, where (cid:101) O ( · ) omits the log terms.
( iii ) for two-layer neural networks under the Barron space, the width m = Ω( √ T ) suffices to ensure sublinear regret.
Furthermore, our regret bounds can be independent of the feature dimension, supporting the premise of practical, high-dimensional data in RL.
1.2 Related work
Recent work on neural network function approximation beyond NTK (or the Eluder dimension) mainly restrict on the generative setting [25, 38] by assuming a simulator in which the agent can require any state and action, and the offline setting [37, 39].
In sequel, we review RL with function approximation under the online setting that DQN falls into this regime.
We also mention that, theoretical understanding of DQN can be conducted by from the perspective of neural fitted Qiteration algorithm
[40, 37, 41], and Q learning [42] in the perspective of understanding the target network [43] and experience replay [44, 45, 46] with linear function approximation.
Note that, for notational consistency with previous work, in this subsection, T denotes the total number of steps (i.e., interactions with the environment) instead of the number of episodes in our paper.
RL with linear/kernel function approximation: RL with linear function approximation achieves a sublinear regret bound with (cid:101) O ( √ d 3 H 3 T ) under a low-rank MDP in a model-free setting [7] and (cid:101)
O ( dH 2 √ T ) in a model-based setting [32], where H is the length of each episode.
The regret can be improved to (cid:101) O ( dH √ T ) under a low inherent Bellman error by assuming a global planning oracle [47] or under a Bernstein-type exploration bonus and controlling extra uniform convergence cost [48].
This nearly optimal regret can be also achieved under the linear mixtures setting [10].
In the kernel regime, the regret can be achieved with (cid:101) O
( δ F √ H 3 T ) [32, 12], where δ F is the intrinsic complexity (e.g., effective dimension) of the function class RKHS F .
The above bounds are based on confidence ellipsoid to quantify the uncertainty in an explicit bonus function by feature mapping/kernel function; while Thompson sampling [34, 33] utilizes an implicit bonus function in probability estimation on uncertainty quantification, which leads to an (cid:101)
O ( d 2 H 2 √ T )
[35] regret in linear function approximation.
RL with general function approximation: One prototypical scheme uses the Eluder dimension [15], which measures the degree of dependence among action rewards, resulting in an (cid:101)
O ( poly ( δ F H ) √ T ) regret [16, 17], where the complexity δ F depends on the Eluder dimension.
Using this metric, the sublinear regret under the ϵ -greedy exploration can be achieved by [49].
Besides, the low Bellman rank assumption [13], where the Bellman error “matrix” admits a low-rank factorization, can be also used general function approximation [14] by measuring the error of the function class under the
Bellman operator.
Combining Bellman rank and Eluder dimension results in a new metric, Bellman
Eluder dimension [50], achieving (cid:101) O
( H √ δ F T ) -regret, where δ F depends on this metric.
Overall, the above metrics are difficult to the nonlinear spaces of DNNs beyond “linear” regime that concern us.
Background and preliminaries
In this section, we introduce the necessary background and definitions with respect to online reinforcement learning based on episodic Markov decision processes (MDPs) and function spaces of deep (and two-layer) ReLU neural networks.
Notation: We denote by a ( n ) ≲ b ( n ) : there exists a positive constant c independent of n such that a ( n ) ⩽ cb ( n ) ; a ( n ) ≍ b ( n ) : there exists two positive constant c 1 and c 2 independent of n such that c 1 b ( n ) ⩽ a ( n ) ⩽ c 2 b ( n ) .
We use the shorthand [ n ] := { 1 , 2 , . . . , n } for some positive n and ⌈ x ⌉ denotes the smallest integer exceeding x .
Let X =
[0 , 1] d be a domain of the functions, we denote the L p -integrable space by L p ( X ) endowed by the norm ∥
f ∥ L p ( X ) = (cid:0) (cid:82) X | f ( x ) | p d x (cid:1) 1 /p , and the µ -integrable L p space by L p (d µ ) for a probability measure µ on X and the norm is given by ∥
f ∥ L p (d µ ) = (cid:0) (cid:82) X | f ( x ) | p d µ (cid:1) 1 /p .
2.1 Episodic Markov decision processes
A (finite-horizon) episodic MDPs is denoted as MDP ( S , A , H, P , r ) , where S is the state space with possibly infinite states; A is the finite action space; H is the number of steps in each episode;
P :=
{ P h } Hh =1 is the Markov transition kernel with the transition probability P h ( ·| s, a ) on action a taken at state s ∈ S in the h -th step; the reward functions r :=
{ r h } Hh =1 are assumed to be deterministic.
For notational simplicity, denote X = S
× A and x = ( s, a ) , we assume X = [0 , 1] d as a compact space of R d and r h : S ×
A → [0 , 1] at h -th step.
A non-stationary policy π is a collection of H functions π :=
{ π h : S → A} Hh =1 .
Given a policy π , the (state) value function V πh : S → [0 , H ] is defined as the expected cumulative reward of the
MDP starting from step h ∈
[ H ] , i.e., V πh ( s ) =
E π (cid:2) (cid:80)
Hh ′ =
h r h ′
( s h ′ , a h ′ )
(cid:12)(cid:12) s h
= s (cid:3) , ∀ s ∈ S , h ∈
[ H ] where E π [ · ] denotes the expectation with respect to the randomness of the trajectory { ( s h , a h ) } Hh = obtained by the policy π .
Likewise, the action-value function Q πh : S ×
A → [0 , H ] is defined as
Q πh ( s, a ) =
E π (cid:2) (cid:80)
Hh ′ =
h r h ′
( s h ′ , a h ′ )
(cid:12)(cid:12) s h
= s, a h
= a (cid:3) .
Moreover, since the action space and episode length are both finite, there always exists an optimal policy π ⋆ [51] such that V ⋆h ( s ) =
sup π V πh ( s ) for all s ∈ S and h ∈
[ H ] .
To simplify the notation, denote ( P h V )( s, a ) :
=
E s ′ ∼ P h ( ·| s,a )
[ V ( s ′ )] and the Bellman operator ( T h V )( s, a ) =
r h ( s, a ) +
( P h V )( s, a ) for any measurable function
V : S → [0 , H ] .
Using this notation, the
Bellman equation associated with a policy π can be formulated as
[Equation]
Similarly, the Bellman optimality equation is given by
[Equation]
Accordingly, the optimal policy π ⋆ is the greedy policy with respect to { Q ⋆h } Hh =1 .
Hence the Bellman optimality operator T ⋆h is defined as
[Equation]
By definition, the Bellman equation in Eq.
(2) is equivalent to Q ⋆h =
T ⋆h Q ⋆h +1 , ∀ h ∈
[ H ] .
In the online setting , the goal is to learn the optimal policy π ⋆ by minimizing the cumulative regret under the interaction with the environment over a number of episodes.
For any policy π , the difference between V π 1 and V ⋆ 1 quantifies its sub-optimality.
Thus, after T (fixed but large) episodes, the total (expected) regret is defined as Regret ( T ) =
(cid:80) Tt =1 (cid:2)
V ⋆ 1 ( s t 1 ) − V ˜
π t 1 ( s t 1 ) (cid:3) , where ˜ π t is the policy executed in the t -th episode and s t 1 is the initial state.
2.2 Function spaces
We give an overview of Besov spaces for deep neural networks and the Barron space for two-layer neural networks.
More details refer to Appendix A. For description simplicity, we focus on the ReLU activation function in this work.
Besov spaces: Previous work in approximation theory focuses on the “smoothness” of the function, e.g., Hölder spaces [52, 37] and Sobolev spaces [53].
Here we consider the concept of α -smooth from modulus of smoothness [30], cf. ,
Appendix A.
Based on this, we consider a more general function space beyond Hölder spaces and Sobolev spaces, i.e., Besov spaces [54, 30], which allows for spatially inhomogeneous smoothness with spikes and jumps.
The Besov space is defined by B αp,q ( X )
= { f ∈
L p ( X ) | ∥ f ∥ B αp,q < ∞} , where the Besov norm is ∥ f ∥ B αp,q := ∥ f
∥ L p ( X ) + | f | B αp,q .
The smoothness parameter α indicates which function at a certain smoothness degree can be represented.
For example, if α > d/p , then the related Besov space is continuously embedded in the set of the continuous functions; if α < d/p , then the functions in the Besov space are no longer continuous.
The formal definition and relations to Hölder spaces and
Sobolev spaces are deferred to Appendix A.
Barron spaces: A two-layer neural network with m neurons can be represented as f ( x ) =m (cid:80) m k
=
b k σ ( w ⊤ k x + c k ) with the ReLU activation function σ ( · ) used in this work and the neural network parameters { b k , w k , c k } mk =1 .
It admits the integral representation f ( x ) =
(cid:82) Ω bσ (cid:0)
w ⊤ x + c (cid:1) ρ (d b, d w , d c ) , x ∈ X , where Ω = R × R d × R and ρ is a probability measure over Ω .
Then the Barron space [31] endowed by the Barron norm is defined as (cid:101) P = (cid:26) f admits Eq.
∥ f ∥ (cid:101) P = inf ρ { E ρ | b | ( ∥ w ∥ 1 + | c | ) } < ∞ (cid:27) .
The Barron space (cid:101) P [31] can be (roughly) equipped with the ℓ 1 -path norm, i.e., ∥ f ∥ (cid:101) P ⩽ ∥ f
∥
P :=m (cid:80) mk =1 | b k | ( ∥ w k
∥
+ c k ) ⩽ 2 ∥ f ∥ (cid:101) P .
Accordingly, it is natural to use ∥ f ∥ P to denote the Barron norm, as the discrete version.
The Barron space [31] can be regarded as the largest function space for two-layer ReLU neural networks.
Here the “largest” terminology [31, 55] means that the approximation ability can avoid curse of dimensionality , i.e., 1) any function in Barron spaces can be efficiently approximated by two-layer neural networks with bounded norm; 2) any continuous function that can be efficiently approximated by two-layer neural networks with bounded norm belongs to a Barron space.
We remark that, avoiding curse of dimensionality is important in theory for practical high-dimensional data in RL.
However, Besov spaces are too large and thus do not enjoy this property for deep ReLU neural networks.
Algorithm: Value iteration via DNNs under ϵ -greedy exploration
In this section, we lay out our algorithm 1 via value iteration by DNNs under the ϵ -greedy policy.
Though our value iteration algorithm is different from one gradient-step for deep Q-learning in
DQN, it still shares the key spirit with DQN in terms of function approximation via DNNs, ϵ -greedy exploration, and experience replay.
Function class: We define the function class F given by F = F 1 × · · · × F H , including F SNN for two-layer (Shallow) ReLU neural networks and F DNN for deep ReLU neural networks as below
[Equation]
where B > 0 is the ℓ 1 -path norm constraint parameter, and deep ReLU neural networks [30] as
F DNN ( L, m, S, B ) :=
[Equation]
where the weight parameters are W (
) ∈
R m × d ,
W ( l ) ∈
R m × m , ∀ l ∈ { 2 , 3 , . . .
, L − 1 } , and
W ( L ) ∈
R m ; the bias parameter are b ( l ) ∈ R m , ∀ l ∈
[ L − 1] and b ( L ) ∈ R .
Such sparselyconnected neural networks require most of the network parameters to be zero or non-active, which can be verified [56].
The depth L , the width m , the sparsity parameter S and the norm parameter B can be determined later in our proof to achieve good approximation and estimation performance.
Experience replay:
In our setting, after initialization, at t -th episode, at h -th time step, we have observed t − 1 transition tuples, { ( s τ h , a τ h , s τ h +1 ) } t − 1 τ =1 and attempt to estimate { Q ⋆ h } H h =1 via DNNs.
Note that, at each time step h , these t − 1 transition tuples are neither independent nor identically distributed due to the interaction with value functions and stochastic transition.
To pursue the independence among the transition tuples that is required in our analysis, we follow the experience replay scheme [36] that is successfully applied in DQN [4].
The intuition behind experience replay is to break (or weaken) the temporal dependency among the observations for neural networks training.
When the replay memory is large (e.g., 10 6 in DQN [4]), experience replay is close to sampling independent transitions.
To be specific, at t -th episode, we store transition { ( s th , a th , r h , s th +1 ) }
Hh = in the replay memory D , and then sample a mini-batch of independent observations from D with { ( s τ j h , a τ j h , s τ j h +1 ) }
( j,h ) ∈
[˜ t ] × [ H ] for DNNs training.
Here the number of mini-batch is denoted as ˜ t := ⌈ ϱt ⌉ with the mini-batch ratio ϱ ∈ (0 , 1) , and { τ j } ˜ tj =1 is the index for the mino-batch of ˜ t independent samples.
Note that such independence assumption from experience replay is also used in RL theory, e.g., [37, 44] and theoretically demonstrated to be a good de-correlator [57].
In fact, our analysis only requires independence via experience replay, which is still weaker than the standard iid assumption.
Value iteration via neural networks:
In our algorithm, we apply the classical least squares value iteration via neural networks for value function learning [28].
We solve the following least squares
1: Input: Function class F , the number of episodes T , the ϵ -greedy parameter ϵ ∈ (0 , 1) , mini-batch ratio ϱ ∈ (0 , 1) .
2: Initialize replay memory D .
3: for episode t = 1 , . . .
, T do 4:
Receive the initial state s t 1 .
Set V tH +1 as the zero function.
Set the minibatch size ˜ t :=
⌈ ϱt ⌉ for experience replay.
7: for step h
= H, . .
, 1 do 8:
Obtain (cid:98) Q th := argmin f ∈F (cid:80) ˜ tj =1 (cid:2) f
( s τ j h , a τ j h ) − r h ( s τ j h , a τ j h ) − V
th +1 ( s τ j h
+1 ) (cid:3) 2 .
Obtain Q th := (cid:98) Q th and V th ( · ) = max a ∈A Q th ( · , a ) .
10: end for 11: //
ϵ -greedy for exploration 12:
Take the policy { ˜ π th } Hh =1 to be greedy policy with probability 1 − ϵ or any policy with probability ϵ .
13: for step h = 1 , . . .
, H do 14:
Take a th ∼ ˜ π th ( ·| s th ) .
Observe the reward r h ( s th , a th ) and obtain the next state s th +1 .
16: end for 17: // experience replay 18:
Store transition { ( s th , a th , r h , s th +1 ) }
Hh =1 in D .
Sample random mini-batch of transitions from D with ˜ t pairs { ( s τ j h , a τ j h , s τ j h +1 ) }
( j,h ) ∈
[˜ t ] × [ H ] .
20: end for regression problem via ˜ t
independent samples
[Equation]
For ease of simplicity for analyses, we directly assume that the global minima solution of problem (5) can be obtained, that follows [58, 52, 59] in deep learning theory.
Nevertheless, our result could be extended to allow small optimization error in each episode that will be discussed in Section 6.
Besides, we also need the expectation version of (cid:98) E th in problem (5) for our analysis.
Formally, we assume each state-action pair in the mini-batch is sampled from a respective (unknown) probability measure, i.e., ( s τ j h , a τ j h ) ∼ µ τ j h , ∀ j ∈ [˜ t ] , where µ τ j h ∈ P ( S × A ) is from the collection of all probability distribution on S × A .
Taking the averaged measure ¯ µ ˜ th := 1˜ t (cid:80) ˜ tj =1 µ τ j h , the expectation of (cid:98) E th is defined as
[Equation]
Note that, (cid:98) Q th in Eq.
(5) is not an unbiased estimator of the squared Bellman error minimizer [60, 61].
Indeed, E th differs from the squared Bellman error because of an extra variance term caused by the stochastic transition [62].
This biased estimation issue can be avoided (or alleviated) in practice by introducing target networks in DQN [63].
Some variants [64] of DQN can also reduce the biased estimate and performs well without target networks.
Nevertheless, in our analysis, we center around the uniform bound sup f ∈F |E th ( f ) − (cid:98)
E th ( f ) | instead of the Bellman error.
ϵ -greedy exploration:
In order to work in the online setting, we need to ensure that the learner visits “good” state action pairs in the sense that are almost maximizers of the value function for unseen state, a.k.a. , exploration.
In RL theory, a classical way is to design an optimistic estimate of the value function via a bonus function
b th [12, 65] such that Q th = min { (cid:98) Q th + b th , H } + .
Instead, we employ the ϵ -greedy exploration that follows DQN-like algorithms.
Using the ϵ -greedy exploration will ensure each state-action pair can be visited with positive probability and favor independence among samples.
In our algorithm, we directly set Q th := min { (cid:98) Q th , H } + , and then naturally incorporate the truncation operation in neural networks training, see Eqs.
(3) and (4).
Based on the above description, our algorithm centers around deep neural function approximation via value iteration under the ϵ -greedy exploration and experience replay under the online setting.
This problem setting matches the spirit of practical DQN, which allows for better understanding deep RL.
Main results
This section presents our results for value iteration under deep (as well as two-layer) ReLU neural networks via the Besov spaces and Barron spaces, respectively.
Our theory is based on the independence assumption via experience replay and achieves sublinear regret under the ϵ -greedy exploration.
4.1 Efficient value iteration via DNNs in Besov spaces
In this setting, we consider (cid:98) Q th = argmin f ∈F DNN (cid:98) E th ( f ) in Eq.
(5), where F DNN is the function space of deep ReLU neural networks defined in Eq.
We make the following assumption on the Besov space B , similar to [7, 12], where the Bellman optimality operator maps any bounded value function to a bounded Besov space ball.
Assumption 1.
Let (cid:101) R be a fixed constant.
Define B (cid:101) R = { f ∈ B αp,q ( X ) :
∥ f ∥ B ⩽ (cid:101) R } in the Besov space and assume that for any h ∈ [ H ] and Q : S × A → [0 , H ] , we have T ⋆ h Q ∈ B (cid:101) R .
Remark:
Due to Q ∈ [0 , H ] , the radius (cid:101)
R in fact depends on H , i.e., (cid:101) R ≍ H .
Based on this assumption, we have the following theorem on the regret bound in the Besov space for deep RL under the ϵ -greedy exploration.
Theorem 1.
Under Assumption 1 with the smoothness parameter α > d (1 /p − 1 / 4) + in the Besov space B αp,q ( X ) , considering value function learning (5) via DNNs defined by Eq.
(4) in Algorithmunder the ϵ -greedy exploration and the mini-batch ratio ϱ ∈ (0 , 1) , and taking the depth L ≍ d
[Equation]
+
[Equation]
log T , the
[Equation]
then given a MDP-dependent constant K ∈ [1 , H ] , for any δ ∈ (0 , 1) , the total regret can be upper bounded with probability at least 1 − δ
Regret
[Equation]
Remark: We make the following remarks.
i )
The constant K describes the “myopic” level of MDPs under the ϵ -greedy policy, e.g., the worst case ( K := H ) under the sparse rewards setting; the benign case K :=
c (for some small constant c ) under the helpful dense rewards setting as discussed in [49].
The exponential dependence on H (in the worst case for any MDP) can be avoided at an additional cost of worsening T dependence.
In fact, whether in the benign/worst case, the sublinear regret is always achieved under some certain ϵ values in Eq.
(8), which theoretically demonstrates the efficiency of deep RL.
Note that the chosen ϵ ∈ (0 , 1) is always satisfied under a large episode T . ii )
Clearly, the regret bound is a non-increasing function of the smoothness parameter α , which shows that an easier task (i.e., the target Q function is more smooth) leads to regret bounds with faster rates.
Specially, if we take α → ∞ (i.e., the target Q function is sufficiently smooth), which holds for linear function approximation
[Equation]
which recovers the regret bound (cid:101)
O ( T K +1 K +2 )
in [49, Theorem 3] via Eluder dimension.
In the best case ( K = 1 ), our regret bound implies (cid:101) O
( H 43 A 13 T 23 ) with H ⩾ 4 , which matches the optimal regret bound for the contextual bandits problem in terms of dependence on T or A under the ϵ -greedy exploration [66].
In the worst case ( K := H ), we can still obtain the sublinear regret at a certain (cid:101)
O
( T H +1 H +2 ) rate.
Theorem 1 demonstrates that the sublinear regret can be achieved by choosing O (log T ) depth and (cid:101)
O ( T d
α + d ) width, but the sublinear regret bound (cid:101)
O ( T αK +( α + d )( K +2) (2 α + d )( K +2) ) heavily depends on the feature dimension d , failing in the curse of dimensionality , which appears ineffective on high dimensional data in deep RL.
In the next, we consider the Barron spaces, i.e., the “largest” function space for two-layer neural networks to avoid the curse of dimensionality.
In this case, the rate of the sublinear regret can get rid of d , which is useful for high dimensional data in practical RL.
4.2 Efficient value iteration via two-layer neural networks in Barron spaces
As mentioned before, Barron spaces are the “largest” function space for two-layer neural networks.
In this setting, we consider (cid:98) Q th = argmin f ∈F SNN (cid:98)
E th ( f ) in Eq.
(5), where F SNN is the function space of two-layer ReLU neural networks defined in Eq.
We give a similar assumption on the Bellman optimality operator in the Barron space.
Assumption 2.
Let (cid:101) R > 0 be a fixed constant.
Define P (cid:101) R = { f ∈ P : ∥ f ∥ P ≤ (cid:101) R } in the Barron space, and assume that for any h ∈ [ H ] and Q : S × A → [0 , H ]
, we have T ⋆h Q ∈ P (cid:101) R .
Based on this assumption, we have the following regret bounds for two-layer ReLU neural networks.
Theorem 2.
Under Assumption 2, considering value function learning (5) by two-layer ReLU neural networks with width m and bounded ℓ 1 norm B defined by Eq.
(3) in Algorithm 1 under the ϵ -greedy exploration and the mini-batch ratio ϱ ∈ (0 , 1) , then given a MDP-dependent constant K ∈ [1 , H ] , for any δ ∈ (0 , 1) , the total regret can be upper bounded with probability at least 1 − δ
Regret
[Equation] [Equation]
by taking m = Ω( √ T ) and ϵ = O (cid:16) H 2 K +2 T
[Equation] [Equation]
K +2)
(cid:17) .
Remark:
In our result, taking m = Ω( √ T ) is suffice to achieve the sublinear regret bound (cid:101)
O ( T 2 K +3 2 K +4 ) , which also gets rid of the feature dimension d , allowing for high-dimensional image data in practice.
Discussion on architecture guidelines in deep RL
In this section, we present a detailed discussion on how our results provide the architecture guidelines in practical deep RL, in the perspective of the width, the depth, and problem-dependent smoothness of the Q function.
Width-depth and DQN: According to Theorem 1, the O (log T ) depth and (cid:101)
O ( T d
α + d ) width are enough for sublinear regret in deep RL.
Interestingly, we notice that this result is closely matching practical implementation of DQN.
For example, the choices of [4] m = 512 and L = 5 can be explained by our theory, indeed log(512)
≈ 6 .
Specially, when taking α → ∞ , this setting holds for linear function approximation.
For two-layer neural networks endowed by the Barron space, the curse of dimensionality in terms of width and regret bound can be avoided in Theorem 2, supporting the premise of practical, high-dimensional RL.
Problem-dependent smoothness and exploration: The problem-dependent smoothness, determined by α , largely affects our regret bounds.
The difficulty of a task in deep RL can be defined in two views: one is the smoothness of the target Q function; and the other is the degree of exploration.
Intuitively speaking, if a RL task is difficult, then the target Q function is often complicated, and thus admits a relative lower smoothness; or we need conduct more exploration in a complex scenario.
Our results coincide with these two views.
One hand, the regret bound in Theorem 1 is a non-increasing function of the smoothness parameter α .
A more difficult task in deep RL (i.e., a smaller α ) leads to a slower rate of the sublinear regret, which indicates that more episodes are required.
On the other hand, Theorem 1 shows that the parameter ϵ is also a non-increasing function of α .
That means, a more difficult task in deep RL requires a larger ϵ , i.e., we need conduct exploration more frequently.
Besides, the exploration parameter ϵ is also affected by K for MDPs with different situations.
For example, compared to the best case K = 1 , more frequent exploration (a larger α ) is required in
MDPs under difficult cases, which coincides with our certain ϵ value in Theorems 1 and 2.
Regretdecomp.
Lem.
  statistical error: Lem.
2 with O ( √ H 3 T )
[Figure]
ϵ -greedy exploration: ϵHT
Width and depth trade-off: Under a limit parameter budget, according to the width-depth ratio m/L = T d 2 α + d in Theorem 1, our theory indicates that less problem-dependent smoothness of
Q-function requires DNNs to be wider.
In practice, if we work in the limited budget of parameters N in neural networks, e.g., N ≍ m 2 L , our theory implies that there is a tradeoff between the depth and width on smoothness, i.e., the depth L := N 1 / 3 T − 2 d
[Equation] [Equation]
+ d ) increasing with α (or T ) and the width m = N 1 / 3 T d 3(
[Equation]
+ d ) decreasing with α (or T ).
Besides, according to the width-depth ratio, it can be found that, the change of α leads to less changes on the depth but more changes on the width.
This shows that width and depth admit different levels of parameter sensitivity under the change of problem-dependent smoothness.
Proof outline
In this section, we outline the proof of our theoretical results presented in Section 4.
As mentioned before, the technical challenge in our analysis is how to estimate the TD error without bonus function design.
Apart from the regret decomposition, our proof framework includes two main parts: transformation of TD error estimation to generalization bounds, see Figure 1; and generalization bounds on non-iid data in certain Besov/Barron spaces for TD error analysis, see Figure 2.
The complete proof is reported in the appendix.
Regret decomposition: This part is standard and commonly studied in RL theory, e.g., [65, 7, 12].
We briefly include here for self-completeness.
Define the temporal-difference (TD) error as Γ th ( s, a ) =
r
[Equation]
where Γ th is a function on S × A for all h ∈
[ H ] and t ∈ [ T ] .
Accordingly, the regret can be decomposed into ( c.f. Lemma 1)
[Equation]
where the first term relates to the TD error and the second term is the statistical error based on the standard martingale difference sequences, which can be upper bounded by the Hoeffding-Azuma inequality with O ( √ H 3 T ) regret ( c.f. Lemma 2).
The last term ϵHT is due to the ϵ -greedy exploration.
Transforming TD error to generalization bounds: To bound the TD error, we first introduce
Lemma 3 with ¯ µ ˜ th ( C ) > 0 , where the event C denotes that all state-action pairs have been visited at all time steps under the ϵ -greedy policy.
Then we are able to build the connection between Term ( i ) and ∥
Γ th ∥ L 2 (d¯ µ ˜ th ) in the L 2 (d¯ µ ˜ th ) -integrable space ( c.f. Lemma 4).
After analysis of E th ( f ) in
Proposition 1, we transform the estimation of ∥ Γ th ∥
L 2 (d¯ µ ˜ th ) to the following two terms: generalization error and approximation error, respectively ( c.f. Lemma 5)
[Equation]
[Equation]
where the first term is the generalization error which we elucidate in the next and the second term is the approximation error and can be considered in an L p ( X ) space for Besov spaces in Corollary 1.
For example, the approximation error in the Besov space admits the certain O ( N − 2 α/d ) rate in [30] for deep ReLU networks with L ≍ log N, S ≍ N, m ≍ N log N .
 
Rademacher complexity on non-iid data: Lem.
7 ⇐ Lem.two-layer NNs: Thm.
2 ⇐ O ( H 2 B (cid:112) log d/n ) ⇐ Lem.
: Rademacher complexity of Barron spaces
DNNs: Thm.
1 ⇐ O ( n − 2 α 2 α + d ) ⇐ Prop. 2 ⇐ Lem.
12 on LRC for Besov spaces
Generalization bounds on non-iid data: The key part left is to bound the generalization error on non-i.i.d data for the TD error estimation, see the proof framework in Figure 2.
In our proof, we firstly verify that the maximum error in estimating the mean of any function f ∈ F can be still bounded by the Rademacher complexity of F in Lemma 6, and then generalization bounds by Rademacher complexity still holds by Lemma 7 via the averaged measure ¯ µ ˜ th , which only requires the data to be independent.
These results can be easily extended to local Rademacher complexity.
For deep neural networks, by computing the local Rademacher complexity of F DNN in Lemmaand choosing proper neural network parameters in Eq.
(4), we derive the convergence rate of generalization bounds at a certain O ( n − 2 α 2 α + d ) rate in Besov spaces ( c.f. Proposition 2) with n non-iid data.
Combining the result of approximation error and taking the depth and width in Eq.
Term ( i ) can be upper bounded with high probability.
Finally we conclude the proof of Theoremby combining with the statistical error.
For two-layer neural networks, by computing the Rademacher complexity of F SNN in Lemma 13, we obtain the generalization error at a certain O ( H 2 B (cid:112) log d/n ) convergence rate.
Combining the result of approximation error in Barron spaces with other terms in the regret decomposition, we conclude the proof of Theorem 2.
Regret bounds effected by optimization error:
Here we briefly discuss the regret bound affected by a solution (denoted as (cid:101) Q th ) that is not a global minimum of problem (5).
Assume that the optimization error is small in the functional view, i.e., ∥ (cid:101)
Q th − (
cid:98) Q th ∥
L 2 (d¯ µ ˜ th ) ⩽ ε opt , that will appear in Eq.
(11), and accordingly Term ( i ) incurs in an extra regret bound
O
( H 2 log T ) if we take ε opt := H/ √ ˜ t .
This condition is fair and reasonable as the optimization error decreases with the mini-batch size ˜ t for neural network training but requires a refined analysis under non-iid data [67, 68].
Conclusion
This paper provides an in-depth understanding on neural network function approximation with the ϵ -greedy exploration under the online setting beyond the “linear” regime.
Our results provide theoretical guarantees of sublinear regret bounds, and shed light on some guidelines for understanding deep RL in the perspective of the width-depth configuration and the problem-dependent smoothness of RL tasks.
The analysis of this work is built on the ϵ -greedy policy for exploration, which are satisfied in practical cases when employing DQN.
Nevertheless, designing a provably efficient exploration mechanism for deep RL could be an interesting future direction in both practice and theory.
Besides, our theory requires state-action pairs to be independent, which (approximately) holds via experience replay and could be improved by reverse experience replay [69].
Furthermore, our work is built on the value iteration based algorithm, which is different from practical DQN that adapts Q-learning via one-step gradient descent.
Towards a better understanding DQN in terms of Q learning and target networks [43, 44] would be an interesting direction.
Acknowledgement
The authors would like to thank anonymous reviewers for their constructive suggestions to improve the presentation and point out the independence issue.
This work was supported by SNF project – Deep Optimisation of the Swiss National Science
Foundation (SNSF) under grant number 200021_205011; the Enterprise for Society Center (E4S); the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement n°725594 - time-data).
A Preliminaries: Besov spaces and Barron spaces
In this section, we give an overview of Besov spaces for deep ReLU neural networks and the Barron spaces for two-layer ReLU neural networks.
A.1 Besov spaces
Here we briefly introduce a general function space for deep ReLU neural networks according to the “smoothness” of the function, i.e., Besov spaces.
To define Besov functions, we need introduce the modulus of smoothness.
Definition 1.
[30, modulus of smoothness] For a function f ∈ L p ( X ) with some p ∈ (0 , ∞ ] , the k -th modulus of smoothness of f is defined by
[Equation]
with ∆ k h ( f )( x ) =
(cid:40)(cid:80) kj =
[Equation]
(cid:0)
[Equation]
(cid:1) (
[Equation]
f ( x
[Equation]
j h ) if x ∈ X , x + k h ∈ X , otherwise .
The quantity ∆ k h ( f ) captures the local oscillation of function f that is not necessarily differentiable.
Based on this, the Besov space is defined as below.
Definition 2.
[54, 30, Besov space B αp,q ( X ) ]
For 0 < p, q ⩽ ∞ , the smoothness parameter α > 0 , k :=
⌊ α ⌋ + 1 , define the semi-norm | · | B αp,q as | f | B αp,q :=
(cid:40)(cid:0)(cid:82) ∞ 0 ( t − α w k,p ( f, t ))
q d tt (cid:1) 1 q ( q < ∞ ) , sup t> 0 t − α w k,p ( f, t ) ( q = ∞ ) .
The norm of the Besov space B αp,q ( X ) is defined by ∥
f ∥ B αp,q := ∥
f ∥ L p ( X ) + | f | B αp,q , and the Besov space is B αp,q ( X ) =
{ f ∈ L p ( X ) | ∥ f ∥ B αp,q < ∞} .
The smoothness parameter α indicates which function at a certain smoothness degree can be represented.
For example, if α > d/p , then the related Besov space is continuously embedded in the set of the continuous functions.
However, if α < d/p , then the functions in the Besov space are no longer continuous.
In particular, the Besov space reduces to the Hölder space C α when p = q = ∞ and α is a positive non-integer; degenerates to the Sobolev space W α 2 when p = q = 2 and α is a positive integer.
The Besov space is more general than these two spaces as it allows for spatially inhomogeneous smoothness with spikes and jumps.
More properties of Besov spaces and relations to other function spaces refer to [30] for details.
A.2 Barron spaces
The study for deep ReLU neural networks is endowed by Besov spaces, but the complete of function space for deep ReLU neural networks to avoid the curse of dimensionality is still open.
Luckily, the complete of function space for two-layer neural networks can be conducted by Barron spaces.
Here we briefly introduce the basic definition and property of Barron spaces [55, 31].
We consider a typical two-layer neural network f ( x ) = 1 m (cid:80) mk =
b k σ ( w ⊤ k x + c k ) , where m is the number of neurons in the hidden layer and σ ( x ) = max { x, 0 } is the ReLU activation function used in this work.
Accordingly, the two-layer neural network admits the following representation
[Equation]
where Ω = R × R d × R and ρ is a probability measure over Ω .
Then the Barron space [31] endowed by the p -Barron norm with p ∈ [1 , + ∞ ] is defined as
[Equation]
Specifically, when using ReLU, these function spaces under different p are the same, i.e., (cid:101) P 1 = (cid:101) P 2 = · · · = (cid:101) P ∞ , and thus we directly use (cid:101) P for short.
The is the main reason why we study ReLU activation functions in this work.
Besides, the Barron norm is close to the ℓ 1 -path norm [70]
[Equation]
Based on this, for description simplicity, we do not strictly distinguish the Barron norm and the ℓ 1 -path norm, and regard ∥ f ∥ P as the discrete version of the Barron norm.
As suggested by [55], Barron space can be regarded as the largest function space for two layer neural networks in two folds [31]: 1) direct approximation: Any function in Barron spaces can be efficiently approximated by two-layer neural networks with bounded ℓ 1 path norm at O (1 /m ) rate without curse of dimensionality ; 2) inverse approximation: Any continuous function that can be efficiently approximated by two-layer neural networks with bounded ℓ 1 -path norm belongs to a Barron space.
B Regret decomposition
We present the regret decomposition under the ϵ -greedy policy by constructing the martingale difference sequence and giving error bounds for this.
Apart from an extra ϵHT regret, this decomposition result appears in [65, 12], and we include them here just for self-completeness.
To establish the regret decomposition, we need some notations.
Remember the definition of the regret, ˜ π t is the ϵ -greedy policy and π t is the greedy policy at the t -th episode, and then we have
[Equation]
where ϵHT stems from the fact that the return of greedy and ϵ -greedy policies can differ at most ϵH in each episode.
In the next, we aim to estimate the first term in the above equation.
It involves the greedy policy π t at the t -th episode, which leads to a trajectory { ( s th , a th ) } Hh =1 .
Note that this trajectory is different from Algorithm 1 that uses the ϵ -greedy policy but we use the same notation on state-action pairs for notational simplicity in this section.
Following [65, 12], we define two quantities ζ 1 t,h , ζ 2 t,h ∈ R for any h ∈
[ H ] and t ∈ [ T ] based on the greedy policy
[Equation]
By definition, ζ 1 t,h depends on the randomness of choosing an action a th ∼ π th ( ·| s th ) ; and ζ 2 t,h captures the stochastic transition, i.e., the randomness of drawing the next state s th +1 from P h ( ·| s th , a th ) .
Based on the following definition of filtration, { ζ 1 t,h , ζ 2 t,h } forms a bounded martingale difference sequence.
Definition 3.
[65, Filtration]
For any ( t, h ) ∈ [ T ] ×
[ H ] , define σ -algebras M t,h, 1 and M t,h,generated by the following respective state-action sequence as
[Equation]
where we identify F t, 0 , 2 with M t − 1 ,H, 2 for all t ⩾ 2 and let M 1 , 0 , 2 be the empty set.
Further, for any t ∈ [ T ] , h ∈
[ H ] and m ∈ [2] , we define the time-step index τ ( t, h, m ) as
[Equation]
which offers an partial ordering over the triplets
( t, h, m ) ∈
[ T ] ×
[ H ] × [2] .
Moreover, according to Eq.
(14) , for any ( t, h, m ) and ( t ′ , h ′ , m ′ )
satisfying τ ( k, h, m ) ⩽ τ ( k ′ , h ′ , m ′ ) , it holds that
M k,h,m ⊆
M k ′ ,h ′ ,m ′ .
Thus, the sequence of σ -algebras {M t,h,m } ( t,h,m ) ∈
[ T ] ×
[ H ] × [2] forms a filtration.
Accordingly, we have the following regret decomposition result.
Lemma 1 (Regret Decomposition [65, 12]) .
Recall the definition of the temporal-difference error
Γ th : S × A → in Eq.
(9) for all ( t, h ) ∈
[ T ] ×
[ H ] , then the regret can be decomposed as
Regret ( T ) ⩽
[Equation]
where ζ 1 t,h and ζ 2 t,h are defined in Eq.
Proof.
Remember the definition of the regret, ˜ π t is the ϵ -greedy policy and π t is the greedy policy at the t -th episode, and then we have
[Equation]
where the first term (*) can be bounded by [65, 12]
[Equation]
where we use the fact that π t is the greedy policy with respect to Q th for any ( t, h ) ∈ [ T ] ×
[ H ] .
The second term (**) is also bounded by [65, 12]
[Equation]
Finally, we conclude the proof.
In the next, it is natural to employ Azuma-Hoeffding inequality for martingale difference sequences as below.
Lemma 2.
[65, statistical error]
For ζ 1 t,h and ζ 2 t,h defined in Eq.
(13) and for any δ ∈ (0 , 1) , with probability at least 1 − δ , we have
T (cid:88) t =
H (cid:88)
[Equation] [Equation]
(cid:112)
[Equation]
log
[Equation] [Equation]
C Proofs of transformation on the temporal difference error
In this section, we aim to transform the temporal difference error in Term ( i ) to generalization bounds.
This is the key part in our proof without bonus function design.
C.1 TD error under the averaged measure
Here we build the connection between Term ( i ) in the regret decomposition and the TD error Γ th in the L 2 (d¯ µ ˜ th ) -integrable space.
To this end, we need study the relationship between L 2 (d µ ) -norm and L ∞ -norm, where µ can be any probability measure over S × A .
For any f ∈ L 2 (d µ ) with δ ⩽ ∥ f ∥ ∞ , denote
G
[Equation]
then we have the following lemma that ¯ µ ˜ th ( G δ ) can be lower bounded under the ϵ -greedy policy.
Lemma 3.
Under the ϵ -greedy policy, considering the set in Eq.
(18) and the averaged measure ¯ µ ˜ th based on a mini-batch of ˜ t historical state-action pairs, we have
[Equation]
Remark:
Clearly, in the best case, we have ¯ µ ˜ th ( G δ ) ⩾ Ω (cid:0) ϵA (cid:1) .
Accordingly, we denote K ∈ [1 , H ] as a MDP-dependent constant to describe the “myopic” level of MDPs [49] such that ¯ µ ˜ th
( G δ ) ⩾ Ω (cid:0) ( ϵ/A ) K (cid:1) .
Proof.
For any f ∈ L 2 (d µ ) with δ ⩽ ∥ f ∥ ∞ , we have
[Equation]
which is also valid to ¯ µ ˜
th .
Clearly, ¯ µ ˜ th ( G δ ) ∈ [0 , 1] .
To prove ¯ µ ˜ th ( G δ ) > 0 with the lower bound, we consider the worst case with δ = 0 and every time step taking non-greedy action with probability ϵ .
That means, we need to find the optimal state-action pair in Eq.
(18), which can be achieved by the fact that all state-action pairs have been visited at all time steps.
It is clear that the cardinality of G δ is a non-decreasing function of δ .
Accordingly, there exists j ∈ [˜ t ] such that
[Equation]
where µ π τjh h is the occupancy measure of the policy π τ j h at the h -step and t -th episode.
Accordingly, µ π τjh h admits the following representation
[Equation]
Accordingly, in the worst case, at every time step we take any one action with probability ϵ/A such that
[Equation]
which implies that
[Equation]
and accordingly we conclude the proof.
Lemma 4.
Given a MDP-dependent constant K ∈ [1 , H ] , for the temporal-difference error Γ th defined in Eq.
(9) for all ( t, h ) ∈
[ T ] ×
[ H ] , under the ϵ -greedy policy, then Term ( i ) can be upper bounded by
[Equation]
Proof.
According to the definition of Term ( i ) in Lemma
[Equation]
we have
[Equation] [Equation]
for any ( s
[Equation]
a ) ∈ S ×
A
[Equation]
Furthermore, by taking δ := t − 1 / 2 such that (cid:82) T 1 t − 1 / 2 d t = O ( √ T ) , and using ¯ µ ˜ th ( G δ ) ⩾ Ω (cid:0) ( ϵ/A ) K (cid:1) with K ∈ [1 , H ] in Lemma 3, the above equation can be further expressed as
Term
[Equation]
i
[Equation]
[using Lemma 3]
[Equation]
[using elementary inequality] which concludes the proof.
C.2 Connection between the TD error and generalization bounds
Based on Lemma 4, the key issue left is to bound (cid:80)
Tt =1 ∥
Γ th ∥ 2 L 2 (d¯ µ ˜ th ) ≲ o ( T ) for a sublinear regret.
To this end, we build the connection between ∥ Γ th ∥ 2 L 2 (d¯ µ ˜ th ) and generalization bounds.
We first the study the decomposition of E t h ( f ) in Eq.
(6) by the following proposition: there exists an extra variance term in the expected risk E th ( f ) .
Proposition 1.
According to the definition of E th ( f ) in Eq.
(6) , then we have
[Equation]
where the variance Var [ V th +1 ( s h +1 )] :
[Equation]
Proof.
Denote s ′ :
= s h +1 for short, we expand E th ( f ) as the following expression
[Equation]
where we use E s ′ ∼ P h ( ·| s h ,a h ) (cid:2)
E s ′
[ V th +1 ( s ′ )]
− V th +1 ( s ′ ) (cid:3) = 0 and conclude the proof.
According to the decomposition of E th ( f ) Proposition 1, ¯ E th ( f ) in Eq.
(21) is close to the squared
Bellman error [61].
We are able to transform the estimation of the TD error to generalization error and approximation error as below.
Lemma 5.
For the temporal-difference error Γ th defined in Eq.
(9) for all ( t, h ) ∈
[ T ] ×
[ H ] , it can be upper bounded in the L 2 (d µ ˜ th ) space with
[Equation]
where the first term is the generalization error of (cid:98) Q th , the second term is the approximation error in the function class F .
Proof.
According to the definition of the TD error Γ th and taking f := (cid:98) Q th in Eq.
(21) given by
Proposition 1, we have
[Equation]
where the second equality holds by the definition of the averaged measure ¯ µ ˜ th
= 1˜ t (cid:80) ˜ tj =1 µ τ j h ; and we use Q th = (cid:98) Q th in the last equality as the truncation operation has been given in function classes, see Eqs.
(3) and (4).
Then, taking the infimum on both sides of Eq.
(21), we have
[Equation]
where the second equality holds by V th +1 ( s h
+
= max a ∈A Q th +
( s h
+1 , a ) .
Combining Eqs.
(22) and (23), we have
[Equation]
[Equation]
which concludes the proof.
Based on Lemma 5, we have the following corollary if we consider the approximation error in
L p ( X ) -integrable space, which is needed for our results on deep ReLU neural networks.
Corollary 1.
Under the same setting of Lemma 5, we have
[Equation]
Proof.
Following the proof of Lemma 5, this result can be easily obtained by Cauchy-Schwartz inequality.
To be specific, for any probability measure µ , we have
[Equation]
where g is the probability density function associated with the probability measure µ .
Note that the result here still holds true for the approximation error in L ∞ ( X ) if we use Hölder inequality, but this condition is much stronger as it requires the target Q function to be continuous.
D Generalization bounds on non-iid data
In this section, we prove that the traditional Rademacher complexity is still valid for independent but non-identically distributed data under a well-defined measure.
Similarly, such result is also valid to local Rademacher complexity.
The key fact is that, the classical Rademacher complexity [71] is still valid as McDiarmid’s bound only requires the independent property.
For description simplicity, we consider a general setting beyond our reinforcement learning task, i.e., learning with n independent but non-identical distributed data X
= { x i } ni
=1 in R d with x i ∼ µ i , ∀ i ∈ [ n ] .
Define the average measure ¯ µ := 1 n (cid:80) ni =1 µ i , we have
[Equation]
Accordingly, the empirical Rademacher complexity of a function class F on the sample set X is defined as
[Equation]
where the expectation is taken over ξ = { ξ 1 , ξ 2 , ·
[Equation]
, ξ n } , i.e., Rademacher random variables, with
Pr( ξ i = 1) =
Pr( ξ i = − 1) = 1 / 2 .
The related Rademacher complexity under our non-iid setting is defined as
[Equation]
where the expectation is taken over { x i } ni =1 with respect to each probability measure { µ i } ni =1 .
This definition follows the classical Rademacher complexity [71] on iid samples to intuitively indicates how expressive the function class is.
Besides, in our proof, we also need a notation of local Rademacher complexity on a set of vectors, where “local” means that the class over which the Rademacher process is defined is a subset of the original class.
Following the same style with Rademacher complexity, the local Rademacher complexity under the non-iid setting is defined as R n { f ∈ F : E ¯ µ f 2 ⩽ R } , and the empirical local Rademacher complexity is defined as (cid:98) R n { f ∈ F : P n f 2 ⩽ R } , where we denote
P n f := 1 n (cid:80) ni
=1 f ( x i ) for short.
Besides, Rademacher complexity is also related to covering number, a metric for estimation of a hypothesis space.
Here we give the definition of covering number, that is also used in this work.
Definition 4.
[72, Definition 5.1, covering number] Let ( F , ∥ · ∥ ) be a norm space.
A δ -cover of the set F with respect to ∥ · ∥ is a set { θ 1 , · · · , θ n } ⊆ F such that for each θ ∈ F , there exists some i ∈ [ n ] such that ∥ θ − θ i ∥ ⩽ δ .
The δ -covering number N ( δ, F , ∥ · ∥ ) is the cardinality of the minimal δ -cover.
In this work, we consider the covering number with two types of norms, one is N ( ϵ, F , ∥ · ∥ ∞ ) and the other is N ( ϵ, F , ∥ · ∥ 2 ) :
=
sup n sup P n N ( ϵ, F , ∥ · ∥ L 2 ( P n ) )
D.1 Rademacher complexity on non-iid data
Based on the definition of Rademacher complexity and its empirical version, we have the following lemma.
Lemma 6.
Let X
= { x i } ni =1 be an independent but non-identical distributed data set with x i ∼ µ i , ∀ i ∈ [ n ] , and R n ( F ) be the Rademacher complexity of the function class F on X , denote the averaged probability measure as ¯ µ := 1 n (cid:80) ni =1 µ i , then we have
[Equation]
Proof.
The proof follows with the classical Rademacher complexity [74, Chapter 26] apart from the averaged measure.
Take a copy of X , i.e., X ′ =
{ x ′ i } ni =
such that X
′ is independent but x ′ i ∼ µ i , ∀ i ∈ [ n ] .
According to Eq.
(25), we have
[Equation] [Equation]
Note that every possible configuration/value of ξ has probability of 1 / 2 n due to ξ ∈ {− 1 , 1 } n .
Without loss of generality, we can permute any configuration of ξ of such that
[Equation]
, where u = { u 1 , u 2 , · · · , u n } is a permutation of { 1 , 2 , . . . , n } .
Accordingly, for any configuration of ξ , we have
[Equation]
(cid:1)(cid:1)(cid:33)(cid:33)(cid:35)(cid:35)
[Equation]
E
[Equation]
(cid:34) sup
[Equation]
(cid:32)n n (cid:88) i =
( f ( x ′
[Equation]
f ( x i )) (cid:33)(cid:35)(cid:35) , (28) where we use the fact that x u i and x ′ u
i are independent and symmetric.
Based on this, we obtain
E { x i } ni = (cid:34) sup
[Equation]
∈F (cid:32)
E
[Equation]
n n (cid:88) i =
[Equation]
(cid:33)(cid:35) =
E {
[Equation]
= (cid:34) sup
[Equation]
∈F (cid:32)
E
[Equation]
x ′ i
[Equation]
ni = (cid:34)n n (cid:88) i =
f ( x ′ i ) (cid:35) −n n (cid:88)
i =
f
( x i ) (cid:33)(cid:35) [using Eq.
=
E { x i } ni = (cid:34) sup f ∈F (cid:32)
E { x ′ i } ni = (cid:34)n n (cid:88) i
=
f
( x ′ i ) − 1 n n (cid:88)
i =
f
( x i ) (cid:35)(cid:33)(cid:35) ⩽
[Equation]
(cid:34)
E
[Equation] [Equation]
(cid:34) sup
[Equation]
(cid:32)
[Equation]
n
[Equation]
(cid:88) i = f
( x ′ i ) − 1 n n (cid:88)
i =
f
( x i ) (cid:33)(cid:35)(cid:35)
[Jensen’s inequality] =
E { x i } ni =
[Equation]
[using Eq.
[Equation]
where the last inequality holds by the fact that ξ i and − ξ i , i ∈ [ n ] admit the same distribution, and multiplying each term in the summation by a Rademacher variable ξ i will not change the expectation due to E ξ i = 0 .
Based on the above lemma, we demonstrate that the Rademacher complexity can be well approximated by the empirical Rademacher complexity under our non-iid setting.
Lemma 7.
Under the same setting of Lemma 6, for any f ∈ F , assume that | f ( x ) − f ( x ′ ) | ⩽ c, ∀ x , x ′ ∈ dom( f ) for some constant c > 0 , for any δ ∈ (0 , 1) , the following proposition holds with probability at least 1 − δ
[Equation]
Proof.
The proof follows with the classical Rademacher complexity [74, Chapter 26] apart from the averaged measure.
Recall the definition of the empirical Rademacher complexity in Eq.
(26), (cid:98) R n ( F , X ) is a function of n random variables { x i } ni =1 .
Moreover, due to | f ( x ) − f ( x ′ ) | ⩽ c , (cid:98) R n ( F , X ) satisfies the precondition for McDiarmid’s inequality by at most c/n , which only requires independence of random variables without the identically distributed condition
[Equation]
which implies
[Equation]
By Lemma 6, we have
E
[Equation]
Denote event A as (cid:34)
[Equation]
we use McDiarmid’s inequality again to obtain Pr( A ) ⩽ e −
nδ 2 /c 2 since E x ∼ ¯ µ [ f ( x )] −n (cid:80) ni =1 f ( x i ) can be regarded as a function of { x i } ni =1 and any variations of { x i } ni =1 would change the outcome by at most c/n .
Denote event B as E x ∼ ¯ µ [ f ( x )] − 1 n (cid:80) ni
=1 f ( x i ) − 2 R n ( F ) ⩾ δ , we have Pr( B ) ⩽ Pr( A ) ⩽ e − 2 nδ 2 /c 2 .
Further, denote the event C as (cid:98) R n ( F , X ) ⩾ R n ( F ) − δ , we have Pr( C ) ⩾ 1 − exp( −
nδ 2 /c 2 ) by
Eq.
Denote the event D as E x ∼ ¯ µ ( f ( x ))
− 1 n (cid:80) ni
=1 f ( x i ) ⩾ 2 (cid:98)
R n ( F ) + 3 δ , we have
[Equation]
which concludes the proof.
Similar to the proof of Lemma 7, it is easy to verify that, the standard Massart’s lemma and the
Talagrand’s Contraction Lemma (empirical Rademacher complexity of Lipschitz function class) in [74, Chapter 26] are valid to our independent but non-iid setting.
D.2 Local Rademacher complexity
Here we present some results on local Rademacher complexity [75] that is needed in this work.
The used lemmas here are still valid for our independent but non-identically distributed data.
Since the proof framework is similar to what we present for Rademacher complexity, we omit the proofs here.
When applying local Rademacher complexity, we need the following definition.
Definition 5.
A function ψ : R + → R + is sub-root if it is non-negative, non-decreasing, and if ψ ( x ) / √ x is non-increasing.
Lemma 8.
[76, Theorem 2] Let F be a function class with ∥ f ∥ ∞ ⩽ b, ∀ f ∈ F and (cid:101) F :=
{ f − g : f, g ∈ F} , and P n f := 1 n (cid:80) ni
=1 f ( x i ) , then taking the average measure ¯ µ , we have
[Equation]
Lemma 9.
[75, Theorem 3.3, modified version] Let f be a class of functions with ranges in [ a, b ] and assume that there exists some functional T : F → R + and some constant B
such that Var ( f ) ⩽
T ( f ) ⩽ BPf for every f ∈ F .
Let P n be the empirical measure supported on the independent data points { x i } ni =1 with the averaged measure ¯ µ := 1 n µ i , Let ψ be a sub-root function with the fixed point R ∗ .
If for any R ⩾ R ∗ , ψ satisfies
[Equation]
then for any J > 1 and δ ∈ (0 , 1) , with probability at least 1 − δ , we have
[Equation]
where c 1 , c 2 , c 3 are some positive constants.
Lemma 10.
[73, Refined entropy integral]
Let P n be the empirical measure supported on the independent data points { x i } ni =1 .
For any function class F and any monotone sequence { ϵ k } ∞ k = decreasing to 0 such that ϵ 0 ⩾ sup f ∈F (cid:112) P n f 2 , the following inequality holds for every non-negative integer N
[Equation]
E Proofs of regret bounds via deep ReLU neural networks
In this section, we give the proofs of regret bounds via deep ReLU neural networks according to the function class of T ⋆h Q in Besov spaces.
To conclude our proof, we need the following lemma that how well the functions in the Besov space can be approximated by deep neural networks with the ReLU activation.
Here the approximation error is defined in the L 4 ( X ) -integrable space ( c.f. Corollary 1).
Lemma 11.
(Approximation error in Besov space) [30, Proposition 1, modified version] Assume that the smoothness parameter α satisfies
[Equation]
then there exists a deep neural network architecture F DNN ( L, m, S, B ) with ν :
= ( α − η ) / (2 η ) and a large N such that
[Equation]
then it holds that
[Equation]
In our proof, we need the following result on local Rademacher complexity of deep ReLU neural networks.
Lemma 12.
Let X
= { x i } n i =1 ⊆
[0 , 1] d be an independent but non-identical distributed data set with x i ∼ µ i , ∀ i ∈ [ n ] , and R n { f ∈ F DNN : Pf 2 ⩽ R } be the local Rademacher complexity of the function class F DNN on X defined in Eq.
(4) , denote the averaged measure as ¯ µ := 1 n (cid:80) ni =1 µ i , then for a large N , we have
[Equation]
Remark:
The parameter N depends on the number of the training data n , but it will be determined later.
Proof.
According to [30, Lemma 3], the covering number of F DNN can be bounded by
[Equation]
ε
[Equation]
Denote (cid:101) F DNN = { f − g : f, g ∈ F DNN } , it satisfies
[Equation]
According to Lemma
[Equation]
taking ε j = 2 − j ε
[Equation]
and using the inequality
[Equation]
then the following inequality holds for any J ∈ N + :
[Equation] [Equation]
J
[Equation]
where the first inequality holds by Lemma 10 and the second and third inequalities hold by Eq.
The last inequality uses the fact that (cid:80) ∞ j =0 √ j +1 2 j − 1 < ∞ .
According to Lemma 8 with sup f ∈F DNN ∥ f ∥ ∞ ⩽ H , we have
[Equation]
where we choose ε := n − 1 / 2 in the last inequality, and then we conclude the proof.
Based on the above result, we have the following proposition on generalization bounds in Besov spaces under non-iid state-action pairs.
Proposition 2.
Given the solution (cid:98) Q th = argmin f ∈F DNN (cid:98) E th ( f ) in Eq.
(5) , then for a large N and any δ ∈ (0 , 1) , with probability at least 1 − δ , we have
[Equation]
where n := ˜ t in our RL setting and N depends on t which needs further determined.
Proof.
It is clear that ψ ( R ) defined in Eq.
(37) in Lemma 12 is a sub-root function.
Therefore, the fixed point R ∗ of ψ ( R ) can be analytically solved by the equation R ∗ =
ψ ( R ∗ ) , which leads to
[Equation]
Strictly speaking, there is an extra term N (cid:2) (log N ) 2 + log n (cid:3) 34 /n in the above equation, but we can omit it as we only concern the smallest and largest order.
By verifying the variance-expectation condition, we have
[Equation]
where f ⋆h := argmin f ∈F DNN E th ( f )
and we use the fact E th ( f ) is 4 H -Lipschitz.
Denote the function space (cid:100) F DNN with the following function formulation for any j ∈ [ n ] ˆ
[Equation]
we have P n ˆ g th = (cid:98) E th
( (cid:98) Q th ) − (cid:98)
E th ( f ⋆h ) ⩽
due to (cid:98) Q th = argmin f ∈F (cid:98) E th ( f ) .
Then using E g 2 ⩽ H 2 Pg , for any g ∈ (cid:100) F DNN by Eq.
(38), according to Lemma 9, the following inequality holds with probability at least 1 − δ
[Equation]
where which further implies
[Equation]
Finally
[Equation]
we conclude the proof
[Equation]
Proof of Theorem 1.
Using the approximation error in L 4 ( X ) by Corollary
[Equation]
the smoothness parameter satisfies α > d (1 /p − 1 / 4) + .
By taking δ/ 2 in Proposition
[Equation]
we have
[Equation]
[ using Corollary 1 ]
[Equation]
where in the second inequality
[Equation]
taking α > d (1 /p − 1 / 4) + , the approximation error can be estimated by Lemma
[Equation]
Accordingly, the right hand side of Eq.
(39) can be minimized by taking N ≍ ˜ t d 2 α + d up to (log ˜ t ) 3order in Eq.
(33) for choosing suitable L, m, S, B .
To make the architecture of deep RL independent of a variable ˜ t (or t ) during different episodes, here we directly choose N ≍ T d 2 α + d log 3 T , in this case, Eq.
(39) can be formulated as
[Equation]
which requires the depth L and the width m up to
[Equation]
Recall ˜ t :
= ⌈ ϱt ⌉ , according to Lemma 4, if α > d (1 /p − 1 / 4) + , then for any δ ∈ (0 , 1) , with probability at least 1 − δ/ 2 , the Term ( i ) can be upper bounded by
Term
[Equation] [Equation]
Then taking δ/ 2 in the statistical error Term ( ii ) in Lemma 1, if α > d (1 /p − 1 / 4) + , with probability at least 1 − δ , we have
Regret ( T ) ≲ (cid:16)
[Equation]
A
[Equation] [Equation]
Then taking ϵ
=
O
[Equation]
H
[Equation]
which implies
[Equation]
Finally we conclude the proof.
F Proofs of regret bounds via two-layer neural networks
In this section, we focus on generalization bounds under the independent but non-identically distributed data setting in the Barron space, and it is useful to present estimates of our regret bound.
Lemma 13.
For two-layer ReLU neural networks with bounded ℓ 1 path norm defined in Eq.
(3) given the function class F SNN and n independent but non-identically distributed data points X
= { x i } ni
=1 ⊆ X , then we have
[Equation]
Proof.
Here we directly focus on the ℓ 1 path norm, which is different from [31, Theorem 3].
Based on the definition of two-layer ReLU neural networks defined in Eq.
(3), denote (cid:101) w k := ( w ⊤ k , c k ) ⊤ and (cid:101) x
= ( x ⊤ , 1) ⊤ for simplicity, the empirical Rademacher complexity of F SNN under our setting can be by
[Table]
[Equation]
[ using Hölder inequality ] where the first inequality holds by the homogeneity of ReLU for any (cid:101) w ∈ R d / { 0 } .
Since the
Massart’s lemma is still valid under our independent but non-identically distributed data, R n ( F SNN ) can be further expressed by
[Equation]
where the last inequality holds by the maximum of n sub-Gaussian random variables [72] since
Rademacher random variables are sub-Gaussian, and finally we conclude the proof.
Proof of Theorem 2.
Denote X := { ( s τ j h , a τ j h , s τ j h +1 ) }
˜ tj =1 for simplicity and notice that the function [ f ( s h , a h ) − r h ( s h , a h ) − V th +
( s h +1 )] 2 is 4 H -Lipschitz.
Then according to Lemma 7, for any δ ∈ (0 , 1) , the following result holds with probability at least 1 − δ/
[Equation]
where we use the empirical Rademacher complexity in Lemma 13.
Accordingly, by Lemma 5 and
Eq.
(41), then with probability at least 1 − δ/ 2 , we have
[Equation]
Assumption 2 ]
[Equation]
where the second inequality uses the approximation result for two-layer ReLU neural networks and the Barron space in [31, Theorem 4].
Accordingly, by Lemma 4, for any δ ∈ (0 , 1) , the Term ( i ) in the regret decomposition can be upper bounded with probability at least 1 − δ/
[Equation]
i
[Equation]
where we use (cid:101) R ≍ H and (cid:82) T 1 ( t − 1) − 1 / 2 d t = O ( √ T ) .
Accordingly, taking δ/ 2 in the statistical error Term ( ii ) in Lemma 1, then with the probability at least 1 − δ , the total regret can be upper bounded by
Regret
[Equation]
(cid:17) .
Taking m = Ω( √ T ) and
ϵ = O (cid:16) H 2 K +2 T −
[Equation]
, the regret bound can be further represented as
[Equation]
which concludes the proof.