# Deep Learning for Anomaly Detection in CNC Machine Vibration Data: A RoughLSTM-Based Approach
## 1 Introduction
This adaptive decision mechanism allows the model to reduce false positives and false negatives, thereby improving the reliability and interpretability of anomaly detection. The contributions of this study are twofold. First, it introduces a novel hybrid model that combines the temporal modeling capabilities of LSTM with the uncertainty management features of RST. Second, it demonstrates the effectiveness of this approach in improving anomaly detection accuracy, particularly in complex industrial environments where data uncertainty is a significant challenge. By addressing the limitations of traditional LSTM models, RoughLSTM offers a more robust and flexible solution for industrial applications, paving the way for more reliable and efficient production processes. In the following sections, we provide a detailed overview of the theoretical foundations of RST and LSTM networks, followed by a comprehensive description of the proposed RoughLSTM model. The experimental results and performance evaluation of the model are also presented, highlighting its advantages over traditional approaches in industrial anomaly detection. Detecting anomalies that occur during machining processes is crucial, whether they are easily observable, as in finishing operations, or harder to detect, as in rough machining operations that escape systematic observations. The efficiency of milling operations depends on the material's capacity to be removed as quickly as possible [5]. However, due to vibrations (chatter) and associated side effects such as poor surface quality, tool and spindle damage, and noise, the material removal rate significantly decreases. Despite the develop ment of various methods to control these negative effects [6], the chatter phenomenon still remains a limiting factor in the efficiency of many machining operations. Advancements in computational power have allowed data-driven methods such as machine learning [7; 8] and signal processing [9] to become important research areas for anomaly detection. These methods have the potential to capture the complexity and variability of systems that traditional knowledge and model-based approaches cannot effectively represent. Supervised machine-learning-based methods treat anomaly detection as a classification problem, distinguishing between healthy and faulty states by training models with both normal and abnormal data examples. [PERSON] et al. [10] developed methods based on sound signal analysis to detect damage in motors and achieved high accuracy using decision trees (DT), support vector machines (SVM), and k-nearest neighbor (kNN) classifiers. However, it is important to highlight the limitations of supervised-learning-based techniques in detecting errors that were not explicitly trained during the model training phase. Since the trained model can only learn from patterns found in the training dataset, it may struggle to recognize new fault patterns not present in the training data. In a study by [PERSON] et al. [11], it was stated that growth in anomaly detection is possible by developing a new anomaly development method (Self-ACM) based on self-supervised learning, in which feature maps are modeled with self-supervised adversarial learning. In the study, an innovative THZ dataset was created to be used in anomaly detection. Self-supervised learning increased the accuracy in anomaly detection by allowing the model to learn richer representations. In another study [12], the CARLA model, which offers a self-supervised contrastive representation learning approach for anomaly detection in time series data, is proposed. CARLA has been tested on seven large time series datasets and achieved higher F1-score and AU-PR values than existing self-supervised, semi-supervised, and unsupervised methods. [PERSON] et al. [13] propose a new method for pure anomaly detection with an adaptive margin using self-supervised deep metric learning.