Research on Anomaly Detection Model Based on Time Series
Abstract
Robust anomaly detection in time series remains challenging because sparse abnormal observations, noise contamination, nonlinear dynamics, and long-range temporal dependencies can obscure deviation patterns. This paper proposes the SALK anomaly detection model, which integrates an attention-enhanced long short-term memory (LSTM) network with K-means clustering. The LSTM component learns temporal representations and predicts the input sequence, while the attention mechanism emphasizes informative time steps. A reconstruction-error sequence is then derived from the prediction output and partitioned by K-means to distinguish normal and anomalous patterns. Experiments on a real-world fresh-food price dataset compare SALK with DBSCAN, K-means, HBOS, USAD, and TranAD. The results show that SALK achieves superior precision, recall, and F1 score, demonstrating improved sensitivity to sparse anomalies and robustness to noisy temporal fluctuations. These findings provide a technically effective framework for unsupervised anomaly identification and early warning in complex time series.