Tripletformer for Probabilistic Interpolation of Irregularly sampled Time Series

Vijaya Krishna Yalavarthi, Johannes Burchert, Lars Schmidt-Thieme

TL;DR

This paper introduces "Tripletformer," a novel attention-based model for probabilistically interpolating irregularly sampled time series with missing data. By treating observations as "triplets" of time, channel, and value, Tripletformer effectively captures complex inter-channel relationships, leading to significantly more accurate and certain predictions compared to existing methods.

What Problem Does This Paper Address?

Many real-world time series, particularly in fields like healthcare (e.g., patient monitoring) and environmental science, are inherently irregular. This means data points are not collected at fixed intervals, and crucial observations are often missing. This irregularity poses a significant challenge for standard time series analysis and imputation techniques, which typically assume regular sampling. The paper addresses the problem of probabilistic interpolation for these Irregularly Sampled Time Series with Missing Values (IMTS). Probabilistic interpolation is crucial because it not only estimates missing values but also quantifies the uncertainty associated with these estimates, preventing overconfident and potentially misleading predictions. Existing deep learning models often struggle with IMTS due to variable channel lengths and non-periodic observations.

Methods

The core innovation is the Tripletformer, an encoder-decoder architecture designed to handle IMTS.

  • Input Representation: Instead of treating time series as sequences, Tripletformer views IMTS as a set of observations, where each observation is a triplet (time, channel, value). This set-based representation is key to handling the irregularity.
  • Encoder: The encoder uses an Induced Multihead Attention Block (IMAB). IMAB is a variation of Multihead Attention (MHA) that reduces computational complexity from quadratic to near-linear by using a fixed set of "induced points" to attend to. This is crucial for handling potentially long time series. The encoder learns to capture both inter- and intra-channel interactions simultaneously by processing these triplets.
  • Decoder: The decoder takes the encoder's output and target query points (time, channel) to predict the probability distribution of the missing values. It uses a Cross-attention block to align target queries with the encoder's learned representations.
  • Probabilistic Output: The model is designed to output heteroscedastic variance, meaning the uncertainty of predictions can vary across different time points and channels, which is more realistic than homoscedastic models. The loss function used is Negative Loglikelihood (NLL), augmented with Mean Squared Error (MSE) to prevent local optima.

Datasets

The paper evaluates Tripletformer on a combination of real-world and synthetic datasets:

  • Real-world IMTS Datasets:
    • Physionet2012
    • MIMIC-III
    • Physionet2019
  • Synthetic IMTS Datasets: Created from real-world MTS datasets (PenDigits and PhonemeSpectra) to simulate extremely sparse scenarios.

The datasets were preprocessed to handle erroneous observations and standardized. Experiments were conducted under two missing patterns: random missing and burst missing.

Key Insights and Ideas

  • Set-based Representation is Key: Treating IMTS as a set of (time, channel, value) triplets, rather than a fixed sequence, is a fundamental shift that allows models to naturally handle irregular sampling.
  • Induced Attention for Scalability: The use of Induced Multihead Attention Blocks (IMAB) in the encoder is critical for making the model computationally feasible for long time series, overcoming the quadratic complexity bottleneck of standard MHA.
  • Inter-channel Interactions are Crucial: The Tripletformer's ability to learn cross-channel interactions simultaneously in the encoder is a significant advantage, especially for synthetic datasets where these interactions might be more pronounced.
  • Probabilistic Output with Heteroscedasticity: The model's ability to provide not just point estimates but also uncertainty estimates (mean and variance) that adapt to the data is vital for reliable imputation in critical applications.

Key Results

Tripletformer demonstrated superior performance across various experiments:

  • Probabilistic Interpolation: Achieved significant improvements in Negative Loglikelihood (NLL) error, with up to 32% improvement on real-world datasets and 85% on synthetic datasets compared to the next best model (HETVAE).
  • Burst Missing: Performed particularly well in burst missing scenarios, which are more challenging than random missing.
  • Deterministic Interpolation: Even when evaluated for deterministic interpolation (predicting only the mean), Tripletformer outperformed baselines by a significant margin, reducing Mean Squared Error by an average of 12%.
  • Scalability: The IMAB in the encoder allows Tripletformer to scale to large datasets like Physionet2019 with up to 3080 observations.
  • Qualitative Comparison: Visualizations showed Tripletformer providing more accurate predictions with higher certainty compared to HETVAE.

Limitations and Future Work

  • Assumed Distribution: The paper assumes a Gaussian distribution for the target values. If the true underlying distribution deviates significantly, the model's performance might degrade. The authors suggest exploring other parametric distributions.
  • Marginal vs. Joint Distributions: The current focus is on marginal distributions. The authors propose future work to develop models that employ joint distributions, which could potentially enhance prediction smoothness and reduce variability for random target times.
  • Computational Resources: While IMAB reduces complexity, conducting experiments with diffusion models like CSDI on all datasets was computationally prohibitive.

The paper concludes that Tripletformer offers a robust and scalable solution for probabilistic interpolation of IMTS, outperforming existing state-of-the-art methods across various scenarios.

Summary updated

Abstract

Irregularly sampled time series data with missing values is a observed in many fields like healthcare, astronomy, and climate science. Interpolation of these types of time series is crucial for tasks such as root cause analysis and medical diagnosis, as well as for smoothing out irregular or noisy data. To address this challenge, we present a novel encoder-decoder architecture called “Tripletformer” for probabilistic interpolation of irregularly sampled time series with missing values. This attention-based model operates on sets of observations, where each element is composed of a triple of time, channel, and value. The encoder and decoder of the Tripletformer are designed with attention layers and fully connected layers, enabling the model to effectively process the presented set elements. We evaluate the Tripletformer against a range of baselines on multiple real-world and synthetic datasets and show that it produces more accurate and certain interpolations. Results indicate an improvement in negative loglikelihood error by up to 32% on real-world datasets and 85% on synthetic datasets when using the Tripletformer compared to the next best model.
BibTeX
@inproceedings{yalavarthi2023tripletformer,
  author = {Vijaya Krishna Yalavarthi and Johannes Burchert and Lars Schmidt-Thieme},
  title = {{Tripletformer for Probabilistic Interpolation of Irregularly sampled Time Series}},
  booktitle = {IEEE Big Data},
  year = {2023},
  doi = {10.1109/bigdata59044.2023.10386325},
}
Figure