The transfer of models trained on labeled datasets from a source domain to unlabeled target domains is facilitated by unsupervised domain adaptation (UDA). However, when dealing with complex time series models, transferability becomes challenging due to differences in dynamic temporal structures between domains, which can result in feature shifts and gaps in time and frequency representations. Additionally, the label distributions in the source and target domains can be vastly different, making it difficult for UDA to address label shifts and recognize labels unique to the target domain.
We introduce Raincoat, a domain adaptation method for time series that can handle both feature and label shifts.

Despite multiple recent methods being proposed to solve the time series UniDA problem under the assumption of feature shift, none of them take into account situations where changes in the frequency domain also act as an implicit feature shift. Furthermore, the field of universal DA for time series without making assumptions about label overlap between source and target domains is an unexplored area of research.
Raincoat Approach
Raincoat has three steps, as illustrated in the following figure:
-
Step 1: Align - It employs time and frequency-based encoders to learn time series representations, using Sinkhorn divergence for source-target feature alignment as frequency features may not have the same support.
-
Step 2: Correct - It retrains an encoder on the target domain to correct any potential misalignments.
-
Step 3: Inference - It calculates the difference between the aligned and corrected representations of target samples to identify unknown target samples through a bi-modality test and binary classification task.

Properties of Raincoat
To address feature shift, Raincoat takes into account implicit frequency feature shift and incorporates additional frequency feature inductive bias in the encoder, to uncover potential invariant features across domains and enhance transferability.
To address label shifts, it employs target-specific feature encoders that retain the semantic meaning of the target domain, enabling inference without relying on user-specified input.
Our experiments using 5 datasets and comparing with 13 state-of-the-art domain adaptation methods show that Raincoat outperforms these methods in the presence of both feature and label shifts. The following figure illustrates the superiority of Raincoat for closed-set domain adaptation.

Publication
Domain Adaptation for Time Series Under Feature and Label Shifts
Huan He, Owen Queen, Teddy Koker, Consuelo Cuevas, Theodoros Tsiligkaridis, Marinka Zitnik
In Review 2023 [arXiv]
@inproceedings{he2023domain,
title = {Domain Adaptation for Time Series Under Feature and Label Shifts},
author = {He, Huan and Queen, Owen and Koker, Teddy and Cuevas, Consuelo and Tsiligkaridis, Theodoros and Zitnik, Marinka},
booktitle = {https://arxiv.org/abs/2302.03133},
year = {2023}
}
Datasets
- Human activity recognition datasets:
- Polysomnograms of healthy subjects and of subjects with mild difficulty falling asleep and expert annotations of sleep stages
Code
PyTorch implementation together with documentation and examples of usage is available in the GitHub repository.