introduction to prioritized experience replay
TRANSCRIPT
![Page 1: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/1.jpg)
ディープラーニングの最新動向 強化学習とのコラボ編⑤
Prioritized Experience Replay
2016/9/15 株式会社ウェブファーマー
大政 孝充
![Page 2: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/2.jpg)
今回取り上げるのはこれ
[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](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/3.jpg)
通常の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](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/4.jpg)
解説のポイント
① 普通のexperience replayで何が問題か ② prioritized experience replayとは ③ 実装する際のテクニック ④ 結果どうなった?
![Page 5: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/5.jpg)
① 普通のexperience replayで何が問題か ② prioritized experience replayとは ③ 実装する際のテクニック ④ 結果どうなった?
解説のポイント
![Page 6: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/6.jpg)
DQNやDDQNのexperience replay
例えばDQN(nature, 2015)では・・・・
ここに貯めたtraisitionsを
[6]Figure 1
![Page 7: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/7.jpg)
DQNやDDQNのexperience replay
例えばDQN(nature, 2015)では・・・・
randomに抜き取ってminibachを形成
[6]Figure 1
![Page 8: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/8.jpg)
DQNやDDQNのexperience replay
[6]Figure 1
例えばDQN(nature, 2015)では・・・・
randomに抜き取ってminibachを形成
重要でないtraisitionが何度も使われる
![Page 9: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/9.jpg)
DQNやDDQNのexperience replay
[6]Figure 1
例えばDQN(nature, 2015)では・・・・
重要なtransitionを何度も使えば学習が早く進むし、精度も上がるのでは!?
![Page 10: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/10.jpg)
解説のポイント
① 普通のexperience replayで何が問題か ② prioritized experience replayとは ③ 実装する際のテクニック ④ 結果どうなった?
![Page 11: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/11.jpg)
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](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/12.jpg)
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](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/13.jpg)
どう優先順位をつけるか
δt = Rt +γmaxa Q St,a( )−Q St−1,At−1( )TD誤差 が大きい
ものをより多く使えば、学習が早く進むだろう。
![Page 14: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/14.jpg)
そこでこの δ を優先順位を表す数値 p に置き換える 方法1) δ に比例的な数値 方法2) ランキング化した数値
どう優先順位をつけるか
pi = δi +ε
pi =1
rank i( )
![Page 15: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/15.jpg)
p を確率にする
どう優先順位をつけるか
P i( ) = piα
pkα
k∑
→ この P(i) 確率で各 i 番目のtransitionを選択すればいい
![Page 16: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/16.jpg)
解説のポイント
① 普通のexperience replayで何が問題か ② prioritized experience replayとは ③ 実装する際のテクニック ④ 結果どうなった?
![Page 17: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/17.jpg)
① P(i) が高確率な順に並べる
実装する際のテクニック
P(i)
i
![Page 18: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/18.jpg)
② minibachが k 個のとき、それぞれのトータル確率が同じになるように、k 個のsegmentに分ける
実装する際のテクニック
seg1
P(i)
i seg2 seg3 seg4 ・・・ segk
![Page 19: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/19.jpg)
③ それぞれのsegmentから1個ずつランダムに選択する
実装する際のテクニック
seg1
P(i)
i seg2 seg3 seg4 ・・・ segk
これとこれとこれとこれとこれ!
![Page 20: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/20.jpg)
これでだいたい確率に従って k 個選択できてる! (piecewiseなlinear)
実装する際のテクニック
seg1
P(i)
i seg2 seg3 seg4 ・・・ segk
これとこれとこれとこれとこれ!
![Page 21: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/21.jpg)
解説のポイント
① 普通のexperience replayで何が問題か ② prioritized experience replayとは ③ 実装する際のテクニック ④ 結果どうなった?
![Page 22: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/22.jpg)
Atari2600での結果
普通のDQN
比例的な p
ランキング化 した p
学習も早い 最終的な得点が高い
[1]Figure 8
![Page 23: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/23.jpg)
Atari2600での結果
DQNでもDDQNでも得点が上昇
[1]table 1
![Page 24: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/24.jpg)
結 論
prioritized experience replayを導入することで、DQNでもDDQNでも学習速度が向上し、得点も上昇した。
![Page 25: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/25.jpg)
Reference
[6]A. Nair, et al “Massively Parallel Methods for Deep Reinforcement Learning” arXiv:1507.04296v2, 2015
![Page 26: Introduction to Prioritized Experience Replay](https://reader031.vdocuments.net/reader031/viewer/2022030316/587790f21a28ab0f778b5211/html5/thumbnails/26.jpg)
終わり