🤖 AI Summary
This study addresses the challenge of efficiently modeling high-dimensional time series data exhibiting both spatial dependencies and temporal trends, which traditional hidden Markov models (HMMs) struggle to handle. The authors propose integrating Gaussian random fields into the HMM framework to capture structured latent variables and develop an enhanced forward algorithm that explicitly exploits sparsity in the Hessian matrix of the likelihood function. By leveraging stochastic partial differential equations (SPDEs), Laplace approximation, automatic differentiation, and sparse optimization techniques—implemented within the Template Model Builder (TMB) framework—the method achieves, for the first time, scalable and efficient joint inference of Gaussian fields and HMMs in high dimensions. Empirical evaluations on stellar flare detection and lion movement trajectory modeling demonstrate substantial improvements in computational speed and scalability, confirming the approach’s effectiveness and practical utility.
📝 Abstract
Hidden Markov models (HMMs) are powerful tools for analysing time series data that depend on discrete underlying but unobserved states. As such, they have gained prominence across numerous empirical disciplines, in particular ecology, medicine, and economics. However, the increasing complexity of empirical data is often accompanied by additional latent structure such as spatial effects, temporal trends, or measurement perturbations. Gaussian fields provide an attractive building block for incorporating such structured latent variation into HMMs. Fast inference methods for Gaussian fields have emerged through the stochastic partial differential equation (SPDE) approach. Due to their sparse representation, these integrate well with novel frequentist estimation methods for random-effects models via the use of automatic differentiation and the Laplace approximation. Scaling to high dimensions requires tools such as (R)TMB to exploit sparsity in the Hessian w.r.t. the latent variables - a property satisfied by SPDE fields but violated by the HMM likelihood. We present a modified forward algorithm to compute the HMM likelihood, constructing sparsity in the Hessian and consequently enabling fast and scalable inference. We demonstrate the practical feasibility and the usefulness through simulations and two case studies exploring the detection of stellar flares as well as modelling the movement of lions.