TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/CARLA: Self-supervised Contrastive Representation Learning...

CARLA: Self-supervised Contrastive Representation Learning for Time Series Anomaly Detection

Zahra Zamanzadeh Darban, Geoffrey I. Webb, Shirui Pan, Charu C. Aggarwal, Mahsa Salehi

2023-08-18Representation LearningAnomaly DetectionContrastive LearningTime Series Anomaly DetectionTime Series
PaperPDFCode(official)

Abstract

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.

Results

TaskDatasetMetricValueModel
Time Series AnalysisSMDAUPR0.507CARLA
Time Series AnalysisSMDF1 score0.5114CARLA
Time Series AnalysisSMDRecall0.63062CARLA
Time Series AnalysisSMDprecision0.4276CARLA
Time Series AnalysisWADIAUPR0.126CARLA
Time Series AnalysisWADIF1 Score0.2953CARLA
Time Series AnalysisWADIRecall0.7316CARLA
Time Series AnalysisWADIprecision0.185CARLA
Time Series AnalysisKPIAUPR0.299CARLA
Time Series AnalysisKPIF1 Score0.3083CARLA
Time Series AnalysisKPIRecall0.736CARLA
Time Series AnalysisKPIprecision0.195CARLA
Time Series AnalysisYahoo A1AUPR0.645CARLA
Time Series AnalysisYahoo A1F1 Score0.7233CARLA
Time Series AnalysisYahoo A1precision0.9755CARLA
Time Series AnalysisMSLAUPR0.501CARLA
Time Series AnalysisMSLF1 Score52.27CARLA
Time Series AnalysisMSLRecall0.7959CARLA
Time Series AnalysisMSLprecision0.3891CARLA
Time Series AnalysisSMAPAUPR0.448CARLA
Time Series AnalysisSMAPF1 Score0.5292CARLA
Time Series AnalysisSMAPRecall0.804CARLA
Time Series AnalysisSMAPprecision0.3944CARLA
Time Series AnalysisSWaTAUPR0.681CARLA
Time Series AnalysisSWaTF1 Score0.7209CARLA
Time Series AnalysisSWaTRecall0.5673CARLA
Time Series AnalysisSWaTprecision0.9886CARLA
Time Series Anomaly DetectionSMDAUPR0.507CARLA
Time Series Anomaly DetectionSMDF1 score0.5114CARLA
Time Series Anomaly DetectionSMDRecall0.63062CARLA
Time Series Anomaly DetectionSMDprecision0.4276CARLA
Time Series Anomaly DetectionWADIAUPR0.126CARLA
Time Series Anomaly DetectionWADIF1 Score0.2953CARLA
Time Series Anomaly DetectionWADIRecall0.7316CARLA
Time Series Anomaly DetectionWADIprecision0.185CARLA
Time Series Anomaly DetectionKPIAUPR0.299CARLA
Time Series Anomaly DetectionKPIF1 Score0.3083CARLA
Time Series Anomaly DetectionKPIRecall0.736CARLA
Time Series Anomaly DetectionKPIprecision0.195CARLA
Time Series Anomaly DetectionYahoo A1AUPR0.645CARLA
Time Series Anomaly DetectionYahoo A1F1 Score0.7233CARLA
Time Series Anomaly DetectionYahoo A1precision0.9755CARLA
Time Series Anomaly DetectionMSLAUPR0.501CARLA
Time Series Anomaly DetectionMSLF1 Score52.27CARLA
Time Series Anomaly DetectionMSLRecall0.7959CARLA
Time Series Anomaly DetectionMSLprecision0.3891CARLA
Time Series Anomaly DetectionSMAPAUPR0.448CARLA
Time Series Anomaly DetectionSMAPF1 Score0.5292CARLA
Time Series Anomaly DetectionSMAPRecall0.804CARLA
Time Series Anomaly DetectionSMAPprecision0.3944CARLA
Time Series Anomaly DetectionSWaTAUPR0.681CARLA
Time Series Anomaly DetectionSWaTF1 Score0.7209CARLA
Time Series Anomaly DetectionSWaTRecall0.5673CARLA
Time Series Anomaly DetectionSWaTprecision0.9886CARLA

Related Papers

Multi-Stage Prompt Inference Attacks on Enterprise LLM Systems2025-07-21Touch in the Wild: Learning Fine-Grained Manipulation with a Portable Visuo-Tactile Gripper2025-07-20Spectral Bellman Method: Unifying Representation and Exploration in RL2025-07-17Boosting Team Modeling through Tempo-Relational Representation Learning2025-07-173DKeyAD: High-Resolution 3D Point Cloud Anomaly Detection via Keypoint-Guided Point Clustering2025-07-17A Semi-Supervised Learning Method for the Identification of Bad Exposures in Large Imaging Surveys2025-07-17SemCSE: Semantic Contrastive Sentence Embeddings Using LLM-Generated Summaries For Scientific Abstracts2025-07-17HapticCap: A Multimodal Dataset and Task for Understanding User Experience of Vibration Haptic Signals2025-07-17