狠狠撸

狠狠撸Share a Scribd company logo
Attention Control
第2回WBA hackathon
落合、都築
やったこと
やったこと
Free Energy Principleの
ニューラルネットによる実装
Free Energy Principle ?
Free Energy Principle by K.Friston
Free Energy=精度 + 複雑度
= ?? ?(?|?)[log ? ? ? ? ] + ? ??[?(?|?)||? ? ? ]? ?, ?
?
?
?
:Hidden or external states
:Sensory states
:Internal states(ex. zの平均、分散)
精度 複雑度
Internal state
? = arg min ?(?, ?) 予測誤差を最小化するよう
内部パラメータを学習
(通常の生成モデル学習)
?
Internal state
Action(Attention)
? = arg min ?(?, ?)
? = arg min ?(?, ?)
予測誤差を最小化するよう
内部パラメータを学習
(通常の生成モデル学習)
予測誤差を最小化する行動
を生成
予測=注目
(Active Inference)
?
?
実装
Free Energy Principle = Variational Autoencoder
? Variational Autoencoder(VAE)は変分ベイズをニューラルネッ
トで表現したもの
? 変分ベイズではFree Energyを最小化している
? Free Energyを内部パラメータ調節で最小化するNetwork
=Variational Autoencoder
? 今回の目標:Active InferenceをVAEに追加
? Active Inference=Free Energyを最小化する動きを生成す
ること
??
?
?
? ??
FC
?
??
?
?
? ??
FC
?
?′ ?′
?? ? ??
FC ?′
??
?? ? ??
FC ?′
??
t=0 t=1
layer=0
layer=1
Active Inference Network
?
?
?
FC
??
??
?′
Action
Hidden state
State(Bottom up)
State(expect)
Action Network
Encoder Network
Decoder Network
Probabilistic
??
?
?
? ??
FC
?
??
?
?
? ??
FC
?
?′ ?′
?? ? ??
FC ?′
??
?? ? ??
FC ?′
??
t=0 t=1
layer=0
layer=1
Active Inference Network
?
?
?
FC
??
??
?′
Action
Hidden state
State(Bottom up)
State(expect)
Action Network
Encoder Network
Decoder Network
Probabilistic
今回作成範囲
??
?
?
? ??
FC
?
??
?
?
? ??
FC
?
?′ ?′
?? ? ??
FC ?′
??
?? ? ??
FC ?′
??
t=0 t=1
layer=0
layer=1
Active Inference Network
?
?
?
FC
??
??
?′
Action
Hidden state
State(Bottom up)
State(expect)
Action Network
Encoder Network
Decoder Network
Probabilistic
Variational Autoencoder
??
?
?
? ??
FC
?
??
?
?
? ??
FC
?
?′ ?′
?? ? ??
FC ?′
??
?? ? ??
FC ?′
??
t=0 t=1
layer=0
layer=1
Active Inference Network
?
?
?
FC
??
??
?′
Action
Hidden state
State(Bottom up)
State(expect)
Action Network
Encoder Network
Decoder Network
Probabilistic
Action
学习环境
環境 エージェント
MNIST画像を並べた
56x56ピクセルの空間
(トーラス状に回り込み)
着目領域
28x28ピクセル
着目領域内の画像
着目領域の
相対移動方向
??
?
?
? ??
FC
?
?′
dx = -1 or 1, dy=-1 or 1
ピクセル単位の移動
结果
Step 0~100
予測画像 軌跡
スタート
Step 4000~4100
予測画像 軌跡
スタート
Step 4000~4100
予測画像 軌跡
スタート
Step 8000~8100
予測画像 軌跡
スタート
Step 8000~8100
予測画像 軌跡
スタート
Step 12000~12100
予測画像 軌跡
スタート
Step 16000~16100
予測画像 軌跡
スタート
Step 20000~20100
予測画像 軌跡
スタート
loss
Epoch(1Epoch = 100Step)
LSTMを追加:Step 16000~16100
予測画像 軌跡
スタート
LSTMを追加:Step 16000~16100
予測画像 軌跡
スタート
LSTMを追加:Step 16000~16100
予測画像 軌跡
スタート
考察
? 予測誤差を最小化するため一箇所で振動
? 理由
? 環境が固定、かつ行動の外乱なし
? 予測誤差は最小化ではなく一定の値になるよう行動を決
めるべき?
? 予測誤差が少なすぎる?退屈
? 予測誤差が高すぎる?不安
? 報酬、トップダウン信号が必要
?すごい: Free Energy Principleを大規模化可能な
形で実装
?おもろい:制御への応用可能性(後述)
?脳っぽい:Free Energy Principleは脳の実験
データによる裏付けも出始めている
Future Work
?探索行動の継続を矯正
?多層化
?トップダウンでの行動生成
?探索行動の継続を矯正
?多層化
?トップダウンでの行動生成
??
?
?
? ??
FC
?
??
?
?
? ??
FC
?
?′ ?′
?? ? ??
FC ?′
??
?? ? ??
FC ?′
??
t=0 t=1
layer=0
layer=1
Active Inference Network
?
?
?
FC
??
??
?′
Action
Hidden state
State(Bottom up)
State(expect)
Action Network
Encoder Network
Decoder Network
Probabilistic
作成予定範囲
柔軟な行動生成
?マップ上でのナビゲーション課題
←こいつを探したい
ある特定の画像を,マップ上で探し出す
??
?
?
? ??
FC
?
??
?
?
? ??
FC
?
?′ ?′
?? ? ??
FC ?′
??
?? ? ??
FC ?′
??
t=0 t=1
layer=0
layer=1
Active Inference Network
?
?
?
FC
??
??
?′
Action
Hidden state
State(Bottom up)
State(expect)
Action Network
Encoder Network
Decoder Network
Probabilistic
探索対象の画像を入力、ボトムアップ計算
??
?
?
? ??
FC
?
??
?
?
? ??
FC
?
?′ ?′
?? ? ??
FC ?′
??
?? ? ??
FC ?′
??
t=0 t=1
layer=0
layer=1
Active Inference Network
?
?
?
FC
??
??
?′
Action
Hidden state
State(Bottom up)
State(expect)
Action Network
Encoder Network
Decoder Network
Probabilistic
上位層のzを固定し、ボトムアップとトップダウン信号を流す
Active Inference Networkのイメージ
layer0
layer1
layer2
layer3
In Brain
World sensor
ゴム紐
Active Inference Networkのイメージ
layer0
layer1
layer2
layer3
In Brain
World sensor
Active Inference Networkのイメージ
layer0
layer1
layer2
layer3
In Brain
World sensor
Active Inference Networkのイメージ
layer0
layer1
layer2
layer3
In Brain
World sensor
Active Inference Networkのイメージ
layer0
layer1
layer2
layer3
In Brain
World sensor
Active Inference Networkのイメージ
layer0
layer1
layer2
layer3
In Brain
World sensor
Active Inference Networkのイメージ
layer0
layer1
layer2
layer3
In Brain
World sensor
Active Inference Networkのイメージ
layer0
layer1
layer2
layer3
In Brain
World sensor
END
以降付録
キーワード
? Free Energy Principle
? Predictive Coding
? Policy Gradient(action の強化学習で使用)
? Variational Autoencoder
? 変分ベイズ
? 変分下界
? エントロピー
環境、ライブラリ
? Python 2.7
? Chainer 1.15.0.1
Variational Autoencoderの式
参考:http://qiita.com/skitaoka/items/64eab1d6c09a189d5841
log ? ? ?
= log ?(?|?)
? ?(?, ?)
?(?|?)
??
= ? ? ? log
? ?(?, ?)
?(?|?)
?? + ? ??[?(?|?)||? ? ? ? ]
? ?(?|?) :真の潜在変数の事後分布
?(?|?) :? ?(?|?)の近似分布(Neural Networkで表現)
log ? ? ? :対数尤度。これを最大化する?を見つけ出したい
下界 = ?(?) 真の分布と近似誤差の差
? ?
= ? ? ? log
? ? ?, ?
? ? ?
??
= ? ?(?|?)[log ? ? ? ? ] ? ? ??[?(?|?)||? ? ? ]
???①
Free Energyの式
= ?? ?(?|?)[log ? ? ? ? ] + ? ??[?(?|?)||? ? ? ]
? ?, ? = ? ?(?|?)[? log ? ?(?, ?)] ? ?[?(?|?)]
参考:https://en.wikipedia.org/wiki/Free_energy_principle
Energy Entropy
???②
?
?
?
:Hidden or external states
:Sensory states
:Internal states ?
?
?
?
World In Brain
両者は同じもの
? ? = ? ?(?|?)[log ? ? ? ? ] ? ? ??[?(?|?)||? ? ? ]
①より ②より
?(?, ?) = ?? ?(?|?)[log ? ? ? ? + ? ??[?(?|?)||? ? ? ]
?? ? = ?? ? ? ? [log ? ? ? ? ] + ? ??[?(?|?)||? ? ? ]
?? ? = ?? ? ? ? [log ? ? ? ? ] + ? ??[?(?|?)||? ? ? ]
観測された値でInternal statesを代用
正規分布と仮定
? Free Energy ?(?, ?)は最小化、変分下界?(?)は最大化。? ?, ? = ??(?)よりやっていることも同じ。
? ?(?)の確率関数はニューラルネットによる近似
Free Energy Principle = Variational Autoencoder
? Variational Autoencoder(VAE)は変分ベイズをニューラルネットで表現
したもの( http://www.asahi-net.or.jp/~fb8t-ysok/docs/vae/ )
? 変分ベイズではFree Energyを最小化している
( http://nktmemoja.github.io/jekyll/update/2016/08/20/variational-
bayes.html )
? Free Energyを内部パラメータ調節で最小化するNetwork
=Variational Autoencoder
? 今回の目標:Active InferenceをVAEに追加
? Active Inference=Free Energyを最小化する動きを生成すること
1枚ものスライド
Free Energy Principle by Friston
implement
“Active Inference Network”
?ある状態を実現するための,行動を生成するネットワークの提案
Test
?マップ上でのナビゲーション課題
←こいつを探したい
ある特定の画像を,マップ上で探し出す

More Related Content

Similar to 落合 Wba hackathon2_成果報告_最終版 (20)

2015年9月18日 (GTC Japan 2015) 深層学習フレームワークChainerの導入と化合物活性予測への応用
2015年9月18日 (GTC Japan 2015) 深層学習フレームワークChainerの導入と化合物活性予測への応用 2015年9月18日 (GTC Japan 2015) 深層学習フレームワークChainerの導入と化合物活性予測への応用
2015年9月18日 (GTC Japan 2015) 深層学習フレームワークChainerの導入と化合物活性予測への応用
Kenta Oono
?
2値化CNN on FPGAでGPUとガチンコバトル(公開版)
2値化CNN on FPGAでGPUとガチンコバトル(公開版)2値化CNN on FPGAでGPUとガチンコバトル(公開版)
2値化CNN on FPGAでGPUとガチンコバトル(公開版)
Hiroki Nakahara
?
Deep learning実装の基礎と実践
Deep learning実装の基礎と実践Deep learning実装の基礎と実践
Deep learning実装の基礎と実践
Seiya Tokui
?
Top-K Off-Policy Correction for a REINFORCE Recommender System
Top-K Off-Policy Correction for a REINFORCE Recommender SystemTop-K Off-Policy Correction for a REINFORCE Recommender System
Top-K Off-Policy Correction for a REINFORCE Recommender System
harmonylab
?
第2回 NIPS+読み会?関西 発表資料 山本
第2回 NIPS+読み会?関西 発表資料 山本第2回 NIPS+読み会?関西 発表資料 山本
第2回 NIPS+読み会?関西 発表資料 山本
驰补丑辞辞!デベロッパーネットワーク
?
エキ Py 読書会02 2010/9/7
エキ Py 読書会02 2010/9/7エキ Py 読書会02 2010/9/7
エキ Py 読書会02 2010/9/7
Tetsuya Morimoto
?
PRMU201902 Presentation document
PRMU201902 Presentation documentPRMU201902 Presentation document
PRMU201902 Presentation document
Masayuki Tanaka
?
ハンズオン セッション 3: リカレント ニューラル ネットワーク入門
ハンズオン セッション 3: リカレント ニューラル ネットワーク入門ハンズオン セッション 3: リカレント ニューラル ネットワーク入門
ハンズオン セッション 3: リカレント ニューラル ネットワーク入門
NVIDIA Japan
?
エキ Py 読書会02 2章前半
エキ Py 読書会02 2章前半エキ Py 読書会02 2章前半
エキ Py 読書会02 2章前半
Tetsuya Morimoto
?
[DL輪読会]Depth Prediction Without the Sensors: Leveraging Structure for Unsuper...
[DL輪読会]Depth Prediction Without the Sensors: Leveraging Structure for Unsuper...[DL輪読会]Depth Prediction Without the Sensors: Leveraging Structure for Unsuper...
[DL輪読会]Depth Prediction Without the Sensors: Leveraging Structure for Unsuper...
Deep Learning JP
?
分類問題 - 機械学習ライブラリ scikit-learn の活用
分類問題 - 機械学習ライブラリ scikit-learn の活用分類問題 - 機械学習ライブラリ scikit-learn の活用
分類問題 - 機械学習ライブラリ scikit-learn の活用
y-uti
?
各言語の k-means 比較
各言語の k-means 比較各言語の k-means 比較
各言語の k-means 比較
y-uti
?
jjugccc2018 app review postmortem
jjugccc2018 app review postmortemjjugccc2018 app review postmortem
jjugccc2018 app review postmortem
tamtam180
?
エキ Py 読書会02 2章後半
エキ Py 読書会02 2章後半エキ Py 読書会02 2章後半
エキ Py 読書会02 2章後半
Tetsuya Morimoto
?
Deep learning入門
Deep learning入門Deep learning入門
Deep learning入門
magoroku Yamamoto
?
顿厂贵2018讲演スライド
顿厂贵2018讲演スライド顿厂贵2018讲演スライド
顿厂贵2018讲演スライド
Hiroki Nakahara
?
"Puzzle-Based Automatic Testing: Bringing Humans into the Loop by Solving Puz...
"Puzzle-Based Automatic Testing: Bringing Humans into the Loop by Solving Puz..."Puzzle-Based Automatic Testing: Bringing Humans into the Loop by Solving Puz...
"Puzzle-Based Automatic Testing: Bringing Humans into the Loop by Solving Puz...
nkazuki
?
础尘别产补におけるレコメンデーションシステムの绍介
础尘别产补におけるレコメンデーションシステムの绍介础尘别产补におけるレコメンデーションシステムの绍介
础尘别产补におけるレコメンデーションシステムの绍介
cyberagent
?
たのしい関数型
たのしい関数型たのしい関数型
たのしい関数型
Shinichi Kozake
?
2015年9月18日 (GTC Japan 2015) 深層学習フレームワークChainerの導入と化合物活性予測への応用
2015年9月18日 (GTC Japan 2015) 深層学習フレームワークChainerの導入と化合物活性予測への応用 2015年9月18日 (GTC Japan 2015) 深層学習フレームワークChainerの導入と化合物活性予測への応用
2015年9月18日 (GTC Japan 2015) 深層学習フレームワークChainerの導入と化合物活性予測への応用
Kenta Oono
?
2値化CNN on FPGAでGPUとガチンコバトル(公開版)
2値化CNN on FPGAでGPUとガチンコバトル(公開版)2値化CNN on FPGAでGPUとガチンコバトル(公開版)
2値化CNN on FPGAでGPUとガチンコバトル(公開版)
Hiroki Nakahara
?
Deep learning実装の基礎と実践
Deep learning実装の基礎と実践Deep learning実装の基礎と実践
Deep learning実装の基礎と実践
Seiya Tokui
?
Top-K Off-Policy Correction for a REINFORCE Recommender System
Top-K Off-Policy Correction for a REINFORCE Recommender SystemTop-K Off-Policy Correction for a REINFORCE Recommender System
Top-K Off-Policy Correction for a REINFORCE Recommender System
harmonylab
?
エキ Py 読書会02 2010/9/7
エキ Py 読書会02 2010/9/7エキ Py 読書会02 2010/9/7
エキ Py 読書会02 2010/9/7
Tetsuya Morimoto
?
PRMU201902 Presentation document
PRMU201902 Presentation documentPRMU201902 Presentation document
PRMU201902 Presentation document
Masayuki Tanaka
?
ハンズオン セッション 3: リカレント ニューラル ネットワーク入門
ハンズオン セッション 3: リカレント ニューラル ネットワーク入門ハンズオン セッション 3: リカレント ニューラル ネットワーク入門
ハンズオン セッション 3: リカレント ニューラル ネットワーク入門
NVIDIA Japan
?
エキ Py 読書会02 2章前半
エキ Py 読書会02 2章前半エキ Py 読書会02 2章前半
エキ Py 読書会02 2章前半
Tetsuya Morimoto
?
[DL輪読会]Depth Prediction Without the Sensors: Leveraging Structure for Unsuper...
[DL輪読会]Depth Prediction Without the Sensors: Leveraging Structure for Unsuper...[DL輪読会]Depth Prediction Without the Sensors: Leveraging Structure for Unsuper...
[DL輪読会]Depth Prediction Without the Sensors: Leveraging Structure for Unsuper...
Deep Learning JP
?
分類問題 - 機械学習ライブラリ scikit-learn の活用
分類問題 - 機械学習ライブラリ scikit-learn の活用分類問題 - 機械学習ライブラリ scikit-learn の活用
分類問題 - 機械学習ライブラリ scikit-learn の活用
y-uti
?
各言語の k-means 比較
各言語の k-means 比較各言語の k-means 比較
各言語の k-means 比較
y-uti
?
jjugccc2018 app review postmortem
jjugccc2018 app review postmortemjjugccc2018 app review postmortem
jjugccc2018 app review postmortem
tamtam180
?
エキ Py 読書会02 2章後半
エキ Py 読書会02 2章後半エキ Py 読書会02 2章後半
エキ Py 読書会02 2章後半
Tetsuya Morimoto
?
顿厂贵2018讲演スライド
顿厂贵2018讲演スライド顿厂贵2018讲演スライド
顿厂贵2018讲演スライド
Hiroki Nakahara
?
"Puzzle-Based Automatic Testing: Bringing Humans into the Loop by Solving Puz...
"Puzzle-Based Automatic Testing: Bringing Humans into the Loop by Solving Puz..."Puzzle-Based Automatic Testing: Bringing Humans into the Loop by Solving Puz...
"Puzzle-Based Automatic Testing: Bringing Humans into the Loop by Solving Puz...
nkazuki
?
础尘别产补におけるレコメンデーションシステムの绍介
础尘别产补におけるレコメンデーションシステムの绍介础尘别产补におけるレコメンデーションシステムの绍介
础尘别产补におけるレコメンデーションシステムの绍介
cyberagent
?

落合 Wba hackathon2_成果報告_最終版