SimAD: A Simple Dissimilarity-based Approach for Time Series Anomaly Detection

Zhijie Zhong,Zhiwen Yu,Xing Xi,Yue Xu,Jiahui Chen,Kaixiang Yang
2024-05-18
Abstract:Despite the prevalence of reconstruction-based deep learning methods, time series anomaly detection remains challenging. Existing approaches often struggle with limited temporal contexts, inadequate representation of normal patterns, and flawed evaluation metrics, hindering their effectiveness in identifying aberrant behavior. To address these issues, we introduce $\textbf{SimAD}$, a $\textbf{Sim}$ple dissimilarity-based approach for time series $\textbf{A}$nomaly $\textbf{D}$etection. SimAD incorporates an advanced feature extractor adept at processing extended temporal windows, utilizes the EmbedPatch encoder to integrate normal behavioral patterns comprehensively, and introduces an innovative ContrastFusion module designed to accentuate distributional divergences between normal and abnormal data, thereby enhancing the robustness of anomaly discrimination. Additionally, we propose two robust evaluation metrics, UAff and NAff, addressing the limitations of existing metrics and demonstrating their reliability through theoretical and experimental analyses. Experiments across $\textbf{seven}$ diverse time series datasets demonstrate SimAD's superior performance compared to state-of-the-art methods, achieving relative improvements of $\textbf{19.85%}$ on F1, $\textbf{4.44%}$ on Aff-F1, $\textbf{77.79%}$ on NAff-F1, and $\textbf{9.69%}$ on AUC on six multivariate datasets. Code and pre-trained models are available at
Machine Learning,Artificial Intelligence
What problem does this paper attempt to address?
The paper primarily addresses the challenges present in time series anomaly detection and proposes a new solution. Existing time series anomaly detection methods face several key issues: 1. **Limitations of the reconstruction assumption**: Many methods rely solely on the reconstruction assumption, where the model is well-trained on normal data and assigns higher anomaly scores to abnormal data during the testing phase. However, this is often insufficient to improve detection capability. 2. **Limited time window**: Due to the complexity constraints of the attention mechanism, existing methods typically can only handle shorter time windows (e.g., 200 or less), which limits the ability to capture more information. 3. **Limited ability to represent normal patterns**: Some methods fail to specifically model normal or abnormal data, and most models have a limited number of parameters, restricting their expressive power. To address the above issues, the paper proposes SimAD (a simple difference-based time series anomaly detection method). The main contributions of SimAD include: - **Feature Extractor**: Capable of handling longer time windows by segmenting the sequence into multiple patches to learn an extended temporal receptive field. - **EmbedPatch Encoder**: Combines prototypes into the attention mechanism to enhance the representation of normal features and introduces an improved attention mechanism to capture dependencies between different patches. - **ContrastFusion Module**: Enhances the ability to distinguish anomalies by amplifying the distribution differences between normal and abnormal data through contrastive learning techniques. Additionally, the paper proposes a new evaluation metric—**UAff and NAff**—to overcome the limitations of existing evaluation metrics. These new metrics better reflect the algorithm's performance, especially when dealing with random anomaly scores. Experimental results show that on six real-world datasets, SimAD achieves significant performance improvements over current state-of-the-art methods across various evaluation metrics, particularly in terms of F1 score, UAff-F1 score, and NAff-F1 score. This demonstrates the effectiveness of SimAD in addressing the task of time series anomaly detection.