0%

Near-optimal Regret Bounds for Reinforcement Learning

0. Abstract

Undiscounted RL in MDP에서, total regret w.r.t. optimal policy를 고려한다.

MDP의 transition structure를 설명하기 위해서 특정 state까지 도달하는데 걸리는 step을 의미하는 diameter $D$를 도입한다.

임의의 MDP w/ $D$, $\mathcal S$, $\mathcal A$에 대해, total regret $\tilde{O}(D S \sqrt{A T})$을 만족하는 RL algorithm을 제시한다.

읽은 이유는 near optimal DTR의 증명을 이해하기 위해서이다.
아직 다 읽진 못했지만 나머지는 곧 읽을 것이다.

1. Introduction

MDP의 reward의 범위를 $\left [0, 1\right]$로 두겠다.

특정 알고리즘으로 학습된 policy의 performance보단, 학습 동안의 performance에 관심이 있다.

이를 위해, 몇가지 정의를 하자면

  • Accumulated reward of algorithm $\mathfrak A$ after $T$ steps in MDP $M$ with initial state $s$
    • $R(M, \mathfrak{A}, s, T):=\sum_{t=1}^{T} r_{t}$
  • Expected average reward of the process $(M, \mathfrak A, s)$
    • $\boldsymbol{\rho}(M, \mathfrak{A}, s):=\lim _{T \rightarrow \infty} \frac{1}{T} \mathbb{E}[R(M, \mathfrak{A}, s, T)]$

편의를 위해, stationary policy만 고려하겠다.

Optimal policy 학습의 어려움은 $| S|, |A|$ 뿐만 아니라 transition structure에도 의존한다.

Definition 1

​ Consider the stochastic process $(M, \pi , s)$

​ Let $T\left(s^{\prime} \mid M, \pi, s\right)$ be the random variable for the first time step w/ $s \Rightarrow s^\prime$

​ Then, the diameter of $M$ is defined as


어떤 policy를 가져와도 특정 state에 도달하기 어렵다면 diameter는 커지게된다.

당연히 알고리즘의 regret의 bound는 finite diameter를 요구할 것처럼 보인다.

왜냐면 learner의 suboptimal action으로 explore한다면, 좋은 쪽으로 가는데 $D$ step이 걸리기 때문이다.

훨씬 간단한 MAB 문제에서 UCB 알고리즘이 $\sum \frac{\log T}{\text{gap}}$의 바운드를 갖기 때문에 $\Theta(D|S||\mathcal{A}| \log T)$ 일것이라고 기대할 수도 있다.

Mannor, 2004의 gap independent algorithm의 $\Omega(\sqrt{|\mathcal{B}| T})$를 생각해보면 $\Theta(\sqrt{D|S||\mathcal{A}| T})$ 일 것이라고 기대할 수도 있다.

Finite diameter를 갖는 경우에 optimal expected average reward는 initial state $s$에 의존하지 않는다.

학습 알고리즘 $\mathfrak A$의 평가를 위해 total regret을 정의하자.

우리가 제안할 UCRL2는 $\tilde{O}(D|\mathcal{S}| \sqrt{|\mathcal{A}| T})$의 total regret을 갖는다.

3. The UCRL2 Algorithm

UCRL Auer and Ortner, 2007처럼, UCRL2는 optimism in the face of uncertainty를 따른다.

  • 이제까지의 observation들을 갖고서 statistically plausible MDP들의 집합 $\mathcal{M}$을 정의한다.
  • Optimistic MDP $\tilde M \in \mathcal M$ w.r.t. optimal reward를 고른다.
  • (nearly) optimal policy $\tilde{\pi}$ for $\tilde M$을 찾고 실행한다.
  • Step 2+3 : empirically estimates $\hat{r}_{k}(s, a)$ and $\hat{p}_{k}\left(s^{\prime} \mid s, a\right)$
  • Step 4 : 높은 확률로 true MDP $M$이 속해있는 plausible MDPs set $\mathcal M_k$ 정의
  • Step 5 : extended value iteration to find near optimal $\tilde \pi_k$ and optimistic MDP $\tilde M_k \in \mathcal M_k$
  • Step 6 : $\tilde \pi_k$를 실행하고 $(s_t, \tilde \pi_k(s_t))$가 $k$ episode 이전에 등장한 횟수를 넘기면 끝낸다.

3.1 Extended Value Iteration: Finding Optimistic Model and Optimal Policy

UCRL2에서 near optimal policy $\tilde \pi_k$와 optimistic MDP $\tilde M_k \in \mathcal M_k$를 찾을 필요가 있다.

일반적으로 VI는 fixed MDP에서 optimal policy를 찾아주지만, 우리는 plausible MDP 사이에서 가장 높은 average reward를 줄 MDP를 고를 필요가 있다.

3.1.1 Problem Formulation

Given $\hat p, \hat r$, let $\mathcal M$ be the set of all MDPs w/ $\tilde p$ and $\tilde r$ s.t.

UCRL2의 EVI에 사용되는 $d$와 $d^\prime$은 Step 4에서 정의한 confidence interval이다.

Assume

  1. $M$ contains at least one MDP w/ finite diameter
  2. True MDP has finite diameter

목표는 $\tilde \pi, \tilde M = \arg \max _{\pi , M \in \mathcal M} \rho\left(M^{\prime}, \pi, s^{\prime}\right)$를 찾는 것이다.

continuous action space 이야기를 꺼내는 데 왜 꺼내는 지 이해 안되니 일단 생략

3.1.2 Extended Value Iteration

Let $u_i(s)$ denote the state values of $i$-th iteration.

Then, undiscounted value iteration

Inner maximization은 linear optimization problem over the convex polytope $\mathcal{P}(s, a)$로 풀린다.

이 아이디어는

  • state의 value가 낮은 쪽의 확률을 최대 $\frac{d(s,a)}{2}$만큼 끌어와서
  • 가장 높은 쪽으로 transition probability를 할당하는 것이다.

3.1.3 Convergence of Extended Value Iteration

continuous action space 이야기를 꺼내는 데 왜 꺼내는 지 이해 안되니 일단 생략

Convergence를 보장하기 위해 EVI가 periodic transition matrix를 갖는 policy를 고르지 않음을 보이면 된다.

See Appendix B

사실 EVI는 $s_1^\prime$에 몰아주는 방식이기에 aperiodic transition matrix를 갖는 policy만 고른다.

Policy가 aperiodic이기에 state independent average reward를 갖는다.

Theorem 7

​ Let $\mathcal M$ be the set of MDPs.

​ If $\mathcal M$ contains at least one communicating MDP, stopping EVI when

, the greedy policy w.r.t. $\mathbf u_i$ is $\epsilon$-optimal policy.

UCRL2의 step5는 $\epsilon = \frac{1}{\sqrt{t_{k}}}$에 대응한다.


Remark 8

​ 나중에

4. Analysis of UCRL2

Let $\Delta_{k}:=\sum_{s, a} v_{k}(s, a)\left(\rho^{*}-\bar{r}(s, a)\right)$ be the regret in episode $k$

4.1에선 total regret이 episode 단위의 regret으로 나눠질 수 있음을 보인다.

4.2에선 true MDP를 포함하지 못한 episode들의 regret의 sum이 $\sqrt{T}$로 bound됨을 보인다.

4.3에선 true MDP를 포함한 episode의 regret의 bound를 보이겠다.

4.4와 4.5에선 이 결과들을 묶어서 Theorem2와 Corollary3을 증명하겠다.


Theorem 2


Corollary 3

4.1 Splitting into Episodes

Total regret을 episode 단위로 쪼개보자.

모든 (state, action) pair를 conditional로 뒀을 때, reward끼리 상호독립이므로 Hoeffding’s inequality를 적용하면

이를 이용해 UCRL2의 total regret의 bound를 구할 수 있다.

이제 이를 episode 단위로 나누기 위해 몇가지 notation을 도입하자면

  • $m$ denotes the number of episodes up to $T$
  • $\sum_{k=1}^{m} v_{k}(s, a)=N(s, a)$
  • $\Delta_{k}:=\sum_{s, a} v_{k}(s, a)\left(\rho^{*}- \bar{r}(s, a)\right)$
  • $\Delta_{k}$는UCRL2의 $k$번째 episode의 regret이다.

관계식을 이용하면 episode 단위로 나눠서 total regret의 bound를 구할 수 있다.

4.2 Dealing with Failing Confidence Regions

True MDP를 포함하지 않는 episode들의 regret의 sum $\sum_{k=1}^{m} \Delta_{k} \mathbb{1}_{M \notin \mathcal{M}_{k}}$을 고려해보자.

Episode의 종료 조건에 의해 $v_{k}(s, a)=1 \text{ and } N_{k}(s, a)=0 \text{ and } \sum_{s, a} v_{k}(s, a)=1$인 trivial episode를 제외하곤,

Therefore,

Furthermore, $\mathbb{P}\{M \notin \mathcal{M}(t)\} \leq \frac{\delta}{15 t^{6}}$ (see Appendix C.1)

Hence,

즉, true MDP를 포함하지 못한 episode들의 regret의 sum이 $\sqrt{T}$로 (확률적으로) bound됨을 보였다.

4.3 Episodes with $M \in \mathcal M_k$

True MDP를 포함하는 episode를 고려하자.

그 경우 optimistic policy $\tilde \pi_k$ in $\tilde M_k$의 average reward $\tilde{\rho}_{k}$는 true MDP의 optimal average reward $\rho^{*}$보다 크다.

Hence, (Relationship btw $\rho^{\star} \sim \tilde \rho _k$)

4.3.1 Extended Value Iteration Revisited

Let $D$ be the diameter of true MDP. Then,

$u_i(s)$ is

  • the total expected reward of $1\sim i$-step non-stationary policy
  • starting from state $s$ in $i$-step on the MDP $\tilde M^+$ w/ extended action set

$\max _{s \in S}\left\{u_{i+1}(s)-u_{i}(s)\right\}-\min _{s \in S}\left\{u_{i+1}(s)-u_{i}(s)\right\}<\frac{1}{\sqrt{t_{k}}}$이 종료조건 일 때,

참고

  • $\tilde r(s, a)$ : $\tilde M_k$의 reward
  • $\bar r(s,a )$ : $M$의 expected reward

Therefore,

4.3.2 The True Transition Matrix

위의 부등식에서 첫텀의 transition matrix $\tilde{\boldsymbol P_k}$ in $\tilde M_k$ w/ $\tilde \pi_k$를 true transition matrix $\boldsymbol P_k$ in $M$ w/ $\tilde \pi _k$로 바꾸고 싶다.

앞에 있는 벡터는 행벡터이고 뒤에 있는 벡터는 열벡터인데 잘 구분하기 바란다.

4.3.2.1 Bound of $\boldsymbol{v}_{k}\left(\tilde{\boldsymbol{P}}_{k}-\boldsymbol{P}_{k}\right) \boldsymbol{w}_{k}$

4.3.2.2 Bound of $\boldsymbol{v}_{k}\left(\boldsymbol{P}_{k}-\boldsymbol{I}\right) \boldsymbol{w}_{k}$

Let $s_1, a_1, s_2, \cdots, a_T, s_{T+1}$ be the sequence of states and actions.

Let $k(t)$ be the episodes which contains step $t$

Then,



Since $X_{t}$ is a sequence of martingale differences satisfying

  • $\left|X_{t}\right| \leq\left(\left|p\left(\cdot \mid s_{t}, a_{t}\right)\right|_{1}+\left|e_{S_{t+1}}\right|_{1}\right) \frac{D}{2} \leq D$
  • and
  • $\mathbb{E}\left[X_{t} \mid s_{1}, a_{1}, \ldots, s_{t}, a_{t}\right]=0$,

마팅게일 부분은 확률론 책 보고 다시 오겠음


$m \leq S A \log _{2}\left(\frac{8 T}{S A}\right)$는 Appendix C.2에 증명되어있다.

4.3.3 Summing over Episodes with $M \in \mathcal{M}_{k}$


추가로 $\sum_{k=1}^{m} \sum_{s, a} \frac{v_{k}(s, a)}{\sqrt{\max \left\{1, N_{k}(s, a)\right\}}}$을 $T$로 bound를 해보자.

Let $Z_{k}=\max \left\{1, \sum_{i=1}^{k} z_{i}\right\}$ and $0 \leq z_{k} \leq Z_{k-1}$

Then, $\sum_{k=1}^{n} \frac{z_{k}}{\sqrt{Z_{k-1}}} \leq(\sqrt{2}+1) \sqrt{Z_{n}}$ by Appendix C.3


4.4 Completing the Proof of Theorem 2

추가로 간단함을 위해 몇가지 부등식을 사용하면 (Appendix C.4)

4.5 Proof of Corollary 3

$\Delta\left(s_{1}, T\right) / T\leq 34 D S \sqrt{A T \log \left(\frac{T}{\delta}\right)} /T < \epsilon$ implies $T>\frac{34^{2} D^{2} S^{2} A \log \left(\frac{T}{\delta}\right)}{\varepsilon^{2}}$