introduction to prioritized experience replay

26
ディープラーニングの最新動向 強化学習とのコラボ編⑤ Prioritized Experience Replay 2016/9/15 株式会社ウェブファーマー 大政 孝充

Upload: -

Post on 15-Apr-2017

2.018 views

Category:

Data & Analytics


1 download

TRANSCRIPT

Page 1: Introduction to Prioritized Experience Replay

ディープラーニングの最新動向 強化学習とのコラボ編⑤

Prioritized Experience Replay

2016/9/15 株式会社ウェブファーマー

大政 孝充

Page 2: Introduction to Prioritized Experience Replay

今回取り上げるのはこれ

[1]T. Schaul, J. Quan, I. Antonoglou, D. Silver. “Prioritized Experience Replay” arXiv:1511.05952v4, 2016. DQNやDDQNのexperience replay内にあるtransitionに優先度をつけることで、学習を高速にし、かつstate-of-the-artな結果(2016年初頭時点)を得た!

Page 3: Introduction to Prioritized Experience Replay

通常のDQNやDDQN部分は・・・

通常のDQN部分の全体像は塚原裕史氏「論文紹介 Playing Atari with Deep Reinforcement Learning」[2] http://www.slideshare.net/htsukahara/paper-intoduction-playing-atari-with-deep-reinforcement-learning や藤田康博氏「Playing Atari with Deep Reinforcement Learning」[3] http://www.slideshare.net/mooopan/ss-30336609 もしくは私の「ディープラーニングの最新動向 強化学習とのコラボ編① DQN」[4] http://www.slideshare.net/ssuser07aa33/introduction-to-deep-q-learning あるいは私の「ディープラーニングの最新動向 強化学習とのコラボ編② DDQN」[5] http://www.slideshare.net/ssuser07aa33/introduction-to-double-deep-qlearning などを参照してください

Page 4: Introduction to Prioritized Experience Replay

解説のポイント

① 普通のexperience replayで何が問題か ② prioritized experience replayとは ③ 実装する際のテクニック ④ 結果どうなった?

Page 5: Introduction to Prioritized Experience Replay

① 普通のexperience replayで何が問題か ② prioritized experience replayとは ③ 実装する際のテクニック ④ 結果どうなった?

解説のポイント

Page 6: Introduction to Prioritized Experience Replay

DQNやDDQNのexperience replay

例えばDQN(nature, 2015)では・・・・

ここに貯めたtraisitionsを

[6]Figure 1

Page 7: Introduction to Prioritized Experience Replay

DQNやDDQNのexperience replay

例えばDQN(nature, 2015)では・・・・

randomに抜き取ってminibachを形成

[6]Figure 1

Page 8: Introduction to Prioritized Experience Replay

DQNやDDQNのexperience replay

[6]Figure 1

例えばDQN(nature, 2015)では・・・・

randomに抜き取ってminibachを形成

重要でないtraisitionが何度も使われる

Page 9: Introduction to Prioritized Experience Replay

DQNやDDQNのexperience replay

[6]Figure 1

例えばDQN(nature, 2015)では・・・・

重要なtransitionを何度も使えば学習が早く進むし、精度も上がるのでは!?

Page 10: Introduction to Prioritized Experience Replay

解説のポイント

① 普通のexperience replayで何が問題か ② prioritized experience replayとは ③ 実装する際のテクニック ④ 結果どうなった?

Page 11: Introduction to Prioritized Experience Replay

prioritized experience replayとは

[6]Figure 1

replay memory内のtransitionに優先順位をつける

重要でない 重要

・・・ s1,a1, r1a '1

s2,a2, r2a '2

sN ,aN , rNa 'N

2番 1番 N番

Page 12: Introduction to Prioritized Experience Replay

prioritized experience replayとは

[6]Figure 1

優先順位の高いtransitionを高確率で取り出す

重要でない 重要

・・・ s1,a1, r1a '1

s2,a2, r2a '2

sN ,aN , rNa 'N

2番 1番 N番 今回は これを使う

Page 13: Introduction to Prioritized Experience Replay

どう優先順位をつけるか

δt = Rt +γmaxa Q St,a( )−Q St−1,At−1( )TD誤差 が大きい

ものをより多く使えば、学習が早く進むだろう。

Page 14: Introduction to Prioritized Experience Replay

そこでこの δ を優先順位を表す数値 p に置き換える 方法1) δ に比例的な数値                方法2) ランキング化した数値

どう優先順位をつけるか

pi = δi +ε

pi =1

rank i( )

Page 15: Introduction to Prioritized Experience Replay

p を確率にする

どう優先順位をつけるか

P i( ) = piα

pkα

k∑

→ この P(i) 確率で各 i 番目のtransitionを選択すればいい

Page 16: Introduction to Prioritized Experience Replay

解説のポイント

① 普通のexperience replayで何が問題か ② prioritized experience replayとは ③ 実装する際のテクニック ④ 結果どうなった?

Page 17: Introduction to Prioritized Experience Replay

① P(i) が高確率な順に並べる

実装する際のテクニック

P(i)

i

Page 18: Introduction to Prioritized Experience Replay

② minibachが k 個のとき、それぞれのトータル確率が同じになるように、k 個のsegmentに分ける

実装する際のテクニック

seg1

P(i)

i seg2 seg3 seg4 ・・・ segk

Page 19: Introduction to Prioritized Experience Replay

③ それぞれのsegmentから1個ずつランダムに選択する

実装する際のテクニック

seg1

P(i)

i seg2 seg3 seg4 ・・・ segk

これとこれとこれとこれとこれ!

Page 20: Introduction to Prioritized Experience Replay

これでだいたい確率に従って k 個選択できてる! (piecewiseなlinear)

実装する際のテクニック

seg1

P(i)

i seg2 seg3 seg4 ・・・ segk

これとこれとこれとこれとこれ!

Page 21: Introduction to Prioritized Experience Replay

解説のポイント

① 普通のexperience replayで何が問題か ② prioritized experience replayとは ③ 実装する際のテクニック ④ 結果どうなった?

Page 22: Introduction to Prioritized Experience Replay

Atari2600での結果

普通のDQN

比例的な p

ランキング化 した p

学習も早い 最終的な得点が高い

[1]Figure 8

Page 23: Introduction to Prioritized Experience Replay

Atari2600での結果

DQNでもDDQNでも得点が上昇

[1]table 1

Page 24: Introduction to Prioritized Experience Replay

結  論

prioritized experience replayを導入することで、DQNでもDDQNでも学習速度が向上し、得点も上昇した。

Page 25: Introduction to Prioritized Experience Replay

Reference

[6]A. Nair, et al “Massively Parallel Methods for Deep Reinforcement Learning” arXiv:1507.04296v2, 2015

Page 26: Introduction to Prioritized Experience Replay

終わり