# Federated Learning for Surface Roughness
## 1 Introduction
[PERSON] and [PERSON] [13] integrated a Markov Transition Field (MTF) with a Convolutional Long Short-Term Memory network (LSTM), proposing an MTF-LSTM model that considers both static machining parameters and dynamic process conditions and effectively improving prediction accuracy. In addition, [PERSON] et al. [14] presented a hybrid prediction framework that integrated physical modeling with deep learning, employing a physics-guided loss function and data augmentation strategies to significantly improve model generalization and predictive performance. Concurrently, [PERSON] et al. [15] utilized a backpropagation neural network (BPNN) to construct their prediction model and conducted variance analyses to examine the effects of machining parameters. [PERSON] et al. [16] and [PERSON] et al. [17] investigated surface roughness prediction in WEDM by utilizing pulse current, pulse duration, and workpiece thickness as model inputs. However, their methodologies rely on pre-established parameters, including fixed machine settings and workpiece characteristics, limiting their real-time prediction capabilities. Addressing this constraint, we referred to the study by [PERSON] et al. [18], which demonstrated that surface roughness could be accurately predicted using only electrical signals such as current and voltage. Building upon these insights, our research extends the minimal-input approach by validating its efficacy on two distinct WEDM machines, highlighting its robustness and cross-machine applicability for real-time surface roughness prediction. Furthermore, federated learning technology has demonstrated broad potential in industrial applications. [PERSON] et al. [19] explored the use of federated learning in the field of digital health, emphasizing its ability to protect patient privacy while enabling personalized healthcare through decentralized machine learning techniques. [PERSON] et al. [20] systematically reviewed the strategies and future prospects of federated learning aggregation algorithms, while [PERSON] et al. [21]provided a comprehensive overview of the application domains, challenges, and technological development directions of federated learning. [PERSON] et al. [22] proposed a deep learning architecture that combines convolutional neural networks with gated recurrent units (CGRUs), which can effectively utilize voltage signals in wire electrical discharge machining (WEDM) to predict unexpected events during the machining process. Taken together, these studies highlight that by leveraging federated learning for real-time prediction of surface roughness in WEDM, it is possible to not only protect data privacy but also significantly enhance real-time monitoring and quality control efficiency in manufacturing. This presents a meaningful step toward the realization of Industry 4.0. To provide a comprehensive overview of the proposed methodology, Figure 1 illustrates the overall workflow of this study. The process begins with the high-resolution acquisition of machining data, including discharge current, spindle current, wire tension, and cutting speed, using a custom-built sensing system. Surface roughness measurements are conducted using a precision roughness tester to obtain accurate ground truth labels. The collected data undergo preprocessing steps such as denoising, normalization, and feature fusion to form a structured time-series input. This input is then fed into a modified Mini-GPT model for surface roughness prediction. Two training paradigms are evaluated: centralized training and federated learning. In the federated approach, local models are trained on separate nodes and periodically aggregated on a central server, ensuring data privacy. Furthermore, data balancing techniques are applied to mitigate the effects of non-uniform distributions across devices. This end-to-end workflow reflects the practical deployment scenario of real-time surface quality monitoring in wire EDM and serves as the foundation for the experimental design discussed in the following sections.