SlideShare a Scribd company logo
1 of 52
Download to read offline
最近 DQN
藤田康博
Preferred Networks
2015/07/23
Outline
DQN
DQN 分析
DQN 改善
DQN 応用
Outline
DQN
DQN 分析
DQN 改善
DQN 応用
話 人
▶ 藤田康博
▶ Twitter: @mooopan
▶ GitHub: muupan
▶ 2015 年 4 月 Preferred Networks 入社
話
DQN(Deep Q-Networks) [Mnih et al. 2013; Mnih et al.
2015]
▶ 説明
▶ 分析・改善・応用 紹介(本題)
▶ 2015 年 7 月 23 日時点 DQN 関連情報
機能 目指
話
DQN 毛色 異 深層強化学習(主 Policy Search 系)
▶ Deterministic Policy Gradient [Silver et al. 2014]
▶ Guided Policy Search [Levine and Koltun 2013]
▶ Trust Region Policy Optimization [Schulman et al. 2015b]
▶ Generalized Advantage Estimation [Schulman et al.
2015a]
▶ 話 ,説明 時間
▶ 別 機会 …
Outline
DQN
DQN 分析
DQN 改善
DQN 応用
強化学習問題
▶ 各 t = 0, 1, . . .
1. 現在 状態 st ∈ S 観測
2. st 応 行動 at ∈ A 選択
3. 報酬 rt ∈ R( 次状態 st+1 ∈ S) 観測
▶ 目標:累積報酬
∑
t rt 最大化
▶ 行動 選 教師 存在
▶ 試行錯誤 通 学習 必要
強化学習 概念(1)
▶ 方策(policy)
▶ 「 行動 選 」
▶ π : S → A
▶ 行動価値関数(action value function)
▶ 状態 s 行動 a 選 , 後方策 π 従 場合 ,
期待累積報酬
▶ Qπ(s, a) = E[rt + γrt+1 + γ2rt+2 + · · · | st = s, at = a, π]
▶ γ 割引率
強化学習 概念(2)
▶ 最適方策
▶ 期待累積報酬 最大化 方策 π∗
▶ 最適行動価値関数
▶ Q∗(s, a) = Qπ∗
(s, a) = maxπ Qπ(s, a)
▶ 求 ,π(s) = arg maxa Q∗(s, a) 最適
方策 求
▶ Bellman 最適方程式
▶ Q∗(s, a) = Es′ [r + γ maxa′ Q∗(s′, a′) | s, a]
▶ 行動価値関数 最適 必要十分条件
▶ 解 Q∗ 求
Q-learning [Watkins and Dayan 1992]
▶ DQN 元
▶ 一定 条件下 Q∗
収束
Input: γ, α
1: Initialize Q(s, a) arbitrarily
2: loop
3: Initialize s
4: while s is not terminal do
5: Choose a from s using policy derived from Q
6: Execute a, observe reward r and next state s′
7: Q(s, a) ← Q(s, a) + α[r + γ maxa′ Q(s′
, a′
) − Q(s, a)]
8: s ← s′
9: end while
10: end loop
Deep Q-learning
▶ 価値関数 DNN 近似
Q(s, a; θ) ≈ Q(s, a)
▶ 損失 定義
L(θ) = E[(r + γ max
a′
Q(s′
, a′
; θ) − Q(s, a; θ))2
]
∂L(θ)
∂θ
= E[(r + γ max
a′
Q(s′
, a′
; θ)−Q(s, a; θ))
∂Q(s, a; θ)
∂θ
]
▶ Stochastic Gradient Descent 最小化可能
何 新
▶ 価値関数 NN 近似?
▶ 昔 (有名 例:TD-Gammon [Tesauro 1994])
▶ 価値関数 DNN 近似?
▶ 何 deep 呼 ,Deep Belief Networks
使 [Abtahi and Fasel 2011]
▶ LSTM 使 古 [Bakker 2001]
▶ 学習 成功 工夫
▶ 重要
▶ 初 DQN 呼 [Silver 2015]
学習 不安定化要因 除去
▶ 入力 時系列 ,i.i.d.
▶ → Experience Replay
▶ 価値関数 小 更新 方策 大 変
,振動
▶ → Target Q-Network
▶ 報酬 異
▶ → 報酬 clipping
Experience Replay
▶ 経験 遷移 (st, at, rt, st+1) replay
memory D 蓄
▶ 損失 計算 Q 更新 D
上 行
L(θ) = Es,a,r,s′∼D[(r + γ max
a′
Q(s′
, a′
; θ) − Q(s, a; θ))2
]
Target Q-Network
▶ 学習 目標値 計算 使 価値関数 固定(target
Q-network)
L(θ) = Es,a,r,s′∼D[(r + γ max
a′
Q(s′
, a′
; θ−
) − Q(s, a; θ))2
]
▶ 一定周期 学習中 Q-network 同期
θ−
← θ
報酬 clipping
▶ 報酬 [−1, 1] 範囲 clip
▶ 負 −1,正 1,0 0
▶ 報酬 大小 区別
Arcade Learning Environment(ALE) [Bellemare
et al. 2013]
図 [Mnih et al. 2013] 引用
▶ 家庭用 機 Atari 2600 +学習用
▶ 50 以上 対応
▶ 変動 読 取
DQN in ALE
図 [Mnih et al. 2015] 引用
▶ 図 畳 込 層 2 , [Mnih et al. 2015] 本文 読
3 !
▶ 入力 過去 4 画像,出力 18 行動価値
DQN vs. 人間
図 [Mnih et al. 2015] 引用
工夫 効果
表 [Silver 2015] 引用
Outline
DQN
DQN 分析
DQN 改善
DQN 応用
DQN 超
▶ [Mnih et al. 2013] 学習率等 詳細 書
▶ 早 Theano DQN 再現 1
試
Nathan Sprague 氏 調
▶ (一方自分 AdaDelta 茶 濁 )
1
https://github.com/spragunr/deep_q_rl
DQN 超 分析 [Sprague 2015]
図 [Sprague 2015] 引用
DQN( [Mnih et al. 2013] 再現) 性能 超 設定 敏感
▶ α:学習率,γ:割引率,ρ:RMSprop 移動平均 減衰率
▶ target Q-network 未使用
Outline
DQN
DQN 分析
DQN 改善
報酬
並列化
先読
Exploration 改善
DQN 応用
Outline
DQN
DQN 分析
DQN 改善
報酬
並列化
先読
Exploration 改善
DQN 応用
Normalized DQN [Silver 2015]
報酬 clipping 代 ,報酬 学習
▶ 報酬 値 使
▶ Q(s, a; θ) 代
U(s, a; θ) ∈ [−1, +1]
出力
▶ 学習可能 π, σ Q 値 変換
Q(s, a; θ, σ, π) = σU(s, a; θ) + π
Outline
DQN
DQN 分析
DQN 改善
報酬
並列化
先読
Exploration 改善
DQN 応用
Gorila(GOogle ReInforcement Learning Architecture)
[Nair et al. 2015]
図 [Nair et al. 2015] 引用
DQN 並列 実行 高速化
▶ Actor:行動 選 経験 (s, a, r, s′
) 積
▶ Memory:Actor 集 経験 蓄
▶ Learner:Memory 経験 更新量 計算
▶ Bundle:(Actor, Memory, Learner) 組
Gorila 安定化
消滅, 遅延 処理 遅延
安定 学習 工夫
▶ 古 θ 使 計算 更新量
Parameter Server 無視
▶ Learner 誤差 絶対値 移動平均・標準偏差 保持
, 大 外 捨
Gorila DQN vs. Single DQN
図 [Nair et al. 2015] 引用
▶ Single DQN:12-14 日間 訓練
▶ Gorila DQN:6 日間 訓練,100 bundles
▶ 49 中 41 Gorila DQN 勝利
Outline
DQN
DQN 分析
DQN 改善
報酬
並列化
先読
Exploration 改善
DQN 応用
ALE 先読
・将棋・囲碁 先読 (
木探索) 使 ,ALE ?
▶ 実 DQN 強 ! [Bellemare et al. 2013; Guo et al.
2014]
▶ 機能 状態 巻 戻 必要
▶ TAS
▶ 遅 (行動 選 数秒)
B. Rider Breakout Enduro Pong Q*bert Seaquest S. Invaders
DQN [Mnih et al. 2013] 4092 168 470 20 1952 1705 581
UCT [Guo et al. 2014] 7233 406 788 21 18850 3257 2354
UCC-I [Guo et al. 2014]
先読 選 行動 真似 訓練
▶ UCC-I(UCTtoClassification-Interleaved)
▶ 先読 教師 生成 , 学習
交互 繰 返
▶ 先読 始 位置 学習中
軌跡 選
▶ 教師 状態分布
際 状態分布 離
意図
▶ DQN [Mnih et al. 2013] 同 形状(=
同 速度) , 高 達成
B. Rider Breakout Enduro Pong Q*bert Seaquest S. Invaders
DQN [Mnih et al. 2013] 4092 168 470 20 1952 1705 581
UCT [Guo et al. 2014] 7233 406 788 21 18850 3257 2354
UCC-I [Guo et al. 2014] 5388 215 601 19 13189 2701 670
Outline
DQN
DQN 分析
DQN 改善
報酬
並列化
先読
Exploration 改善
DQN 応用
Exploration vs. Exploitation
▶ 強化学習 下 2 必要
▶ Exploration: 知識 状態・行動 試
▶ Exploitation: 良 状態・
行動 試
▶ DQN ?
▶ ϵ-greedy:確率 ϵ 行動,確率 1 − ϵ
Q(s, a) 最大 行動 選
▶ 最初 1000000 ϵ 1 0.1 ,
以降 0.1 固定
Exploration Bonus [Stadie et al. 2015]
選 状態・行動対 報酬 R(s, a)
N(s, a) 加 学習
▶ 次 状態 予測 M 学習 ,予測誤差 大
大 与
e(s, a) = ∥σ(s′
) − M(σ(s), a)∥2
2
¯e(s, a) = et(s, a)/maxe
N(s, a) =
¯e(s, a)
t ∗ C
▶ σ : S → RN 状態 特徴表現,maxe e
値 最大値,t 数,C 定数
▶ σ,M 学習
Exploration Bonus vs. Plain DQN
表 [Stadie et al. 2015] 引用
▶ Static AE(Auto Encoder):DQN 学習前 学習 AE σ
使
▶ Dynamic AE:AE DQN 学習 合 更新
Outline
DQN
DQN 分析
DQN 改善
DQN 応用
Outline
DQN
DQN 分析
DQN 改善
DQN 応用
図 [Narasimhan et al. 2015] 引用
▶ 状態:画像 文章
▶ 行動:動詞 目的語
LSTM-DQN [Narasimhan et al. 2015]
図 [Narasimhan et al. 2015] 引用
▶ LSTM(Long Short-Term Memory) 文章 状態表現 落
▶ 単語 word embedding 前 順 入力 ,最後 出
力 平均
▶ word embedding 一緒 学習
▶ Q(s, a)(動詞) Q(s, o)(目的語) 2 出力 学習
LSTM-DQN vs. BOW-DQN
図 [Narasimhan et al. 2015] 引用
▶ Fantasy World Evennia2
▶ 語彙数:1340
▶ 組 合 数:222
▶ 1 epoch = 20 episodes × 250 steps
▶ BOG(Bag-of-Words) 良 性能
2
http://www.evennia.com/
LSTM-DQN Word Embeddings
図 [Narasimhan et al. 2015] 引用
Outline
DQN
DQN 分析
DQN 改善
DQN 応用
制御
見 人 今
「分散深層強化学習 制御 — Preferred Research」3
!!!
3
http://research.preferred.jp/2015/06/
distributed-deep-reinforcement-learning/
制御
見 人 今
「分散深層強化学習 制御 — Preferred Research」3
!!!
3
http://research.preferred.jp/2015/06/
distributed-deep-reinforcement-learning/
Outline
DQN
DQN 分析
DQN 改善
DQN 応用
▶ DQN
▶ 以外 応用 少
▶ 改善
▶ 今後 目 離 !
参考文献 I
[1] Farnaz Abtahi and Ian Fasel. “Deep belief nets as function approximators for
reinforcement learning”. In: AAAI 2011 Lifelong Learning Workshop (2011),
pp. 183–219.
[2] Bram Bakker. “Reinforcement Learning with Long Short-Term Memory”. In:
NIPS 2001. 2001.
[3] Marc C. Bellemare et al. “The arcade learning environment: An evaluation
platform for general agents”. In: Journal of Artificial Intelligence Research 47
(2013), pp. 253–279.
[4] Xiaoxiao Guo et al. “Deep learning for real-time Atari game play using offline
Monte-Carlo tree search planning”. In: Advances in Neural Information
Processing Systems (NIPS) 2600 (2014), pp. 1–9.
[5] Sergey Levine and Vladlen Koltun. “Guided Policy Search”. In: ICML 2013.
Vol. 28. 2013, pp. 1–9.
[6] Volodymyr Mnih et al. “Human-level control through deep reinforcement
learning”. In: Nature 518.7540 (2015), pp. 529–533.
[7] Volodymyr Mnih et al. “Playing Atari with Deep Reinforcement Learning”.
In: NIPS 2014 Deep Learning Workshop. 2013, pp. 1–9. arXiv:
arXiv:1312.5602v1.
参考文献 II
[8] Arun Nair et al. “Massively Parallel Methods for Deep Reinforcement
Learning”. In: ICML Deep Learning Workshop 2015. 2015.
[9] Karthik Narasimhan, Tejas Kulkarni, and Regina Barzilay. Language
Understanding for Text-based Games Using Deep Reinforcement Learning.
2015. arXiv: arXiv:1506.08941v1.
[10] John Schulman et al. High-Dimensional Continuous Control Using
Generalized Advantage Estimation. 2015. arXiv: arXiv:1506.02438v1.
[11] John Schulman et al. “Trust Region Policy Optimization”. In: ICML 2015.
2015. arXiv: arXiv:1502.05477v1.
[12] David Silver. Deep Reinforcement Learning. ICLR 2015 Keynote.
http://www.iclr.cc/lib/exe/fetch.php?media=iclr2015:silver-
iclr2015.pdf. 2015.
[13] David Silver et al. “Deterministic Policy Gradient Algorithms”. In: ICML
2014. 2014, pp. 387–395.
[14] Nathan Sprague. “Parameter Selection for the Deep Q-Learning Algorithm”.
In: RLDM 2015. 2015.
[15] Bradly C. Stadie, Sergey Levine, and Pieter Abbeel. Incentivizing Exploration
In Reinforcement Learning With Deep Predictive Models. 2015. arXiv:
1507.00814v2.
参考文献 III
[16] Gerald Tesauro. “TD-Gammon, A Self-Teaching Backgammon Program,
Achieves Master-Level Play”. In: Neural Computation 6(2) (1994),
pp. 215–219.
[17] Christopher JCH Watkins and Peter Dayan. “Q-learning”. In: Machine
learning 8.3-4 (1992), pp. 279–292.

More Related Content

What's hot

Control as Inference (強化学習とベイズ統計)
Control as Inference (強化学習とベイズ統計)Control as Inference (強化学習とベイズ統計)
Control as Inference (強化学習とベイズ統計)Shohei Taniguchi
 
ゼロから始める深層強化学習(NLP2018講演資料)/ Introduction of Deep Reinforcement Learning
ゼロから始める深層強化学習(NLP2018講演資料)/ Introduction of Deep Reinforcement Learningゼロから始める深層強化学習(NLP2018講演資料)/ Introduction of Deep Reinforcement Learning
ゼロから始める深層強化学習(NLP2018講演資料)/ Introduction of Deep Reinforcement LearningPreferred Networks
 
深層強化学習の分散化・RNN利用の動向〜R2D2の紹介をもとに〜
深層強化学習の分散化・RNN利用の動向〜R2D2の紹介をもとに〜深層強化学習の分散化・RNN利用の動向〜R2D2の紹介をもとに〜
深層強化学習の分散化・RNN利用の動向〜R2D2の紹介をもとに〜Jun Okumura
 
Introduction to A3C model
Introduction to A3C modelIntroduction to A3C model
Introduction to A3C modelWEBFARMER. ltd.
 
[DL輪読会]Control as Inferenceと発展
[DL輪読会]Control as Inferenceと発展[DL輪読会]Control as Inferenceと発展
[DL輪読会]Control as Inferenceと発展Deep Learning JP
 
[DL輪読会]深層強化学習はなぜ難しいのか?Why Deep RL fails? A brief survey of recent works.
[DL輪読会]深層強化学習はなぜ難しいのか?Why Deep RL fails? A brief survey of recent works.[DL輪読会]深層強化学習はなぜ難しいのか?Why Deep RL fails? A brief survey of recent works.
[DL輪読会]深層強化学習はなぜ難しいのか?Why Deep RL fails? A brief survey of recent works.Deep Learning JP
 
Graph convolution (スペクトルアプローチ)
Graph convolution (スペクトルアプローチ)Graph convolution (スペクトルアプローチ)
Graph convolution (スペクトルアプローチ)yukihiro domae
 
強化学習エージェントの内発的動機付けによる探索とその応用(第4回 統計・機械学習若手シンポジウム 招待公演)
強化学習エージェントの内発的動機付けによる探索とその応用(第4回 統計・機械学習若手シンポジウム 招待公演)強化学習エージェントの内発的動機付けによる探索とその応用(第4回 統計・機械学習若手シンポジウム 招待公演)
強化学習エージェントの内発的動機付けによる探索とその応用(第4回 統計・機械学習若手シンポジウム 招待公演)Shota Imai
 
Trust Region Policy Optimization
Trust Region Policy OptimizationTrust Region Policy Optimization
Trust Region Policy Optimizationmooopan
 
[DL輪読会]Graph R-CNN for Scene Graph Generation
[DL輪読会]Graph R-CNN for Scene Graph Generation[DL輪読会]Graph R-CNN for Scene Graph Generation
[DL輪読会]Graph R-CNN for Scene Graph GenerationDeep Learning JP
 
多様な強化学習の概念と課題認識
多様な強化学習の概念と課題認識多様な強化学習の概念と課題認識
多様な強化学習の概念と課題認識佑 甲野
 
強化学習アルゴリズムPPOの解説と実験
強化学習アルゴリズムPPOの解説と実験強化学習アルゴリズムPPOの解説と実験
強化学習アルゴリズムPPOの解説と実験克海 納谷
 
強化学習における好奇心
強化学習における好奇心強化学習における好奇心
強化学習における好奇心Shota Imai
 
機械学習モデルの判断根拠の説明
機械学習モデルの判断根拠の説明機械学習モデルの判断根拠の説明
機械学習モデルの判断根拠の説明Satoshi Hara
 
深層強化学習入門 2020年度Deep Learning基礎講座「強化学習」
深層強化学習入門 2020年度Deep Learning基礎講座「強化学習」深層強化学習入門 2020年度Deep Learning基礎講座「強化学習」
深層強化学習入門 2020年度Deep Learning基礎講座「強化学習」Tatsuya Matsushima
 
DeepLearning 14章 自己符号化器
DeepLearning 14章 自己符号化器DeepLearning 14章 自己符号化器
DeepLearning 14章 自己符号化器hirono kawashima
 
PCAの最終形態GPLVMの解説
PCAの最終形態GPLVMの解説PCAの最終形態GPLVMの解説
PCAの最終形態GPLVMの解説弘毅 露崎
 
TensorFlowで逆強化学習
TensorFlowで逆強化学習TensorFlowで逆強化学習
TensorFlowで逆強化学習Mitsuhisa Ohta
 
深層生成モデルと世界モデル(2020/11/20版)
深層生成モデルと世界モデル(2020/11/20版)深層生成モデルと世界モデル(2020/11/20版)
深層生成モデルと世界モデル(2020/11/20版)Masahiro Suzuki
 
Deep Recurrent Q-Learning(DRQN) for Partially Observable MDPs
Deep Recurrent Q-Learning(DRQN) for Partially Observable MDPsDeep Recurrent Q-Learning(DRQN) for Partially Observable MDPs
Deep Recurrent Q-Learning(DRQN) for Partially Observable MDPsHakky St
 

What's hot (20)

Control as Inference (強化学習とベイズ統計)
Control as Inference (強化学習とベイズ統計)Control as Inference (強化学習とベイズ統計)
Control as Inference (強化学習とベイズ統計)
 
ゼロから始める深層強化学習(NLP2018講演資料)/ Introduction of Deep Reinforcement Learning
ゼロから始める深層強化学習(NLP2018講演資料)/ Introduction of Deep Reinforcement Learningゼロから始める深層強化学習(NLP2018講演資料)/ Introduction of Deep Reinforcement Learning
ゼロから始める深層強化学習(NLP2018講演資料)/ Introduction of Deep Reinforcement Learning
 
深層強化学習の分散化・RNN利用の動向〜R2D2の紹介をもとに〜
深層強化学習の分散化・RNN利用の動向〜R2D2の紹介をもとに〜深層強化学習の分散化・RNN利用の動向〜R2D2の紹介をもとに〜
深層強化学習の分散化・RNN利用の動向〜R2D2の紹介をもとに〜
 
Introduction to A3C model
Introduction to A3C modelIntroduction to A3C model
Introduction to A3C model
 
[DL輪読会]Control as Inferenceと発展
[DL輪読会]Control as Inferenceと発展[DL輪読会]Control as Inferenceと発展
[DL輪読会]Control as Inferenceと発展
 
[DL輪読会]深層強化学習はなぜ難しいのか?Why Deep RL fails? A brief survey of recent works.
[DL輪読会]深層強化学習はなぜ難しいのか?Why Deep RL fails? A brief survey of recent works.[DL輪読会]深層強化学習はなぜ難しいのか?Why Deep RL fails? A brief survey of recent works.
[DL輪読会]深層強化学習はなぜ難しいのか?Why Deep RL fails? A brief survey of recent works.
 
Graph convolution (スペクトルアプローチ)
Graph convolution (スペクトルアプローチ)Graph convolution (スペクトルアプローチ)
Graph convolution (スペクトルアプローチ)
 
強化学習エージェントの内発的動機付けによる探索とその応用(第4回 統計・機械学習若手シンポジウム 招待公演)
強化学習エージェントの内発的動機付けによる探索とその応用(第4回 統計・機械学習若手シンポジウム 招待公演)強化学習エージェントの内発的動機付けによる探索とその応用(第4回 統計・機械学習若手シンポジウム 招待公演)
強化学習エージェントの内発的動機付けによる探索とその応用(第4回 統計・機械学習若手シンポジウム 招待公演)
 
Trust Region Policy Optimization
Trust Region Policy OptimizationTrust Region Policy Optimization
Trust Region Policy Optimization
 
[DL輪読会]Graph R-CNN for Scene Graph Generation
[DL輪読会]Graph R-CNN for Scene Graph Generation[DL輪読会]Graph R-CNN for Scene Graph Generation
[DL輪読会]Graph R-CNN for Scene Graph Generation
 
多様な強化学習の概念と課題認識
多様な強化学習の概念と課題認識多様な強化学習の概念と課題認識
多様な強化学習の概念と課題認識
 
強化学習アルゴリズムPPOの解説と実験
強化学習アルゴリズムPPOの解説と実験強化学習アルゴリズムPPOの解説と実験
強化学習アルゴリズムPPOの解説と実験
 
強化学習における好奇心
強化学習における好奇心強化学習における好奇心
強化学習における好奇心
 
機械学習モデルの判断根拠の説明
機械学習モデルの判断根拠の説明機械学習モデルの判断根拠の説明
機械学習モデルの判断根拠の説明
 
深層強化学習入門 2020年度Deep Learning基礎講座「強化学習」
深層強化学習入門 2020年度Deep Learning基礎講座「強化学習」深層強化学習入門 2020年度Deep Learning基礎講座「強化学習」
深層強化学習入門 2020年度Deep Learning基礎講座「強化学習」
 
DeepLearning 14章 自己符号化器
DeepLearning 14章 自己符号化器DeepLearning 14章 自己符号化器
DeepLearning 14章 自己符号化器
 
PCAの最終形態GPLVMの解説
PCAの最終形態GPLVMの解説PCAの最終形態GPLVMの解説
PCAの最終形態GPLVMの解説
 
TensorFlowで逆強化学習
TensorFlowで逆強化学習TensorFlowで逆強化学習
TensorFlowで逆強化学習
 
深層生成モデルと世界モデル(2020/11/20版)
深層生成モデルと世界モデル(2020/11/20版)深層生成モデルと世界モデル(2020/11/20版)
深層生成モデルと世界モデル(2020/11/20版)
 
Deep Recurrent Q-Learning(DRQN) for Partially Observable MDPs
Deep Recurrent Q-Learning(DRQN) for Partially Observable MDPsDeep Recurrent Q-Learning(DRQN) for Partially Observable MDPs
Deep Recurrent Q-Learning(DRQN) for Partially Observable MDPs
 

Viewers also liked

Deep Q-Network 論文輪読会
Deep Q-Network 論文輪読会Deep Q-Network 論文輪読会
Deep Q-Network 論文輪読会Kotaro Tanahashi
 
introduction to double deep Q-learning
introduction to double deep Q-learningintroduction to double deep Q-learning
introduction to double deep Q-learningWEBFARMER. ltd.
 
IT技術者でも1から学べるビジネスモデルキャンバス入門
IT技術者でも1から学べるビジネスモデルキャンバス入門IT技術者でも1から学べるビジネスモデルキャンバス入門
IT技術者でも1から学べるビジネスモデルキャンバス入門陽一 滝川
 
Paper intoduction "Playing Atari with deep reinforcement learning"
Paper intoduction   "Playing Atari with deep reinforcement learning"Paper intoduction   "Playing Atari with deep reinforcement learning"
Paper intoduction "Playing Atari with deep reinforcement learning"Hiroshi Tsukahara
 
Tech-Circle #18 Pythonではじめる強化学習 OpenAI Gym 体験ハンズオン
Tech-Circle #18 Pythonではじめる強化学習 OpenAI Gym 体験ハンズオンTech-Circle #18 Pythonではじめる強化学習 OpenAI Gym 体験ハンズオン
Tech-Circle #18 Pythonではじめる強化学習 OpenAI Gym 体験ハンズオンTakahiro Kubo
 
Itエンジニアのための自然言語処理入門
Itエンジニアのための自然言語処理入門Itエンジニアのための自然言語処理入門
Itエンジニアのための自然言語処理入門Satoru Mikami
 
大富豪に対する機械学習の適用 + α
大富豪に対する機械学習の適用 + α大富豪に対する機械学習の適用 + α
大富豪に対する機械学習の適用 + αKatsuki Ohto
 
Pythonではじめる OpenAI Gymトレーニング
Pythonではじめる OpenAI GymトレーニングPythonではじめる OpenAI Gymトレーニング
Pythonではじめる OpenAI GymトレーニングTakahiro Kubo
 
強化学習入門
強化学習入門強化学習入門
強化学習入門Shunta Saito
 
成功するスタートアップの作り方 ー 完全版
成功するスタートアップの作り方 ー 完全版 成功するスタートアップの作り方 ー 完全版
成功するスタートアップの作り方 ー 完全版 Masa Tadokoro
 

Viewers also liked (12)

Deep Q-Network 論文輪読会
Deep Q-Network 論文輪読会Deep Q-Network 論文輪読会
Deep Q-Network 論文輪読会
 
introduction to double deep Q-learning
introduction to double deep Q-learningintroduction to double deep Q-learning
introduction to double deep Q-learning
 
IT技術者でも1から学べるビジネスモデルキャンバス入門
IT技術者でも1から学べるビジネスモデルキャンバス入門IT技術者でも1から学べるビジネスモデルキャンバス入門
IT技術者でも1から学べるビジネスモデルキャンバス入門
 
Paper intoduction "Playing Atari with deep reinforcement learning"
Paper intoduction   "Playing Atari with deep reinforcement learning"Paper intoduction   "Playing Atari with deep reinforcement learning"
Paper intoduction "Playing Atari with deep reinforcement learning"
 
Tech-Circle #18 Pythonではじめる強化学習 OpenAI Gym 体験ハンズオン
Tech-Circle #18 Pythonではじめる強化学習 OpenAI Gym 体験ハンズオンTech-Circle #18 Pythonではじめる強化学習 OpenAI Gym 体験ハンズオン
Tech-Circle #18 Pythonではじめる強化学習 OpenAI Gym 体験ハンズオン
 
Itエンジニアのための自然言語処理入門
Itエンジニアのための自然言語処理入門Itエンジニアのための自然言語処理入門
Itエンジニアのための自然言語処理入門
 
大富豪に対する機械学習の適用 + α
大富豪に対する機械学習の適用 + α大富豪に対する機械学習の適用 + α
大富豪に対する機械学習の適用 + α
 
Pythonではじめる OpenAI Gymトレーニング
Pythonではじめる OpenAI GymトレーニングPythonではじめる OpenAI Gymトレーニング
Pythonではじめる OpenAI Gymトレーニング
 
強化学習入門
強化学習入門強化学習入門
強化学習入門
 
ビジネスモデルの作り方
ビジネスモデルの作り方ビジネスモデルの作り方
ビジネスモデルの作り方
 
成功するスタートアップの作り方 ー 完全版
成功するスタートアップの作り方 ー 完全版 成功するスタートアップの作り方 ー 完全版
成功するスタートアップの作り方 ー 完全版
 
SlideShare 101
SlideShare 101SlideShare 101
SlideShare 101
 

More from mooopan

Clipped Action Policy Gradient
Clipped Action Policy GradientClipped Action Policy Gradient
Clipped Action Policy Gradientmooopan
 
Model-Based Reinforcement Learning @NIPS2017
Model-Based Reinforcement Learning @NIPS2017Model-Based Reinforcement Learning @NIPS2017
Model-Based Reinforcement Learning @NIPS2017mooopan
 
ChainerRLの紹介
ChainerRLの紹介ChainerRLの紹介
ChainerRLの紹介mooopan
 
Safe and Efficient Off-Policy Reinforcement Learning
Safe and Efficient Off-Policy Reinforcement LearningSafe and Efficient Off-Policy Reinforcement Learning
Safe and Efficient Off-Policy Reinforcement Learningmooopan
 
A3Cという強化学習アルゴリズムで遊んでみた話
A3Cという強化学習アルゴリズムで遊んでみた話A3Cという強化学習アルゴリズムで遊んでみた話
A3Cという強化学習アルゴリズムで遊んでみた話mooopan
 
Learning Continuous Control Policies by Stochastic Value Gradients
Learning Continuous Control Policies by Stochastic Value GradientsLearning Continuous Control Policies by Stochastic Value Gradients
Learning Continuous Control Policies by Stochastic Value Gradientsmooopan
 
Effective Modern C++ Item 24: Distinguish universal references from rvalue re...
Effective Modern C++ Item 24: Distinguish universal references from rvalue re...Effective Modern C++ Item 24: Distinguish universal references from rvalue re...
Effective Modern C++ Item 24: Distinguish universal references from rvalue re...mooopan
 
"Playing Atari with Deep Reinforcement Learning"
"Playing Atari with Deep Reinforcement Learning""Playing Atari with Deep Reinforcement Learning"
"Playing Atari with Deep Reinforcement Learning"mooopan
 

More from mooopan (8)

Clipped Action Policy Gradient
Clipped Action Policy GradientClipped Action Policy Gradient
Clipped Action Policy Gradient
 
Model-Based Reinforcement Learning @NIPS2017
Model-Based Reinforcement Learning @NIPS2017Model-Based Reinforcement Learning @NIPS2017
Model-Based Reinforcement Learning @NIPS2017
 
ChainerRLの紹介
ChainerRLの紹介ChainerRLの紹介
ChainerRLの紹介
 
Safe and Efficient Off-Policy Reinforcement Learning
Safe and Efficient Off-Policy Reinforcement LearningSafe and Efficient Off-Policy Reinforcement Learning
Safe and Efficient Off-Policy Reinforcement Learning
 
A3Cという強化学習アルゴリズムで遊んでみた話
A3Cという強化学習アルゴリズムで遊んでみた話A3Cという強化学習アルゴリズムで遊んでみた話
A3Cという強化学習アルゴリズムで遊んでみた話
 
Learning Continuous Control Policies by Stochastic Value Gradients
Learning Continuous Control Policies by Stochastic Value GradientsLearning Continuous Control Policies by Stochastic Value Gradients
Learning Continuous Control Policies by Stochastic Value Gradients
 
Effective Modern C++ Item 24: Distinguish universal references from rvalue re...
Effective Modern C++ Item 24: Distinguish universal references from rvalue re...Effective Modern C++ Item 24: Distinguish universal references from rvalue re...
Effective Modern C++ Item 24: Distinguish universal references from rvalue re...
 
"Playing Atari with Deep Reinforcement Learning"
"Playing Atari with Deep Reinforcement Learning""Playing Atari with Deep Reinforcement Learning"
"Playing Atari with Deep Reinforcement Learning"
 

最近のDQN

  • 4. 話 人 ▶ 藤田康博 ▶ Twitter: @mooopan ▶ GitHub: muupan ▶ 2015 年 4 月 Preferred Networks 入社
  • 5. 話 DQN(Deep Q-Networks) [Mnih et al. 2013; Mnih et al. 2015] ▶ 説明 ▶ 分析・改善・応用 紹介(本題) ▶ 2015 年 7 月 23 日時点 DQN 関連情報 機能 目指
  • 6. 話 DQN 毛色 異 深層強化学習(主 Policy Search 系) ▶ Deterministic Policy Gradient [Silver et al. 2014] ▶ Guided Policy Search [Levine and Koltun 2013] ▶ Trust Region Policy Optimization [Schulman et al. 2015b] ▶ Generalized Advantage Estimation [Schulman et al. 2015a] ▶ 話 ,説明 時間 ▶ 別 機会 …
  • 8. 強化学習問題 ▶ 各 t = 0, 1, . . . 1. 現在 状態 st ∈ S 観測 2. st 応 行動 at ∈ A 選択 3. 報酬 rt ∈ R( 次状態 st+1 ∈ S) 観測 ▶ 目標:累積報酬 ∑ t rt 最大化 ▶ 行動 選 教師 存在 ▶ 試行錯誤 通 学習 必要
  • 9. 強化学習 概念(1) ▶ 方策(policy) ▶ 「 行動 選 」 ▶ π : S → A ▶ 行動価値関数(action value function) ▶ 状態 s 行動 a 選 , 後方策 π 従 場合 , 期待累積報酬 ▶ Qπ(s, a) = E[rt + γrt+1 + γ2rt+2 + · · · | st = s, at = a, π] ▶ γ 割引率
  • 10. 強化学習 概念(2) ▶ 最適方策 ▶ 期待累積報酬 最大化 方策 π∗ ▶ 最適行動価値関数 ▶ Q∗(s, a) = Qπ∗ (s, a) = maxπ Qπ(s, a) ▶ 求 ,π(s) = arg maxa Q∗(s, a) 最適 方策 求 ▶ Bellman 最適方程式 ▶ Q∗(s, a) = Es′ [r + γ maxa′ Q∗(s′, a′) | s, a] ▶ 行動価値関数 最適 必要十分条件 ▶ 解 Q∗ 求
  • 11. Q-learning [Watkins and Dayan 1992] ▶ DQN 元 ▶ 一定 条件下 Q∗ 収束 Input: γ, α 1: Initialize Q(s, a) arbitrarily 2: loop 3: Initialize s 4: while s is not terminal do 5: Choose a from s using policy derived from Q 6: Execute a, observe reward r and next state s′ 7: Q(s, a) ← Q(s, a) + α[r + γ maxa′ Q(s′ , a′ ) − Q(s, a)] 8: s ← s′ 9: end while 10: end loop
  • 12. Deep Q-learning ▶ 価値関数 DNN 近似 Q(s, a; θ) ≈ Q(s, a) ▶ 損失 定義 L(θ) = E[(r + γ max a′ Q(s′ , a′ ; θ) − Q(s, a; θ))2 ] ∂L(θ) ∂θ = E[(r + γ max a′ Q(s′ , a′ ; θ)−Q(s, a; θ)) ∂Q(s, a; θ) ∂θ ] ▶ Stochastic Gradient Descent 最小化可能
  • 13. 何 新 ▶ 価値関数 NN 近似? ▶ 昔 (有名 例:TD-Gammon [Tesauro 1994]) ▶ 価値関数 DNN 近似? ▶ 何 deep 呼 ,Deep Belief Networks 使 [Abtahi and Fasel 2011] ▶ LSTM 使 古 [Bakker 2001] ▶ 学習 成功 工夫 ▶ 重要 ▶ 初 DQN 呼 [Silver 2015]
  • 14. 学習 不安定化要因 除去 ▶ 入力 時系列 ,i.i.d. ▶ → Experience Replay ▶ 価値関数 小 更新 方策 大 変 ,振動 ▶ → Target Q-Network ▶ 報酬 異 ▶ → 報酬 clipping
  • 15. Experience Replay ▶ 経験 遷移 (st, at, rt, st+1) replay memory D 蓄 ▶ 損失 計算 Q 更新 D 上 行 L(θ) = Es,a,r,s′∼D[(r + γ max a′ Q(s′ , a′ ; θ) − Q(s, a; θ))2 ]
  • 16. Target Q-Network ▶ 学習 目標値 計算 使 価値関数 固定(target Q-network) L(θ) = Es,a,r,s′∼D[(r + γ max a′ Q(s′ , a′ ; θ− ) − Q(s, a; θ))2 ] ▶ 一定周期 学習中 Q-network 同期 θ− ← θ
  • 17. 報酬 clipping ▶ 報酬 [−1, 1] 範囲 clip ▶ 負 −1,正 1,0 0 ▶ 報酬 大小 区別
  • 18. Arcade Learning Environment(ALE) [Bellemare et al. 2013] 図 [Mnih et al. 2013] 引用 ▶ 家庭用 機 Atari 2600 +学習用 ▶ 50 以上 対応 ▶ 変動 読 取
  • 19. DQN in ALE 図 [Mnih et al. 2015] 引用 ▶ 図 畳 込 層 2 , [Mnih et al. 2015] 本文 読 3 ! ▶ 入力 過去 4 画像,出力 18 行動価値
  • 20. DQN vs. 人間 図 [Mnih et al. 2015] 引用
  • 23. DQN 超 ▶ [Mnih et al. 2013] 学習率等 詳細 書 ▶ 早 Theano DQN 再現 1 試 Nathan Sprague 氏 調 ▶ (一方自分 AdaDelta 茶 濁 ) 1 https://github.com/spragunr/deep_q_rl
  • 24. DQN 超 分析 [Sprague 2015] 図 [Sprague 2015] 引用 DQN( [Mnih et al. 2013] 再現) 性能 超 設定 敏感 ▶ α:学習率,γ:割引率,ρ:RMSprop 移動平均 減衰率 ▶ target Q-network 未使用
  • 27. Normalized DQN [Silver 2015] 報酬 clipping 代 ,報酬 学習 ▶ 報酬 値 使 ▶ Q(s, a; θ) 代 U(s, a; θ) ∈ [−1, +1] 出力 ▶ 学習可能 π, σ Q 値 変換 Q(s, a; θ, σ, π) = σU(s, a; θ) + π
  • 29. Gorila(GOogle ReInforcement Learning Architecture) [Nair et al. 2015] 図 [Nair et al. 2015] 引用 DQN 並列 実行 高速化 ▶ Actor:行動 選 経験 (s, a, r, s′ ) 積 ▶ Memory:Actor 集 経験 蓄 ▶ Learner:Memory 経験 更新量 計算 ▶ Bundle:(Actor, Memory, Learner) 組
  • 30. Gorila 安定化 消滅, 遅延 処理 遅延 安定 学習 工夫 ▶ 古 θ 使 計算 更新量 Parameter Server 無視 ▶ Learner 誤差 絶対値 移動平均・標準偏差 保持 , 大 外 捨
  • 31. Gorila DQN vs. Single DQN 図 [Nair et al. 2015] 引用 ▶ Single DQN:12-14 日間 訓練 ▶ Gorila DQN:6 日間 訓練,100 bundles ▶ 49 中 41 Gorila DQN 勝利
  • 33. ALE 先読 ・将棋・囲碁 先読 ( 木探索) 使 ,ALE ? ▶ 実 DQN 強 ! [Bellemare et al. 2013; Guo et al. 2014] ▶ 機能 状態 巻 戻 必要 ▶ TAS ▶ 遅 (行動 選 数秒) B. Rider Breakout Enduro Pong Q*bert Seaquest S. Invaders DQN [Mnih et al. 2013] 4092 168 470 20 1952 1705 581 UCT [Guo et al. 2014] 7233 406 788 21 18850 3257 2354
  • 34. UCC-I [Guo et al. 2014] 先読 選 行動 真似 訓練 ▶ UCC-I(UCTtoClassification-Interleaved) ▶ 先読 教師 生成 , 学習 交互 繰 返 ▶ 先読 始 位置 学習中 軌跡 選 ▶ 教師 状態分布 際 状態分布 離 意図 ▶ DQN [Mnih et al. 2013] 同 形状(= 同 速度) , 高 達成 B. Rider Breakout Enduro Pong Q*bert Seaquest S. Invaders DQN [Mnih et al. 2013] 4092 168 470 20 1952 1705 581 UCT [Guo et al. 2014] 7233 406 788 21 18850 3257 2354 UCC-I [Guo et al. 2014] 5388 215 601 19 13189 2701 670
  • 36. Exploration vs. Exploitation ▶ 強化学習 下 2 必要 ▶ Exploration: 知識 状態・行動 試 ▶ Exploitation: 良 状態・ 行動 試 ▶ DQN ? ▶ ϵ-greedy:確率 ϵ 行動,確率 1 − ϵ Q(s, a) 最大 行動 選 ▶ 最初 1000000 ϵ 1 0.1 , 以降 0.1 固定
  • 37. Exploration Bonus [Stadie et al. 2015] 選 状態・行動対 報酬 R(s, a) N(s, a) 加 学習 ▶ 次 状態 予測 M 学習 ,予測誤差 大 大 与 e(s, a) = ∥σ(s′ ) − M(σ(s), a)∥2 2 ¯e(s, a) = et(s, a)/maxe N(s, a) = ¯e(s, a) t ∗ C ▶ σ : S → RN 状態 特徴表現,maxe e 値 最大値,t 数,C 定数 ▶ σ,M 学習
  • 38. Exploration Bonus vs. Plain DQN 表 [Stadie et al. 2015] 引用 ▶ Static AE(Auto Encoder):DQN 学習前 学習 AE σ 使 ▶ Dynamic AE:AE DQN 学習 合 更新
  • 41. 図 [Narasimhan et al. 2015] 引用 ▶ 状態:画像 文章 ▶ 行動:動詞 目的語
  • 42. LSTM-DQN [Narasimhan et al. 2015] 図 [Narasimhan et al. 2015] 引用 ▶ LSTM(Long Short-Term Memory) 文章 状態表現 落 ▶ 単語 word embedding 前 順 入力 ,最後 出 力 平均 ▶ word embedding 一緒 学習 ▶ Q(s, a)(動詞) Q(s, o)(目的語) 2 出力 学習
  • 43. LSTM-DQN vs. BOW-DQN 図 [Narasimhan et al. 2015] 引用 ▶ Fantasy World Evennia2 ▶ 語彙数:1340 ▶ 組 合 数:222 ▶ 1 epoch = 20 episodes × 250 steps ▶ BOG(Bag-of-Words) 良 性能 2 http://www.evennia.com/
  • 44. LSTM-DQN Word Embeddings 図 [Narasimhan et al. 2015] 引用
  • 46. 制御 見 人 今 「分散深層強化学習 制御 — Preferred Research」3 !!! 3 http://research.preferred.jp/2015/06/ distributed-deep-reinforcement-learning/
  • 47. 制御 見 人 今 「分散深層強化学習 制御 — Preferred Research」3 !!! 3 http://research.preferred.jp/2015/06/ distributed-deep-reinforcement-learning/
  • 49. ▶ DQN ▶ 以外 応用 少 ▶ 改善 ▶ 今後 目 離 !
  • 50. 参考文献 I [1] Farnaz Abtahi and Ian Fasel. “Deep belief nets as function approximators for reinforcement learning”. In: AAAI 2011 Lifelong Learning Workshop (2011), pp. 183–219. [2] Bram Bakker. “Reinforcement Learning with Long Short-Term Memory”. In: NIPS 2001. 2001. [3] Marc C. Bellemare et al. “The arcade learning environment: An evaluation platform for general agents”. In: Journal of Artificial Intelligence Research 47 (2013), pp. 253–279. [4] Xiaoxiao Guo et al. “Deep learning for real-time Atari game play using offline Monte-Carlo tree search planning”. In: Advances in Neural Information Processing Systems (NIPS) 2600 (2014), pp. 1–9. [5] Sergey Levine and Vladlen Koltun. “Guided Policy Search”. In: ICML 2013. Vol. 28. 2013, pp. 1–9. [6] Volodymyr Mnih et al. “Human-level control through deep reinforcement learning”. In: Nature 518.7540 (2015), pp. 529–533. [7] Volodymyr Mnih et al. “Playing Atari with Deep Reinforcement Learning”. In: NIPS 2014 Deep Learning Workshop. 2013, pp. 1–9. arXiv: arXiv:1312.5602v1.
  • 51. 参考文献 II [8] Arun Nair et al. “Massively Parallel Methods for Deep Reinforcement Learning”. In: ICML Deep Learning Workshop 2015. 2015. [9] Karthik Narasimhan, Tejas Kulkarni, and Regina Barzilay. Language Understanding for Text-based Games Using Deep Reinforcement Learning. 2015. arXiv: arXiv:1506.08941v1. [10] John Schulman et al. High-Dimensional Continuous Control Using Generalized Advantage Estimation. 2015. arXiv: arXiv:1506.02438v1. [11] John Schulman et al. “Trust Region Policy Optimization”. In: ICML 2015. 2015. arXiv: arXiv:1502.05477v1. [12] David Silver. Deep Reinforcement Learning. ICLR 2015 Keynote. http://www.iclr.cc/lib/exe/fetch.php?media=iclr2015:silver- iclr2015.pdf. 2015. [13] David Silver et al. “Deterministic Policy Gradient Algorithms”. In: ICML 2014. 2014, pp. 387–395. [14] Nathan Sprague. “Parameter Selection for the Deep Q-Learning Algorithm”. In: RLDM 2015. 2015. [15] Bradly C. Stadie, Sergey Levine, and Pieter Abbeel. Incentivizing Exploration In Reinforcement Learning With Deep Predictive Models. 2015. arXiv: 1507.00814v2.
  • 52. 参考文献 III [16] Gerald Tesauro. “TD-Gammon, A Self-Teaching Backgammon Program, Achieves Master-Level Play”. In: Neural Computation 6(2) (1994), pp. 215–219. [17] Christopher JCH Watkins and Peter Dayan. “Q-learning”. In: Machine learning 8.3-4 (1992), pp. 279–292.