A Non-asymptotic Analysis of Non-parametric Temporal-Difference Learning
Abstract
Temporal-difference learning is a popular algorithm for policy evaluation.
In thispaper, we study the convergence of the regularized non-parametric TD(0) algorithm,in both the independent and Markovian observation settings.
In particular, when
TD is performed in a universal reproducing kernel Hilbert space (RKHS), we proveconvergence of the averaged iterates to the optimal value function, even when itdoes not belong to the RKHS.
We provide explicit convergence rates that dependon a source condition relating the regularity of the optimal value function to the
RKHS.
We illustrate this convergence numerically on a simple continuous-state
Markov reward process.
Introduction
One of the main ingredients of reinforcement learning (RL) is the ability to estimate the long-termeffect on future rewards of employing a given policy.
This building block, known as policy evaluation,already contains crucial features of more complex RL algorithms, such as SARSA or Q-learning [59].
Temporal-difference learning (TD), proposed by [57], is among the simplest algorithms for policyevaluation.
The estimation of the performance of the policy is made through a value function.
It isupdated online , after each new observation of a couple composed of a state transition and a reward.
Although the formulation of TD is quite natural, its theoretical analysis has proved more challenging,as it combines two difﬁculties.
The ﬁrst one is that TD bootstraps , in the sense that it uses itsprevious – possibly inaccurate – predictions to correct its next predictions, because it does nothave access to a ﬁxed ground truth.
The second difﬁculty is that the observations are producedalong a trajectory following a ﬁxed policy ( on-policy ), hence they are correlated, which calls formore involved stochastic approximation tools compared to independent identically distributed ( i.i.d. )
samples.
Moreover, using off-policy samples, produced by a different policy than the one beingevaluated, can make the algorithm diverge [15].
Off-policy sampling is out of our scope in this paper.
A third element which is not inherent to TD further complicates the plot: function approximation.
While TD was originally proposed in a tabular setting, its large-scale applicability has been greatlyextended by its combination with parametric function approximation [16].
This enables the use ofany linear or non-linear function approximation method to model the value function, including neuralnetworks.
However, one can exhibit unstable diverging behaviors of TD even with simple non-linearapproximation schemes [61].
This combination of difﬁculties (even with linear function approximation) has been coined the “deadly triad” by [58].
We argue that convergence can be obtained even withnon-linear function approximation, by making use of the non-parametric formalism of reproducingkernel Hilbert spaces (RKHS), involving linear approximation in inﬁnite-dimension.
Studying thiscase could bring us closer to understanding what happens with other universal approximators used inpractice, like neural networks.
1.1 Contributions
We study the policy evaluation algorithm TD(0) in the non-parametric case, ﬁrst when the observationsare sampled i.i.d.
from the invariant distribution of the Markov chain resulting from the evaluatedpolicy, and then when they are collected from a trajectory of the Markov chain with geometric mixing.
In that sense we follow a similar outline as the analysis of [10] which is dedicated to the linear case.
The non-parametric formulation of TD closes the gap between the original tabular formulation
andthe parametric formulation which involves semi-gradients.
It allows the use of classical tools andtheory from kernel methods [19].
In particular, we highlight the central role of inﬁnite-dimensionalcovariance operators [5, 2] which already appear in the analysis of other non-parametric algorithms,like least-squares regression.
We study a regularized variant of TD, a widely used way of dealingwith misspeciﬁcation in regression.
Importantly, when the regularized TD approximation is run on aninﬁnite-dimensional RKHS which is dense in the space of square-integrable functions, then there isno approximation error and the algorithm converges to the true value function.
More precisely, weprovide a proof of convergence in expectation of TD without approximation error, even when the truevalue function does not belong to the RKHS, under a weaker source condition.
Furthermore, we givenon-asymptotic convergence rates related to this source condition, which measures the regularity ofthe true value function relative to the RKHS, e.g. , its smoothness if the RKHS is a Sobolev space [46].
Note that using a universal kernel [43] to obtain convergence of TD to the true value function is alsointeresting from a theoretical point of view.
Indeed it exempts us from a possibly tedious study ofthe approximation (or projection) error on a given basis, and simply removes an error term which ingeneral scales linearly with the horizon of the Markov reward process [44, 65].
In the rest of this section, we review the related literature.
In Sec. 2, we present the algorithm, alongwith generic results and notations.
In Sec. 3, we analyze a simpliﬁed version of the algorithm, namelypopulation TD in continuous time.
This allows to catch the main features of the analysis, whilepostponing the technicalities related to stochastic approximation.
Sec. 4 is dedicated to the analysis ofnon-parametric TD with i.i.d.
observations, while Sec. 5 consists in a similar analysis for correlatedobservations sampled from a geometrically mixing Markov chain.
Finally, in Sec. 6, we presentsimple numerical simulations illustrating the convergence results and the role the main parameters.
1.2 Related literature
Temporal-difference learning.
The TD algorithm was introduced in its tabular version by [57],with a ﬁrst convergence result for linearly independent features, later extended to dependent featuresby [24].
Further stochastic approximation results were proposed by [36] for the tabular case, andby [53] for the linear approximation case.
[61] provided a thorough asymptotic analysis of TDwith linear function approximation, while failure cases were already known [4].
A non-asymptoticanalysis was later proposed by [40] in the i.i.d.
sampling case with constant step size, concurrentlyto another approach extending to Markov sampling by [10].
Other problem-dependent bounds forlinear TD were derived around the same period [23, 55], along with an analysis of variance-reduced
TD [39, 64].
All of the analyses mentioned above focus either on the tabular or on the linearparametric TD algorithm.
A recent work by [42] deals with the batch counterpart of non-parametric
TD, namely the least-squares TD algorithm (LSTD), but they rather focus on the analysis of thestatistical estimation error.
Importantly, LSTD only requires ofﬂine computations and is not relatedto stochastic approximation.
Most closely related to our work is the non-parametric regularized TDsetting studied by [38].
However, their analysis is limited to the case where the optimal value functionbelongs to the RKHS.
This is not sufﬁcient to get rid of the approximation error term.
Also, we willshow later that regularization is not necessary in this case.
Furthermore, their analysis is restricted tothe i.i.d.
setting, for which we will require fewer regularity assumptions.
Kernel methods in RL.
To tackle large-dimensional problems, kernel methods have been combinedwith various RL algorithms, including approximate dynamic programming [48, 11, 6, 34], policyevaluation [22], policy iteration [32], LSTD [30], the linear programming formulation of RL [26],upper conﬁdence bound [29], or ﬁtted Q-iteration [42].
Such kernel methods often come along withpractical ways to reduce the computational complexity that grows with the number of observedtransitions and rewards [7, 38].
Stochastic approximation.
The analysis of TD requires tools from stochastic approximation [8],among which the ODE method [13].
Such tools are primarily designed for ﬁnite-dimensionalproblems.
Stochastic gradient descent (SGD) [14] is a speciﬁc instance of stochastic approximationthat has received extensive attention for supervised learning.
In particular, the role of regularizationof SGD for least-squares regression has been studied [17, 21], as well as the effect of of samplingdata from a Markov chain [45].
Finally, we use a formalism which is close to the analyses [28, 49, 9]of non-parametric SGD for least squares regression.
Problem formulation and generic results2.1 The non-parametric TD(0) algorithm
We consider a Markov reward process (MRP), i.e. , a Markov chain with a reward associated to eachstate.
This is what results from keeping the policy ﬁxed in a Markov decision process (MDP) forpolicy evaluation.
We consider MRPs in discrete-time, not necessarily with a countable state space X .
Speciﬁcally, we use the formalism of Markov chains on a measurable state space which uniﬁesdiscrete- and continuous-state Markov chains.
Formally, let X ⊂ R d a measurable set associated withthe σ -algebra A of Lebesgue measurable sets.
Let ( x n ) n ≥ 1 a time-homogeneous Markov chain with Markov kernel κ .
A Markov kernel [51, 37] is a mapping κ : X
× A → [0 , 1] that has the followingtwo properties: (1) for every x ∈ X , κ ( x, · ) is a probability measure on A , and (2) for every A ∈ A ,κ ( · , A ) is A -measurable.
If X is a countable set, κ is represented by a transition matrix Q such that
Q i,j := P ( j | i ) =
κ ( i, { j } ) , for any i, j ∈ X .
We deﬁne a reward function r : X → R uniformly bounded by R < ∞ , and a discount factor γ ∈ [0 , 1) .
The aim of policy evaluation is to compute the value function of the MRP:
[Equation]
where the ( x n ) n ≥ 1 are drawn from the Markov chain.
A probability distribution p :
A → Ris a stationary distribution for κ if for all A ∈ A , p ( A ) =
(cid:82) X κ ( x, A ) p ( dx ) .
The existence anduniqueness of a stationary distribution p , along with the convergence of the Markov chain to p intotal variation, is ensured by ergodicity conditions.
A sufﬁcient condition is that the Markov chainis Harris ergodic, i.e. , it has a regeneration set, and is aperiodic and positively recurrent (see [1]and [31] for an exposition of Harris chains).
For discrete-state Markov chains, ergodicity conditionscan be expressed somewhat more simply, and any aperiodic and positive recurrent Markov chainhas a unique invariant distribution.
Throughout this paper, we assume that p is the unique invariantdistribution of the Markov chain, and that it has full support on X .
Only in Sec. 5, we will in additionassume that the Markov chain is geometrically mixing.
We deﬁne L 2 ( p ) , the set of squared integrable functions f : X → R with respect to p , with thenorm (cid:107) f (cid:107) 2 L 2 ( p ) =
(cid:82) X f ( x ) 2 p ( dx ) <
+ ∞ .
We also consider a reproducing kernel Hilbert space H of
A -measurable functions, associated to a positive-deﬁnite kernel K : X × X → R .
For all x ∈ X , weuse the notation Φ( x ) :
= K ( x, · ) for the mapping of x in H , and (cid:104)· , ·(cid:105) H for the inner product in H(we sometimes drop the index).
We assume that M H :=
sup x ∈ X K ( x, x ) is ﬁnite, which impliesthat H ⊂ L 2 ( p ) .
More precisely, the H -norm controls the L 2 ( p ) -norm: any sequence convergingin H thus converges in L 2 ( p ) .
Indeed, if f ∈ H :
[Equation]
[Equation]
We also assume that r ∈ L 2 ( p ) .
The non-parametric TD(0) algorithm in the RKHS H is deﬁnedas follows [48, 38].
Draw a sequence ( x n ) n {+≥ 
+} according to the Markov chain with initial distribution p , and collect the corresponding rewards ( r ( x n )) n ≥ 0 .
Deﬁne a sequence of non-negative stepsizes ( ρ n ) n ≥ 1 .
We build recursively a sequence of approximate value functions ( V n ) n ≥ 0 in L 2 ( p ) .
Throughout the paper, we take V
= 0 for simplicity, but note that all the results can be adapted tothe case V 0 ∈ H .
For n ≥ 1 :
[Equation]
where x (cid:48) n := x n +1 .
The term in brackets is called a temporal-difference.
Equivalently, in the RKHS:
[Equation]
This update has a running time complexity of O ( n 2 ) , which can be improved to O ( n ) , e.g. using
Nyström approximation or random features [35].
More details on the implementation are givenin App.
B.2.
This non-parametric formulation is a natural extension of the tabular TD algorithm.
Indeed, if X is a countable set and K ( x, y ) = 1 x = y is a Dirac kernel – a valid positive-deﬁnitekernel – then we exactly recover tabular TD: the update rule (3) becomes, after observing a transition( i, i (cid:48) , r i ) :
= ( x n , x (cid:48) n , r ( x n )) :
[Equation]
and ∀ j (cid:54)
[Equation] This also covers the semi-gradient formulation of TD for linear function approximation [59].
Suppose H has ﬁnite dimension d , then V n can be identiﬁed to ξ n ∈ R d , and we are searching for anapproximation of the form V n ( x ) = ξ (cid:62) n Φ( x ) .
Then (4) becomes:
[Equation]
Since V 0 ∈ H , all the iterates V n are in the RKHS, in particular V n ∈ span { Φ( x k ) } 1 ≤ k ≤ n .
Consequently, if the sequence ( V n ) converges in the topology induced by the L 2 ( p ) -norm, it converges in
H , the closure of H with respect to the L 2 ( p ) -norm.
In particular, for a dense RKHS and because phas full support on X , H =
L 2 ( p ) , but in general it only holds that H ⊂ L 2 ( p ) .
To understand the behavior of the algorithm, we will ﬁrst consider the population version (also calledmean-path in [10]) of the algorithm: set V
= 0 and for n ≥ 1 :
[Equation]
where the expectation is taken with respect to q ( dx, dx (cid:48) )
= p ( dx ) κ ( x, dx (cid:48) ) .
Since V n − 1 ∈ H , thereproducing property holds: V n − 1 ( x ) =
(cid:104) V n − 1 , Φ( x ) (cid:105) H .
Hence the update is afﬁne and reads: V n = V n − 1 + ρ n ( AV n − 1 + b ) , with A :=
E q [ γ Φ( x ) ⊗ Φ( x (cid:48) ) − Φ( x ) ⊗ Φ( x )] and b :=
E p [ r ( x )Φ( x )] ,where ⊗ denotes the outer product in H deﬁned by g ⊗ h : f (cid:55)→ (cid:104) f, h (cid:105) H g .
2.2 Covariance operators
Assume that the expectations Σ :=
E p [Φ( x ) ⊗ Φ( x )] and Σ 1 :=
E q [Φ( x ) ⊗ Φ( x (cid:48) )] are well-deﬁned.
Σ and Σ 1 are the uncentered auto-covariance operators of order 0 and 1 of the Markov process( x n ) n ≥ 1 , under the invariant distribution p .
They are operators from H to H , such that, for allf, g ∈ H , using the reproducing property:
[Equation]
In particular, for all y ∈ X and f ∈ H , (Σ f )( y ) = (cid:104) Φ( y ) , Σ f (cid:105) H
= E p
[ f ( x ) K ( x, y )] and similarly,(Σ 1 f )( y ) =
E q [ f ( x (cid:48) ) K ( x, y )] .
Following [28], Σ and Σ 1 can therefore be extended to operators Σ eand Σ e 1 from L 2 ( p ) to L 2 ( p ) deﬁned by: [Equation] x
[Equation]
( x ) p ( dx ) , such that ∀ y ∈ X , (Σ e f )( y ) =
E p [ f ( x ) K ( x, y )]
[Equation]
( x
[Equation]
( x ) q ( dx, dx (cid:48) ) , such that ∀ y [Equation]
[Equation]
These two operators are the building blocks of the TD iteration (7).
In particular, A = γ Σ 1 − Σ andb =
Σ e r , the latter being valid for r ∈ L 2 ( p ) .
With a slight abuse of notation, we denote simply as Σ ,Σ 1 the extended operators.
Furthermore [28], Im (Σ) ⊂ H and Σ 1 / 2 is an isometry from L 2 ( p ) to H :
[Equation]
The fact that p is a stationary distribution for κ implies a particular constraint linking Σ and Σ 1 :
Lemma 1.
There exists a unique bounded linear operator ˜Σ 1 : H → H such that Σ 1 = Σ 1 / 2 ˜Σ 1 Σ 1 / 2on H , and (cid:107) ˜Σ 1 (cid:107) op ≤ 1 ( (cid:107) · (cid:107) op is the H -operator norm).
This results from an application of [5, Thm. 1], valid on H and extended by continuity to H .
Seealso [33] for an exposition of cross-covariance operators speciﬁcally in an RKHS.
In ﬁnite dimension,this is retrieved with generic results on positive semi-deﬁnite (PSD) matrices.
Speciﬁcally, if H ⊂ R m ,the uncentered covariance matrix of the random variable (Φ( x ) , Φ( x (cid:48) )) , when ( x, x (cid:48) ) ∼ q is:
(cid:18) Σ ΣΣ (cid:62)Σ (cid:19) (cid:23) 0 .
Using a classical condition on block matrices [12, Prop. 1.3.2], this matrix is PSD if and only if thereexists a matrix ˜Σ 1 such {+that (cid:107) ˜Σ 1 (cid:107) op ≤ 1 and Σ 1 = Σ 1 / 2 ˜Σ 1 Σ 1 / 
+}
(cid:107) · (cid:107) op is also the spectral norm inthis case).
This corresponds to the fact that the Schur complement of a PSD block matrix is also PSD.
Assumptions on Σ and V ∗ .
We assume that x (cid:55)→ K ( x, x ) is uniformly bounded by M H .
Therefore, the eigenvalues of Σ are upper-bounded.
However, unlike [61] and [10], we do not assume themto be lower-bounded, i.e. , Σ (cid:23) 0 is not invertible in general.
We will formulate our convergenceresults for two sets of assumptions.
The ﬁrst one recovers known results from [10] for linear functionapproximation.
The second one assumes that V ∗ veriﬁes a source condition [27, Chap.
1]:(A1) V ∗ ∈ H , H is ﬁnite-dimensional and Σ has full-rank;(A2)
V ∗ ∈ Σ θ/ 2 ( H ) for some θ ∈ ( − 1 , 1] (and consequently, (cid:107) Σ − θ/ 2 V ∗ (cid:107) H < + ∞ ), and
H =
L 2 ( p ) ( i.e. , K is a universal kernel).
In (A1) , H is ﬁnite-dimensional because Σ cannot be simultaneously compact ( x (cid:55)→ K ( x, x )being uniformly bounded) and invertible in inﬁnite-dimension [18].
Recalling the isometry property (10), the case θ = − 1 always holds in (A2) because V ∗ ∈ L 2 ( p ) (which we prove in thenext subsection).
The case θ = 0 is equivalent to V ∗ ∈ H .
For θ > 0 , it must be interpreted as:(cid:107) Σ − θ/ 2 V ∗ (cid:107) 2 H := inf {(cid:107) V (cid:107) 2 H | V s.t.
V ∗ =
Σ θ/ 2 V } , with (cid:107) Σ − θ/ 2 V ∗ (cid:107) H = + ∞ if V ∗ / ∈ Σ θ/ 2 ( H ) .
Using a universal approximation removes the need for a projection operator on H , as typically usedfor ﬁnite-dimensional function approximation, and hence there will be no projection error [61].
2.3 Non-expansiveness of the Bellman operator
It is known that the value function V ∗ of the MRP is a ﬁxed point of the Bellman operator T .
Wedeﬁne two operators P and T : L 2 ( p ) →
L 2 ( p ) by, for V ∈ L 2 ( p ) , PV ( x ) =
E x (cid:48) ∼ κ ( x, · ) V ( x (cid:48) ) and
TV ( x ) =
r ( x ) + γPV ( x ) .
Both operators can be expressed in terms of Σ and Σ 1 .
For V ∈ L 2 ( p ) :(cid:26)
[Equation]
Lemma 2.
For any V ∈ L 2 ( p ) : (cid:107) PV (cid:107) L 2 ( p ) ≤ (cid:107) V (cid:107) L 2 ( p ) .
This is a direct reformulation of [61, Lemma 1], the proof of which is given in App.
A.1.
As stressedby [61], this strongly relies on the fact that p is a stationary distribution of the Markov chain.
Itimplies that T is a γ -contraction mapping on L 2 ( p ) and has as unique ﬁxed point V ∗ .
One cancheck that if Σ is non-singular, Lemma 2 is exactly equivalent to (cid:107) Σ − 1 / 2 Σ 1 Σ − 1 / 2 (cid:107) op ≤ 1 , that is,
Lemma 1.
Moreover, using Lemma 2, we obtain (cid:107) V ∗ (cid:107) L 2 ( p ) ≤ (cid:107) r (cid:107) L 2 ( p ) / (1 − γ ) and V [-⇤ 
-]∗ ∈
L 2 ( p ) .
Analysis of a continuous-time version of the population TD algorithm
Before considering regularized TD with stochastic samples, we look at simpliﬁed versions of thealgorithm that momentarily remove the difﬁculties related to stochastic approximation.
Speciﬁcally,we consider the population version of TD to capture a “mean” behavior, and a continuous-timealgorithm to avoid choosing step sizes.
Instead, we focus on the role of the regularization parameter.
3.1 Existence of a ﬁxed-point for regularized TD
For λ ≥ 0 , let us consider the regularized population recursion:
[Equation]
If the TD iterations converge, their limit will be a solution of the regularized ﬁxed-point equation:
[Equation]
Proposition 1.
If λ > 0 , γ Σ 1 − Σ − λI is non-singular on H and equation (13) admits a uniquesolution V ∗ λ in L 2 ( p ) , deﬁned by V ∗ λ
= ( γ Σ 1 − Σ − λI ) − 1 Σ r .
Furthermore, V ∗ λ ∈ H and:
[Equation]
[Equation]
The proof is in App.
A.2.
Hence, for λ > 0 , the H -norm of V ∗ λ is always bounded, unlike (cid:107) V ∗ (cid:107) H .
3.2 Convergence of the regularized ﬁxed point to the optimal value function
Recalling that V ∗ ∈ L 2 ( p ) , it satisﬁes the relation TV ∗ =
V ∗ , implying that Σ TV ∗ =
Σ V ∗ , i.e. ,Σ r + ( γ Σ 1 − Σ) V ∗ = 0 .
This unregularized ﬁxed point equation possibly has other solutions, butif K is a universal kernel, as assumed by (A2) , then Σ is injective [56] and V ∗ is the unique solution.
Let us recall that (A2) does not imply that V ∗ has a bounded H -norm.
However, we can control the
L 2 ( p ) -norm of V ∗ λ − V ∗ when λ is small using the source condition (A2) .
Proposition 2.
Assume that λ > 0 and assumption (A2) .
Then:
[Equation]
The proof in App.
A.2 is inspired by similar results [17, 21] in the context of ridge regression(recovered for γ = 0 ).
Note that only (cid:107) V ∗ λ − V ∗ (cid:107) L 2 ( p ) is controlled, not (cid:107) V ∗ λ − V ∗ (cid:107) H .
Consequently,we obtain the convergence of V ∗ λ to V ∗ in L 2 ( p ) -norm when λ → 0 : the higher θ is, the faster the rateof convergence.
For universal Mercer kernels [20], if we drop the source condition (A2) , using onlythe fact that V ∗ ∈ L 2 ( p ) – corresponding to θ = − 1 in (A2) – we can still prove that V ∗ λ convergesto V ∗ in L 2 ( p ) -norm when λ → 0 , but without an explicit rate (see App.
A.2, Cor. 1).
3.3 Convergence of continuous-time population TD
Following the ordinary differential equation (ODE) method [13], we study the continuous-timecounterpart of the population iteration (12).
At least formally, this consists in deﬁning (cid:101) V t
= V n ( t ) for tand n ( t ) satisfying t = {+(cid:80) n ( t ) i =
+}
ρ i , and letting ρ i tend to 0 for any i ≥ 1 , where V n ( t ) is deﬁned byrecursion using (12).
With a slight abuse of notation, we use the notation V t instead of (cid:101) V t .
We thenobtain the following ODE in H :
V 0 = 0 and for t ≥ 0 :
[Equation]
We can exhibit a Lyapunov function for this dynamical system, see [54].
This implies that V tconverges to V ∗ λ when t tends to inﬁnity, where V ∗ λ is deﬁned in Prop. 1.
More precisely, forβ ∈ {− 1 , 0 } , we deﬁne W β , the Lyapunov function, by W β ( t ) :
= (cid:107) Σ − β/ 2 ( V t − V ∗ λ ) (cid:107) 2 H (pleasenote that β ’s role in W β is an index, not a power).
W 0 ( t ) strictly decreases with t as follows:
Lemma 3 (Descent Lemma) .
For λ > 0 , for all t ≥ 0 , the following holds:
[Equation]
The proof (see App. A.2) mainly relies on the contraction property of the Bellman operator asexpressed in Lemma 2.
We can then deduce the convergence of the ODE (16) to V ∗ λ .
Proposition 3.
Under assumption (A1) , the solution V t of the ODE (16) with λ = 0 is such that:
[Equation]
T > [Equation] 18) where V T is the Polyak-Ruppert average [50] of V t , deﬁned by V T := 1 T {+(cid:82) T 
+}
V t dt .
Under assumption (A2) , the solution V t of the ODE (16) with λ > 0 is such that: [Equation]
T ≥ 0 ,
[Equation]
Under (A1) , we recover the same O (1 /T ) convergence rate as [10].
We focus on (A2) , where weget a fast convergence to V ∗ λ in H -norm (stronger than L 2 ( p ) ).
However, we are rather interested inconvergence to V ∗ .
Prop. 2 quantiﬁes how far V ∗ λ is from V ∗ .
Indeed, the error decomposes as:
[Equation]
Combining Propositions 1, 2, 3 shows a trade-off on λ : (cid:107) V T − V {+∗ (cid:107) 
+}
L 2 ( p ) =
{+O (cid:0) e − 2 λT /λ 2 + λ θ +
+}
(cid:1) .
Taking λ
= (3 + θ ) log T/ (2 T ) balances the terms up to logarithmic factors: (cid:107) V T − V ∗ (cid:107) 2 L 2 ( p ) =
˜ O (cid:0) T − 1 − θ (cid:1) (where ˜ O ( g ( n )) :
= O ( g ( n ) log( n ) (cid:96) ) , for some (cid:96) ∈ R ).
In particular, for θ = 0 ,i.e. , V ∗ ∈ H , we recover a convergence rate ˜ O (1 /T ) :
up to logarithmic factors, it
Stochastic TD with i.i.d. sampling
We now consider stochastic TD iterations (4), where the couples ( x n , x (cid:48) n ) n ≥ 1 are sampled i.i.d.
fromthe distribution q ( dx, dx (cid:48) ) =
p ( dx ) κ ( x, dx (cid:48) ) .
Such i.i.d.
samples can be obtained by running the
Markov chain until it has mixed so that x n ∼ p , collecting a couple ( x n , x (cid:48) n ) , and restarting.
With
A n := γ Φ( x n ) ⊗ Φ( x (cid:48) n ) − Φ( x n ) ⊗ Φ( x n ) and b n :
= r ( x n )Φ( x n ) , we study the recursion:
[Equation]
In particular, E q [ A n ] =
A , E p [ b n ] = b , and A n and b n are independent of the past ( V k ) k<n .
For β ∈ { 0 , 1 } , let W βn : = (cid:107) Σ − β/ 2 ( V n − V ∗ λ ) (cid:107) 2 H .
Adapting the proof of Lemma 3, we exhibit asimilar decreasing behavior of W 0 n in expectation, hence showing that E [ (cid:107) V n − V ∗ λ (cid:107) 2 H ] [-! 
-]→ 0 forwell-chosen step sizes ρ n .
Finally, λ is chosen to balance E [ (cid:107) V n − V ∗ λ (cid:107) 2 L 2 ( p ) ] and (cid:107) V ∗ λ − V ∗ (cid:107) 2 L 2 ( p ) .
We deﬁne V (e) n and V (t) n as the exponentially-weighted and the tail-averaged n -th iterates respectively: [Equation] [Equation] and V
[Equation]
Theorem 1.
Let n ≥ 9 .
Under assumption (A2) with − 1 < θ ≤ 1 , there exist a positive realnumber λ θ independent of n such that, for λ 0 ≥ λ θ , (a) Using λ = λ 0 n − +
θ and a constant step size ρ = log
n λn , then [Equation]
(b) Using λ = λ 0 n − 12+ θ and a constant step size ρ = log n λn , then:
[Equation]
(c) Using λ = λ 0 n − 12+ θ and a constant step size ρ = 2log n λn for the ﬁrst (cid:98) n/ 2 (cid:99) − 1 iterates and then a decreasing step size ρ k = 1 λk , then:
[Equation]
A similar exponentially-weighted averaging scheme as in (b) has been used to study constant stepsize SGD in [25].
When γ = 0 , the rates can be compared to existing results for SGD.
For example,for θ ∈ [0 , 1] , [60] proves almost sure convergence for regularized least-mean-squares withoutaveraging at rate O ( n − 1+ θ 2+ θ ) .
The dependence in θ is similar to what we obtain.
Moreover, underassumption (A1) , we recover the same O (1 / √ n ) convergence rate as [10] (see Prop. 4 stated in
App. A.3).
Finally, our bounds have a polynomial dependence in the horizon 1 / (1 − γ ) of the MRP.
Stochastic TD with Markovian sampling
We now consider the truly online TD algorithm, where the samples are produced by a Markovchain.
In particular, there is now a correlation between the current samples ( x n , x (cid:48) n ) and the previousiterate V n − 1 .
To control it, we assume that the Markov chain mixes at uniform geometric rate:
[Equation]
where d TV denotes the total variation distance.
This is always veriﬁed for irreducible, aperiodic ﬁnite
Markov chains [41].
We give an example of continuous-state Markov chain with geometric mixing in
Sec. 6.
Furthermore, following [10], in our analysis we need to control the magnitude of the iteratesalmost surely.
To do so, we add a projection step at each TD iteration:
[Equation]
24) where Π B is the projection on the H ball of radius B > 0 .
If (cid:107) V ∗ λ (cid:107) H ≤ B , the convergence ofthe method is preserved.
In the following theorem, we consider two regimes with different rates ofconvergence.
In the ﬁrst one, we assume like [10] that we are given an oracle B upper-bounding(cid:107) V ∗ λ (cid:107) H , with B independent of λ .
In the second one, we use the bound of Prop. 1, but this will affectthe convergence rate since in this case B
=
O
(1 /λ ) .
Theorem 2.
Assuming (A2) and that the samples are produced by a Markov chain with uniformgeometric mixing (A3) , the projected TD iterations (24) are such that:(i) Using λ = n − 12+ θ , a constant step size ρ = log n 2 λn , and using a projection radius Bindependent of λ provided by an oracle and such that (cid:107) V ∗ λ (cid:107) H ≤ B , then: E (cid:104) (cid:107) [Equation]
(e [Equation] n
[Equation]
∗ [Equation] 2 ( p ) (cid:105)
[Equation]
(cid:17) .
(25) (ii) Using λ = n − 14+ θ , ρ = log n 2 λn , and the projection radius B = √ M H (cid:107) r (cid:107) L 2 ( p )
/λ , then:
[Equation]
(cid:16) (log n
[Equation]
[Equation]
(cid:17)
[Equation]
(26) with V (e) n = (cid:80) nk
=1 (1 − 2 ρλ ) n − k V k − 1 / (cid:80) nj
=1 (1 − 2 ρλ ) n − j .
When an oracle is given for B (i.e., setting (i)), we recover the same rate as i.i.d.
sampling, up toa multiplicative factor log( n ) / log(1 /µ ) which represents the mixing time of the Markov chain.
Ifno oracle is provided (i.e., setting (ii)), the convergence will be slower because the bound B is oforder 1 /λ .
Note that the slight changes in the deﬁnitions of ρ , λ , V ( e ) , and the absence of constrainton λ , as compared to Thm. 1, are implied by the boundedness of the iterates.
Following a similarstudy for SGD [45], we might compare these rates to those of a naive algorithm which we call“ τ -Skip-TD”, for some τ ≥ 1 , where only one every τ samples from the Markov chain is used tomake TD updates:
[Equation]
For τ large enough, of the order of the mixing time of the Markov chain, the new sample ( x nτ , x (cid:48) nτ )is almost independent from the past ones ( x kτ , x (cid:48) kτ ) k<n .
Of course, since we need to generate τtimes more samples to make a step, we must look at the distance of V n/τ to the optimum.
Suchconvergence rates for τ -Skip-TD are derived in App.
A.4, Cor. 2.
In setting (i) , they are similar to
Theorem 2 up to a log( n ) factor.
This suggests that making updates at each sample of the Markovchain is not more efﬁcient than τ -Skip-TD for large τ , at least in our theoretical analysis.
In practice,using all samples seems slightly better, especially for a slowly mixing Markov chain (see App.B.3).
In setting (ii) , we obtain a rate for Skip-TD whose leading term does not depend on log(1 /µ ) – whichonly appears in higher order terms – suggesting that the rate and parameters of Thm. 2, setting (ii)might be suboptimal.
Experiment on artiﬁcial data
Building a value function.
We build a toy model for which the main parameters can be computedin closed form.
We consider the dynamics on the circle X
=
[0 , 1] deﬁned by: with probability ε ,x n +1 ∼ U ([0 , 1]) , and with probability 1 − ε , x n +1 = x n .
Because the Markov kernel is symmetric,the invariant distribution is p =
U ([0 , 1]) .
In particular, the mixing parameter can be boundedexplicitly with m = 1 and µ = 1 − ε (see App. B.1).
Also, simple computations show that V ∗ isan afﬁne transform of r : V ∗ ( x ) =
ar ( x ) + b , with a = (1 − γ (1 − ε )) − 1 and b = − a (cid:82) 1 0 r ( u ) du .
Hence we can build a V ∗ with a given regularity by choosing an appropriate reward with the sameregularity.
We consider two rewards: r abs ( x ) :
= 2 | x − 1 / 2 | and r cos ( x ) :
= (1 + cos(2 πx )) / 2 .
Kernels on the torus.
We consider the RKHS of splines on the circle [62] of regularity s ∈ N ∗ ,denoted by H s per .
It is a Sobolev space equipped with the following norm:
[Equation]
Its corresponding reproducing kernel K s is a translation-invariant kernel deﬁned by:
[Equation]
where { x } := x − (cid:98) x (cid:99) and B j is the j -th Bernoulli polynomial [47].
Let us recall that the Fourierseries expansion on the torus of a 1-periodic function f ∈ L 2 ( p ) is: f ( x ) = (cid:80) ω ∈ Z e 2 iωπx ˆ f ω ,with ˆ f {+ω := (cid:82) 
+}
0 f ( x ) e − 2 iωπx dx , for ω ∈ Z .
The kernel K s has an embedding in the space of
Fourier coefﬁcients Φ( x ) =
( √ c ω e 2 iωπx ) (cid:62) m
∈ Z with c ω := | ω | − 2 s if ω (cid:54) = 0 and c 0 := 1 .
Using
Parseval’s theorem in Eqn.
(28), one can compute the norm of f from its Fourier coefﬁcients(cid:107)
f (cid:107) 2 H s per = (cid:80) ω
∈ Z | ˆ f ω | 2 /c ω .
The operators Σ and Σ 1 can be represented as countably inﬁnitedimensional matrices Σ
= diag ( c ) and Σ 1 = (1 − ε )Σ + ε √ c ( √ c ) (cid:62) .
Hence the source conditionstates that | ˆ f 0 | 2 + (cid:80) ω
{+(cid:54) =
+}
| ω | 2 s (1+ θ ) | ˆ f ω | 2 < ∞ .
In particular, it holds if f ∈ H s (cid:48) per , for any s (cid:48) ≥ s (1+ θ ) .
In our example, we consider two Sobolev spaces H 1 per and H 2 per , and our two example functions have
Fourier coefﬁcients (ˆ r abs ) ω
= 1 − ( − 1) ω
π 2 ωfor ω
(cid:54)
= 0 , and (ˆ r cos ) ω = 0 for | ω | > 1 .
The largest θ ∈ [0 , 1]such that the source condition holds are indicated in the ﬁrst row of Tab. 1.
Results.
We run TD on functions r abs and r cos , with kernels K 1 and K 2 .
We use parameters λ and ρand exponential averaging as prescribed in Thm.
1 (b) .
Each experiment is repeated 10 times andwe record the mean ± one standard deviation.
The implementation is based on a ﬁnite dimensionalrepresentation of the iterates ( V k ) k ≤ n in R n (see further details in App.
B.2).
This implies computingthe kernel matrix in O ( n 2 ) operations.
To accelerate this computation when the eigenvalues decreasefast, we approximate it with the incomplete Cholesky decomposition [3].
In Tab. 1, we set ε = 0 .
8 ,γ = 0 .
5 and report the observed convergence rates v.s.
the ones expected by Thm. 2, which are fairlyconsistent.
In Fig.
1, we show the respective effects of varying ε and γ .
Larger values of ε or γ makethe problem more difﬁcult and slow down convergence, presumably in the constants without affectingthe rates, as predicted by Thm. 2.
Additional experiments are provided in App.
B.3.
[Table]
[Figure]
Conclusion
We have provided convergence rates for the regularized non-parametric TD algorithm in the i.i.d.
and
Markovian sampling settings.
The rates depend on a source condition that quantiﬁes the relativeregularity of the optimal value function to the RKHS.
They are compatible with our empiricalobservations on a one-dimensional MRP, but we have not proved optimality of such rates.
Interestingdirections include the extension to the TD( λ ) algorithm, which we believe can be achieved withsimilar tools, as well as more challenging extensions to control counterparts of TD (Q-learning,
SARSA,...) for which the policy is optimized.