# Deep Learning for Anomaly Detection in CNC Machine Vibration Data: A RoughLSTM-Based Approach
## 1 Introduction
Multi-scale convolutional neural networks (MCNNs) [38], fully convolutional networks (FCNs), and residual networks (ResNets) [39] incorporate CNN-based deep learning approaches for univariate time series classification. These methods stand out as powerful tools for processing and classifying time-series data. In a study aimed at predicting water quality variables, an integrated CNN-LSTM model was developed [40], and traditional machine learning models such as support vector regression (SVR) and decision trees (DTs) were also developed for comparison. The results showed that the LSTM model outperformed the CNN model in predicting dissolved oxygen (DO). The hybrid model formed by integrating LSTM and CNN successfully captured both low and high levels. [PERSON] et al. [41] developed a milling force prediction method based on image data using convolutional CNN with high accuracy. [PERSON] et al. [42] predicted the development of milling forces by combining a physical model with a neural network, but this approach overlooked signal noise and distortions caused by unmodeled dynamics. Hybrid neural networks that combine different network structures have been proposed to more precisely capture complex dynamic behaviors. [PERSON] et al. [43] proposed a hybrid neural network combining CNN and LSTM to predict cutting torque in tunnel boring machines and demonstrated its superior performance compared to a single neural network. In another study [44], two sub-networks involving LSTM were integrated with CNN to predict system rigidity and grinding force patterns for large-scale milling processes. In another study [45], fully convolutional networks were extended with LSTM recurrent neural network (RNN) submodules to improve time series classification. To monitor milling forces in noninvasive ways, a method capable of making real-time predictions based on spindle vibration was proposed, where a hybrid neural network combining LSTM with deep neural networks (DNNs) was used to model the relationship between milling force and spindle vibration [46]. The accuracy of milling force prediction using the hybrid neural network was increased by 16.7% compared to existing data-driven prediction methods. Another study [47] proposed a rough-knowledge-based ensemble learning framework for production quality prediction. The proposed model consisted of three main components: (i) identification of critical parameters in different production stages through attribute reduction and decision rule extraction using RST, (ii) LSTM, and (iii) enhancement of LSTM's learning performance using AdaBoost. LSTM, due to its ability to model long-term dependencies and short-term relationships, is gaining increasing interest as an artificial intelligence method with superior prediction performance in areas such as production quality prediction [48], remaining useful life prediction [49], and production cycle time forecasting [50]. However, to the authors' knowledge, there are not many studies on anomaly detection using the LSTM model. Anomaly detection in manufacturing processes is a critical step in enhancing production efficiency, improving quality, and extending equipment lifespan. Anomalies occurring in production machinery can lead to process interruptions or system failures. Optimization-based anomaly detection enables the early prediction of such disruptions, thereby making maintenance processes more effective. Factors such as uncontrolled vibrations, surface defects, and out-of-tolerance products can negatively impact quality. By detecting such anomalies in advance, production quality can be significantly improved. Sudden machine failures can cause production halts and lead to high maintenance costs. Optimizing cutting tools, spindles, and energy consumption in machining processes helps reduce unnecessary material waste and energy losses. Anomaly detection provides real-time feedback on machine conditions during production, enabling operators and production managers to make timely decisions.