## 6 Security Analysis and Performance Evaluation
### Performance of Personalized FL with Multi-Level ACE-Based IoT Knowledge Sharing  
The proposed multi-level ACE-based personalized FL framework undergoes evaluation on two widely used datasets, MNIST and CIFAR-10, which were both designed for image classification tasks encompassing 10 classes. The training sets are divided among 30 clients in accordance with the IID setting. Under this setup, each client is randomly assigned a uniform distribution across the 10 classes. These 30 clients are further divided into two groups: 5 clients at the secret level and the remaining 25 clients at the public level. We adopted a two-layer CNN with a \(5\times 5\) convolution kernel as the backbone model. The training configuration involves 1 local epoch and 500 communication rounds. We utilize the SGD optimizer with a learning rate of 0.005, and the batch size is set to 64. Figure 3: Computational time and storage cost of the ACE algorithm. (**a**) Time cost with different sizes of plaintext length of ACE\({}^{1}\). (**b**) Encryption time cost with different numbers of clients of ACE\({}^{3}\). (**c**) Time cost with different numbers of security levels. (**d**) Storage cost with different sizes of plaintext length of ACE\({}^{1}\). (**e**) Sanitization and decryption time cost with different numbers of clients of ACE\({}^{1}\). (**f**) Storage cost with different numbers of security levels. The training loss curve and test accuracy curve on MNIST are illustrated in Figure 4a.b. For clients at the secret level, FedAvg with multi-level ACE-based IoT knowledge sharing converges to 98.83%, whereas FedAvg without the access control scheme converges to 96.69%. Our solution achieves personalized privacy-preserving federated learning without losing IoT data availability. Notably, our solution converges faster on the clients' decentralized data, as evident from the loss curve. The performance disparity between multi-level ACE-empowered FL and no-ACE FL is more pronounced on CIFAR-10. As depicted in Figure 4c,d, multi-level ACE-empowered FedAvg attains an accuracy of 68.59%, while FedAvg without the access control scheme achieves 51.09%, representing a noteworthy improvement of 17.5%. These experimental results underscore that users can achieve enhanced FL model accuracy and faster convergence rates through our proposed secure IoT knowledge access and sharing approach. Considering the case that the data of different IoT users are non-IID, a further experimental setup is performed as follows. We simulate the case of non-IID in a distribution-based label imbalance [44] way. The specific method is to assign the proportion of each label sample based on the Dirichlet distribution, which is a commonly used prior distribution for simulating real data distribution. We sample \(p_{k}\sim Dir_{N}(\beta)\) and allocate a \(pk,l\) proportion of the instances of class \(k\) to batch \(l\)[45]. \(Dir(\beta)\) denotes the Dirichlet distribution and concentration parameter \(\beta=0.5\) acquiescently. Figure 4: _Cont._  
In the non-IID scenario, FedAvg with multi-level ACE-based IoT knowledge sharing achieves an average accuracy of 96.74% on MNIST for secret-level clients, slightly below the IID case (98.83%). This closely aligns with the average accuracy of FedAvg without the access control scheme in the IID scenario (96.69%). Furthermore, both the accuracy and loss function convergence on non-IID data using the FedAvg algorithm are inferior to those on IID data, as depicted in Figure 5. This suboptimal training effect is deemed unacceptable. To enhance knowledge-sharing performance, opting for more suitable personalized federated learning algorithms becomes imperative when dealing with non-IID data from IoT users. We conduct experiments on MNIST using the proposed PFL algorithm with multi-level ACE-based IoT knowledge sharing. The hyperparameter \(\lambda\) in PFL is set to 0.1, and the other training parameters are set at the same as in the IID case. The average accuracy of the PFL algorithm converged to 99.51% in the setting of the non-IID.