Time series anomaly detection hybrid model based on SARIMA and LSTM
Wenjuan Wu, Mingyuan Guo, Shangfei Wang, Jinying Han · Journal of Computing and Electronic Information Management · 2025
For complex time series data, it is difficult for short-time memory neural networks to capture multiple factors comprehensively, and seasonal differential autoregressive moving average model has limitations in dealing with nonlinear relationships and outliers. To solve these problems, a hybrid time-series data anomaly detection model combining seasonal differential autoregressive moving average model (SARIMA) and short and long-time memory neural network (LSTM) is proposed. First, SARIMA model was used to initially fit key performance index data to capture the linear trend and seasonal pattern in the series. Then the sliding window technique is used to convert the fitted residual data into supervised learning data format, and the input dimension of the LSTM model is determined accordingly. Finally, an improved sparse regularization multi-head attention mechanism is proposed to add into the LSTM model. This mechanism realizes the sparsity of attention weights by introducing L1 regularization into the standard multi-head attention mechanism, and takes the output residual of the SARIMA model as the input of the improved LSTM model for secondary prediction and anomaly detection. The proposed hybrid model is compared with the public data set, and the experimental results show that the SARMI-LSTM hybrid model has a good performance in the accuracy of anomaly detection.