論文紹介:”Playing hard exploration games by watching YouTube“
1. 論文紹介:
Playing hard exploration games by watching YouTube
Yusuf Aytar, et al. arXiv:1805.11592
(+ Demonstrationからの学習についてのまとめ)
Jun Ernesto Okumura
@pacocat
10. Intrinsic Motivation
● Count-based exploration
○ Model-based Interval Estimation with Exploration Bonuses (Strehl and Littman, 2008)
○ 画像状態のカウントに対応した pseudo-count function を提案
■ Pseudo-count total に対して、状態 が出現する密度は
■ さらに次に状態 を観測する密度を次のように表現したい。
ここから、擬似的なカウント を定義できる。
⇒
Strehl, A. L., & Littman, M. L. (2008). An analysis of model-based interval estimation for Markov decision processes.
Journal of Computer and System Sciences, 74(8), 1309-1331.
Bellman Equation Exploration Bonus
未知状態への到達に対して
報酬を与える
11. Intrinsic Motivation
● Count-based exploration
○ 探索ボーナスを加えることで、 DQNでは到達できなかった部屋にも訪問できるようになった
○ 一方、DQNより成績は改善されているものの、 human-levelには程遠い
■ A3Cにcount bonusを導入したA3C+で比較(Stochastic ALEによるスコア)
Strehl, A. L., & Littman, M. L. (2008). An analysis of model-based interval estimation for Markov decision processes.
Journal of Computer and System Sciences, 74(8), 1309-1331.
Montezuma’s
Revenge
Pitfall! Private Eye
DQN 0.0 -286.1 146.7
A3C+ 142.5 -155.9 100.0
Ave. Human 4743.7 6464.0 69571.0
12. Intrinsic Motivation
● Curiosity-driven exploration
○ sparseな外部報酬に加えて「想定外の状態」に報酬を感じる内部報酬を付与
○ Intrinsic Curiosity Module (ICM):次状態の予測値と実績値の差分から内部報酬を出力
○ “VizDoom” や “Super Mario Bros” で高いパフォーマンスが報告されている
Pathak, D., Agrawal, P., Efros, A. A., & Darrell, T. (2017, May). Curiosity-driven exploration by self-supervised prediction.
In International Conference on Machine Learning (ICML) (Vol. 2017).
エージェントが予測した次状態
実際の次状態
予測と現実のギャップから感じる内部報酬(好奇心)
13. Imitation Learning
● Deep Q-learning from Demonstrations(DQfD)
○ エキスパートによるdemonstration dataに近づくようなlossを定義
○ 以下のlossを使い(なるべくdemo. Dataに近づくように制御しながら事前に)模倣学習
■ 各lossの重みλを変えることで模倣の度合いを調整可能
○ 事前学習で獲得した Qを使って強化学習(加えて replay bufferにdemo. dataを混ぜる)
Hester, T., Vecerik, M., Pietquin, O., Lanctot, M., Schaul, T., Piot, B., ... & Osband, I. (2017). Deep Q-learning from Demonstrations.
arXiv preprint arXiv:1704.03732.
large margin classification loss ( で0、それ以外で0.8)
1-step loss n-step loss
(λ:1.0)
supervised loss
(λ:1.0)
L2 loss
(λ:1.e-5)
14. Imitation Learning
● Deep Q-learning from Demonstrations(DQfD)
○ 既存の提案手法よりも高いパフォーマンスが出せている
○ Replay Buffer Spiking(RBS)
■ 初期状態のreplay bufferにdemo. Dataを入れる手法
○ Human Experience Replay(HER)
■ demo. Dataを常にmini-batchに混ぜ込む手法
○ Accelerated DQN with Expert Trajectories(ADET)
■ DQfDのmargin lossをcross-entropy lossにしたもの
Hester, T., Vecerik, M., Pietquin, O., Lanctot, M., Schaul, T., Piot, B., ... & Osband, I. (2017). Deep Q-learning from Demonstrations.
arXiv preprint arXiv:1704.03732.
Montezuma’s
Revenge
Pitfall! Private Eye
DQN 0.0 -286.1 146.7
A3C+ 142.5 -155.9 100.0
DQfD 4659.0 57.3 42457.2
Ave. Human 4743.7 6464.0 69571.0
17. ゲーム表現の獲得
● 2つの分類器によってゲーム表現を学習する
○ Temporal distance classification (TDC)
■ ゲーム画像間の経過時間の学習
○ Cross-modal temporal distance classification (CMC)
■ ゲーム画面と効果音の対応関係を学習
Aytar, Yusuf, et al. "Playing hard exploration games by watching YouTube." arXiv preprint arXiv:1805.11592 (2018).
18. ゲーム表現の獲得
● Temporal distance classification (TDC)
○ Embedding function
○ Classifier
○ Classification loss
Aytar, Yusuf, et al. "Playing hard exploration games by watching YouTube." arXiv preprint arXiv:1805.11592 (2018).
19. ゲーム表現の獲得
● Cross-modal temporal distance classification (CMC)
○ Embedding function
○ Classifier
○ Classification loss
Aytar, Yusuf, et al. "Playing hard exploration games by watching YouTube." arXiv preprint arXiv:1805.11592 (2018).
20. 獲得された表現の評価
● Cycle-consistency (motivated by CycleGAN)
○ 2つの入力ベクトルを考える
○ それぞれのembedding spaceにおけるユークリッド距離を導入
○ ある が以下を満たす時、 cycle-consistentであるという
○ cycle-consistentな要素の割合によって表現を評価することが可能 state space
embedding space
22. 表現学習結果
● 様々な手法と比較してTDC+CMCが一番cycle-consistencyが高かった
○ : test videoとtraining videoのcycle-consistency
○ : test videoと2 training videoの 3-way cycle-consistency
Aytar, Yusuf, et al. "Playing hard exploration games by watching YouTube." arXiv preprint arXiv:1805.11592 (2018).
26. And More…
● Learning Montezuma’s Revenge from a Single Demonstration
○ OpenAIによって最近提案された Montezuma's Revengeの学習手法
■ https://blog.openai.com/learning-montezumas-revenge-from-a-single-demonstration/
○ Single demo.に対して逆順にカリキュラム学習を進めることで、 Long Time Horizonに対処
■ “Reverse Curriculum Generation for Reinforcement Learning Agents”の姉妹版?
● http://bair.berkeley.edu/blog/2017/12/20/reverse-curriculum/
○ Montezuma’s Revengeで74,500 overというSotAを達成
■ とはいえ、DeepMind(YouTube論文)の41,000との差分はダイヤモンドの獲得数が
大きいので、正直決定的な挙動の違いがあるわけではない点に注意
33. Direct Policy Learning via Interactive Expert
● 都度Expertが介入し続けることで、より汎化した方策を獲得する
1. Expert方策 を導入
2. for m=1
a. 方策 を使って軌跡を集める :
b. 軌跡から状態分布を定義 :
c. Expertのフィードバックを集める :
d. 集めた教師データを元に学習を繰り返す
● 学習の仕方には、主に2系統ある
○ Data Aggregation (e.g. DAgger)
○ Policy Aggregation (e.g. SEARN & SMILe)
Image from: Yisong Yue & Hoang M. Le, “Imitation Learning Tutorial”ICML2018, https://sites.google.com/view/icml2018-imitation-learning/
34. Direct Policy Learning via Interactive Expert
● Data Aggregation (e.g. DAgger)
○ サンプリング対象のデータ分布を結合することで方策を学習
● Policy Aggregation (e.g. SEARN & SMILe)
○ 直近のデータ分布から方策を学習し、過去のものと混ぜ合わせる
Ross, Stéphane, Geoffrey Gordon, and Drew Bagnell. "A reduction of imitation learning and structured prediction to no-regret online learning.",
Proceedings of the fourteenth international conference on artificial intelligence and statistics. 2011.
Daumé III, Hal. "Unsupervised search-based structured prediction." Proceedings of the 26th Annual International Conference on Machine Learning. ACM, 2009.
Ross, Stéphane, and Drew Bagnell. "Efficient reductions for imitation learning." Proceedings of the thirteenth international conference on artificial intelligence and statistics. 2010.
36. Inverse Reinforcement Learning
● 実際には、エキスパート軌跡を満たす報酬関数は複数考えられるため、
一定の制約条件のもとで方策分布を最適化する必要がある
● 様々な解法や関連論文があるので、詳細は例えば中田さんの以下参照
○ Maximum Entropy IRL(最大エントロピー逆強化学習)とその発展系について
■ https://www.slideshare.net/YusukeNakata1/maximum-entropy-irl
○ Generative Adversarial Imitation Learningの紹介(RLアーキテクチャ勉強会)
■ https://www.slideshare.net/YusukeNakata1/generative-adversarial-imitation-learningrl
○ 他論文多数(注釈参照)
Abbeel, Pieter, and Andrew Y. Ng. "Apprenticeship learning via inverse reinforcement learning." Proceedings of the twenty-first international conference on Machine learning. ACM, 2004.
Syed, Umar, and Robert E. Schapire. "A game-theoretic approach to apprenticeship learning." Advances in neural information processing systems. 2008.
Ziebart, Brian D., et al. "Maximum Entropy Inverse Reinforcement Learning." AAAI. Vol. 8. 2008.
Finn, Chelsea, Sergey Levine, and Pieter Abbeel. "Guided cost learning: Deep inverse optimal control via policy optimization." International Conference on Machine Learning. 2016.
Ho, Jonathan, and Stefano Ermon. "Generative adversarial imitation learning." Advances in Neural Information Processing Systems. 2016.
37. Representation Learning
● 方策や報酬ではなく、モデル・状態・行動といった要素の表現を
Expertデータから学習することで、探索を促進するアプローチ
○ “Playing hard exploration games by watching YouTube” (Yusuf, et al. arXiv:1805.11592)
■ 状態をYouTube動画からマルチモーダルに学習、その事前知識を強化学習に転用する
ことで、これまで学習が難しかったゲームタスクを攻略
○ “Imitation Learning with Concurrent Actions in 3D Games”
■ 多くのボタンがあるようなコントローラーを操作する際は行動数が爆発してしまうが、
Expertが使いやすいボタンの組み合わせを事前学習することで探索を促進
■ https://www.ea.com/seed/news/seed-imitation-learning-concurrent-actions
38. Demonstration Data in Reply Memory
● Experience Replayを使う学習において、Replay BufferにExpertの経験を混ぜ込
むことで、学習を促進させるアプローチ
○ “Replay Buffer Spiking”
■ Replay BufferをDemonstration dataで初期化することで、学習の立ち上がりを支援
■ 会話タスクで有効性を確認
○ “Human Checkpoint Replay”
■ 学習バッチに常にDemonstration dataを混ぜることでより人間の経験を強く反映
■ Atariの探索困難なタスクで有効性を確認
○ “Accelerated DQN with Expert Trajectories” / “Deep Q-learning from Demonstrations”
■ Expertによる事前学習後の強化学習時に、 Replay BufferへのExpert軌跡混入を行う
Lipton, Zachary, et al. "BBQ-Networks: Efficient Exploration in Deep Reinforcement Learning for Task-Oriented Dialogue Systems." arXiv preprint arXiv:1711.05715 (2017).
Hosu, Ionel-Alexandru, and Traian Rebedea. "Playing Atari games with deep reinforcement learning and human checkpoint replay." arXiv preprint arXiv:1607.05077 (2016).
Lakshminarayanan, Aravind S., Sherjil Ozair, and Yoshua Bengio. "Reinforcement learning with few expert demonstrations." NIPS Workshop on Deep Learning for Action and Interaction.
Vol. 2016. 2016.