Using matrix-product states for time-series machine learning
Joshua B. Moore, Hugo P. Stackhouse, Ben D. Fulcher, Sahand Mahmoodian
TL;DR
This work introduces MPSTime, an end-to-end MPS-based framework for learning the joint distribution of univariate time-series data to enable unified imputation and classification. Time-series values are mapped into a finite-dimensional Hilbert space via Legendre-based encoding, and the joint distribution is represented as an MPS, trained with a KL/NLL loss and a DMRG-like sweeping procedure. The authors demonstrate competitive performance on synthetic and real-world datasets spanning medicine, energy, and astronomy, and provide interpretable insights through single-site density matrices and entanglement entropy, along with trajectory generation capabilities. They also show robustness to missing data and discuss extensions to translationally invariant MPS for variable-length sequences and forecasting, with the MPSTime code released for public use.
Abstract
Matrix-product states (MPS) have proven to be a versatile ansatz for modeling quantum many-body physics. For many applications, and particularly in one-dimension, they capture relevant quantum correlations in many-body wavefunctions while remaining tractable to store and manipulate on a classical computer. This has motivated researchers to also apply the MPS ansatz to machine learning (ML) problems where capturing complex correlations in datasets is also a key requirement. Here, we develop and apply an MPS-based algorithm, MPSTime, for learning a joint probability distribution underlying an observed time-series dataset, and show how it can be used to tackle important time-series ML problems, including classification and imputation. MPSTime can efficiently learn complicated time-series probability distributions directly from data, requires only moderate maximum MPS bond dimension $χ_{\rm max}$, with values for our applications ranging between $χ_{\rm max} = 20-160$, and can be trained for both classification and imputation tasks under a single logarithmic loss function. Using synthetic and publicly available real-world datasets, spanning applications in medicine, energy, and astronomy, we demonstrate performance competitive with state-of-the-art ML approaches, but with the key advantage of encoding the full joint probability distribution learned from the data, which is useful for analyzing and interpreting its underlying structure. This manuscript is supplemented with the release of a publicly available code package MPSTime that implements our approach. The effectiveness of the MPS-based ansatz for capturing complex correlation structures in time-series data makes it a powerful foundation for tackling challenging time-series analysis problems across science, industry, and medicine.
