Monte Carlo Filtering Objectives

Shuangshuang Chen, Sihao Ding, Yiannis Karayiannidis, Mårten Björkman

Abstract

Training generative models for time series data is often hampered by high-variance gradient estimates when approximating the marginal likelihood. We introduce Monte Carlo Filtering Objectives (MCFOs), a family of variational bounds that decompose the marginal likelihood into a sequence of conditional filtering steps. By utilizing the reparameterization trick for proposal models and score function estimators for generative models, MCFOs provide stable, lower-variance gradients without the bias inherent in previous methods like AESMC or FIVO. Our results across synthetic state-space models, high-dimensional video sequences, and polyphonic music benchmarks demonstrate that MCFOs achieve faster convergence, higher sample efficiency, and state-of-the-art performance.

Introduction

Learning generative models for temporal data—such as video frames or musical sequences—requires inferring latent trajectories that drive the observed data. Since these hidden states are typically intractable, researchers rely on surrogate objectives like the Evidence Lower Bound (ELBO) or tighter bounds derived from Sequential Monte Carlo (SMC). However, existing SMC-based methods often suffer from a "gradient problem": the resulting gradient estimates exhibit extreme variance. To maintain training stability, practitioners frequently omit high-variance terms, introducing a permanent bias that prevents models from ever reaching their true potential.

The MCFO Framework

Monte Carlo Filtering Objectives (MCFOs) address these challenges by breaking down the total log-likelihood of a sequence into a sum of conditional log-likelihoods for each time step. This decomposition allows for more flexible and stable estimation.

Key Technical Innovations

  • Flexible Estimators: MCFOs are not restricted to SMC; they can incorporate various estimators, such as Particle Independence Metropolis-Hastings (PIMH), to improve the quality of the latent state approximation.
  • Gradient Stability: By combining the reparameterization trick for the proposal distribution with a score function estimator for the generative model, MCFOs avoid high-variance terms without resorting to biased approximations.
  • Optimal Proposals: The framework ensures that the objective is maximized when the proposal distribution matches the true filtering posterior, providing a clear optimization target.
Performance of MCFO on Linear Gaussian State Space Models (LGSSM). MCFO shows superior convergence in marginal likelihood, lower gradient norms, and higher Effective Sample Size (ESS) compared to baselines.

Experimental Evaluation

The authors evaluated MCFOs on three distinct types of temporal data to verify gradient accuracy and modeling performance.

Datasets

  1. Linear Gaussian State Space Models (LGSSM): A synthetic benchmark where ground truth is known, used to validate gradient fidelity.
  2. Pendulum Video Sequences: 1,000 simulated $32 \times 32$ pixel sequences of a pendulum system, representing high-dimensional, non-linear dynamics.
  3. Polyphonic Music: Standard benchmarks (Nottingham, JSB chorales, MuseData, Piano-midi.de) for modeling complex non-Markovian sequences.

Gradient Fidelity and Bias

A critical advantage of MCFOs is their ability to produce unbiased gradients. As shown in the gradient distribution analysis, MCFO gradients align closely with the analytic ground truth, whereas previous methods like IWAE or AESMC exhibit significant bias or excessive variance in certain parameter regimes.

Comparison of gradient distributions for model parameters (theta) and proposal parameters (phi). MCFO gradients (orange) closely track the analytic ground truth (dashed line), while IWAE (blue) and AESMC (green) show significant bias or variance.

Key Results and Insights

  • Faster Convergence and Sample Efficiency: In the pendulum task, MCFO-SMC and MCFO-PIMH converged faster and reached lower prediction errors than AESMC. Furthermore, MCFOs demonstrated higher Effective Sample Size (ESS), indicating more efficient use of particles.
  • State-of-the-Art Music Modeling: MCFOs outperformed established models (FIVO, IWAE, SRNN) in Negative Log-Likelihood (NLL) across all music datasets. For instance, on the Nottingham dataset, MCFO-PIMH reached an NLL of 2.06, significantly better than FIVO's 2.58.
  • The "Bias Trap": The experiments confirm that dropping high-variance gradient terms (a common practice in AESMC) creates a performance "floor." MCFOs bypass this limitation, allowing the model to reach the true optimum.

Conclusion and Future Work

MCFOs represent a significant step forward in training generative models for time series by providing a stable, unbiased, and sample-efficient objective. While MCFO-PIMH introduces some computational overhead due to its iterative nature, the gains in convergence speed and final model quality are substantial. Future research may extend this framework from filtering to smoothing and explore the integration of Normalizing Flows to further enhance the flexibility of the latent state distributions.

Summary updated

BibTeX
@inproceedings{chen2021monte,
  author = {Shuangshuang Chen and Sihao Ding and Yiannis Karayiannidis and Mårten Björkman},
  title = {{Monte Carlo Filtering Objectives}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.24963/ijcai.2021/311},
}
Figure