Variational Kalman Filter
Yoshiaki SakakuraDenso IT Laboratory, INC.
DENSO IT Laboratory, INC. 1
Variational Kalman Filter(VKF)
• The Variational Kalman Filter and an Efficient Implementation using Limited Memory BFGS, Int. J. Numer. Meth. Fluids, 2010
– 高速・省メモリな Kalman Filter の設計法(大規模問題を想定)
– Fluids!(データ同化ってやつですか)
DENSO IT Laboratory, INC. 2
導入(1/3) : 状態空間モデル
• 構成・・・状態ダイナミクス+観測で構成される系
• 目的・・・現在・未来・過去の状態を知りたい
– 現在:フィルタ、未来:予測、過去:平滑化
• 応用・・・各種シミュレーション、トラッキング、SLAM etc…
xt‐1 xt xt+1
yt‐1 yt yt+1
状態
観測
フィルタ
平滑化 予測
,
,
~ ;
~ ;
: 1vector : 1vector
DENSO IT Laboratory, INC. 3
導入(2/3) : Kalman Filter
• 線形・ガウス型状態空間モデルを想定
• フィルタと予測を繰り返す演算
• 現在・未来の状態を知りたい
~ 0,
~ 0,Prediction
Filtering
Initialization
← 1 and return to Prediction Step
Initialize , and ← 1
DENSO IT Laboratory, INC. 4
導入(3/3) : Kalman Filterの限界
• 問題が大規模になると、
– メモリの限界・・・ M×Mの密行列( : N×Nの密行列 に依存)
– 計算量の限界・・・Kalman Gain : N×Nの逆行列計算
• ※ , , , :疎行列と仮定
Prediction
Filtering
Initialization
← 1 and return to Prediction Step
Initialize , and ← 1
DENSO IT Laboratory, INC. 5
VKF概要
• 目的
– の省メモリ表現
– を直接計算回避
• 手段
– Kalman Filter を2つの最適化問題で表現
• 本質的な問題 : Optimizer: 、Inverse Hessian : • 補助問題・・・上記問題を解くために必要
– L‐BFGS(Limited memory BFGS)で解法
• (Inverse)Hessianの省メモリ近似を用いる準ニュートン法
argmin by LBFGS
as LBFGS form
as LBFGS form
Prediction
Filtering
InitializationInitialize , and ← 1
← 1 and return to Prediction StepDENSO IT Laboratory, INC. 6
アウトライン
• L‐BFGS(Limited Memory BFGS)
• VKF algorithm導出
• 数値実験結果
• 関連研究との比較
• まとめ
• おまけ
DENSO IT Laboratory, INC. 7
アウトライン
• L‐BFGS(Limited Memory BFGS)
• VKF algorithm導出
• 数値実験結果
• 関連研究との比較
• まとめ
• [おまけ]
DENSO IT Laboratory, INC. 8
準ニュートン法
• 最適化の各STEPで、(inverse)Hessian を近似しながら最適化
min , ∈
Line Search
Input: , , , ∈← 0
Repeat until convergence
← 1output: , ,
DENSO IT Laboratory, INC. 9
の算出法 BFGS公式
• 天下り!
– ポイントは更新式になっているところ
– ※今回はInverse Hessianを使うので、両方かいとくよー。
,
Hessian(BFGS)
Inverse Hessian(BFGS)
DENSO IT Laboratory, INC. 10
実は
• : 、 に最も近い、ただしセカント条件、正定値条件を満たす中で
– 最も近い : KL Divergence最小化
– セカント条件 : ヘシアンによく似ている形
– 正定値条件 ≻ : 下ってくれる
argminKL , , ,
s.t. , ≻
,
DENSO IT Laboratory, INC. 11
L‐BFGS公式 : Inverse Hessian approximation
• の再帰展開し, 次で打ち切り で打ち切り
– メモリオーダ → : 通常 10– 過去 回分の , ∈ だけ覚えておけばよい
⋯ ⋯⋯ ⋯⋯ ⋯
⋯
,
∈∈
∈ :sparse
⋯ ⋯⋯ ⋯⋯ ⋯
⋯
Inverse Hessian(L‐BFGS)
DENSO IT Laboratory, INC. 12
LBFGSによる準ニュートン構成
min , ∈
Define as LBFGS Inverse Hessian form
Line Search
Input: , , , ∈ :sparse,
← 0Repeat until convergence
Compute sequentially
: initial search direction
← 1Archive , :latest time search
output: , , (LBFGS form)
DENSO IT Laboratory, INC. 13
アウトライン
• L‐BFGS(Limited Memory BFGS)
• VKF algorithm導出
• 数値実験結果
• 関連研究との比較
• まとめ
• [おまけ]
DENSO IT Laboratory, INC. 14
Optimizer: ,Inverse Hessian : を持つ最適化問題
• 事後確率 の最大化
– フィルタ演算そのもの : Kalman Filter の本質的な最適化問題
→ min.
∝12
12
ln ∝ ln ln
argmin
DENSO IT Laboratory, INC. 15
補助問題
• 損失関数 を効率的に計算
• をInverse Hessianにもつ最適化問題
12
12 → min.
DENSO IT Laboratory, INC. 16
VKF Algorithm
Define auxiliary probrem
argmin by LBFGS
as LBFGS
as LBFGS form
Define
Define MAP loss function|
Prediction
Filtering
Initialization
Initialize , :sparse and ← 1
← 1 and return to Prediction Step
DENSO IT Laboratory, INC. 17
アウトライン
• L‐BFGS(Limited Memory BFGS)
• VKF algorithm導出
• 数値実験結果
• 関連研究との比較
• まとめ
• [おまけ]
DENSO IT Laboratory, INC. 18
数値実験結果
A) Filtering Step が進むにつれKFに漸近
B) 条件によっては、初期にKFより精度が高い(筆者らは、LBFGSによる正則化効果であると主張)
C) KFではメモリ制約で実行できない場合にも適用可能
※ちなみに、状態数=32で、計算時間は1/10まで低下らしい
状態数32
システム誤差、観測誤差パターンA
状態数32
システム誤差、観測誤差パターンB
状態数256
※KFはメモリ不足で計算できず
〇: VKF*: KF
〇: VKF*: KF
〇: VKF*:LBFGS‐KF(前ver.)
問題
結果(A) 結果(B) 結果(C)
DENSO IT Laboratory, INC. 19
状態
推定
誤差
関連研究との比較
• 【関連研究】
– 状態・分散共分散行列の低ランク近似(以下LRA)• 時不変基底、重みを時間発展
– Ensemble Kalman Filter(EnKF), Particle Filter(PF)• 各推定量をサンプルで近似
• 共分散行列が退化していれば少サンプルで近似可能
• 【比較】
– モデル表現の厳密性・柔軟性
• v.s. LRA : 時変性をうまくモデル化できる(特にEKFで効く?)
• v.s. EnKF/PF : サンプリングバイアスがない(ただしガウスのみ)
• 事後確率に任意の正則化項導入(ただし諸刃の剣)
– 計算量
• LBFGSの収束性能依存(ただし超1次収束)
• LBFGS部分の並列化困難
DENSO IT Laboratory, INC. 20
アウトライン
• L‐BFGS(Limited Memory BFGS)
• VKF algorithm導出
• 数値実験結果
• 関連研究との比較
• まとめ
• [おまけ]
DENSO IT Laboratory, INC. 21
まとめ
• 【まとめ】
– Variational Kalman Filter の紹介
• LBFGSを用いた、共分散行列の省メモリ構成、Kalman Gain計算回避
– 他手法との比較(ここらへん加味して選択しよう)
• モデル表現の厳密性・柔軟性
• 計算量
DENSO IT Laboratory, INC. 22
アウトライン
• L‐BFGS(Limited Memory BFGS)
• VKF algorithm導出
• 数値実験結果
• 関連研究との比較
• まとめと今後
• [おまけ]
DENSO IT Laboratory, INC. 23
おまけ
• とはいえ、みなさんEmsembleばら撒くの好きでしょ?
– Emsemble→ 高速+ 非線形 + 非ガウス
• というわけで VEnKF (Variational Ensemble Kalman Filter [SOLONEN 2012])• EnKFに比べ少ないサンプルで高い推定精度を得ている
– だけど、ガウス
DENSO IT Laboratory, INC. 24
参考文献
• H. Auvinen et. al., The Variational Kalman Filter and an Efficient Implementation using Limited Memory BFGS, Int. J. Numer. Meth. Fluids, 2010
• Antti Solonen et. al., Variational Ensemble Kalman Filtering Using Limited Memory BFGS, ENTA, 2012
• 淡路敏之ら, データ同化観測・実験とモデルを融合するイノベーション, 京都大学学術出版会, 2009
• Takafumi Kanamori et. al., A Bregman Extension of quasi‐Newton updates I: An Information Geometrical framework, arXiv:1010.2847, 2010
DENSO IT Laboratory, INC. 25
Top Related