More Related Content
Similar to Hessian free (7)
More from Jiro Nishitoba (10)
Hessian free
- 6. 最適化
• 目的関数 f(θ)
• f: 連続関数
• θ: 入力で与えるパラメータ
• f(θ)の値を最小化するパラメータθとその時の値を求めたい
© 2017 Retrieva, Inc. 6
- 8. © 2017 Retrieva, Inc. 8
copyright: ForestWander Nature photograpy
http://www.ForestWander.com
月のない夜道、突然背後から襲われ気絶しました…
気づいたら真っ暗な闇の中…
ここは山の中だろうか…
あなたは遭難時の鉄則に従い、山頂を目指して歩くことに…
- 9. 最適化問題との対応
• 登る方向: 勾配
• 高さ: 目的関数の値
• 最適化手法
• (どこを歩いているか分からないにせよ) 高いところに向かって歩く
• どちらへ行こうとしても下る方向の時、その地点が求めたい所である
© 2017 Retrieva, Inc. 9
- 10. もうちょっと最適化問題との対応
• 最小化
• 谷底を見つける
• 方向を決めた後にワープをする
• 下り坂の方に方向を定める
• 勾配に応じて移動距離を決める
• 傾きが急であるときは良い方向であるので移動距離を長めに設定する
• 傾きが緩やかであるときは様子見で移動距離を短めにする
© 2017 Retrieva, Inc. 10
- 16. Deep Learningの学習における課題
© 2017 Retrieva, Inc. 16
• Deep Learningの学習における最適化は時間がかかる
• DeepSpeech2(Baidu): GPU1台だと3〜6週間
• RNN言語モデル(Google): Tesla K40を32台で10日
- 38. Hessianを必要とする例
• Bi-CG-STAB
• (A=H)
© 2017 Retrieva, Inc. 38
e scaling of different part in distributed HF on upto 32 nodes (1,152 cores).
always find a descent di-
gative directions, the ap-
unbounded below, which
uch direction (at least lo-
ximation is valid). It was
nd Prieto (2008) that if al-
e directions, it will even-
critical point.
improved method to find
y stabilized bi-conjugate
Algorithm 3), which is
ed to solve unsymmetri-
Algorithm 3 Bi-CG-STAB Algorithm
1: Compute r0 := b − Ax0. Choose r∗
0 such that
(r0, r∗
0) ̸= 0
2: p0 := r0, k := 0
3: if Termination condition not satisfied then
4: αj := (rj , r∗
0)/ (Apj , r∗
0)
5: sj := rj − αj Apj
6: γj := (sj , Asj )/ (Asj , Asj )
7: xj + 1 := xj + αj pj + γj sj
8: rj + 1 := sj − γj Asj
9: βj :=
(r j + 1 ,r ∗
0 )
(r j ,r ∗
0 ) ×
α j
γj
10: pj + 1 := rj + 1 + βj (pj − γj Apj )
11: end if
Hessianを用いる
ところの計算結果
はパラメータ数の
オーダー
- 40. Hessian Free
• Hx のようなHessian行列 x ベクトルの値をベクトルの内積で近
似する
• それによりパラメータ数の3乗のオーダーの計算量をパラメー
タ数のオーダーに減らすことができる
© 2017 Retrieva, Inc. 40
- 41. Hessian演算の近似
• H(Hessian) と v(ベクトル)の積を次の式で近似する
© 2017 Retrieva, Inc. 41
)
pproximated) Hessian-vector
tor product ∇ 2
f [i ] (θk )v cor-
ini-batch on each node i =
o root node to obtain Gk (v) =
各パラメータの二階の微分
ベクトルとvの積で近似
- 52. 参考文献
• James Marten, Ilya Sutskever Training Deep and Recurrent
Networks with Hessian-Free Optimization
• Ian Goodfellow and Yoshua Bengio and Aaron Courville Deep
Learning
• He, et al. Distributed Hessian-Free Optimization for Deep Neural
Network
• Krause, et al. On the Efficiency of Recurrent Neural Network
Optimization Algorithms
© 2017 Retrieva, Inc. 52