On Time Series Clustering with Graph Neural Networks

Abstract

Graph clustering and pooling operators have been adopted in graph-based architectures to capture meaningful patterns in time series data by leveraging both temporal and relational structures. However, the contribution of each design choice and the behavior of different operators remain underexplored. This work introduces a streamlined deep learning framework based on a spatio-temporal graph neural network (STGNN) for clustering time series, which can leverage prior knowledge on the spatial structure of the data. The STGNN-based model flexibly identifies clusters in various data settings through an encoder-decoder architecture with a bottleneck, showing that a spatio-temporal approach can identify meaningful clusters even in datasets that do not explicitly include spatial relations. We validate the framework’s qualitative performance through experiments on synthetic and real-world data, showing its effectiveness in different scenarios. We also provide a heuristic for model selection in unsupervised settings via a self-supervised forecasting loss. Code is available at https://github.com/NGMLGroup/Time-Series-Clustering-with-GNNs

Cite

Text

Hansen et al. "On Time Series Clustering with Graph Neural Networks." Transactions on Machine Learning Research, 2025.

Markdown

[Hansen et al. "On Time Series Clustering with Graph Neural Networks." Transactions on Machine Learning Research, 2025.](https://mlanthology.org/tmlr/2025/hansen2025tmlr-time/)

BibTeX

@article{hansen2025tmlr-time,
  title     = {{On Time Series Clustering with Graph Neural Networks}},
  author    = {Hansen, Jonas Berg and Cini, Andrea and Bianchi, Filippo Maria},
  journal   = {Transactions on Machine Learning Research},
  year      = {2025},
  url       = {https://mlanthology.org/tmlr/2025/hansen2025tmlr-time/}
}