Entropic Regret I: Deterministic MDPs

https://www.lesswrong.com/posts/zTf946PQwN2AN3X3Y/entropic-regret-i-deterministic-mdps

Contents

% operators that are separated from the operand by a space \DeclareMathOperator{\Sgn}{sgn} \DeclareMathOperator{\Supp}{supp} \DeclareMathOperator{\Dom}{dom}

% autosize delimiters \newcommand{\AP}[1]{\left(#1\right)} \newcommand{\AB}[1]{\left[#1\right]} \newcommand{\AC}[1]{\left{#1\right}} \newcommand{\APM}[2]{\left(#1;\middle\vert;#2\right)} \newcommand{\ABM}[2]{\left[#1;\middle\vert;#2\right]} \newcommand{\ACM}[2]{\left{#1;\middle\vert;#2\right}}

% operators that require brackets \newcommand{\Pa}[2]{\underset{#1}{\operatorname{Pr}}\AB{#2}} \newcommand{\CP}[3]{\underset{#1}{\operatorname{Pr}}\ABM{#2}{#3}} \newcommand{\PP}[2]{\underset{\substack{#1 \ #2}}{\operatorname{Pr}}} \newcommand{\PPP}[3]{\underset{\substack{#1 \ #2 \ #3}}{\operatorname{Pr}}} \newcommand{\E}[1]{\underset{#1}{\operatorname{E}}} \newcommand{\Ea}[2]{\underset{#1}{\operatorname{E}}\AB{#2}} \newcommand{\CE}[3]{\underset{#1}{\operatorname{E}}\ABM{#2}{#3}} \newcommand{\EE}[2]{\underset{\substack{#1 \ #2}}{\operatorname{E}}} \newcommand{\EEE}[3]{\underset{\substack{#1 \ #2 \ #3}}{\operatorname{E}}} \newcommand{\Var}{\operatorname{Var}} \newcommand{\I}[1]{\underset{#1}{\operatorname{I}}} \newcommand{\CI}[3]{\underset{#1}{\operatorname{I}}\ABM{#2}{#3}} \newcommand{\Ia}[2]{\underset{#1}{\operatorname{I}}\AB{#2}} \newcommand{\II}[2]{\underset{\substack{#1 \ #2}}{\operatorname{I}}} \newcommand{\III}[3]{\underset{\substack{#1 \ #2 \ #3}}{\operatorname{I}}}

% operators that require parentheses \newcommand{\En}{\operatorname{H}} \newcommand{\Ena}[1]{\operatorname{H}\AP{#1}} \newcommand{\PS}[1]{\mathcal{P}\AP{#1}}

\newcommand{\D}{\mathrm{d}} \newcommand{\KL}[2]{\operatorname{D}{\mathrm{KL}}\AP{#1\middle\vert\middle\vert#2}} \newcommand{\RD}[3]{\operatorname{D}{#1}\AP{#2\middle\vert\middle\vert#3}} \newcommand{\Dtv}{\operatorname{d}{\text{tv}}} \newcommand{\Dtva}[1]{\operatorname{d}{\text{tv}}\AP{#1}}

\newcommand{\Argmin}[1]{\underset{#1}{\operatorname{arg,min}},} \newcommand{\Argmax}[1]{\underset{#1}{\operatorname{arg,max}},}

\newcommand{\Nats}{\mathbb{N}} \newcommand{\Ints}{\mathbb{Z}} \newcommand{\Rats}{\mathbb{Q}} \newcommand{\Reals}{\mathbb{R}} \newcommand{\Coms}{\mathbb{C}}

\newcommand{\Estr}{\boldsymbol{\lambda}}

\newcommand{\Lim}[1]{\lim_{#1 \rightarrow \infty}} \newcommand{\LimInf}[1]{\liminf_{#1 \rightarrow \infty}} \newcommand{\LimSup}[1]{\limsup_{#1 \rightarrow \infty}}

\newcommand{\Abs}[1]{\left\vert #1 \right\vert} \newcommand{\Norm}[1]{\left\Vert #1 \right\Vert} \newcommand{\Floor}[1]{\left\lfloor #1 \right\rfloor} \newcommand{\Ceil}[1]{\left\lceil #1 \right\rceil} \newcommand{\Chev}[1]{\left\langle #1 \right\rangle} \newcommand{\Quote}[1]{\left\ulcorner #1 \right\urcorner}

\newcommand{\K}{\xrightarrow{\text{k}}} \newcommand{\PF}{\xrightarrow{\circ}}

\newcommand{\F}[2]{\AC{#1\rightarrow#2}}

% Paper specific

\newcommand{\A}{\mathcal{A}} \newcommand{\St}{\mathcal{S}} \newcommand{\XS}{\mathcal{X}} \newcommand{\O}{\mathcal{O}} \newcommand{\T}{\mathcal{T}} \newcommand{\R}{\mathcal{R}} \newcommand{\Env}{e}

\DeclareMathOperator{\Sta}{st} \DeclareMathOperator{\Rew}{rw}

\newcommand{\Ut}{\operatorname{U}} \newcommand{\V}{\operatorname{V}} \newcommand{\Hy}{\mathcal{H}} \newcommand{\Rg}{\mathrm{R}}

\newcommand{\G}{\text{glob}} \newcommand{\PD}{\dim_\text{p}} \newcommand{\EA}[2]{\underset{#1}{\operatorname{E}}^*\AB{#2}} is the first in a series of essays that aim to derive a regret bound for DRL that depends on finer attributes of the prior than just the number of hypotheses. Specifically, we consider the entropy of the prior and a certain learning-theoretic dimension parameter. As a "by product", we derive a new regret bound for ordinary RL without resets and without traps. In this chapter, we open the series by demonstrating the latter, under the significant simplifying assumption that the MDPs are deterministic.

Background

The regret bound we previously derived for DRL grows as a power law with the number of hypotheses. In contrast, the RL literature is usually concerned with considering all transition kernels on a fixed state space satisfying some simple assumption (e.g. a bound on the diameter or bias span). In particular, the number of hypotheses is uncountable. While the former seems too restrictive (although it’s relatively simple to generalize it to *countable *hypothesis classes), the latter seems too coarse. Indeed, we expect a universally intelligent agent to detect *patterns *in the data, i.e. follow some kind of simplicity prior rather than a uniform distribution over transition kernels. The underlying technique of our proof was lower bounding the information gain in a single episode of posterior sampling by the expected regret incurred during this episode. Although we have not previously stated it in this form, the resulting regret bound depends on the *entropy *of the prior (we considered a uniform prior instead). This idea (unbeknownst to us) appeared earlier in Russo and Van Roy. Moreover, later Russo and Van Roy used to it formulate a generalization of posterior sampling they call "information-directed sampling" the can produce far better regret bounds in certain scenarios. However, to the best of our knowledge, this technique was not previously used to analyze reinforcement learning (as opposed to bandits). Therefore, it seems natural to derive such an "entropic" regret bound for ordinary RL, before extending it to DRL. Now, Osband and Van Roy derived a regret bound for priors supported on some space of transition kernels as a function of its Kolmogorov dimension and "eluder" dimension (the latter introduced previously by Russo and Van Roy). They also consider a continuous state space. This is a finer approach than considering nearly arbitrary transition kernels on a fixed state space, but it still doesn’t distinguish between different priors with the same support. Our new results involve a parameter similar to eluder dimension, but instead of Kolmogorov dimension we use entropy (in the following chapters we will see that Kolmogorov dimension is, in some sense, an upper bound on entropy). As opposed to Osband and Van Roy, we currently limit ourselves to finite state spaces, but on the other hand we consider no resets (at the price of a "no traps" assumption).
In this chapter we derive the entropic regret bound for *deterministic *MDPs. (In the following we will call them deterministic decision processes (DDPs) since they have little to do with Markov.) This latter restriction significantly simplifies the analysis. In the following chapters, we will extend it to stochastic MDPs, however the resulting regret bound will be somewhat weaker.

Results

We start by introducing a new learning-theoretic concept of dimension. It is similar to eluder dimension, but is adapted to the discrete deterministic setting and also somewhat stronger (i.e. smaller: more environment classes are low dimensional w.r.t. this concept than w.r.t. eluder dimension). Definition 1 Consider sets A, B and F \subseteq \F{A}{B} non-empty. Given C \subseteq A \times B and a^ \in A, we say that a^* is F-dependent of C when for any f,g:A\rightarrow B s.t. for any (a,b)\in C it holds f(a)=g(a)=b, we have f\AP{a^}=g\AP{a^}.* Otherwise, we say that a^ is F-independent of C.* The prediction dimension of F (denoted \PD{F}) is the supremum of the set of n\in\Nats for which there is a sequence \AC{\AP{a_k\in A, b_k\in B}}{k\in[n]} s.t. for every k\in[n], a_k is F-independent of \AC{\AP{a_j,b_j}}{j\in[k]}. Fix non-empty finite sets \St (the set of states) and \A (the set of actions). Denote \XS:=\St\times[0,1], where the second factor is regarded as the space of reward values. Given \Env:\St\times\A\rightarrow\XS, \T^\Env:\St\times\A\rightarrow\St and \R^\Env:\St\times\A\rightarrow[0,1] s.t. \Env(s,a)=\AP{\T^\Env(s,a),\R^\Env(s,a)}, we regard \T^\Env as the (deterministic) transition kernel and \R^\Env as the reward function associated with "DDP hypothesis" e. This allows us to speak of the dimension of a DDP hypothesis class (i.e. some \Hy\subseteq\F{\St\times\A}{\XS}). We now give some examples for dimensions of particular function/​hypothesis classes. Proposition 1 *Given any A, B and F\subseteq \F{A}{B}, we have \PD{F} < \Abs{F}. * Proposition 2 *Given any *A, B *and *F\subseteq \F{A}{B}, *we have \PD{F}\leq\Abs{A}. In particular, given \Hy as above, \dim{\Hy}\leq\Abs{\St}\cdot\Abs{\A}. * Proposition 3 *We now consider deterministic Markov decision processes that are cellular automata. Consider finite sets X (the set of cells), M (the set of neighbor types) and a mapping \nu: X \times M \rightarrow X (which cell is the neighbor of which cell). For example, M might be a subset of a group acting on X. More specifically, *X can be \AP{\Ints/n\Ints}^d acting on itself, corresponding to a d-dimensional toroidal cellular automaton of size n. *Consider another set C (the set of cell states) and suppose that \St=\F{X}{C}. Given any s\in\St, and x\in X, define s_x:X\rightarrow C by s_x(m):=s\AP{\nu(x,m)}. Given any *\T:\F{M}{C}\times\A\rightarrow C, *define *\T^{\text{glob}}:\St\times\A\rightarrow\St by \T^\text{glob}(s,a)(x):=\T\AP{s_x,a}. *Given any \R:\F{M}{C}\rightarrow[0,1], define \R^\text{glob}:\St\rightarrow[0,1] by \R^\text{glob}(s):=\frac{1}{\Abs{X}}\sum_{x\in X}\R\AP{s_x}. Define \Hy by \Hy:=\ACM{(\T^\text{glob},\R^\text{glob})}{\T:\F{M}{C}\times\A\rightarrow C,\ \R:\F{M}{C}\rightarrow[0,1]}That is, \Hy is the set of transition kernels and reward functions that are local in the sense defined by \nu. Then, \PD{\Hy}\leq\Abs{C}^{\Abs{M}}\AP{\Abs{\A}+1}. * In Proposition 3, it might seem like, although the rules of the automaton are local, the influence of the agent is necessarily global, because the dependence on the action appears in all cells. However, this is not really a restriction: the state of the cells can encode a particular location for the agent and the rules might be such that the agent’s influence is local around this location. More unrealistic is the full observability. Dealing with partially observable cellular automata is outside the scope of this essay. The central lemma in the proof of the regret bound for RL is a regret bound in its own right, in the setting of (deterministic) contextual bandits. Since this lemma might be of independent interest, we state it already here. Let \St (contexts), \A (arms) and \O (outcomes) be non-empty sets. Fix a function \R:\O\rightarrow[0,1] (the reward function). For any c\in\St^\omega (a fixed sequence of contexts), \Env:\St\times\A\rightarrow\O (outcome rule) and \pi:\AP{\St\times\O}^\times\St\K\A (policy), we define \Env c\pi\in\Delta\O^\omega to be the resulting distribution over outcome histories. Given \gamma\in[0,1), we define \Ut_\gamma:\O^\omega\rightarrow[0,1] (the utility function) by \Ut_\gamma\AP{o}:=(1-\gamma)\sum_{n=0}^\infty{\gamma^n \R\AP{o_n}}Lemma 1 Consider a countable non-empty set of hypotheses \Hy\subseteq\F{\St\times\A}{\O} and some \zeta\in\Delta\Hy (the prior). For each s\in\St, define \Hy_s\subseteq\F{\A}{\O} by \Hy_s:=\ACM{\Env:\A\rightarrow\O}{\Env(a)=\Env'(s,a),\ \Env'\in\Hy}Let D:=\max_{s\in\St}{\PD{\Hy_s}} and suppose that \A is countable [this assumption is to simplify the proof and is not really necessary]. Then, there exists \pi^\dagger:\AP{\St\times\O}^\times\St\K\A s.t. for any c\in\St^\omega and \gamma\in(0,1) \Ea{\Env\sim\zeta}{(1-\gamma)\sum_{n=0}^\infty{\gamma^n \max_{a\in\A}{\R\AP{\Env\AP{c_n,a}}}}-\Ea{\Env c\pi^\dagger}{\Ut_\gamma}}\leq\sqrt{\frac{16D\En(\zeta)}{\ln{2}}\cdot(1-\gamma)}Note that the expression on the left hand side is the Bayesian regret. On the right hand side, \En(\zeta) stands for the Shannon entropy of \zeta. In particular we have \En(\zeta)\leq\ln{\Abs{\Hy}}\leq\Abs{\St}\cdot\Abs{\A}\ln{\Abs{\O}}Also, it’s not hard to see that \Abs{\Hy}\leq\Abs{\O}^{\PD{\Hy}}\leq\Abs{\O}^{D\Abs{\St}} and therefore D\En(\zeta)\leq\AP{\PD{\Hy}}^2\ln{\Abs{\O}}D\En(\zeta)\leq D^2\Abs{\St}\ln{\Abs{\O}}Finally, the policy \pi^\dagger we actually consider in the proof is Thompson sampling. Now we proceed to studying reinforcement learning. First, we state a regret bound for RL with resets. Now \St stands for the set of states and \A for the set of actions. We fix a sequence of initial states c\in\St^\omega. For any \Env:\St\times\A\rightarrow\XS (environment), \pi:\XS^\times\XS\K\A (policy), and T\in\Nats^+ we define \Env\pi\in\Delta\XS^\omega to be the resulting distribution over histories, assuming that the state is reset to c_n and the reward to 0 every time period of length T+1. In particular, we have \Pa{x\sim\Env c[T]\pi}{\forall n \in \Nats: x_{n(T+1)}=\AP{c_n,0}}=1Given \gamma\in[0,1) we define \Ut_\gamma:\XS^\omega\rightarrow[0,1] \Ut_\gamma\AP{sr}:=(1-\gamma)\sum_{n=0}^\infty{\gamma^n r_n}Theorem 1 Consider a countable non-empty set of hypotheses \Hy\subseteq\F{\St\times\A}{\XS} and some \zeta\in\Delta\Hy. Let D:=\PD{\Hy}. Then, for any T\in\Nats^+ and \gamma\in[0,1), there exists \pi^\dagger_{\gamma}:\XS^\times\XS\K\A s.t. for any c\in\St^\omega \Ea{\Env\sim\zeta}{\max_{\pi:\XS^\times\XS\rightarrow\A}\Ea{\Env c[T]\pi}{\Ut_\gamma}-\Ea{\Env c[T]\pi^\dagger_{T,\gamma}}{\Ut_\gamma}}\leq\sqrt{\frac{16D\En(\zeta)}{\ln{2}}\cdot(T+1)(1-\gamma)}Note that \Env c[T]\pi is actually a probability measure concentrated on a single history, sincee \pi is deterministic: we didn’t make it explicit only to avoid introducing new notation. Finally, we give the regret bound without resets. For any \Env:\St\times\A\rightarrow\XS and \pi:\XS^\times\XS\K\A, we define \Env\pi\in\Delta\XS^\omega to be the resulting distribution over histories, given initial state s_0 and no resets. Theorem 2 *Consider a countable non-empty set of hypotheses \Hy\subseteq\F{\St\times\A}{\XS} and some \zeta\in\Delta\Hy. Let D:=\PD{\Hy}. Assume that for any *\Env\in\Hy and s\in\St, \A_e^0(s)=\A [\A^0 was defined here in "Definition 1"; so was the value function \V(s,x) used below] (i.e. there are no traps). For any \gamma\in[0,1) we define \tau(\gamma) by \tau(\gamma):=\Ea{e\sim\zeta}{\max_{s\in\St}\sup_{x\in(\gamma,1)}\Abs{\frac{\D{\V_e(s,x)}}{\D{x}}}} Then, for any \gamma\in[0,1) s.t.1-\gamma\ll1 there exists \pi^\dagger_{\gamma}:\XS^\times\XS\K\A s.t. \Ea{\Env\sim\zeta}{\max_{\pi:\XS^\times\XS\rightarrow\A}\Ea{\Env\pi}{\Ut_\gamma}-\Ea{\Env\pi^\dagger_\gamma}{\Ut_\gamma}}=O\AP{\sqrt[3]{D\En(\zeta)\cdot\AP{\tau(\gamma)+1}(1-\gamma)}}Note that \tau(\gamma) decreases with \gamma so this factor doesn’t make the qualitative dependence on \gamma any worse. Both Theorem 1 and Theorem 2 have anytime variants in which the policy doesn’t depend on \gamma at the price of a slightly (within a constant factor) worse regret bound, but for the sake of brevity we don’t state them (our ultimate aim is DRL which is not anytime anyway). In Theorem 2 we didn’t specify the constant, so it is actually true verbatim without the \gamma dependence in \pi^\dagger_\gamma (but we still leave the dependence to simplify the proof a little). It is also possible to spell out the assumption on \gamma in Theorem 2.

Proofs

Definition A.1 Consider sets A, B and F \subseteq \F{A}{B} non-empty. A sequence \AC{\AP{a_k\in A, b_k\in B}}{k\in[n]} *is said to be F-independent, when for every k\in[n], a_k is F-independent of \AC{\AP{a_j,b_j}}{j\in[k]}. Definition A.2 Consider sets A, B. Given C \subseteq A \times B and a^ \in A, suppose f,g:A\rightarrow B are s.t.:

Comment

https://www.lesswrong.com/posts/zTf946PQwN2AN3X3Y/entropic-regret-i-deterministic-mdps?commentId=XNkqLW8mFE3xCyfnb

I was fixing bugs in the LaTeX and accidentally pressed "save draft" instead of "post", after which I had to "post" again to make it reappear, and thereby bumped up the date. My apologies for the disturbance in the aether.

Comment

https://www.lesswrong.com/posts/zTf946PQwN2AN3X3Y/entropic-regret-i-deterministic-mdps?commentId=oLRd5o9n8h3bdSyEK

I can quickly fix it. Do you remember what the original date was?

Comment

If I’m not mistaken, it was August 16.