UniTS: A Universal Time Series Analysis Framework with Self-supervised Representation Learning

Zhiyu Liang, Chen Liang, Zheng Liang, Hongzhi Wang · DOI

TL;DR

This paper introduces UniTS, a novel framework for time series analysis that leverages self-supervised representation learning. By pre-training on unlabeled data, UniTS learns transferable features that significantly improve performance on various tasks, especially in challenging scenarios like partial labeling and domain shift, outperforming traditional task-specific methods.

What Problem Does This Paper Address?

Time series analysis, while powerful with machine learning, faces significant hurdles in real-world applications. These include:

  • Partial Labeling: Obtaining sufficient labeled data for supervised learning is often costly or impractical.
  • Domain Shift: Models trained on one data distribution often fail when applied to data with a different underlying distribution.
  • Task and Domain Specificity: Existing methods are often tailored to specific tasks (e.g., classification, forecasting) and domains, making it difficult to choose the right approach for a new problem.

UniTS aims to create a universal framework that addresses these challenges by learning robust, generalizable representations that can be adapted to various tasks and domains with minimal labeled data.

Methods

UniTS is built around a three-module framework, designed with a flexible, sklearn-like API for easy extension:

  1. Pre-training Module: This is the core of UniTS. It uses self-supervised learning techniques on unlabeled time series data to learn general-purpose representations. The paper mentions three types of pre-training objectives:
  2. Contrastive Learning: Encourages similar time series (or parts of them) to have similar representations, and dissimilar ones to have different representations. This is applied at whole-series, sub-sequence, and timestamp levels.
  3. Autoregression: Involves masking parts of a time series and then predicting the masked values from the unmasked ones, similar to masked language modeling in NLP.
  4. Hybrid: Combines objectives from contrastive learning and autoregression. The pre-training module learns task-independent encoders.

  5. Feature Fusion Module: This module takes the representations from multiple pre-trained encoders and combines them into a single, unified representation. This can be done through simple concatenation or by using a learnable projection model. This allows UniTS to benefit from diverse pre-trained features.

  6. Analysis Task Module: This module adapts the fused representations for specific downstream tasks. It involves appending a task-specific output model and fine-tuning the entire pipeline (encoders, fusion module, and output model) using a small amount of labeled data. UniTS supports five mainstream tasks: classification, clustering, forecasting, anomaly detection, and missing value imputation.

Datasets

The paper mentions using the UEA multivariate time series classification archive [1] for demonstration. They also refer to real-world tasks like Human Action Recognition (HAR), Fault Detection (FD) across different machine domains, and Server Monitoring (SM). The specific datasets for FD and SM are not detailed beyond their application context.

Key Insights and Ideas

  • Self-supervised learning is key to universality: By learning representations from unlabeled data, UniTS decouples the learning process from specific tasks and domains, leading to more robust and transferable features.
  • Pre-training reduces the need for labels: The learned representations capture rich information, meaning only a small amount of labeled data is needed for fine-tuning, effectively addressing the partial labeling problem.
  • Transferability across domains: Pre-trained encoders can learn features that are disentangled from domain-specific information, allowing for effective fine-tuning on new domains with limited target data.
  • Modularity and extensibility: The sklearn-like API design makes it easy for researchers to integrate new pre-training methods, feature fusion techniques, or analysis tasks into the UniTS framework.
  • Complementary representations: Using multiple pre-training methods and fusing their outputs can lead to richer representations than any single method alone.

Key Results

UniTS demonstrates superior performance compared to traditional methods that train models from scratch for specific tasks and domains. Specifically:

  • Partial Labeling: UniTS achieves significantly better performance than training from scratch when only a small percentage (e.g., 1%) of labeled data is available for tasks like Human Action Recognition (HAR).
  • Domain Shift: For tasks like Fault Detection (FD), UniTS shows improved generalization on a target domain using only 1% of target data, outperforming models trained from scratch on either just the target domain or both source and target domains.
  • Overall Performance: Figure 3 shows that UniTS consistently outperforms traditional training from scratch across various tasks (Classification, Clustering, Forecasting, Anomaly Detection, Imputation) and scenarios (partial labeling, domain shift). For example, in HAR classification with 1% labeled data, UniTS achieves ~0.9 accuracy, while training from scratch achieves ~0.3.

Limitations and Future Work

  • Limitations: The paper doesn't explicitly detail limitations of UniTS itself, but the performance gains are shown in specific benchmark settings. The effectiveness might vary with different types of time series data or more complex domain shifts.
  • Future Work: The authors highlight the ease of extending UniTS with new pre-training methods, feature fusion techniques, and analysis tasks. They also mention the integration of user-friendly GUIs and flexible hyper-parameter configurations, suggesting a focus on usability and broader adoption. The paper also implies that further exploration of hybrid pre-training objectives and advanced feature fusion strategies could yield even better results.

Summary updated

BibTeX
@inproceedings{liang2024units,
  author = {Zhiyu Liang and Chen Liang and Zheng Liang and Hongzhi Wang},
  title = {{UniTS: A Universal Time Series Analysis Framework with Self-supervised Representation Learning}},
  booktitle = {SIGMOD Conference Companion},
  year = {2024},
  doi = {10.1145/3626246.3654733},
}
Figure