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

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

18 Aug 2023arXiv:2308.09296archive 2025-07-28

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

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.

PaperPDFCode

Code

zamanzadeh/CARLA officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Anomaly DetectionContrastive LearningRepresentation LearningTime SeriesTime Series Anomaly Detection

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Time Series Anomaly Detection KPI CARLA AUPR 0.299 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection KPI CARLA F1 Score 0.3083 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection KPI CARLA Recall 0.736 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection KPI CARLA precision 0.195 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection MSL CARLA AUPR 0.501 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection MSL CARLA F1 Score 52.27 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection MSL CARLA Recall 0.7959 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection MSL CARLA precision 0.3891 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection SMAP CARLA AUPR 0.448 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection SMAP CARLA F1 Score 0.5292 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection SMAP CARLA Recall 0.804 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection SMAP CARLA precision 0.3944 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection SMD CARLA AUPR 0.507 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection SMD CARLA F1 score 0.5114 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection SMD CARLA Recall 0.63062 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection SMD CARLA precision 0.4276 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection SWaT CARLA AUPR 0.681 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection SWaT CARLA F1 Score 0.7209 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection SWaT CARLA Recall 0.5673 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection SWaT CARLA precision 0.9886 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection WADI CARLA AUPR 0.126 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection WADI CARLA F1 Score 0.2953 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection WADI CARLA Recall 0.7316 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection WADI CARLA precision 0.185 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection Yahoo A1 CARLA AUPR 0.645 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection Yahoo A1 CARLA F1 Score 0.7233 #1 of 1 Archive leaderboard report
Time Series Anomaly Detection Yahoo A1 CARLA precision 0.9755 #1 of 1 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Contrastive LearningTriplet Loss

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections