Self-supervised Autoregressive Domain Adaptation for Time Series Data

Mohamed Ragab, Emadeldeen Eldele, Zhenghua Chen, Min Wu, Chee-Keong Kwoh, Xiaoli Li · DOI

Abstract

Unsupervised Domain Adaptation (UDA) for time series faces unique challenges, including temporal dependencies and the absence of universal pre-training datasets. This paper introduces SLARDA (Self-supervised Autoregressive Domain Adaptation), a framework designed to learn robust, domain-invariant features by combining self-supervised forecasting with an autoregressive discriminator and a teacher model for precise class alignment. Evaluated across human activity recognition, sleep stage classification, and machine fault diagnosis, SLARDA consistently outperforms state-of-the-art methods, demonstrating significant improvements in cross-domain accuracy.

Introduction: The Challenges of Time Series UDA

Unsupervised Domain Adaptation (UDA) aims to transfer knowledge from a labeled "source" domain to an unlabeled "target" domain. While highly successful in computer vision, time series data presents three distinct hurdles:

  1. The Pre-training Gap: Unlike vision models that leverage ImageNet, time series models often start from scratch, resulting in features that are overly specific to the source domain.
  2. Temporal Blindness: Standard UDA methods often treat features as static vectors, ignoring the critical temporal order inherent in time series.
  3. Class-Conditional Shift: Global alignment strategies may inadvertently map source classes to incorrect target classes, leading to misclassification despite overall distribution matching.
Conceptual comparison between global feature alignment and SLARDA's class-conditional approach.

The SLARDA Framework

The proposed SLARDA framework addresses these challenges through a multi-pillared architecture that emphasizes temporal context and robust feature learning.

The SLARDA architecture, featuring self-supervised pre-training, an autoregressive discriminator, and a mean teacher model.

1. Self-supervised Pre-training

To bridge the pre-training gap, the source encoder is trained to predict future latent features from past sequences using a contrastive predictive loss ($L_{SL}$). This forces the model to capture the underlying dynamics of the data, which are typically more invariant across domains than raw signal values.

2. Autoregressive Domain Discriminator

Rather than evaluating single feature vectors, SLARDA employs a Transformer-based discriminator to analyze sequences of features. By accounting for temporal dependencies, this autoregressive discriminator ($L_{adv}$) makes it harder for the model to "cheat" the domain alignment, resulting in more robust domain-invariant features.

3. Ensemble Teacher Model for Class Alignment

To prevent class-conditional shifts, SLARDA utilizes a "Mean Teacher" approach. A temporal ensemble of the target model (updated via Exponential Moving Average) generates confident pseudo-labels for target data. These labels guide the main model ($L_{ca}$), ensuring that specific classes—such as different activity types or sleep stages—are correctly aligned across domains.

Experimental Evaluation

SLARDA was evaluated across 30 cross-domain scenarios in three real-world applications:

  • Human Activity Recognition (HAR): Using the Opportunity dataset (113 sensors, 4 users).
  • Sleep Stage Classification (SSC): Across Sleep-EDF, SHHS-1, and SHHS-2 datasets with varying hardware-induced shifts.
  • Machine Fault Diagnosis (MFD): Using the Paderborn bearing dataset under different operating conditions.

Key Results

SLARDA consistently outperformed baselines like DANN, CDAN, and DIRT:

  • HAR: 2.62% improvement over the best baseline.
  • SSC: 5% average improvement, particularly effective in high-to-low resolution mapping.
  • MFD: The most significant gain, with an average improvement of 17.34%. In difficult scenarios, accuracy jumped from ~50% to over 84%.
  • Ablation Study: Removing self-supervised pre-training led to an 8% performance drop, highlighting the importance of "ImageNet-style" pre-training for time series.

Insights and Future Directions

The success of SLARDA underscores that forecasting serves as a universal bridge for domain adaptation. By mastering future-state prediction in the source domain, the model naturally develops features useful for the target domain. Furthermore, maintaining temporal context during alignment prevents the loss of the data's "rhythm."

While SLARDA marks a significant step forward, it still relies on a large labeled source dataset. Future research may explore "few-shot" domain adaptation to reduce labeling burdens, potentially integrating even more advanced self-supervised techniques.

Summary updated

BibTeX
@article{ragab2021self,
  author = {Mohamed Ragab and Emadeldeen Eldele and Zhenghua Chen and Min Wu and Chee-Keong Kwoh and Xiaoli Li},
  title = {{Self-supervised Autoregressive Domain Adaptation for Time Series Data}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2021},
  doi = {10.1109/tnnls.2022.3183252},
}
Figure