F-SE-LSTM: A Time Series Anomaly Detection Method with Frequency Domain Information

Yi-Xiang Lu,Xiao-Bo Jin,Jian Chen,Dong-Jie Liu,Guang-Gang Geng
2024-12-03
Abstract:With the development of society, time series anomaly detection plays an important role in network and IoT services. However, most existing anomaly detection methods directly analyze time series in the time domain and cannot distinguish some relatively hidden anomaly sequences. We attempt to analyze the impact of frequency on time series from a frequency domain perspective, thus proposing a new time series anomaly detection method called F-SE-LSTM. This method utilizes two sliding windows and fast Fourier transform (FFT) to construct a frequency matrix. Simultaneously, Squeeze-and-Excitation Networks (SENet) and Long Short-Term Memory (LSTM) are employed to extract frequency-related features within and between periods. Through comparative experiments on multiple datasets such as Yahoo Webscope S5 and Numenta Anomaly Benchmark, the results demonstrate that the frequency matrix constructed by F-SE-LSTM exhibits better discriminative ability than ordinary time domain and frequency domain data. Furthermore, F-SE-LSTM outperforms existing state-of-the-art deep learning anomaly detection methods in terms of anomaly detection capability and execution efficiency.
Artificial Intelligence
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: Existing time - series anomaly detection methods mainly directly analyze time series in the time domain, and it is difficult to distinguish some relatively hidden abnormal sequences. Therefore, the author proposes a new time - series anomaly detection method based on frequency - domain information - F - SE - LSTM. Specifically, this method aims to: 1. **Enhance anomaly detection ability by using frequency - domain information**: Most existing anomaly detection methods only analyze in the time domain and cannot capture some hidden abnormal patterns. By introducing frequency - domain information, these hidden anomalies can be more effectively identified. 2. **Combine time - domain and frequency - domain features**: Traditional methods often only focus on a single feature in the time domain or the frequency domain and ignore the association between the two. F - SE - LSTM can more comprehensively extract features in the time series by combining the information of the time domain and the frequency domain. 3. **Improve the accuracy and efficiency of anomaly detection**: Through experimental verification on multiple datasets (such as Yahoo Webscope S5 and Numenta Anomaly Benchmark), F - SE - LSTM shows better anomaly detection ability and execution efficiency than existing methods. ### Method overview To achieve the above goals, F - SE - LSTM adopts the following steps: 1. **Construct a frequency matrix**: Use the Fast Fourier Transform (FFT) to convert time - series data in different time periods into frequency - domain data and construct a frequency matrix. \[ D=\begin{bmatrix} x_1&x_2&\cdots&x_N\\ x_2&x_3&\cdots&x_{N + 1}\\ \vdots&\vdots&\ddots&\vdots\\ x_M&x_{M + 1}&\cdots&x_L \end{bmatrix}, \quad M = L - N+ 1 \] where \(M\) is the number of sliding windows, and each sequence represents a sample. 2. **Extract frequency matrix features**: Use Squeeze - and - Excitation Networks (SENet) and Long Short - Term Memory (LSTM) to extract relevant features in the frequency matrix. - **SENet**: Extract the dependency relationship between adjacent frequencies through convolution operations and strengthen important features through the channel attention mechanism. - **LSTM**: Used to model the frequency dependency relationship between different time periods, thereby capturing the long - term dependency in the time series. 3. **Output anomaly detection results**: Use a deep neural network (DNN) to reduce the dimension of the one - dimensional vector output by LSTM, and introduce Dropout to prevent overfitting, and finally output the binary - classification anomaly detection results. ### Main contributions 1. **Propose a method of converting time - series data into a frequency matrix by using FFT and a sliding window**, which contains frequency - related features and frequency - based time - related features. 2. **Combine SENet and LSTM to construct a time - series anomaly detection model**, which can extract frequency - related information within the same time period and different time periods, and enhance the characterization of anomalies in time - series data. 3. **Experimental results show that the proposed F - SE - LSTM method is superior to existing methods in terms of anomaly detection ability and execution efficiency**, providing a practical solution to the time - series anomaly detection problem. Through this method, F - SE - LSTM not only improves the accuracy of anomaly detection but also enhances the ability to identify hidden anomalies.