Time series anomaly detection (TAD) faces a significant challenge due to the scarcity of labelled data, which hinders the development of accurate detection models. Unsupervised domain adaptation (UDA) addresses this challenge by leveraging a labelled dataset from a related domain to detect anomalies in a target dataset. Existing domain adaptation techniques assume that the number of anomalous classes does not change between the source and target domains. In this paper, we propose a novel Domain Adaptation Contrastive learning for Anomaly Detection in multivariate time series (DACAD) model to address this issue by combining UDA and contrastive representation learning. DACAD's approach includes an anomaly injection mechanism that introduces various types of synthetic anomalies, enhancing the model's ability to generalise across unseen anomalous classes in different domains. This method significantly broadens the model's adaptability and robustness. Additionally, we propose a supervised contrastive loss for the source domain and a self-supervised contrastive triplet loss for the target domain, improving comprehensive feature representation learning and extraction of domain-invariant features. Finally, an effective Centre-based Entropy Classifier (CEC) is proposed specifically for anomaly detection, facilitating accurate learning of normal boundaries in the source domain. Our extensive evaluation across multiple real-world datasets against leading models in time series anomaly detection and UDA underscores DACAD's effectiveness. The results validate DACAD's superiority in transferring knowledge across domains and its potential to mitigate the challenge of limited labelled data in time series anomaly detection.
翻译:时间序列异常检测因标注数据稀缺而面临重大挑战,这阻碍了精准检测模型的发展。无监督域适应通过利用相关域中的标注数据集来检测目标域中的异常,从而解决了这一难题。现有域适应技术假设源域与目标域之间异常类别数量不变。本文提出了一种新颖的多变量时间序列域适应对比学习异常检测模型——DACAD,通过融合无监督域适应与对比表示学习解决该问题。DACAD方法包含异常注入机制,可引入多种类型合成异常,增强模型对不同域中未见异常类别的泛化能力。该方法显著提升了模型的适应性与鲁棒性。此外,我们为源域提出监督对比损失,为目标域提出自监督对比三元组损失,以改善综合特征表示学习与域不变特征提取。最后,针对异常检测任务设计了高效的基于中心的熵分类器,促进源域中正常边界的精准学习。通过在多个真实数据集上进行的全面评估,并与时间序列异常检测及无监督域适应领域的领先模型对比,DACAD的有效性得到验证。实验结果证实了DACAD在跨域知识迁移中的优越性,及其缓解时间序列异常检测中标注数据稀缺问题的潜力。