目次 1. イントロダクション: 強化学習の目標 2. 基礎編: DQNの誕生 a. ピクセルから価値推定まで b. DQNの改良 3. 応用編: DQNのその先へ a. 一遍に覚える: 転移/マルチタスク学習 b. すぐに覚える: Episodic Control c. 好奇心に従う: Curiosity-driven Exploration 4. まとめ: これからの深層強化学習 11
目次 1. イントロダクション: 強化学習の目標 2. 基礎編: DQNの誕生 a. ピクセルから価値推定まで b. DQNの改良 3. 応用編: DQNのその先へ a. 一遍に覚える: 転移/マルチタスク学習 b. すぐに覚える: Episodic Control c. 好奇心に従う: Curiosity-driven Exploration 4. まとめ: これからの深層強化学習 12
用語を覚えよう(5) 収益(return) R t = r t + γr t+1 + γ2r t+2 + γ3r t+3 + …. ● γ=1 (今の報酬と未来の報酬が同じ大事さ) R t = r t + r t+1 + r t+2 + r t+3 + …. ● γ=0.9 (遠い未来は考えない) R t = r t + 0.9r t+1 + 0.81r t+2 + 0.729r t+3 + …. ● γ=0 (今を生きる) R t = r t 27
目次 1. イントロダクション: 強化学習の目標 2. 基礎編: DQNの誕生 a. ピクセルから価値推定まで b. DQNの改良 3. 応用編: DQNのその先へ a. 一遍に覚える: 転移/マルチタスク学習 b. すぐに覚える: Episodic Control c. 好奇心に従う: Curiosity-driven Exploration 4. まとめ: これからの深層強化学習 31
DQN (Deep Q-Network)とは ● Playing Atari with Deep Reinforcement Learning [Mnih+ 2013] ● Human-level control through deep reinforcement learning [Mnih+ 2015] Q関数をDNNで近似した 43 価値 (Q値)
DQNの工夫: Experience Replay 昔経験したことe t =(s t , a t , r t , s t+1 )をメモリーに貯めて ランダムに複数(n=32)選んで学習に使うことで 学習を高速且つ安定させた e t-4 Replay Memory ランダムに選んで学習 49 e t-3 e t-2 e t-1 e t t
目次 1. イントロダクション: 強化学習の目標 2. 基礎編: DQNの誕生 a. ピクセルから価値推定まで b. DQNの改良 3. 応用編: DQNのその先へ a. 一遍に覚える: 転移/マルチタスク学習 b. すぐに覚える: Episodic Control c. 好奇心に従う: Curiosity-driven Exploration 4. まとめ: これからの深層強化学習 59
目次 1. イントロダクション: 強化学習の目標 2. 基礎編: DQNの誕生 a. ピクセルから価値推定まで b. DQNの改良 3. 応用編: DQNのその先へ a. 一遍に覚える: 転移/マルチタスク学習 b. すぐに覚える: Episodic Control c. 好奇心に従う: Curiosity-driven Exploration 4. まとめ: これからの深層強化学習 72
一遍に覚える: 転移/マルチタスク学習 問題: 難しいタスクを1から学習するのは難しい 方法: 他のタスクで得た知識を利用する ● Improving Generalisation for Temporal Difference Learning: The Successor Representation, 1993 ● Successor Features for Transfer in Reinforcement Learning, 2016 ● Actor-Mimic Deep Multitiask and Transfer Reinforcement Learning, 2016 ● PathNet: Evolution Channels Gradient Descent in Super Neural Networks, 2017 ● Playing FPS Games with Deep Reinforcement Learning, 2016 ● Reinforcement Learning with Unsupervised Auxiliary Tasks, 2016 ● Learning To Navigate in Complex Environments, 2017 ● Learning to Act by Predicting the Future, 2017 74
未来の状態を推定する特徴量を使う ● Improving Generalisation for Temporal Difference Learning: The Successor Representation [Dayan+ 1993] 強化学習において、汎用的に使える特徴量を使いたい →未来の状態を推定する表現 x 報酬の重みベクトルの内積で 価値を推定するように学習すると探索タスクで有効 ● Successor Features for Transfer in Reinforcement Learning [Barret+ 2016] 深層強化学習においても未来の状態を推定する表現を用いた →環境は同じだが報酬の発生の仕方が変わるという条件では 報酬の重みベクトルだけ学習し直すことで効率よく学習できる 75
学習済みモデルから転移させる ● Actor-Mimic Deep Multitiask and Transfer Reinforcement Learning [Parisotto+ 2016] 新しいモデルに過去の知識を覚えさせたい →学習済みモデルを真似するように学習させて転移学習 学習済みのQ値の出力をsoftmaxしたものを真似るように学習 学習済みの隠れ層の発火を真似するように学習 76 Actor Mimic Network Expert
ゲーム独自の情報も一緒に学習する ● Playing FPS Games with Deep Reinforcement Learning [Lample+ 2016] ゲームに有利な知識も学習に含めたい →ゲームの情報(アイテム数とか)をDQNのCNNを共有して 教師あり学習を行うことでゲームに有用な特徴量を獲得する ● Learning to Act by Predicting the Future [Dosovitskiy+ 2017] →未来のゲームの情報とゴール(弾薬を集めるなど) も含めて学習を行った VizDoom AI Competitionで圧倒的な1位を獲得 81
目次 1. イントロダクション: 強化学習の目標 2. 基礎編: DQNの誕生 a. ピクセルから価値推定まで b. DQNの改良 3. 応用編: DQNのその先へ a. 一遍に覚える: 転移/マルチタスク学習 b. すぐに覚える: Episodic Control c. 好奇心に従う: Curiosity-driven Exploration 4. まとめ: これからの深層強化学習 88
Episodic Control を強化学習へ エピソード記憶: 自分の経験の記憶 人間は学習序盤でエピソード記憶を使って行動選択をしている これが Episodic Control である Hippocampal Contributions to Control: The Third Way [Lengyel+ 2007] 強化学習において、学習序盤は目標の計算に推測値を使っている (bootstrap)ので学習効率が悪い →Episodic Controlの学習初期における優位性を主張 報酬が得られた行動シーケンスを保存して、そのシーケンスを 再生することで学習序盤の学習性能を改善する可能性を示した 91
メモリーモジュール Differentiable Neural Dictionary (DND) というメモリーが エージェントの各行動がそれぞれ持っている h i をi番目のキーとしてv i をi番目の値とすると NECでは ● h: CNNによってエンコードされた状態の表現 ● v: Q値 h i v i h i+1 h i+2 h i+3 h i+... v i+2 v i+2 v i+3 v i+... 98 a 1
目次 1. イントロダクション: 強化学習の目標 2. 基礎編: DQNの誕生 a. ピクセルから価値推定まで b. DQNの改良 3. 応用編: DQNのその先へ a. 一遍に覚える: 転移/マルチタスク学習 b. すぐに覚える: Episodic Control c. 好奇心に従う: Curiosity-driven Exploration 4. まとめ: これからの深層強化学習 105
好奇心に従う 問題: 報酬がないとどこを探索すればいいのか分からない 方法: 見たことのない場所に行った時に追加報酬を与える ● A Possiblity for Implementing Curiosity and Boredom in Model-Building Neural Controllers, 1991 ● Incentivizing Exploration In Reinforcement Learning With Deep Predictive Models, 2015 ● Action-Conditional Video Prediction using Deep Networks in Atari Games, 2015 ● Unifying Count-based Exploration and Intrinsic Motivation, 2016 ● A Study of Count-Based Exploration for Deep Reinforcement Learning, 2017 ● Curiosity-driven Exloration by Self-supervised Prediction, 2017 109
動画予測で訪れてない状態へ移動 ● Action-Conditional Video Prediction using Deep Networks in Atari Games [Oh+ 2015] この論文の最大の売りは動画予測の手法であるが Atariのゲームをaction-conditionalで100step先まで動画予測できるよ うになった →動画予測を使って直近で訪れていない状態へ移動 114 行動aを取った時の 推定フレーム 直近のフレーム 訪れたかどうか 訪れた回数
本当に面白いのを見分けるICMの構成 方策と別に以下の二つのものを一緒に学習する ● 逆モデル: s t とs t+1 からa t を推定 ● 順モデル: a t と上で得られる特徴量Φ(s t )からΦ(s t+1 )を推定 順モデル 逆モデル 122 CNN CNN s t s t+1 CNN a’ t CNN a t Φ’ t+1 Φ t+1 ri t 内部報酬
目次 1. イントロダクション: 強化学習の目標 2. 基礎編: DQNの誕生 a. ピクセルから価値推定まで b. DQNの改良 3. 応用編: DQNのその先へ a. 一遍に覚える: 転移/マルチタスク学習 b. すぐに覚える: Episodic Control c. 好奇心に従う: Curiosity-driven Exploration 4. まとめ: これからの深層強化学習 138
紹介論文リスト(1) ● Bellemare, Marc G., et al. "The Arcade Learning Environment: An evaluation platform for general agents." J. Artif. Intell. Res.(JAIR)47 (2013): 253-279. ● Mnih, Volodymyr, et al. "Playing atari with deep reinforcement learning." arXiv preprint arXiv:1312.5602 (2013). ● Mnih, Volodymyr, et al. "Human-level control through deep reinforcement learning." Nature 518.7540 (2015): 529-533. ● Lin, Long-Ji. Reinforcement learning for robots using neural networks. No. CMU-CS-93-103. Carnegie-Mellon Univ Pittsburgh PA School of Computer Science, 1993. ● Nair, Arun, et al. "Massively parallel methods for deep reinforcement learning." arXiv preprint arXiv:1507.04296 (2015). ● Mnih, Volodymyr, et al. "Asynchronous methods for deep reinforcement learning." International Conference on Machine Learning. 2016. ● Babaeizadeh, Mohammad, et al. "Reinforcement learning through asynchronous advantage actor-critic on a gpu." (2016). 146
紹介論文リスト(2) ● Thrun, Sebastian, and Anton Schwartz. "Issues in using function approximation for reinforcement learning." Proceedings of the 1993 Connectionist Models Summer School Hillsdale, NJ. Lawrence Erlbaum. 1993. ● Hasselt, Hado V. "Double Q-learning." Advances in Neural Information Processing Systems. 2010. ● Van Hasselt, Hado, Arthur Guez, and David Silver. "Deep Reinforcement Learning with Double Q-Learning." AAAI. 2016. ● Wang, Ziyu, et al. "Dueling network architectures for deep reinforcement learning." arXiv preprint arXiv:1511.06581 (2015). ● Schaul, Tom, et al. "Prioritized experience replay." arXiv preprint arXiv:1511.05952 (2015). ● Li, Yuxi, and Dale Schuurmans. "MapReduce for Parallel Reinforcement Learning." EWRL. 2011. 147
紹介論文リスト(3) ● Barreto, André, et al. "Successor features for transfer in reinforcement learning." arXiv preprint arXiv:1606.05312 (2016). ● Parisotto, Emilio, Jimmy Lei Ba, and Ruslan Salakhutdinov. "Actor-mimic: Deep multitask and transfer reinforcement learning." arXiv preprint arXiv:1511.06342 (2015). ● Rusu, Andrei A., et al. "Progressive neural networks." arXiv preprint arXiv:1606.04671 (2016). ● Dutta, Bhaskar, Anders Wallqvist, and Jaques Reifman. "PathNet: a tool for pathway analysis using topological information." Source code for biology and medicine 7.1 (2012): 10. ● Lample, Guillaume, and Devendra Singh Chaplot. "Playing FPS Games with Deep Reinforcement Learning." AAAI. 2017. ● Dosovitskiy, Alexey, and Vladlen Koltun. "Learning to act by predicting the future." arXiv preprint arXiv:1611.01779 (2016). 148
紹介論文リスト(4) ● Dayan, Peter. "Improving generalization for temporal difference learning: The successor representation." Neural Computation 5.4 (1993): 613-624. ● Jaderberg, Max, et al. "Reinforcement learning with unsupervised auxiliary tasks." arXiv preprint arXiv:1611.05397 (2016). ● Mirowski, Piotr, et al. "Learning to navigate in complex environments." arXiv preprint arXiv:1611.03673 (2016). ● Lengyel, Máté, and Peter Dayan. "Hippocampal contributions to control: the third way." Advances in neural information processing systems. 2008. ● Blundell, Charles, et al. "Model-free episodic control." arXiv preprint arXiv:1606.04460 (2016). ● Pritzel, Alexander, et al. "Neural Episodic Control." arXiv preprint arXiv:1703.01988 (2017). ● urgen Schmidhuber, J. "A possibility for implementing curiosity and boredom in model-building neural controllers." From animals to animats: proceedings of the first international conference on simulation of adaptive behavior (SAB90). 1991. 149
紹介論文リスト(5) ● Stadie, Bradly C., Sergey Levine, and Pieter Abbeel. "Incentivizing exploration in reinforcement learning with deep predictive models." arXiv preprint arXiv:1507.00814 (2015). ● Oh, Junhyuk, et al. "Action-conditional video prediction using deep networks in atari games." Advances in Neural Information Processing Systems. 2015. ● Bellemare, Marc, et al. "Unifying count-based exploration and intrinsic motivation." Advances in Neural Information Processing Systems. 2016. ● Tang, Haoran, et al. "# Exploration: A Study of Count-Based Exploration for Deep Reinforcement Learning." arXiv preprint arXiv:1611.04717 (2016). ● Pathak, Deepak, et al. "Curiosity-driven exploration by self-supervised prediction." arXiv preprint arXiv:1705.05363 (2017). 150
サブゴール 問題: 報酬が手に入りにくいと、なかなか学習が進まない 方法: サブゴールを設定して報酬を密にする ● Classifying Options for Deep Reinforcement Learning, 2016 ● Hierarchical Deep Reinforcement Learning: Integrating Temporal Abstraction and Intrinsic Motivation, 2016 ● Universal Value Function Approximation, 2016 ● Subgoal Discovery for Hierarchical Reinforcement Learning Using Learned Policies, 2003 ● Deep Successor Reinforcement Learning, 2016 ● Beating Atari with Natural Language Guided Reinforcement Learning, 2017 ● Micro-Objective Learning: Accelerating Deep Reinforcement Learning through the Discovery of Continuous Subgoals, 2017 152
モジュール構成 ● Meta-Controller: s → g 状態からサブゴールを選択 環境からの報酬を最大化 ● Contoller: s, g → a 状態とサブゴールから行動を選択 Criticからの報酬を最大化 ● Critic: s, a, s’ → r サブゴールを達成できていれば Controllerに報酬を与える 157
Reward Propagation の改善 問題: TD誤差の伝搬には多くの更新が必要 方法: TD誤差の計算式を改善する ● Increasing the Action Gap: New Oprerators for Reinforcement Learing, 2015 ● Learning to Play in a Day: Faster Deep Reinforcement Learning by Optimality Tightening, 2016 164
学習序盤のTD誤差計算をより正確に ● Learning to Play in a Day: Faster Deep Reinforcement Learning by Optimality Tightening [He+ 2016] TD誤差計算では目標値に予測値を使っている(bootstrap)ので 学習序盤は学習効率が悪い →経験で得られた収益を目標値に直接使用して効率をあげた 収益の上限と下限を定義 jからj+kの有限タイムステップの収益 上の式の変形 上限 下限 166
Learning to Play in a Day: Faster Deep Reinforcement Learning by Optimality Tightening [He+ 2016] 収益の上限と下限を混ぜて以下の損失関数を最小化 上限 下限 DQNよりはるかに学習序盤からスコアが伸びた 167