# Kalman Filter-Based Differential Privacy Federated Learning Method
## 4 Experiment and Analysis
### Experimental Results  
The effectiveness of the method is shown by the model accuracy, and the comparison results are shown in Figure 3. The DP-FedAvg algorithm protected privacy by adding noise to the gradient matrix, and the impact of privacy protection depended on the size of the privacy budget. The smaller the privacy budget, the better the privacy protection. However, as the privacy budget decreased, the noise required to be added increased, which may lead to a decrease in the accuracy of the model. By comparing the accuracy under the non-IID dataset, DP-FedAvg in (a) and (c), a higher requirement for privacy protection needed a smaller \(\varepsilon\), which led to lower accuracy of the model. Furthermore, the accuracy of DP-FedAvg at \(\varepsilon=1\) decreased about 3% compared to that at \(\varepsilon=5\). Furthermore, the accuracy of DP-FedAvg \(\varepsilon=1\) was lower than \(\varepsilon=5\) and was the same as the pattern in the IID.  
In addition, using different datasets, FMNIST and CIFAR10, the experimental results in Table 4 show that KDPFL achieved good results in the other two datasets. Hence, the model is suitable for other datasets. By testing CNN and CIFAR10, the experimental results show that KDPFL is suitable for different neural network structures and has good compatibility.  
In this paper, the parameter update equation was transformed into the state update equation. Furthermore, the global model parameter update, which was completely determined by the TN's training result, was transformed into the global model parameter update, which was jointly determined by the estimated value and the TN calculation result. The Kalman gain coefficient was calculated by the noise covariance matrix, and the weight  
\begin{table}
\begin{tabular}{l c c c c c c c c} \hline \hline \multirow{2}{*}{**Method**} & \multicolumn{2}{c}{**FMNIST (acc/\%)**} & \multicolumn{4}{c}{**CIFAR10 (acc/\%)**} \\ \cline{2-9}  & \multicolumn{2}{c}{**Non IID**} & \multicolumn{2}{c}{**IID**} & \multicolumn{2}{c}{**Non IID**} & \multicolumn{2}{c}{**IID**} \\ \cline{2-9}  & \(\varepsilon=\textbf{1}\) & \(\varepsilon=\textbf{5}\) & \(\varepsilon=\textbf{1}\) & \(\varepsilon=\textbf{5}\) & \(\varepsilon=\textbf{1}\) & \(\varepsilon=\textbf{5}\) & \(\varepsilon=\textbf{1}\) & \(\varepsilon=\textbf{5}\) \\ \hline FedAvg & \multicolumn{2}{c}{86.62} & \multicolumn{2}{c}{89.56} & \multicolumn{2}{c}{83.21} & \multicolumn{2}{c}{86.34} \\ DP-FedAvg & 83.17 & 84.94 & 86.59 & 88.02 & 77.26 & 79.44 & 81.23 & 83.55 \\ KDPFL & 86.12 & 86.23 & 88.93 & 89.01 & 82.76 & 82.88 & 85.93 & 86.03 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Accuracy in different models and datasets.  
of the estimated value and the predicted value in the global model update were calculated by the Kalman gain coefficient to realize the optimal global model update.  
The Kalman filter noise reduction method, which reduced the noise at aggregation, decreased the effect of the differential privacy added noise on the model, achieved an accuracy closer to the FedAvg algorithm without added noise, and performed well with both non-IID data and IID data. With non-IID data, the accuracy \(\varepsilon=1\) was improved up to 4.5% compared to DP-FedAvg, and the accuracy \(\varepsilon=5\) was improved up to 2.5%. The above experiments show that the scheme proposed in this paper can protect the user's privacy with little loss of accuracy.