# Deep Learning for Anomaly Detection in CNC Machine Vibration Data: A RoughLSTM-Based Approach
## 1 Introduction
Therefore, image analysis provides powerful tools for visualizing and recognizing flaws in systems [25]. In a study by [PERSON] et al. [26], an approach based on mechanical information was first developed to determine the most suitable signal processing method, and then a deep-learning-based method was proposed to automatically detect vibration phenomena. In this approach, input images obtained from the fast Fourier transform (FFT) analysis of vibration signals from the processing of Alstom industrial railway systems were used. Deep learning utilized pretrained deep neural networks such as VGG16 and ResNet50 to extract features from image data. The model's accuracy was evaluated by adding a test dataset with noisy and more uncertain images, and it was shown that the model successfully detected these uncertain conditions thanks to the clean cases used for training. As a result, the model demonstrated a high overall performance with an accuracy rate of 73.71%. A new approach based on wavelet-transformed LSTM autoencoder networks was proposed to monitor vibration signals [27]. The study emphasizes the ability of LSTM autoencoders to learn temporal patterns from input signals, while highlighting the ability of wavelet transform to effectively capture the dynamics and interactions of different frequency components of the signals. Data-driven strategies use machine learning and deep learning techniques to extract the most informative features from available data (such as sensor, image, or text information) [28]. [PERSON] et al. [29] developed an artificial neural network (ANN) to predict milling energy based on selected machining parameters and integrated this network with a particle swarm optimization (PSO) algorithm to determine the optimal machining parameters for minimum energy consumption. [PERSON] et al. [30] used a neuro-fuzzy inference system supported by PSO optimization to predict surface roughness and cutting zone temperature. [PERSON] et al. [31] utilized artificial neural networks to model the dynamic relationship between machining parameters and milling force. [PERSON] et al. [32] proposed a method to monitor the manufacturing process by combining time-frequency analysis with deep neural networks. In their study, acoustic emission signals were obtained during turning operations with different spindle speeds, feed rates, and cutting depths. A literature review reveals that the authors have addressed topics such as real-time process and machine condition monitoring, fault detection, and diagnosis of bearings in rotating machines, considering changes in spindle speed, feed rate, and overall mean band frequency amplitude in vibration detection. An integrated model using a pretrained deep neural network, AlexNet [33], with self-excited vibration theory and short-time Fourier transform (STFT), was used by a study to detect vibrations (chatter) [34]. Continuous wavelet transform (CWT) was applied to obtain vibration-rich images, which were then used during signal preprocessing. These images were later used as training data for deep neural networks [35]. A real-time vibration detection approach was developed based on continuous wavelet transform scalograms and convolutional neural networks (CNNs), predicting system states (stable, transient, and unstable) [36]. The transfer learning model proposed by the study contained analytical solutions and a CNN, and it was able to detect vibration without requiring real data during the training phase. However, this model is based on a simple approach using a root mean square (RMS) threshold. An LSTM variant was used for vibration detection in high-speed milling operations [37]. Online vibration detection based on current signals from a CNC machine was presented, where LSTM was trained to detect vibrations in simulated sequences of control currents. Recently, deep neural networks have been effectively used in time-series classification tasks.