Abstract
Unsupervised domain adaptation (UDA) for time series analysis remains challenging due to the lack of labeled data in target domains. Existing methods rely heavily on auxiliary data yet often fail to fully exploit the intrinsic task consistency between different domains. To address this limitation, we propose a novel time series UDA framework called CLTC that enhances feature transferability by capturing semantic context and reconstructing class-wise representations. Specifically, contrastive learning is first utilized to capture contextual representations that enable label transfer across domains. Dual reconstruction on samples from the same class then refines the task-specific features to improve consistency. To align the cross-domain distributions without target labels, we leverage Sinkhorn divergence which can handle non-overlapping supports. Consequently, our CLTC reduces the domain gap while retaining task-specific consistency for effective knowledge transfer. Extensive experiments on four time series benchmarks demonstrate state-of-the-art performance improvements of 0.7-3.6% over existing methods, and ablation study validates the efficacy of each component.




Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Data Availability
The datasets (WISDM [21], HAR [1], HHAR [40], and Sleep-EDF [14]) analyzed in this study are publicly available, and are cited in this article. The corresponding download links and evaluation details are provided in those article, ensuring easy access and transparency for verification and replication purposes.
References
Anguita D, Ghio A, Oneto L et al (2013) A public domain dataset for human activity recognition using smartphones. In: European symposium on artificial neural networks
Bachman P, Hjelm RD, Buchwalter W (2019) Learning representations by maximizing mutual information across views. In: Advances in neural information processing systems
Cai R, Chen J, Li Z et al (2021) Time series domain adaptation via sparse associative structure alignment. In: the thirty-fifth AAAI conference on artificial intelligence (AAAI-21), pp 6859–6867. https://doi.org/10.1609/aaai.v35i8.16846
Chen C, Fu Z, Chen Z et al (2020a) HoMM: Higher-order moment matching for unsupervised domain adaptation. In: The Thirty-Fourth AAAI Conference on Artificial Intelligence (AAAI-20), pp 3422–3429. https://doi.org/10.1609/aaai.v34i04.5745
Chen J, Wu X, Duan L et al (2020) Domain adversarial reinforcement learning for partial domain adaptation. IEEE Transactions on Neural Networks and Learning Systems 33(2):539–553. https://doi.org/10.1109/TNNLS.2020.3028078
Chen K, Yao L, Zhang D et al (2019) Distributionally robust semi-supervised learning for people-centric sensing. In: Proceedings of the AAAI conference on artificial intelligence, pp 3321–3328. https://doi.org/10.1609/aaai.v33i01.33013321
De Lange M, Aljundi R, Masana M et al (2022) A continual learning survey: Defying forgetting in classification tasks. IEEE Trans Pattern Anal Mach Intell 44(7):3366–3385. https://doi.org/10.1109/TPAMI.2021.3057446
Eldele E, Ragab M, Chen Z et al (2021) Time-series representation learning via temporal and contextual contrasting. In: Proceedings of the thirtieth international joint conference on artificial intelligence, pp 2352–2359. https://doi.org/10.24963/ijcai.2021/324
Feydy J, Séjourné T, Vialard FX et al (2019) Interpolating between optimal transport and MMD using sinkhorn divergences. In: Proceedings of the twenty-second international conference on artificial intelligence and statistics, pp 2681–2690
Flexa C, Gomes W, Moreira I et al (2021) Polygonal Coordinate System: Visualizing high-dimensional data using geometric DR, and a deterministic version of t-SNE. Expert Syst Appl 175(114):741. https://doi.org/10.1016/j.eswa.2021.114741
Franceschi JY, Dieuleveut A, Jaggi M (2019) Unsupervised scalable representation learning for multivariate time series. In: Advances in neural information processing systems
Ganin Y, Ustinova E, Ajakan H et al (2017) Domain-adversarial training of neural networks. Journal of Machine Learning Research pp 189–209. https://doi.org/10.1007/978-3-319-58347-1_10
Gardner P, Liu X, Worden K (2020) On the application of domain adaptation in structural health monitoring. Mech Syst Signal Process 138(106):550. https://doi.org/10.1016/j.ymssp.2019.106550
Goldberger AL, Amaral LA, Glass L et al (2000) PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation 101(23):e215–e220. https://doi.org/10.1161/01.CIR.101.23.e215
He H, Queen O, Koker T et al (2023) Domain adaptation for time series under feature and label shifts. In: International conference on machine learning
He K, Fan H, Wu Y et al (2020) Momentum contrast for unsupervised visual representation learning. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp 9729–9738. https://doi.org/10.1109/CVPR42600.2020.00975
Huang J, Guan D, Xiao A et al (2021) Model adaptation: Historical contrastive learning for unsupervised domain adaptation without source data. In: Advances in neural information processing systems, pp 3635–3649
Kang G, Jiang L, Yang Y et al (2019) Contrastive adaptation network for unsupervised domain adaptation. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp 4893–4902
Kiyasseh D, Zhu T, Clifton DA (2021) CLOCS: Contrastive learning of cardiac signals across space, time, and patients. In: International conference on machine learning
Kuehne H, Jhuang H, Garrote E et al (2011) HMDB: A large video database for human motion recognition. In: 2011 International conference on computer vision, pp 2556–2563. https://doi.org/10.1109/ICCV.2011.6126543
Kwapisz JR, Weiss GM, Moore SA (2011) Activity recognition using cell phone accelerometers. ACM SIGKDD Explorations Newsl 12(2):74–82. https://doi.org/10.1145/1964897.1964918
Levy J, Ben-Moshe N, Shalit U et al (2023) DUDE: Deep Unsupervised Domain adaptation using variable nEighbors for physiological time series analysis. In: The International conference on learning representations
Liu J, Liu Y, Tian C et al (2021) A survey of recent advances in driving behavior analysis. In: 2021 3rd International symposium on smart and healthy cities (ISHC), pp 145–157. https://doi.org/10.1109/ishc54333.2021.00035
Liu J, Liu Y, Donglai W et al (2022a) Attention-based auto-encoder framework for abnormal driving detection. In: 2022 IEEE International symposium on circuits and systems (ISCAS), pp 3150–3154. https://doi.org/10.1109/iscas48785.2022.9937548
Liu J, Liu Y, Li D et al (2023a) DSDCLA: Driving style detection via hybrid CNN-LSTM with multi-level attention fusion. Appl Intell pp 1–18. https://doi.org/10.1007/s10489-023-04451-5
Liu J, Zhu W, Li D et al (2023b) Domain generalization with semi-supervised learning for people-centric activity recognition. Sci China Inform Sci pp 1–18. https://doi.org/10.1007/s11432-022-3860-y
Liu Q, Xue H (2021) Adversarial spectral kernel matching for unsupervised time series domain adaptation. In: Thirtieth international joint conference on artificial intelligence (IJCAI-21), pp 2744–2750
Liu Y, Liu J, Zhao M et al (2022b) Learning appearance-motion normality for video anomaly detection. In: 2022 IEEE International conference on multimedia and expo (ICME), pp 1–6. https://doi.org/10.1109/ICME52920.2022.9859727
Liu Y, Yang D, Wang Y et al (2024) Generalized video anomaly event detection: Systematic taxonomy and comparison of deep models. ACM Comput Surv. https://doi.org/10.1145/3645101
Long M, CAO ZHANGJIE, Wang J et al (2018) Conditional adversarial domain adaptation. In: Advances in neural information processing systems
Nguyen AT, Tran T, Gal Y et al (2021) Domain invariant representation learning with domain density transformations. In: Advances in neural information processing systems, pp 5264–5275
Ozyurt Y, Feuerriegel S, Zhang C (2022) Contrastive learning for unsupervised domain adaptation of time series. In: The eleventh international conference on learning representations. https://doi.org/10.48550/arXiv.2206.06243
Pei Z, Cao Z, Long M et al (2018) Multi-adversarial domain adaptation. In: Proceedings of the AAAI conference on artificial intelligence. https://doi.org/10.1609/aaai.v32i1.11767
Purushotham S, Carvalho W, Nilanon T et al (2022) Variational recurrent adversarial deep domain adaptation. In: International conference on learning representations
Qian H, Pan SJ, Miao C (2021) Latent independent excitation for generalizable sensor-based cross-person activity recognition. In: Proceedings of the AAAI conference on artificial intelligence, pp 11,921–11,929. https://doi.org/10.1609/aaai.v35i13.17416
Ragab M, Eldele E, Tan WL et al (2023) ADATIME: A benchmarking suite for domain adaptation on time series data. ACM Trans Knowl Discov Data 17(8)
Rahman MM, Fookes C, Baktashmotlagh M, et al (2020) On minimum discrepancy estimation for deep domain adaptation. In: Domain Adaptation for Visual Understanding. p 81–94. https://doi.org/10.1007/978-3-030-30671-7_6
Singh A (2021) CLDA: Contrastive learning for semi-supervised domain adaptation. In: Advances in neural information processing systems, pp 5089–5101
Soomro K, Zamir AR, Shah M (2012) UCF101: A dataset of 101 human actions classes from videos in the wild. https://doi.org/10.48550/arXiv.1212.0402
Stisen A, Blunck H, Bhattacharya S et al (2015) Smart devices are different: Assessing and MitigatingMobile sensing heterogeneities for activity recognition. In: Proceedings of the 13th ACM conference on embedded networked sensor systems, pp 127–140. https://doi.org/10.1145/2809695.2809718
Sun B, Saenko K (2016) Deep CORAL: Correlation alignment for deep domain adaptation. In: European conference on computer vision, pp 443–450. https://doi.org/10.1007/978-3-319-49409-8_35
Tang S, Su P, Chen D et al (2021) Gradient regularized contrastive learning for continual domain adaptation. In: Proceedings of the AAAI conference on artificial intelligence, pp 2665–2673. https://doi.org/10.1609/aaai.v35i3.16370
Tian Y, Krishnan D, Isola P (2020a) Contrastive multiview coding. In: Proceedings of the European conference on computer vision. https://doi.org/10.1007/978-3-030-58621-8_45
Tian Y, Sun C, Poole B, et al (2020b) What makes for good views for contrastive learning? In: Advances in neural information processing systems
Tonekaboni S, Eytan D, Goldenberg A (2021) Unsupervised representation learning for time series with temporal neighborhood coding. In: International conference on learning representations
Tzeng E, Hoffman J, Zhang N et al (2014) Deep domain confusion: Maximizing for domain invariance. https://doi.org/10.48550/arXiv.1412.3474
Tzeng E, Hoffman J, Saenko K et al (2017) Adversarial discriminative domain adaptation. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. https://doi.org/10.1109/CVPR.2017.316
Wang Y, Song W, Tao W et al (2022) A systematic review on affective computing: Emotion models, databases, and recent advances. Inform Fusion 83–84:19–52. https://doi.org/10.1016/j.inffus.2022.03.009
Wang Y, Yan S, Song W et al (2024) MGR3Net: Multigranularity region relation representation network for facial expression recognition in affective robots. IEEE Trans Ind Inform pp 1–11. https://doi.org/10.1109/TII.2024.3353912
Wilson G, Doppa JR, Cook DJ (2020) Multi-source deep domain adaptation with weak supervision for time-series sensor data. In: Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery & data mining, pp 1768–1778. https://doi.org/10.1145/3394486.3403228
Wilson G, Doppa JR, Cook DJ (2023) CALDA: Improving multi-source time series domain adaptation with contrastive adversarial learning. IEEE Transactions on pattern analysis and machine intelligence. https://doi.org/10.48550/arxiv.2109.14778
Xiang X, Liu Y, Fang G et al (2023) Two-stage alignments framework for unsupervised domain adaptation on time series data. IEEE Sig Process Lett pp 1–5. https://doi.org/10.1109/LSP.2023.3264621
Yang L, Hong S (2022) Unsupervised time-series representation learning with iterative bilinear temporal-spectral fusion. In: International conference on machine learning
Yèche H, Dresdner G, Locatello F, et al (2021) Neighborhood contrastive learning applied to online patient monitoring. In: International conference on machine learning
Yin J, Xie J, Ma Z et al (2022) MPCCL: Multiview predictive coding with contrastive learning for person re-identification. Pattern Recogn 129(108):710. https://doi.org/10.1016/j.patcog.2022.108710
Yue Z, Wang Y, Duan J, et al (2022) TS2Vec: Towards universal representation of time series. In: Proceedings of the AAAI conference on artificial intelligence. https://doi.org/10.1609/aaai.v36i8.20881
Zhang X, Wang Z, Liu D et al (2021) Deep adversarial data augmentation for extremely low data regimes. IEEE Trans Circuits Syst Video Technol 31(1):15–28. https://doi.org/10.1109/tcsvt.2020.2967419
Zhang X, Zhao Z, Tsiligkaridis T et al (2022) Self-supervised contrastive pre-training for time series via time-frequency consistency. In: Advances in neural information processing systems
Zhou C, Ma X, Michel P et al (2021) Examining and combating spurious features under distribution shift. In: Proceedings of the 38th international conference on machine learning, pp 12,857–12,867
Zhu X, Li L, Liu W et al (2024) Multi-level sequence denoising with cross-signal contrastive learning for sequential recommendation. Neural Netw p 106480. https://doi.org/10.1016/j.neunet.2024.106480
Zhu Y, Zhuang F, Wang J et al (2021) Deep subdomain adaptation network for image classification. IEEE Transactions on Neural Networks and Learning Systems 32(4):1713–1722. https://doi.org/10.1109/tnnls.2020.2988928
Zou L, Tang H, Chen K et al (2021) Geometry-aware self-training for unsupervised domain adaptation on object point clouds. In: Proceedings of the IEEE/CVF international conference on computer vision, pp 6403–6412. https://doi.org/10.1109/iccv48922.2021.00634
Acknowledgements
The research was partly supported by the National Natural Science Foundation of China (No. 62175037). We would like to thank Prof. Huiliang Shang of the Fudan University for his help in checking and polishing this paper. We sincerely thank all the editors and anonymous reviewers for their careful work and thoughtful suggestions that have helped improve this paper substantially.
Author information
Authors and Affiliations
Contributions
The contributions of the authors to this research are as follows: Tao Wu was responsible for developing the methodology and preparing the original draft of the manuscript. Qiushu Chen and Dongfang Zhao conducted the formal analysis and investigation. Jinhua Wang contributed to the acquisition of funding, provision of resources, and supervision of the project. Linhua Jiang managed the project administration, assisted in funding acquisition, and also played a supervisory role. All authors were involved in the conception and design of the study, engaged in critical revision, and participated in the writing, review, and editing of the manuscript, approving the final version for submission.
Corresponding authors
Ethics declarations
Ethical and Informed Consent
This research abides by the ethical standards in the field. In cases involving human participants, informed consent was obtained from all subjects. The research did not involve any animal studies. All data were collected and processed in compliance with the relevant regulatory standards.
Competing of interest
The authors declare that we have no competing financial or non-financial interests that could have appeared to influence the work reported in this manuscript. This includes, but is not limited to, financial interests such as funding, employment, stock or share ownership, patents, paid expert testimony, and personal or professional relationships or affiliations.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Wu, T., Chen, Q., Zhao, D. et al. Domain adaptation of time series via contrastive learning with task-specific consistency. Appl Intell 54, 12576–12588 (2024). https://doi.org/10.1007/s10489-024-05799-y
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10489-024-05799-y