# Deep Learning for Anomaly Detection in CNC Machine Vibration Data: A RoughLSTM-Based Approach
## 5 Conclusions  
This study introduced a novel RoughLSTM model for anomaly detection in CNC machine vibration data by integrating rough set theory with long short-term memory networks. The proposed model addresses the limitations of conventional long short-term memory models, particularly in handling uncertainty and ambiguity in vibration data, by classifying inputs into distinct regions: the upper approach, lower approach, and boundary region. This adaptive decision-making mechanism enhances anomaly detection accuracy and reduces false positives and negatives. The RoughLSTM model was evaluated on real-world \begin{table}
\begin{tabular}{l l c c c c} \hline \hline
**Operations** & **Axis** & **CNN–LSTM** & **WaveletLSTMa** & **LSTM** & **RoughLSTM** \\ \hline \multirow{4}{*}{**OP01+OP02**} & x-axis & **0.8567** & 0.7542 & 0.7294 & 0.7792 \\  & y-axis & 0.7883 & **0.8233** & 0.7305 & 0.7883 \\  & z-axis & 0.7736 & 0.7817 & 0.7128 & **0.7950** \\  & x-axis & 0.8347 & 0.8433 & 0.7815 & **0.8750** \\ \multirow{4}{*}{**OP04+OP07**} & y-axis & 0.7917 & **0.8167** & 0.7664 & 0.7833 \\  & z-axis & 0.8097 & 0.8133 & 0.7700 & **0.8233** \\ \multirow{4}{*}{**OP010+OP14**} & x-axis & **0.8350** & 0.8233 & 0.7194 & 0.7181 \\  & y-axis & 0.8433 & 0.8733 & 0.7678 & **0.8792** \\ \cline{1-1}  & z-axis & **0.8517** & 0.8400 & 0.7408 & 0.7986 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Comparison of axis-based accuracy values for models in selected operations of MO3 machines. \begin{table}
\begin{tabular}{l l c c c c} \hline \hline
**Operations** & **Axis** & **CNN–LSTM** & **WaveletLSTMa** & **LSTM** & **RoughLSTM** \\ \hline \multirow{4}{*}{**OP02+OP08**} & x-axis & **0.9400** & 0.9383 & 0.8694 & 0.9194 \\  & y-axis & 0.9350 & 0.9233 & 0.8279 & **0.9389** \\  & z-axis & 0.9500 & 0.9350 & 0.8912 & **0.9514** \\  & x-axis & 0.6783 & 0.6833 & **0.7194** & 0.7181 \\ \multirow{4}{*}{**OP04+OP09**} & y-axis & 0.7783 & 0.7900 & 0.7019 & **0.8028** \\  & z-axis & 0.8283 & **0.8400** & 0.7436 & 0.7972 \\ \multirow{4}{*}{**OP07+OP11**} & x-axis & 0.9317 & 0.9317 & 0.7994 & **0.9319** \\  & y-axis & 0.9217 & 0.9200 & 0.8126 & **0.9347** \\ \cline{1-1}  & z-axis & 0.9300 & 0.9500 & 0.8302 & **0.9542** \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Comparison of axis-based accuracy values for models in selected operations of MO2 machines. vibration data collected from CNC milling machines operating under various conditions. A comparative performance analysis was conducted against other deep-learning-based models, including CNN-LSTM, WaveletLSTMa, and conventional LSTM models. Experimental results demonstrate that RoughLSTM outperforms the conventional LSTM in several key performance metrics:  
* Accuracy: RoughLSTM achieved a classification accuracy of 94.3%, compared to 78% for the conventional LSTM. * False positive rate (FPR): RoughLSTM reduced the FPR to 3.7%, while the standard LSTM exhibited a much higher rate. * False negative rate (FNR): The proposed model minimized the FNR to 2.0%, ensuring reliable detection of anomalies. * AUC (area under the curve): RoughLSTM showed AUC values close to 0.95 across multiple operational scenarios, indicating strong classification performance. Furthermore, the comparative performance analysis of axis-based accuracy values across MO1, MO2, and MO3 machines confirmed that RoughLSTM consistently delivered superior performance. The model achieved the highest or second-highest accuracy in various operational scenarios, particularly excelling in the z-axis across multiple operations. Compared to CNN-LSTM and WaveletLSTMa, RoughLSTM demonstrated a strong generalization ability, effectively distinguishing between normal and abnormal conditions in complex industrial environments. This performance improvement translates into reduced machine downtime, optimized maintenance schedules, and significant cost savings for industrial operations.