Contrastive Domain Adaptation for Time-Series via Temporal Mixup

Emadeldeen Eldele,Mohamed Ragab,Zhenghua Chen,Min Wu,Chee-Keong Kwoh,Xiaoli Li
DOI: https://doi.org/10.1109/TAI.2023.3293473
2023-07-27
Abstract:Unsupervised Domain Adaptation (UDA) has emerged as a powerful solution for the domain shift problem via transferring the knowledge from a labeled source domain to a shifted unlabeled target domain. Despite the prevalence of UDA for visual applications, it remains relatively less explored for time-series applications. In this work, we propose a novel lightweight contrastive domain adaptation framework called CoTMix for time-series data. Unlike existing approaches that either use statistical distances or adversarial techniques, we leverage contrastive learning solely to mitigate the distribution shift across the different domains. Specifically, we propose a novel temporal mixup strategy to generate two intermediate augmented views for the source and target domains. Subsequently, we leverage contrastive learning to maximize the similarity between each domain and its corresponding augmented view. The generated views consider the temporal dynamics of time-series data during the adaptation process while inheriting the semantics among the two domains. Hence, we gradually push both domains towards a common intermediate space, mitigating the distribution shift across them. Extensive experiments conducted on five real-world time-series datasets show that our approach can significantly outperform all state-of-the-art UDA methods. The implementation code of CoTMix is available at \href{<a class="link-external link-https" href="https://github.com/emadeldeen24/CoTMix" rel="external noopener nofollow">this https URL</a>}{<a class="link-external link-http" href="http://github.com/emadeldeen24/CoTMix" rel="external noopener nofollow">this http URL</a>}.
Machine Learning
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the **Unsupervised Domain Adaptation (UDA) problem in time - series data**. Specifically, it is about how to transfer knowledge from the source domain to the unlabeled target domain when there are distribution differences between the source and target domains. Although unsupervised domain adaptation has made significant progress in visual applications, there has been relatively little exploration on time - series data. ### Main problems: 1. **Domain distribution differences**: There are significant differences in time characteristics or working conditions between training data and test data, which lead to a decline in the performance of deep - learning models. 2. **Limitations of existing methods**: - **Statistical distance methods**: They ignore the time - dependence of time - series data, which may lead to sub - optimal adaptation effects. - **Adversarial training methods**: The training is complex and it is difficult to converge to a satisfactory local optimal solution. - **Direct transfer**: Directly making the target - domain distribution closer to the source - domain may have poor results when the domain differences are large. ### Solutions proposed in the paper: The authors propose a new contrastive - learning framework **CoTMix**, which is specifically designed for unsupervised domain adaptation of time - series data. This framework solves the above problems in the following ways: 1. **Cross - domain Temporal Mixup**: Generate two intermediate augmented views - the source - dominated domain and the target - dominated domain. These views retain the semantic information of their respective domains while learning the time characteristics of the other domain. 2. **Contrastive learning**: Use contrastive learning to maximize the similarity between each domain and its corresponding augmented view, and gradually map the source and target domains to a common intermediate space, thereby alleviating the domain distribution differences. ### Formula representation: - Formula for generating source - dominated samples: \[ x_{sd}^i = \lambda x_s^i+(1 - \lambda)\frac{1}{T}\sum_{j = i-\frac{T}{2}}^{i+\frac{T}{2}}x_t^j,\quad0.5 < \lambda < 1 \] - Formula for generating target - dominated samples: \[ x_{td}^i=\lambda x_t^i+(1 - \lambda)\frac{1}{T}\sum_{j = i-\frac{T}{2}}^{i+\frac{T}{2}}x_s^j,\quad0.5 < \lambda < 1 \] ### Summary: The main contribution of this paper is to propose an unsupervised domain adaptation framework CoTMix for time - series data based on contrastive learning. It generates augmented views through the cross - domain temporal mixup strategy and uses contrastive learning to gradually map the source and target domains to a common intermediate space, effectively alleviating the domain distribution differences problem. Experimental results show that CoTMix significantly outperforms existing UDA methods on multiple real - world time - series datasets.