## 4 Experiment Results and Analysis
### Experimental Results  
This study analyzed and compared the proposed federated learning algorithm with the FedProx [18] and FedPer algorithms [23] under different data distributions for three different datasets. The FedTP algorithm is not selected for comparison because it is mainly designed as a transformer with a self-attention mechanism layer of each client locally to encourage the cooperation among clients [20]. The overall accuracy can be improved by client communication, but it also may increase the communication cost and slows down the training speed. The FedOFA operates on the server side, incurring no additional computational cost on the client, making it advantageous in communication-constrained scenarios [21]. However, this architecture is more suited to an overall server computing approach, where the server computes each client parameter model. This may be not in line with the privacy computing structure of the client model preferred in this study. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Parameters \(\backslash\) Dataset** & **Fashion-MNIST** & **CIFAR10** & **CIFAR100** \\ \hline Input shape & (28, 28, 1) & (32, 32, 3) & (32, 32, 3) \\ \hline CNN layer & 2 & 2 & 3 \\ \hline FCNN layer & 1 & 1 & 2 \\ \hline Federated round & 100 & 100 & 100 \\ \hline Participating clients & 10 & 10 & 10 \\ \hline Participating fraction & 0.8 & 0.8 & 0.8 \\ \hline Client training epoch & 1 & 1 & 3 \\ \hline Data batch size & 32 & 32 & 32 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The federated learning parameters. The corresponding federated learning loss values are shown in Figure 4. Based on the experimental results, the federated learning algorithm proposed in this study has a lower training loss when facing a non-IID data distribution among the client datasets. In the Fashion-MNIST dataset, although the initial \(\beta\) value had a higher loss, it was able to converge within 20 rounds and achieve less data loss. In the CIFAR10 and CIFAR100 datasets, the FedPer federated learning algorithm did not limit the local neural network model training based on the heterogeneity of the client data distribution during the model aggregation stage. This resulted in poor model performance, which became more apparent as the non-IID degree of the dataset increased. When the non-IID degree of the dataset increased, the differences in the neural network model trends among the client datasets widened. Even if a constraint term was added during the federated learning training process to restrict the client model trends, it could not solve the impact of client drift caused by this data distribution. In contrast, the algorithm proposed in this study reduced the impact of client drift through personalized federated learning and aggregated the models with limitations based on the premise that clients have their own good models after federated learning ends. This resulted in a better model convergence speed and data loss rate. Therefore, the federated learning algorithm proposed in this study can better reduce the impact of client drift caused by a non-IID data distribution. The prediction accuracy results for the three datasets are shown in Figure 5. For the Fashion-MNIST dataset, the accuracy of the proposed method was higher than those of  
Figure 4: Loss value in various datasets: (**a**) Fashion-MNIST with \(\alpha=1\); (**b**) Fashion-MNIST with \(\alpha=0.1\); (**c**) Fashion-MNIST with \(\alpha=0.05\); (**d**) CIFAR-10 with \(\alpha=1\); (**e**) CIFAR-10 with \(\alpha=0.1\); (**f**) CIFAR-10 with \(\alpha=0.05\); (**g**) CIFAR-100 with \(\alpha=1\); (**h**) CIFAR-100 with \(\alpha=0.1\); (**i**) CIFAR-100 with \(\alpha=0.05\). the other two federated learning algorithms. It can be found that as the distribution of each dataset becomes more decentralized, the accuracy of both the FedProx and FedPer algorithms decreases from 74% to about 62%. However, the accuracy rate of the proposed algorithm converges to 94% over 20 rounds.