Adapting to the stream: an instance-attention GNN method for irregular multivariate time series data

Kun Han, Abigail M. Y. Koay, Ryan K. L. Ko, Weitong Chen, Miao XuFrontiers of Computer Science 2025 · OpenReview

Abstract

Multivariate time series (MTS) data are vital for various applications, particularly in machine learning tasks. However, challenges such as sensor failures can result in irregular and misaligned data with missing values, thereby complicating their analysis. While recent advancements use graph neural networks (GNNs) to manage these Irregular Multivariate Time Series (IMTS) data, they generally require a reliable graph structure, either pre-existing or inferred from adequate data to properly capture node correlations. This poses a challenge in applications where IMTS data are often streamed and waiting for future data to estimate a suitable graph structure becomes impractical. To overcome this, we introduce a dynamic GNN model suited for streaming characteristics of IMTS data, incorporating an instance-attention mechanism that dynamically learns and updates graph edge weights for realtime analysis. We also tailor strategies for high-frequency and low-frequency data to enhance prediction accuracy. Empirical results on real-world datasets demonstrate the superiority of our proposed model in both classification and imputation tasks.

Introduction

Multivariate Time Series (MTS) data is ubiquitous in modern technology, ranging from ICU patient monitoring to financial market analysis. Ideally, these data streams are sampled at regular intervals. However, real-world conditions often introduce noise, sensor failures, and network latency, resulting in Irregular Multivariate Time Series (IMTS). These irregular streams are characterized by missing values and misaligned timestamps, which present significant hurdles for traditional machine learning models.

Comparison of regular and irregular multivariate time series data.

Graph Neural Networks (GNNs) have emerged as a powerful tool for IMTS by modeling sensors as nodes and passing information between them to fill missing data. Yet, most GNN-based approaches rely on static graph structures or require full dataset access to compute correlations. This is unsuitable for streaming environments where data arrives sequentially and future information is unavailable. This paper addresses this gap by proposing a dynamic GNN that learns sensor relationships on the fly.

Methodology

We present DynIMTS (Dynamic IMTS), a recurrent architecture designed for step-by-step processing of streaming data. The model utilizes a spatial-temporal encoder that operates at each timestamp through three primary stages:

  1. Graph Learning via Instance-Attention: DynIMTS estimates current sensor relationships by calculating cosine similarity between embeddings from the previous timestamp. A novel instance-attention mechanism then aggregates these relationships across a batch of samples to form a cohesive, updated adjacency matrix.
  2. Embedding Learning: The model maps current inputs (including a missing-data mask) into a latent space. A Graph Convolutional Network (GCN) facilitates message passing, allowing sensors with missing data to "borrow" information from their neighbors.
  3. Spatial-Temporal Learning: A Gated Recurrent Unit (GRU) updates the temporal state of each sensor, integrating neighborhood-informed embeddings with historical patterns.
The multi-task learning framework for classification and imputation.

For high-frequency data, the model incorporates a linear imputation strategy and extended historical context to stabilize the learning process.

Experimental Evaluation

DynIMTS was evaluated on both imputation and classification tasks across several real-world datasets, including air quality indices (AQI), exchange rates, and ICU monitoring data (P12, P19).

Key Results

  • Imputation Accuracy: DynIMTS outperformed state-of-the-art models like BRITS and GRIN. On the AQI-36 dataset, it achieved a Mean Absolute Error (MAE) of 14.9, compared to GRIN's 15.7.
  • Classification Performance: On the P12 dataset, DynIMTS reached an AUROC of 75.1%, a significant improvement over the RITS baseline (71.2%).
  • Robustness: The model demonstrated exceptional resilience to extreme data loss. On the PAM dataset with 50% missing data, DynIMTS maintained 95.8% accuracy, whereas standard recurrent models like RITS dropped to 61.1%.

Discussion and Insights

A key finding of this research is that dynamic graph learning is superior to static physical graphs for streaming applications, as it adapts to shifting variables. Furthermore, the study observed that higher missing data rates can sometimes act as a regularizer in high-frequency datasets, smoothing out noise and forcing the model to focus on broader temporal trends.

Despite these strengths, the model's performance is less pronounced on very short time series (e.g., the P19 dataset), where there is insufficient sequential data to evolve the graph structure. Future work will focus on providing theoretical guarantees for the dynamic graph learning mechanism and refining precision for small numerical values.

Summary updated

Abstract

Multivariate time series (MTS) data are vital for various applications, particularly in machine learning tasks. However, challenges such as sensor failures can result in irregular and misaligned data with missing values, thereby complicating their analysis. While recent advancements use graph neural networks (GNNs) to manage these Irregular Multivariate Time Series (IMTS) data, they generally require a reliable graph structure, either pre-existing or inferred from adequate data to properly capture node correlations. This poses a challenge in applications where IMTS data are often streamed and waiting for future data to estimate a suitable graph structure becomes impractical. To overcome this, we introduce a dynamic GNN model suited for streaming characteristics of IMTS data, incorporating an instance-attention mechanism that dynamically learns and updates graph edge weights for realtime analysis. We also tailor strategies for high-frequency and low-frequency data to enhance prediction accuracy. Empirical results on real-world datasets demonstrate the superiority of our proposed model in both classification and imputation tasks.
BibTeX
@article{han2025adapting,
  author = {Kun Han and Abigail M. Y. Koay and Ryan K. L. Ko and Weitong Chen and Miao Xu},
  title = {{Adapting to the stream: an instance-attention GNN method for irregular multivariate time series data}},
  journal = {Frontiers of Computer Science},
  year = {2025},
  url = {https://openreview.net/forum?id=uOlQz81Kjw},
}
Figure