Self-Supervised Time-Series Anomaly Detection Using Learnable Data Augmentation

Kukjin Choi, Jihun Yi, Jisoo Mok, Sungroh YoonarXiv 2024 · OpenReview

Abstract

Continuous efforts are being made to advance anomaly detection in various manufacturing processes to increase the productivity and safety of industrial sites. Deep learning replaced rule-based methods and recently emerged as a promising method for anomaly detection in diverse industries. However, in the real world, the scarcity of abnormal data and difficulties in obtaining labeled data create limitations in the training of detection models. In this study, we addressed these shortcomings by proposing a learnable data augmentation-based time-series anomaly detection (LATAD) technique that is trained in a self-supervised manner. LATAD extracts discriminative features from time-series data through contrastive learning. At the same time, learnable data augmentation produces challenging negative samples to enhance learning efficiency. We measured anomaly scores of the proposed technique based on latent feature similarities. As per the results, LATAD exhibited comparable or improved performance to the state-of-the-art anomaly detection assessments on several benchmark datasets and provided a gradient-based diagnosis technique to help identify root causes.

1. Introduction

In modern industrial environments, detecting anomalies such as equipment faults or cyber-physical attacks is critical for maintaining safety and productivity. While deep learning has significantly advanced this field, it faces a persistent challenge: the extreme scarcity of labeled abnormal data. Most industrial datasets are heavily imbalanced, consisting almost entirely of normal operational data.

Existing deep learning approaches typically rely on reconstruction or forecasting. Reconstruction-based models, such as autoencoders, identify anomalies by high reconstruction errors, while forecasting-based models flag deviations from predicted future values. However, these methods often suffer from "over-generalization," where the model inadvertently learns to reconstruct or predict the anomalies themselves, leading to missed detections. Furthermore, standard data augmentation techniques used in computer vision do not readily apply to multivariate time-series data, where temporal sequences and inter-sensor correlations must be strictly preserved.

2. The LATAD Framework

To overcome these limitations, we propose LATAD (Learnable Data Augmentation-based Time-series Anomaly Detection). LATAD utilizes self-supervised contrastive learning to map data into a latent space where normal samples are tightly clustered and anomalies are distinctly separated.

The LATAD framework architecture, integrating parallel feature extraction modules and a contrastive learning objective.

2.1 Multi-Stage Feature Extraction

The feature extractor $f_\theta$ is designed to capture complex patterns in multivariate sensor data by employing multiple neural architectures in parallel:

  • 1D-Convolution: Captures local temporal patterns.
  • Graph Attention Network (GAT): Models the spatial dependencies and correlations between different sensors.
  • Transformer Encoder: Identifies long-range temporal dependencies across the sequence.
  • Temporal Convolutional Network (TCN): Fuses these features to capture comprehensive causal relationships.

2.2 Learnable Data Augmentation

The core innovation of LATAD is its learnable augmentation strategy, which generates "challenging" samples to improve the robustness of the feature extractor.

Detailed view of the learnable data augmentation process, including (a) positive sample selection using stationary neighborhoods and (b) negative sample generation via learnable masking.
  • Positive Samples ($x^+$): Instead of random cropping, LATAD selects samples from a "temporal neighborhood." It employs an Augmented Dickey-Fuller (ADF) test to ensure the selected neighborhood is stationary, respecting the underlying physical properties of the system.
  • Negative Samples ($x^-$): A learnable generator $g_\phi$ creates masks to produce synthetic anomalies. By training the generator alongside the detector, LATAD creates "semi-hard" negative samples that are difficult to distinguish from normal data, forcing the model to learn sharper decision boundaries.

2.3 Triplet Margin Loss

The framework is optimized using a three-part loss function:

  1. Compactness ($\mathcal{L}_{comp}$): Minimizes the distance between normal samples in the latent space.
  2. Separateness ($\mathcal{L}_{sep}$): Maximizes the distance between normal samples and generated negatives.
  3. Regularization ($\mathcal{L}_{reg}$): Uses KL-Divergence to ensure generated negatives remain within a realistic distribution, preventing the task from becoming trivial.

3. Experimental Evaluation

LATAD was evaluated on five benchmark datasets: SWaT and WADI (water treatment systems), MSL and SMAP (NASA spacecraft telemetry), and SMD (server machine data).

The results demonstrate that LATAD consistently outperforms or matches state-of-the-art (SOTA) models such as GDN, USAD, and MTAD-GAT. Specifically, LATAD achieved a 6.53% average improvement in F1-score across all datasets. On the MSL, SMAP, and SMD benchmarks, it set new performance records. Beyond detection, the model supports root cause analysis through a gradient-based diagnosis technique, identifying which specific sensors contributed most to an anomaly score.

4. Conclusion

LATAD introduces a robust self-supervised framework for industrial anomaly detection by combining multi-modal feature extraction with learnable data augmentation. By generating challenging negative samples, the model learns a highly discriminative latent space without requiring manual labels. Future work will focus on reducing detection delays inherent in sliding-window approaches and adapting the model to non-stationary environments where system dynamics evolve over time.

Summary updated

BibTeX
@misc{choi2024self,
  author = {Kukjin Choi and Jihun Yi and Jisoo Mok and Sungroh Yoon},
  title = {{Self-Supervised Time-Series Anomaly Detection Using Learnable Data Augmentation}},
  year = {2024},
  eprint = {2406.12260},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.12260},
}
Figure