先端論文紹介ゼミ 09/10/20 B4 石川 智昭 紹介論文 “A model for

Download Report

Transcript 先端論文紹介ゼミ 09/10/20 B4 石川 智昭 紹介論文 “A model for

先端論文紹介ゼミ
09/10/20
B4 石川 智昭
紹介論文
• “A model for learning to segment temporal
sequences,utilizing a mixture of RNN experts
together with adaptive variance” (2008)
• Jun Namikawa,Jun Tani
ABSTRACT
• 時系列データを適切な部分時系列に分節す
る“mixture of RNN expertsモデル”の提案。
• 九つのリサージュ曲線を確率的に遷移するマ
ルコフ過程をうまく学習することを示している。
• 時系列予測と生成の実際問題として、小型の
ヒューマノイドロボットの感覚運動フロー
(sensory-motor flow)の学習に適用させる。
1.Introduction
• ニューラルネットワークを用いて時系列の分
節を行う際には、リカレントニューラルネット
ワーク(RNNs)がよく用いられる。
• RNNsは感覚運動のシーケンスパターン、文
法のシンボル列、連続時間的空間パターンを
学習できる。
• Tani and Nolfiはmixture of expertsの考えを階
層的にまとまったRNNsに適用する、感覚運動
フローの階層的セグメンテーションを提案。
1.Introduction
• mixture of RNN expertsにはモジュールの数
が増えると分節がうまくいかなくなるという問
題がある。
提案手法では、モジュールの数が増えても
安定性を失わずに分節を行う
2.Model
• Mixture of RNN expertsモデル
un(i )  (1 ε)un(i)1 ε(W1(i ) xn  W2(i )cn(i)1  v1(i ) )
(1)
cn(i )  tanh(un(i ) )
(2)
yn(i )  tanh(W3(i )cn(i )  v2(i ) )
(3)
(0 ≤ ε ≤ 1)
N
yn   gn(i ) yn(i )
(4)
i 1
xn :入力ベクトル
yn :出力ベクトル
W , v :モジュール
(i )
1
(i )
1
un(i) :ニューロンの内部状態
cn(i ) :ニューロンの状態
yn(i ) :モジュールの出力
i のパラメータ
gn(i ) :ゲートの値
gn(i ) ≥ 0
を満たす
N
(i )
 gn = 1
i 1
2.1. Learning method
ゲート g n
g 
(i )
n
exp(n(i ) )
(5)
N
exp(
k 1
(k )
n
)
入力時系列 X  ( xn )Tn1 、パラメータ n ,  が与えられた時、
モデルの出力が yn となる確率 p( yn X , n ,γ)
N
p( yn X , n ,  )   gn(i ) p( yn X ,  i )
(6)
i 1
2
yn(i )  yn
1 d
p( yn X ,  i )  (
) exp(
)
2 i2
2  i
(7)
d:出力ベクトルの次元
2.1. Learning method
パラメータを   ((n )Tn1,  ) 、入力時系列をX、
出力時系列を Y  ( yn )Tn1 とするときの確率
T
p(Y X , )   p( yn X , n ,  )
(8)
n1
時系列の組 D  ( X , Y ) に対するパラメータ  の
尤度L
L(D, )  p(Y X , )( )
 ( ) は次式で定義される事前分布である
T 1 N
(n(i)1  n(i ) )2
1
 ( )  
exp(
)
2
2
2 
n1 i 1
(9)
(10)
これより、ゲートの時系列の変化を抑えることができる。
2.1. Learning method
最尤度Lによって最適なパラメータ  を選択
慣性項つきの勾配法を用いる。モデルパラメータの更新式は、
 ln L( D, (t ))
 (t )  
 (t 1) (11)  (t ) :学習ステップtにおけるパラメータ
 (t )
 :学習係数
(12)  :慣性項の係数
 (t  1)   (t )   (t )
で与えられ、
 ln L( D, )
各パラメータの偏微分方程式
は次式で与えられる。
n(i )
(i )
 ln L( D, ) gn p( yn X , n ,  )) Gn(i )

 2
(13)
n(i )
p( yn X , n ,  )

If n = 1
n(i)1  n(i )

If n = T
Gn(i )   n(i )  n(i)1
 (i )  2 (i )   (i )
otherwise
n
n1
 n1
(i )
 ln L( D, ) T gn p( yn X ,  i ) 1  (i )

yn  yn
2
i
p
(
y
X
,

,

)
2



n1
n
n
i
i
yn(i )  yn
gn(i ) p( yn X ,  i )  d
 ln L( D, )

 

 i
p
(
y
X
,

,

)
i
 i3
n1
n
n

T
(14)
2
2




(15)
(16)
2.2. Feedback loop with time delay

• 時間遅れ による出力から入力へのフィード
バックがある場合
訓練データ D  ( X , Y ) が
yn  xn を満たしている
• 学習後、モデルの出力が訓練データと完全に
等しくなった場合、訓練データの代わりにモデ
ルの出力を入力としたフィードバックを生成で
きる。
3.Numerical simulation
3.1.Learning
周期が32で9つのリサージュ曲線を遷移するマルコフ連鎖による訓練データ
Fig.1. (a)Training data generated by Markov chain switching of 9 Lissajous curves.(b)Each Lissajous curve.The subscript of each
figure denotes the index of each Lissajous curve.The transitions among curves are consonant with continuity of the orbit.
xn,1  Ai cos(ai n)  Bi
(17)
xn,2  Ci sin(bi n  ci )  Di
(18)
フィードバックの時間遅れ  、 yn  xn を満たす訓練データ
D  ( X ,Y )
3.1.Learning
遷移確率R
(19)
訓練データの長さ T = 10,000、学習は300,000ステップ行う。
モジュールの数は N = 24、10次元のコンテキストニューロン、時定数を   0.1 、
フィードバックの時間遅れ  5 、分散の下限を   0.05 、
事前分布の標準偏差を   1 、慣性項  0.9 、学習係数
 0.01 Td とする。
n  0 と   1で初期化し、
(i )
(i )
要素(element of the matrices) W1(i ) ,W2(i ) ,W3(i ) とベクトル(the vectors) v1 , v2 は-0.1から
(i )
0.1の範囲でランダムに初期化し、初期状態 uo を-1から1の範囲でランダムに初期化
する。

3.1.Learning
平均2乗誤差の定義
1 T
E
 y  yn
2Td n1 n
2
(20)
yn :訓練データ
y n :モデルの出力
Fig.2.Mean square error for each learning step.(a)Open-loop dynamics.(b)Closed-loop dynamics.
Fig.3.The parameter σ under adaptive optimization.
3.1.Learning
時間 n にモジュール i が選択される確率 q(i,n)
q(i, n) 
gn(i ) p( xn  i )
N
g
k 1
(k )
n
p( xn  k )
gn(i ) p( xn  i )

pxn n ,  
(21)
qmax(n)  arg max q(i, n)
(22)
Q  i nqmax(n)  i
(23)
1i  N
Fig.4.The number of elements in Q for each learning step.
3.1.Learning
Fig.5.A snapshot of the training data,output and gate opening values at the end of learning.(a)The training data.(b)The
casein which σ is optimized.(c)The case of constant σ.In (b) and (c),the upper figures display output of trained models for
the closed-loop dynamics,and lower figures display gate opening values,where the number over a gate opening value
denotes the current opening gate.
3.1.Learning
Fig.6.Trajectories generated by trained models in the closed-loop dynamics.Here (a) and (b) display outputs of the trained
model and the output of modules in the case of adaptive σ,respectively.(c) and (d) also display these outputs in the case
of constant σ.Notice that the output of a module i is plotted if qmax(n) = i,namely,if gate i opens at time n.If gate i never
opened,then drawing the module i is omitted.
3.2.Generalization
Fig.7.The generalization error and |Q| after 100,000 learning steps for each value of the parameter N,the number of learning
modules.(a)The generalization error for the closed-loop dynamics.(b)The number of elements in the set Q.In the case of RNN using
BPTTT,the number of context neurons in the RNN is set to 10N,that is,the total number of context neurons in the mixture of RNN
experts.For each parameter N,we computed the results for 10 samples with different initial conditions,training data and test data.
Fig.8.(a)The generalization error for the closed-loop dynamics.(b)The number of elements in the set Q for the test data.For each
parameter ς ,we computed the results for 10 samples up to 100,000 learning steps,where the number of learning modules is N = 16.
3.3.Practical application
Fig.9.Humanoid robot behavior.
①物に手を伸ばす
②上下に動かす
③左右に動かす
④前後に動かす
⑤左右の手で交互にふれる
⑥両手でふれる
3.3.Practical application
Fig.10.Mean square error for closed-loop dynamics for learning of humanoid robot tasks.(a)Learning for expert modules.(b)Learning
for a gating network to generate gn in computation of closed-loop dynamics.
3.3.Practical application
Fig.11.Time series of motor vector and gate opening vector.Output yn and gate opening vector gn of trained model are computed
in closed-loop dynamics.For each time series,only the initial state of the model differs.
4.Discussion
4.1.Segmentation of temporal time series caused by indeterminacy
観測データに不確定要素を伴う、リサージュ曲線を確率的に
変化したり、ロボットの行動を任意で構成したりする学習は、
mixture of RNN expertsモデルに非決定性選択の情報を用い
てデータをうまく分節させる。
現在の課題はTani and Nolfiによって検討された分節手法で
本質的な特徴を再現することである。
4.2.Dynamic change of functions
動的システムを利用したシステムは他に、
・時間発展規則に影響している複数の写像を動的に切り替
わる切り替え写像システム
・多様な秩序状態を遷移するカオス的遍歴
・1次元関数空間上の動的システムである関数ダイナミクス
などがあり、これらのシステムは提案手法のモデルで学習で
きるかは、まだはっきりしていない。
モデルの学習の可能性を解明することは将来の研究テーマ
である。
5.Conclusion
従来法では学習できないデータでも、適切に
分節を行うことができる。
提案手法がモデルの学習能力を向上させて
いる。
ヒューマノイドロボットの実験を通して、提案
手法の有用性を確認している。