# An EWS-LSTM-Based Deep Learning Early Warning System for Industrial Machine Fault Prediction
## 6 Conclusions  
EWSs represent essential tools for enabling domain experts to anticipate potential system failures. This study investigated the implementation of such a system in a real-world industrial context, using data collected from the embosser of a legacy industrial printing machine. The data required significant preprocessing due to the heterogeneity and asynchronous nature of the acquisition and communication layers. After a review of the literature on EWS and fault prediction, and following an in-depth analysis of the sensor variables in collaboration with domain experts, a deep learning framework was designed to predict specific classes of paper-related errors. LSTM networks enhanced with attention mechanisms were selected as the most suitable architecture for this task. A multi-model classification approach was adopted, where five distinct neural networks were each trained to identify a specific critical error class. The development process was managed using a modular pipeline built with Kedro, ensuring both reproducibility and scalability. This framework also facilitated seamless deployment of the trained models on cloud infrastructure, allowing automated retraining and updates as new data become available. Figure 6: Box plot distribution for all models. Model performance was assessed using standard metrics, including accuracy, precision, recall, and AUROC. The best-performing model achieved an AUROC of 0.93 and a recall above 90%, with the ability to predict fault events up to 10 time units in advance. While some degree of overfitting was observed, particularly in models trained on smaller subsets, this is attributed to the limited number of training instances for certain error classes. To assess robustness in real-world conditions, the full dataset was partitioned and streamed sequentially to each model, simulating a real-time deployment scenario. The results confirmed the models' capacity to anticipate faults within a proactive maintenance horizon. In conclusion, this study offers several practical insights for the design and deployment of intelligent EWSs in industrial environments: (1) the proposed data pipeline can be reused across different machines and operational contexts; (2) the AI models are modular and easily re-trainable on new error types without modifying the overall structure; (3) automatic retraining enables continuous improvement in predictive accuracy; and (4) the architecture is portable and adaptable, making it suitable for deployment on other legacy industrial systems. Researchers and practitioners in the fields of Big Data analytics, cloud-based predictive maintenance, and industrial AI applications can leverage these results to design and address future research and industrial activities. Conceptualization, A.M.C., M.L. and A.S.; Methodology, A.M.C., M.L., G.S. and A.S.; Software, F.C. ; Validation, F.C. ; Formal analysis, G.S. and A.S.; Data curation, F.C. ; Writing--original draft, F.C., A.M.C., M.L., G.S. and A.S.; Writing--review & editing, M.L. ; Supervision, M.L. ; Project administration, M.L. All authors have read and agreed to the published version of the manuscript. This project has received funding from the Piano di Sviluppo research and innovation programme under the SCREAM project (SeCure Remote Equipment and Asset Monitoring), grant agreement F/190043/01/X44. Not applicable. The datasets presented in this article are not readily available because the datasets is based on sensors of a proprietary machine of Sofidel and it is managed and provided to the SCREAM project. We would like to thank Sofidel ([[https://www.sofidel.com/](https://www.sofidel.com/)]([https://www.sofidel.com/](https://www.sofidel.com/)), accessed on 6 July 2023) for providing the data used in this work and the valuable support during the development of the proposed solution.