Table of Contents
Fetching ...

TopoCL: Topological Contrastive Learning for Time Series

Namwoo Kim, Hyungryul Baik, Yoonjin Yoon

TL;DR

This work tackles universal time series representation learning, where augmentation-induced information loss hampers semantic capture. It introduces TopoCL, a dual-modality framework that jointly learns temporal representations and topological features derived from persistent homology, aligned through a cross-modal contrastive objective. Persistence diagrams from delay-embedded time series are encoded and fused with temporal features, yielding state-of-the-art results across anomaly detection, classification, forecasting, and transfer learning while remaining robust to various augmentations. The study demonstrates the practical value of incorporating topology into time-series learning and highlights directions for scaling topological computations in foundation-model-scale pretraining.

Abstract

Universal time series representation learning is challenging but valuable in real-world applications such as classification, anomaly detection, and forecasting. Recently, contrastive learning (CL) has been actively explored to tackle time series representation. However, a key challenge is that the data augmentation process in CL can distort seasonal patterns or temporal dependencies, inevitably leading to a loss of semantic information. To address this challenge, we propose Topological Contrastive Learning for time series (TopoCL). TopoCL mitigates such information loss by incorporating persistent homology, which captures the topological characteristics of data that remain invariant under transformations. In this paper, we treat the temporal and topological properties of time series data as distinct modalities. Specifically, we compute persistent homology to construct topological features of time series data, representing them in persistence diagrams. We then design a neural network to encode these persistent diagrams. Our approach jointly optimizes CL within the time modality and time-topology correspondence, promoting a comprehensive understanding of both temporal semantics and topological properties of time series. We conduct extensive experiments on four downstream tasks-classification, anomaly detection, forecasting, and transfer learning. The results demonstrate that TopoCL achieves state-of-the-art performance.

TopoCL: Topological Contrastive Learning for Time Series

TL;DR

This work tackles universal time series representation learning, where augmentation-induced information loss hampers semantic capture. It introduces TopoCL, a dual-modality framework that jointly learns temporal representations and topological features derived from persistent homology, aligned through a cross-modal contrastive objective. Persistence diagrams from delay-embedded time series are encoded and fused with temporal features, yielding state-of-the-art results across anomaly detection, classification, forecasting, and transfer learning while remaining robust to various augmentations. The study demonstrates the practical value of incorporating topology into time-series learning and highlights directions for scaling topological computations in foundation-model-scale pretraining.

Abstract

Universal time series representation learning is challenging but valuable in real-world applications such as classification, anomaly detection, and forecasting. Recently, contrastive learning (CL) has been actively explored to tackle time series representation. However, a key challenge is that the data augmentation process in CL can distort seasonal patterns or temporal dependencies, inevitably leading to a loss of semantic information. To address this challenge, we propose Topological Contrastive Learning for time series (TopoCL). TopoCL mitigates such information loss by incorporating persistent homology, which captures the topological characteristics of data that remain invariant under transformations. In this paper, we treat the temporal and topological properties of time series data as distinct modalities. Specifically, we compute persistent homology to construct topological features of time series data, representing them in persistence diagrams. We then design a neural network to encode these persistent diagrams. Our approach jointly optimizes CL within the time modality and time-topology correspondence, promoting a comprehensive understanding of both temporal semantics and topological properties of time series. We conduct extensive experiments on four downstream tasks-classification, anomaly detection, forecasting, and transfer learning. The results demonstrate that TopoCL achieves state-of-the-art performance.

Paper Structure

This paper contains 30 sections, 15 equations, 5 figures, 6 tables.

Figures (5)

  • Figure 1: Illustration of persistence diagram
  • Figure 2: (a) Overall framework of TopoCL. TopoCL consists of two distinct modules: a temporal module and a topological module. The temporal module learns semantically meaningful temporal characteristics using a hierarchical contrastive loss, while the topological module facilitates time-topology correspondence through cross-modal contrastive loss. To achieve this, topological feature construction is performed in three steps: time delay embedding, persistence diagram calculation via Vietoris-Rips filtration, and point cloud transformation. Subsequently, a contrastive loss between the embeddings from the time and topology modalities is applied to ensure time-topology correspondence. TopoCL jointly optimizes the learning process through both intra-modal and cross-modal correspondences. After pre-training, the embedding vectors obtained from $f^{time}_\theta$ are used for downstream applications. (b) Topological feature extractor $f^{topo}_\theta$. Topological feature extractor comprises a series of multilayer perceptrons with ReLU activations and max-pooling layer.
  • Figure 3: A Critical Difference (CD) diagram of representation learning methods on time series classification tasks, using 125 UCR datasets and 29 UEA datasets
  • Figure 4: Classification results on $Crop$ data with various augmentation techniques
  • Figure 5: Classification results in a limited data sample scenario.