single-jc.php

JACIII Vol.30 No.6 pp. 1744-1761
(2026)

Research Paper:

Anomaly Detection in Time Series with Enhanced Privacy Using Self-Supervised Contrastive Learning

Chihiro Maru*,† ORCID Icon, Masato Oguchi** ORCID Icon, Miyuki Nakano***, and Ichiro Kobayashi** ORCID Icon

*Faculty of Science and Engineering, Chuo University
1-13-27 Kasuga, Bunkyo-ku, Tokyo 112-8551, Japan

†Corresponding author

**Graduate School of Humanities and Sciences, Ochanomizu University
2-1-1 Otsuka, Bunkyo-ku, Tokyo 112-8610, Japan

***College of Liberal Arts, Tsuda University
2-1-1 Tsuda-machi, Kodaira, Tokyo 187-8577, Japan

Received:
November 14, 2025
Accepted:
June 2, 2026
Published:
November 20, 2026
Keywords:
anomaly detection, time series, Transformer, self-supervised contrastive learning, adversarial training
Abstract

Anomaly detection in time series is increasingly used for sensitive data, including medical and physiological data. However, these data carry a substantial risk of information leakage, making privacy preservation through anonymization essential. While anonymization reduces the risk of privacy breach, it can also remove informative features, creating a trade-off between privacy preservation and anomaly-detection performance. To address this challenge, we propose a robust framework that mitigates this trade-off and enables high-accuracy anomaly detection on anonymized data. Our approach centers on an anonymization function that transforms a time series by removing sensitive information, including contextual features and personally identifiable information, while retaining information that is beneficial for anomaly detection. We introduced a privacy model that guides the training of the anonymization function and optimizes the two components in an adversarial manner using contrastive loss in opposite directions. This design uses the anonymization function to eliminate sensitive information captured by the privacy model. We incorporate an anomaly detection loss function to ensure that the anonymization function preserves the essential information required for accurate anomaly detection. The effectiveness of the anonymization process and its impact on anomaly-detection performance were evaluated using multiple real-world and synthetic datasets. Results showed that our method reduced privacy-related information leakage by 42.65% while incurring only a 2.58% decrease in the F1 score for anomaly detection.

Privacy-enhanced anomaly detection framework

Privacy-enhanced anomaly detection framework

Cite this article as:
C. Maru, M. Oguchi, M. Nakano, and I. Kobayashi, “Anomaly Detection in Time Series with Enhanced Privacy Using Self-Supervised Contrastive Learning,” J. Adv. Comput. Intell. Intell. Inform., Vol.30 No.6, pp. 1744-1761, 2026.
Data files:
References
  1. [1] A. A. Cook, G. Mısırlı, and Z. Fan, “Anomaly detection for IoT time-series data: A survey,” IEEE Internet of Things J., Vol.7, No.7, pp. 6481-6494, 2020. https://doi.org/10.1109/JIOT.2019.2958185
  2. [2] G. Pang, C. Shen, L. Cao, and A. V. D. Hengel, “Deep learning for anomaly detection: A review,” ACM Computing Surveys (CSUR), Vol.54, No.2, pp. 1-38, 2021. https://doi.org/10.1145/3439950
  3. [3] M. Landauer, S. Onder, F. Skopik, and M. Wurzenberger, “Deep learning for anomaly detection in log data: A survey,” Machine Learning with Applications, Vol.12, Article No.100470, 2023. https://doi.org/10.1016/j.mlwa.2023.100470
  4. [4] Y. Mao, Q. Ye, Q. Wang, and H. Hu, “Differential Privacy for Time Series: A Survey,” IEEE Data Eng. Bull., Vol.48, No.2, pp. 67-92, 2024.
  5. [5] X. Zhang, C. Chen, Y. Xie, X. Chen, J. Zhang, and Y. Xiang, “A survey on privacy inference attacks and defenses in cloud-based deep neural network,” Computer Standards & Interfaces, Vol.83, Article No.103672, 2023. https://doi.org/10.1016/j.csi.2022.103672
  6. [6] M. Al-Rubaie and J. M. Chang, “Privacy-preserving machine learning: Threats and solutions,” IEEE Security & Privacy, Vol.17, No.2, pp. 49-58, 2019. https://doi.org/10.1109/MSEC.2018.2888775
  7. [7] S. Sagiroglu and D. Sinanc, “Big data: A review,” 2013 Int. Conf. on Collaboration Technologies and Systems (CTS), pp. 42-47, 2013. https://doi.org/10.1109/CTS.2013.6567202
  8. [8] M. Keshk, E. Sitnikova, N. Moustafa, J. Hu, and I. Khalil, “An integrated framework for privacy-preserving based anomaly detection for cyber-physical systems,” IEEE Trans. on Sustainable Computing, Vol.6, No.1, pp. 66-79, 2021. https://doi.org/10.1109/TSUSC.2019.2906657
  9. [9] I. Makhdoom, M. Abolhasan, J. Lipman, N. Shariati, D. Franklin, and M. Piccardi, “Securing Personally Identifiable Information: A Survey of SOTA Techniques, and a Way Forward,” IEEE Access, Vol.12, pp. 116740-116770, 2024. https://doi.org/10.1109/ACCESS.2024.3447017
  10. [10] A. Machanavajjhala, J. Gehrke, D. Kifer, and M. Venkitasubramaniam, “L-diversity: Privacy beyond k-anonymity,” 22nd Int. Conf. on Data Engineering (ICDE’06), pp. 24-24, 2006. https://doi.org/10.1109/ICDE.2006.1
  11. [11] S. Mehnaz and E. Bertino, “Privacy-preserving Real-time Anomaly Detection Using Edge Computing,” 2020 IEEE 36th Int. Conf. on Data Engineering (ICDE), pp. 469-480, 2020. https://doi.org/10.1109/ICDE48307.2020.00047
  12. [12] N. Gruver, M. Finzi, S. Qiu, and A. G. Wilson, “Large Language Models Are Zero-Shot Time Series Forecasters,” Advances in Neural Information Processing Systems, Vol.36, pp. 19622-19635, 2023.
  13. [13] M. Goswami, K. Szafer, A. Choudhry, Y. Cai, S. Li, and A. Dubrawski, “MOMENT: A Family of Open Time-series Foundation Models,” Int. Conf. on Machine Learning, pp. 16115-16152, 2024.
  14. [14] X. Shi, S. Wang, Y. Nie, D. Li, Z. Ye, Q. Wen, and M. Jin, “Time-MoE: Billion-Scale Time Series Foundation Models with Mixture of Experts,” arXiv preprint, arXiv:2409.16040, 2024. https://doi.org/10.48550/arXiv.2409.16040
  15. [15] K. K. Nakka, A. Frikha, R. Mendes, X. Jiang, and X. Zhou, “PII-Scope: A Comprehensive Study on Training Data PII Extraction Attacks in LLMs,” arXiv preprint, arXiv:2410.06704, 2024. https://doi.org/10.48550/arXiv.2410.06704
  16. [16] H. Li, D. Guo, W. Fan, M. Xu, J. Huang, F. Meng, and Y. Song, “Multi-step Jailbreaking Privacy Attacks on ChatGPT,” Findings of the Association for Computational Linguistics: EMNLP 2023, 2023. https://doi.org/10.18653/v1/2023.findings-emnlp.272
  17. [17] C. Dwork, “Differential privacy,” Int. Colloquium on Automata, Languages, and Programming, 2006. https://doi.org/10.1007/11787006_1
  18. [18] V. Rastogi and S. Nath, “Differentially private aggregation of distributed time-series with transformation and encryption,” Proc. of the 2010 ACM SIGMOD Int. Conf. on Management of Data, pp. 735-746, 2010. https://doi.org/10.1145/1807167.1807247
  19. [19] J. W. Kim, B. Jang, and H. Yoo, “Privacy-preserving aggregation of personal health data streams,” PloS One, Vol.13, No.11, Article No.e0207639, 2018. https://doi.org/10.1371/journal.pone.0207639
  20. [20] Q. Ye, H. Hu, N. Li, X. Meng, H. Zheng, and H. Yan, “Beyond Value Perturbation: Local Differential Privacy in the Temporal Setting,” IEEE Conf. on Computer Communications (IEEE INFOCOM 2021), 2021. https://doi.org/10.1109/INFOCOM42981.2021.9488899
  21. [21] Q. Ye, H. Hu, K. Huang, M. H. Au, and Q. Xue, “Stateful Switch: Optimized Time Series Release with Local Differential Privacy,” IEEE Conf. on Computer Communications (IEEE INFOCOM 2023), 2023. https://doi.org/10.1109/INFOCOM53939.2023.10229063
  22. [22] Y. Mao, Q. Ye, Q. Wang, and H. Hu, “Utility-Aware Time Series Data Release With Anomalies Under TLDP,” IEEE Trans. on Mobile Computing, Vol.23, No.6, pp. 7135-7147, 2024. https://doi.org/10.1109/TMC.2023.3332963
  23. [23] G. Giorgi, W. Abbasi, and A. Saracino, “Privacy-Preserving Analysis for Remote Video Anomaly Detection in Real Life Environments,” J. Wirel. Mob. Networks Ubiquitous Comput. Dependable Appl., Vol.13, No.1, pp. 112-136, 2022. https://doi.org/10.22667/JOWUA.2022.03.31.112
  24. [24] M. Abadi, A. Chu, I. Goodfellow, H. B. McMahan, I. Mironov, K. Talwar, and L. Zhang, “Deep learning with differential privacy,” Proc. of the 2016 ACM SIGSAC Conf. on Computer and Communications Security, pp. 308-318, 2016. https://doi.org/10.1145/2976749.2978318
  25. [25] Z. Zamanzadeh Darban, G. I. Webb, S. Pan, C. Aggarwal, and M. Salehi, “Deep learning for time series anomaly detection: A survey,” ACM Computing Surveys, Vol.57, No.1, Article No.15, 2024. https://doi.org/10.1145/3691338
  26. [26] C. Zhang, D. Song, Y. Chen, X. Feng, C. Lumezanu, W. Cheng, J. Ni, B. Zong, H. Chen, and N. V. Chawla, “A deep neural network for unsupervised anomaly detection and diagnosis in multivariate time series data,” Proc. of the 33rd AAAI Conf. on Artificial Intelligence, pp. 1409-1416, 2019. https://doi.org/10.1609/aaai.v33i01.33011409
  27. [27] D. Li, D. Chen, B. Jin, L. Shi, J. Goh, and S.-K. Ng, “MAD-GAN: Multivariate anomaly detection for time series data with generative adversarial networks,” 28th Int. Conf. on Artificial Neural Networks, pp. 703-716, 2019. https://doi.org/10.1007/978-3-030-30490-4_56
  28. [28] M. Said Elsayed, N.-A. Le-Khac, S. Dev, and A. D. Jurcut, “Network anomaly detection using LSTM based autoencoder,” Proc. of the 16th ACM Symp. on QoS and Security for Wireless and Mobile Networks, pp. 37-45, 2020. https://doi.org/10.1145/3416013.3426457
  29. [29] J. Audibert, P. Michiardi, F. Guyard, S. Marti, and M. A. Zuluaga, “USAD: UnSupervised Anomaly Detection on Multivariate Time Series,” Proc. of the 26th ACM SIGKDD Int. Conf. on Knowledge Discovery & Data Mining, pp. 3395-3404, 2020. https://doi.org/10.1145/3394486.3403392
  30. [30] L. Shen, Z. Yu, Q. Ma, and J. T. Kwok, “Time series anomaly detection with multiresolution ensemble decoding,” Proc. of the AAAI Conf. on Artificial Intelligence, Vol.35, pp. 9567-9575, 2021. https://doi.org/10.1609/aaai.v35i11.17152
  31. [31] Y. Zhang, Y. Chen, J. Wang, and Z. Pan, “Unsupervised deep anomaly detection for multi-sensor time-series signals,” IEEE Trans. on Knowledge and Data Engineering, Vol.35, No.2, pp. 2118-2132, 2023. https://doi.org/10.1109/TKDE.2021.3102110
  32. [32] J. Xu, H. Wu, J. Wang, and M. Long, “Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy,” Int. Conf. on Learning Representations, 2022.
  33. [33] S. Tuli, G. Casale, and N. R. Jennings, “TranAD: Deep Transformer Networks for Anomaly Detection in Multivariate Time Series Data,” Proc. of VLDB, Vol.15, No.6, pp. 1201-1214, 2022. https://doi.org/10.14778/3514061.3514067
  34. [34] K. Hundman, V. Constantinou, C. Laporte, I. Colwell, and T. Soderstrom, “Detecting spacecraft anomalies using LSTMs and nonparametric dynamic thresholding,” Proc. of the 24th ACM SIGKDD Int. Conf. on Knowledge Discovery & Data Mining, pp. 387-395, 2018. https://doi.org/10.1145/3219819.3219845
  35. [35] H. Song, D. Rajan, J. J. Thiagarajan, and A. Spanias, “Attend and diagnose: Clinical time series analysis using attention models,” Proc. of the 32nd AAAI Conf. on Artificial Intelligence, pp. 4091-4098, 2018.
  36. [36] A. Deng and B. Hooi, “Graph neural network-based anomaly detection in multivariate time series,” Proc. of the AAAI Conf. on Artificial Intelligence, Vol.35, pp. 4027-4035, 2021. https://doi.org/10.1609/aaai.v35i5.16523
  37. [37] Y. Li, X. Peng, J. Zhang, Z. Li, and M. Wen, “DCT-GAN: Dilated Convolutional Transformer-Based GAN for Time Series Anomaly Detection,” IEEE Trans. on Knowledge and Data Engineering, Vol.35, No.4, pp. 3632-3644, 2023. https://doi.org/10.1109/TKDE.2021.3130234
  38. [38] Y. Yang, C. Zhang, T. Zhou, Q. Wen, and L. Sun, “DCdetector: Dual Attention Contrastive Representation Learning for Time Series Anomaly Detection,” Proc. of the 29th ACM SIGKDD Conf. on Knowledge Discovery and Data Mining, pp. 3033-3045, 2023. https://doi.org/10.1145/3580305.3599295
  39. [39] Z. Z. Darban, Y. Yang, G. I. Webb, C. C. Aggarwal, Q. Wen, S. Pan, and M. Salehi, “DACAD: Domain Adaptation Contrastive Learning for Anomaly Detection in Multivariate Time Series,” arXiv preprint, arXiv:2404.11269, 2024. https://doi.org/10.48550/arXiv.2404.11269
  40. [40] Y. Ganin, E. Ustinova, H. Ajakan, P. Germain, H. Larochelle, F. Laviolette, M. Marchand, and V. Lempitsky, “Domain-Adversarial Training of Neural Networks,” J. of Machine Learning Research, Vol.17, No.1, pp. 2096-2030, 2016.
  41. [41] Z. Wu, H. Wang, Z. Wang, H. Jin, and Z. Wang, “Privacy-preserving deep action recognition: An adversarial learning framework and a new dataset,” IEEE Trans. on Pattern Analysis and Machine Intelligence, Vol.44, No.4, pp. 2126-2139, 2022.
  42. [42] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton, “A simple framework for contrastive learning of visual representations,” 37th Int. Conf. on Machine Learning, pp. 1597-1607, 2020.
  43. [43] C. I. Tang, I. Perez-Pozuelo, D. Spathis, and C. Mascolo, “Exploring Contrastive Learning in Human Activity Recognition for Healthcare,” arXiv preprint, arXiv:2011.11542, 2020. https://doi.org/10.48550/arXiv.2011.11542
  44. [44] E. Eldele, M. Ragab, Z. Chen, M. Wu, C. K. Kwoh, X. Li, and C. Guan, “Time-series representation learning via temporal and contextual contrasting,” arXiv preprint, arXiv:2106.14112, 2021. https://doi.org/10.48550/arXiv.2106.14112
  45. [45] D. Kiyasseh, T. Zhu, and D. A. Clifton, “Clocs: Contrastive learning of cardiac signals across space, time, and patients,” 38th Int. Conf. on Machine Learning, pp. 5606-5615, 2021.
  46. [46] S. Tonekaboni, D. Eytan, and A. Goldenberg, “Unsupervised representation learning for time series with temporal neighborhood coding,” arXiv preprint, arXiv:2106.00750, 2021. https://doi.org/10.48550/arXiv.2106.00750
  47. [47] Z. Yue, Y. Wang, J. Duan, T. Yang, C. Huang, Y. Tong, and B. Xu, “Ts2vec: Towards universal representation of time series,” Proc. of the 36th AAAI Conf. on Artificial Intelligence, pp. 8980-8987, 2022. https://doi.org/10.1609/aaai.v36i8.20881
  48. [48] G. Woo, C. Liu, D. Sahoo, A. Kumar, and S. C. H. Hoi, “CoST: Contrastive Learning of Disentangled Seasonal-Trend Representations for Time Series Forecasting,” 2022 Int. Conf. on Learning Representations, 2022.
  49. [49] L. Yang and S. Hong, “Unsupervised time-series representation learning with iterative bilinear temporal-spectral fusion,” 39th Int. Conf. on Machine Learning, pp. 25038-25054, 2022.
  50. [50] J. Dong, H. Wu, H. Zhang, L. Zhang, J. Wang, and M. Long, “Simmtm: A simple pre-training framework for masked time-series modeling,” 37th Advances in Neural Information Processing Systems, pp. 29996-30025, 2023.
  51. [51] X. Zhang, Z. Zhao, T. Tsiligkaridis, and M. Zitnik, “Self-supervised contrastive pre-training for time series via time-frequency consistency,” 36th Advances in Neural Information Processing Systems, pp. 3988-4003, 2022.
  52. [52] Y. Nie, N. H. Nguyen, P. Sinthong, and J. Kalagnanam, “A Time Series is Worth 64 Words: Long-term Forecasting with Transformers,” 2023 Int. Conf. on Learning Representations, 2023.
  53. [53] V. Mondéjar-Guerra, J. Novo, J. Rouco, M. G. Penedo, and M. Ortega, “Heartbeat classification fusing temporal and morphological information of ECGs via ensemble of classifiers,” Biomedical Signal Processing and Control, Vol.47, pp. 41-48, 2019. https://doi.org/10.1016/j.bspc.2018.08.007
  54. [54] G. B. Moody and R. G. Mark, “The impact of the MIT-BIH arrhythmia database,” IEEE Engineering in Medicine and Biology Magazine, Vol.20, No.3, pp. 45-50, 2001. https://doi.org/10.1109/51.932724
  55. [55] A. L. Goldberger, L. A. Amaral, L. Glass, J. M. Hausdorff, P. C. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H. E. Stanley, “PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals,” Circulation, Vol.101, No.23, pp. e215-e220, 2000. https://doi.org/10.1161/01.cir.101.23.e215
  56. [56] K.-H. Lai, D. Zha, J. Xu, Y. Zhao, G. Wang, and X. Hu, “Revisiting Time Series Outlier Detection: Definitions and Benchmarks,” NeurIPS Datasets and Benchmarks, 2021.
  57. [57] A. P. Mathur and N. O. Tippenhauer, “SWaT: A water treatment testbed for research and training on ICS security,” 2016 Int. Workshop on Cyber-Physical Systems for Smart Water Networks (CySWater), pp. 31-36, 2016. https://doi.org/10.1109/CySWater.2016.7469060
  58. [58] A. Abdulaal, Z. Liu, and T. Lancewicki, “Practical Approach to Asynchronous Multivariate Time Series Anomaly Detection and Localization,” Proc. of the 27th ACM SIGKDD Conf. on Knowledge Discovery & Data Mining, pp. 2485-2494, 2021. https://doi.org/10.1145/3447548.3467174
  59. [59] J. Grus, “Data science from scratch: first principles with python,” O’ Reilly Media, 2019.
  60. [60] Y. Nam, S. Yoon, Y. Shin, M. Bae, H. Song, J.-G. Lee, and B. S. Lee, “Breaking the Time-Frequency Granularity Discrepancy in Time-Series Anomaly Detection,” Proc. of the ACM on Web Conf. 2024, pp. 4204-4215, 2024. https://doi.org/10.1145/3589334.3645556
  61. [61] J. Paparrizos and L. Gravano, “k-Shape: Efficient and Accurate Clustering of Time Series,” Proc. of the 2015 ACM SIGMOD Int. Conf. on Management of Data, pp. 1855-1870, 2015. https://doi.org/10.1145/2723372.2737793
  62. [62] J. Paparrizos, C. Liu, A. J. Elmore, and M. J. Franklin, “Debunking Four Long-Standing Misconceptions of Time-Series Distance Measures,” Proc. of the 2020 ACM SIGMOD Int. Conf. on Management of Data, pp. 1887-1905, 2020. https://doi.org/10.1145/3318464.3389760
  63. [63] H. Robbins and S. Monro, “A stochastic approximation method,” The Annals of Mathematical Statistics, Vol.22, No.3, pp. 400-407, 1951. https://doi.org/10.1214/aoms/1177729586
  64. [64] L. Bottou, “Large-scale machine learning with stochastic gradient descent,” Proc. of 19th Int. Conf. on Computational Statistics (COMPSTAT’2010), pp. 177-186, 2010. https://doi.org/10.1007/978-3-7908-2604-3_16
  65. [65] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” arXiv preprint, arXiv:1412.6980, 2014. https://doi.org/10.48550/arXiv.1412.6980
  66. [66] J. Duchi, E. Hazan, and Y. Singer, “Adaptive subgradient methods for online learning and stochastic optimization,” J. of Machine Learning Research, Vol.12, No.7, pp. 2121-2159, 2011.
  67. [67] L. van der Maaten and G. Hinton, “Visualizing data using t-SNE,” J. of Machine Learning Research, Vol.9, No.86, pp. 2579-2605, 2008.
  68. [68] H. Xu, W. Chen, N. Zhao, Z. Li, J. Bu, Z. Li, Y. Liu, Y. Zhao, D. Pei, Y. Feng et al., “Unsupervised anomaly detection via variational auto-encoder for seasonal kpis in web applications,” Proc. of the 2018 World Wide Web Conf., pp. 187-196, 2018. https://doi.org/10.1145/3178876.3185996
  69. [69] S. Kim, K. Choi, H.-S. Choi, B. Lee, and S. Yoon, “Towards a rigorous evaluation of time-series anomaly detection,” Proc. of the AAAI Conf. on Artificial Intelligence, Vol.36, pp. 7194-7201, 2022. https://doi.org/10.1609/aaai.v36i7.20680

*This site is desgined based on HTML5 and CSS3 for modern browsers, e.g. Chrome, Firefox, Safari, Edge, Opera.

Last updated on Nov. 20, 2026