# FedRDS: Federated Learning on Non-IID Data via Regularization and Data Sharing
## 4 Experiments and Analysis
### Comparison of Average Accuracy  
Figure 4 presents the four models' comparative experimental results on the MNIST, Fashion MNIST, SVHN, and CIFAR-10 datasets (FedAvg, FedProx, MOON, and FedRDS). The figure displays the accuracy trend and training loss under non-IID nodes.  
In Figure 3(a), after 126 rounds, the FedRDS algorithm gradually converges and its model accuracy reaches 98.23%. Figure 3(b) shows that the accuracy of FedRDS differs from other methods during the initial phase of model training and reaches a smooth accuracy curve after 165 rounds. The accuracy of the model can ultimately reach 88.74%. In Figure 3(c), the FedRDS accuracy curve showed significant fluctuations in the early stages,  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Dataset** & \(\mathbf{\eta}\) & **B** & **C** & \(\mathbf{\beta}\) & \(\mathbf{\kappa}\) & **E** \\ \hline
**MNIST** & 0.001 & 8 & 0.1 & 0.1 & 0.5 & 10 \\
**Fashion-MNIST** & 0.0001 & 14 & 0.1 & 0.1 & 0.5 & 10 \\
**SVHN** & 0.1 & 500 & 0.1 & 0.1 & 0.5 & 10 \\
**CIFAR-10** & 0.01 & 10 & 0.1 & 0.1 & 0.5 & 10 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Experimental Settings.  
and before 36 rounds, the loss curve experienced severe tremors. However, the two curves gradually stabilized as the number of communication rounds increased. The accuracy of FedRDS after 200 rounds of communication reached 84.95%, MOON achieved an 83.98% accuracy, FedProx achieved an 83.32% accuracy, and FedAvg achieved an 82.62% accuracy, while FedRDS achieved an accuracy of 55.91% for CIFAR-10 and FedAvg only achieved 53.03% (2.88% lower than FedRDS). FedProx and MOON showed moderate accuracy and some convergence in all four datasets. However, their performance is relatively weak in non-IID situations and further optimization and improvement are needed.  
The data in Figure 4 indicates that FedRDS has faster convergence and higher model accuracy compared to other baselines in most non-IID situations. This is due to the use of dynamically balanced weights and allocated FedRDS algorithm node weights being reasonable, which improves the model's performance. The FedRDS algorithm gradually converges after training because the FedRDS algorithm avoids the overfitting of local models, thus improving the generalization ability of models. The accuracy curve in the experiment fluctuates more because the data-sharing strategy promotes data flow between all clients and allows them to use the existing data better. The data-sharing strategy aids in minimizing the gap between local and global data and provides more categories of training data. The loss curve indicates that most algorithms have a smooth decreasing curve, and the loss curve of FedRDS decreases faster and lower than other algorithms. This result indicates that FedRDS has better training efficiency when processing non-IID data and can use data from each client more effectively. Therefore, compared to FedAvg, FedProx, and MOON, FedRDS has faster and higher accuracy improvements. We provide a detailed comparison of the accuracy of four methods in Table 3.  
Figure 4: Average accuracy and training loss in the non-IID scenario. (**a**) Average accuracy on MNIST. (**b**) Average accuracy on Fashion-MNIST. (**c**) Average accuracy on SVHN. (**d**) Average accuracy on CIFAR-10. (**e**) Training loss on MNIST. (**f**) Training loss on Fashion-MNIST. (**g**) Training loss on SVHN. (**h**) Training loss on CIFAR-10.