One main challenge in time series anomaly detection (TSAD) is the lack of labelled data in many real-life scenarios. Most of the existing anomaly detection methods focus on learning the normal behaviour of unlabelled time series in an unsupervised manner. The normal boundary is often defined tightly, resulting in slight deviations being classified as anomalies, consequently leading to a high false positive rate and a limited ability to generalise normal patterns. To address this, we introduce a novel end-to-end self-supervised ContrAstive Representation Learning approach for time series Anomaly detection (CARLA). While existing contrastive learning methods assume that augmented time series windows are positive samples and temporally distant windows are negative samples, we argue that these assumptions are limited as augmentation of time series can transform them to negative samples, and a temporally distant window can represent a positive sample. Our contrastive approach leverages existing generic knowledge about time series anomalies and injects various types of anomalies as negative samples. Therefore, CARLA not only learns normal behaviour but also learns deviations indicating anomalies. It creates similar representations for temporally closed windows and distinct ones for anomalies. Additionally, it leverages the information about representations' neighbours through a self-supervised approach to classify windows based on their nearest/furthest neighbours to further enhance the performance of anomaly detection. In extensive tests on seven major real-world time series anomaly detection datasets, CARLA shows superior performance over state-of-the-art self-supervised and unsupervised TSAD methods. Our research shows the potential of contrastive representation learning to advance time series anomaly detection.
翻译:时间序列异常检测(TSAD)的主要挑战之一是许多现实场景中缺乏标注数据。现有异常检测方法大多专注于以无监督方式学习未标注时间序列的正常行为。由于正常边界通常定义得较为严格,导致细微偏差被归类为异常,进而产生高误报率并限制了对正常模式的泛化能力。为解决这一问题,我们提出了一种新颖的端到端自监督对比表示学习方法,用于时间序列异常检测(CARLA)。现有对比学习方法假设增强后的时间序列窗口为正样本,而时间上距离较远的窗口为负样本,但我们认为这些假设存在局限性——时间序列的增强可能使其转变为负样本,而时间上距离较远的窗口可能代表正样本。我们的对比方法利用了时间序列异常的通用先验知识,将多种异常类型注入作为负样本。因此,CARLA不仅能学习正常行为,还能学习表征异常的偏差。该方法为时间上相邻的窗口生成相似表示,而为异常生成差异表示。此外,它通过自监督方式利用表示邻居的信息,基于最近/最远邻居对窗口进行分类,从而进一步提升异常检测性能。在七个主流真实世界时间序列异常检测数据集上的广泛测试中,CARLA展现了优于现有最先进自监督和无监督TSAD方法的性能。我们的研究揭示了对比表示学习在推动时间序列异常检测发展方面的潜力。