Deep Kalman Filters

Rahul G. Krishnan, Uri Shalit, David A. SontagarXiv 2015

Abstract

Deep Kalman Filters (DKFs) represent a synthesis of classical state-space modeling and modern deep learning. By integrating the structured temporal dynamics of Kalman filters with the non-linear representational capacity of deep neural networks, DKFs enable robust generative modeling of complex time-series data. This framework, trained via variational inference, facilitates counterfactual reasoning—predicting outcomes of alternative interventions—which is particularly valuable in domains like healthcare for personalized treatment planning.

Introduction

Modeling the evolution of dynamical systems is fundamental across scientific disciplines, ranging from aerospace engineering to clinical medicine. Traditionally, the Kalman Filter has served as the standard for state estimation. However, its reliance on linear transition and emission functions limits its applicability to real-world datasets, such as Electronic Health Records (EHRs), where relationships are inherently non-linear. For instance, a patient's response to medication often depends non-linearly on demographic factors and medical history.

While Recurrent Neural Networks (RNNs) excel at sequence modeling, they often lack the explicit latent state structure required for counterfactual inference—answering "what-if" questions regarding specific interventions. Deep Kalman Filters bridge this gap by embedding deep neural networks within a structured probabilistic graphical model.

Methodology

The DKF framework leverages Variational Autoencoders (VAEs) and stochastic backpropagation to learn a generative model of sequences.

The Generative Model

The model defines a latent state $z_t$ that evolves over time. Unlike classical linear models, the transition function $p(z_t | z_{t-1}, u_{t-1})$ and the emission function $p(x_t | z_t)$ are parameterized by deep neural networks. This allows the model to capture complex, high-dimensional dependencies.

The Recognition Network

Because the true state $z_t$ is unobserved, a recognition network $q_\phi(\vec{z} | \vec{x}, \vec{u})$ approximates the posterior distribution. The authors evaluated several architectures for this network, finding that Bi-directional RNNs (q-BRNN) provided the most accurate state estimates by smoothing over both past and future observations.

Comparison of the standard Variational Autoencoder (a) and the proposed Deep Kalman Filter (b) architectures. The DKF incorporates temporal dependencies and external actions $u$.

Learning and Inference

The model is trained end-to-end by maximizing the Evidence Lower Bound (ELBO). By maintaining the Markov property—where the future state depends only on the current state and action—the complex joint probability distribution remains computationally tractable.

Experimental Evaluation

The authors validated DKFs on two primary datasets:

  • Healing MNIST: A synthetic dataset of rotating MNIST digits with added noise and a persistent "healing" feature to test long-range dependency capture.
  • Electronic Health Records (EHR): Real-world data from 8,000 diabetic patients, tracking lab results and prescriptions over 4.5 years.

Results and Discussion

Experimental results demonstrated that non-linear DKFs significantly outperformed linear baselines in log-likelihood on EHR data. In the Healing MNIST task, the model successfully filtered out 20% bit-flip noise, reconstructing clean digits and accurately predicting rotations.

Crucially, the model demonstrated strong counterfactual reasoning capabilities. By treating medications as actions ($u_t$), the DKF could simulate patient trajectories under different treatment scenarios. For example, it accurately predicted the adverse effects of withholding Metformin in diabetic patients, aligning with clinical expectations.

Conclusion and Future Work

Deep Kalman Filters provide a powerful tool for modeling non-linear dynamical systems with latent structure. While currently assuming Gaussian latent distributions, future work may explore more complex distributions via Normalizing Flows. Additionally, applying DKFs to unsupervised video learning or causal discovery remains a promising frontier for research.

Summary updated

BibTeX
@misc{krishnan2015deep,
  author = {Rahul G. Krishnan and Uri Shalit and David A. Sontag},
  title = {{Deep Kalman Filters}},
  year = {2015},
  eprint = {1511.05121},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1511.05121},
}
Figure