# Federated Learning for Surface Roughness
## 4 Results  
### Model Results for Surface Roughness Prediction in a Centralized Learning Environment  
To evaluate the performance of the neural network model in predicting surface roughness during wire-cut electrical discharge machining (WEDM), we conducted a detailed analysis using Absolute Error. The model's predictive capability was quantified by calculating the distribution of absolute prediction errors over the test dataset and analyzing the proportion of samples falling within different error ranges. Furthermore, we compared the effectiveness of federated learning (FL) and traditional centralized training (CT) to explore the impact of distributed learning approaches on model performance under heterogeneous machine environments. This comparison aimed to assess the practical feasibility and advantages of FL in real-world manufacturing scenarios. During model training, we partitioned the dataset from a single machine (729 samples) into 80% for training (583 samples) and 20% for testing (146 samples). For centralized training, the training data from two machines were combined, resulting in a total of 1166 training samples and 292 testing samples. Figure 8 presents a comparison between the model's predictions and the ground truth labels on the test dataset. The results show that while the model successfully captured the overall trend of surface roughness, there was a certain degree of prediction dispersion--particularly at the extreme ends of the roughness scale, where the prediction error tended to increase. In addition, the RMSE calculated on the same test dataset was 0.074, indicating a generally reliable prediction performance.  
Figure 7: Federated learning architecture for WEDM surface roughness prediction.  
The distribution of model performance across various error ranges is summarized in Table 1, and the proportion of samples within different Absolute Error intervals is illustrated in Figure 9.  
It is worth noting that 28.42% of the samples exhibited a prediction error greater than 0.1, indicating that the model still faces limitations in understanding data features under certain conditions. This may be attributed to fluctuations during the data collection process or inconsistencies in timestamps during data preprocessing. Overall, the model achieved a  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Absolute Error** & **Sample Proportion** & **Sample** \\ \hline \(<\)0.025 & 29.79 & 87 \\
0.025–0.05 & 14.72 & 43 \\
0.05–0.075 & 10.96 & 32 \\
0.075–0.1 & 16.09 & 47 \\ \(>\)0.1 & 28.42 & 83 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Centralized training results of surface roughness prediction model.  
Figure 8: Performance of centralized model for surface roughness prediction.  
Figure 9: Centralized training results of surface roughness prediction model.  
high-accuracy sample proportion of 71.56% (Absolute Error < 0.1), demonstrating strong learning and predictive capabilities in most cases. However, further improvements are necessary for handling high-error samples. Future work will focus on optimizing the neural network architecture and applying data augmentation strategies, such as enhancing training data quality or employing more effective feature engineering techniques to improve the model's generalization performance.