TL;DR
This paper introduces a novel unsupervised anomaly detection algorithm for time series data that leverages topological data analysis (TDA). By identifying "normal" patterns as persistent loops (1-cycles) in a topological representation of the time series, the algorithm effectively distinguishes anomalies based on their deviation from these normal structures. This approach offers a robust and competitive alternative to existing methods, particularly for time series with complex, repetitive behaviors.
What Problem Does This Paper Address?
Anomaly detection in time series is a critical task with applications ranging from healthcare to industrial monitoring. A key challenge is defining "normality" in data that can exhibit multiple normal patterns, varying pattern lengths, and the presence of noise. Traditional methods often struggle with these complexities, leading to difficulties in accurately identifying deviations. This paper addresses the need for an unsupervised anomaly detection method that can effectively model and identify normal patterns, even in the presence of noise and multiple underlying behaviors, to then flag deviations as anomalies.
Methods
The core of the proposed algorithm lies in applying topological data analysis (TDA) to time series. The process involves several key steps:
- Delay Embedding: The time series is transformed into a higher-dimensional point cloud using a delay embedding. This captures the temporal dependencies and structure of the data.
- DTM Rips Filtration: A weighted Vietoris-Rips filtration is constructed on a subsampled version of the delay embedding. This filtration, based on the "distance to measure" (DTM), is designed to be robust to outliers and captures density information.
- Persistent Homology: 1-dimensional persistent homology is computed on the filtration. This technique identifies "loops" or 1-cycles in the data, which are interpreted as representations of recurrent, normal patterns.
- Normal Cycle Identification: The algorithm identifies "normal" 1-cycles by analyzing the persistence diagram. It uses thresholds based on cycle persistence (how long a loop exists) and birth date (when it appears) to distinguish significant, stable loops from transient or noisy ones.
- Anomaly Scoring: Points in the delay embedding are assigned an anomaly score based on their distance to the identified normal cycles. Points far from these normal structures are considered anomalous.
The novelty lies in the specific combination of DTM-based Rips filtration for robustness and the focus on 1-dimensional persistent homology to capture cyclical patterns as indicators of normality.
Datasets
The paper evaluates its algorithm on:
- Synthetic Dataset: 120 time series generated according to the proposed model, with varying anomaly types (punctual, sequential), presence of multiple normal atoms, and repeating anomalies.
- Real-world Datasets: 18 public datasets from the TSB-UAD benchmark suite, comprising univariate time series with labeled anomalies.
Key Insights and Ideas
- Topological Loops as Normality: The fundamental idea that persistent loops in a topological representation of a time series can serve as robust indicators of normal behavior is a key insight. This moves beyond simple density or prediction-based notions of normality.
- DTM Filtration for Robustness: Using a distance-to-measure (DTM) based filtration is crucial for handling noisy data and potential outliers, which are common in real-world time series. This makes the topological features more reliable.
- Subsampling for Efficiency: The ability to compute persistent homology on a subsample of the delay embedding while retaining density information from the full point cloud is a significant practical contribution, drastically reducing computation time without sacrificing performance.
- Parameter Sensitivity: The study highlights that while the algorithm is generally robust, the choice of embedding dimension (
d) and delay (τ) is critical, with their product (d*τ) being particularly important for capturing patterns of appropriate scale.
Key Results
- Competitive Performance: The proposed method achieves competitive results on 18 real-world anomaly detection datasets, demonstrating strong performance comparable to state-of-the-art methods. It achieved the best score on 4 datasets and was in the top 5 on 13.
- Robustness to Noise: The algorithm shows good robustness to noise, maintaining a high AUC-ROC even with moderate noise levels.
- Efficiency Gains: The subsampling strategy significantly reduces computation time, making the algorithm scalable to large datasets. For instance, computation time can be reduced by orders of magnitude with a subsample size of around 200 points, while performance remains near-optimal.
- Parameter Influence: The study provides insights into parameter tuning, showing that the product
d*τis important for capturing patterns of the right scale, and that very low values ofqcan degrade performance.
Limitations and Future Work
- Model Assumptions: The algorithm's effectiveness is tied to the model of time series described in Section 2, which assumes that patterns start and end at zero and have disjoint supports. While the DTM filtration offers some robustness, significant deviations from this model (e.g., very slow variations in abnormal atoms) could pose challenges.
- Parameter Selection: While heuristics are provided for parameter selection, optimal parameters can still vary across datasets. Further research into automated parameter tuning could be beneficial.
- Multivariate Time Series: The current work focuses on univariate time series. Adapting the method to multivariate time series is suggested as a future research direction.
- Linear Trends: The presence of a linear trend in time series is also mentioned as a potential challenge that could be addressed in future work.
- Faster Cycle Extraction: The authors suggest exploring faster methods for extracting cycles or finding sparse filtrations to further improve computational efficiency.
Summary updated