## 5 Existing Solutions
### Other Solutions
They used the Merkle tree to anchor gathered devices' data to the Blockchain, and they used smart contracts to apply an incentive mechanism to reward training participating nodes with tokens. Moreover, ref. [45] proposed a similar use of federated learning and Blockchain in iIoT. In that work, the authors focused on how to preserve communication costs. The proposed mechanism applied CNN and used a k-top algorithm to limit the training gradients of one trainee node before the local aggregation. This mechanism applies Gaussian noise to protect the privacy of the model gradients that are stored on-chain. In [46], the authors applied differential privacy on data by using homomorphic encryption. Using LaPlace and Pillar, cryptosystems encrypted the data to train it with K-means, random forest, and AdaBoost. Lastly, the global model gradients were stored on-chain after aggregation. However, the works of [44; 45; 46] did not provide ways to prevent poisonous node additions. Others had a somewhat separate deployment of federated learning with Blockchain [47; 48; 49; 50]. Claiming to be the first application of federated learning with Blockchain in an intrusion detection system (IDS), the authors of [47] used MultiChain permissioned Blockchain to ensure the training epoch data integrity. The usage of MultiChain gained the proposed system the ability to store the data of the training round and organize the next round's leader. During experiments, the proposed system performed well. However, with 12 deep learning servers, there was an executional delay compared with regular Blockchain, by 5-15%. Authors of [48] proposed a framework that leverages federated learning and Blockchain in the Internet of Battle Things (IoBT). The edge-computing-based system consists of four layers: data, edge, fog, and cloud layers. Data is where the data collection happens, the edge is where the model training and off-chain aggregation happens, fog follows a similar pattern, while the cloud layer stores the final globally trained model. An experiment to test the performance of [48]'s proposed system was conducted using an imagery dataset of airplanes, birds, drones, and ships. With two learning rate criteria of 0.01 and 0.02, the first setting of fixed participants achieved 92% and 94% in edge nodes, respectively, and 99% and 97% in fog nodes, respectively, over 50 rounds of learning. In contrast, a second set of randomly selected participants achieved 89% and 92% in edge nodes, respectively, and 97% and 96% in fog nodes, respectively. While it is lesser than fog nodes, it is still regarded as having high accuracy with low loss. The work of [50] is another example of another semi-separate application in anomaly detection systems. The authors designed an asynchronous learning system to detect anomalies in an IoT system. Using Blockchain to validate the model updates enhanced privacy and security. Works of [49; 51] used Blockchain as an authentication authority to provide the required access and participation. In [49], authors deployed a real-time data-processing and multi-agent system in an Internet of Medical Things (IoMT) environment. The authors employed three agents: learning agent, data management agent, and indirect agent. They used separate cloud storage to store the datasets of patients and the classifier models. Similar, but in a different flavor, [51] uses federated transfer learning (FTL) for each iIoT-device-trained parameter's transfer to a cloud server for aggregation. The consensus mechanism was Ripple, where a device must be approved by 51% of connected nodes to be authenticated. The paper of [52] proposed a multi-layer consensus system for the Internet of Vehicles, yet another flavor of IoT. The Blockchain-enabled hierarchal mechanism relied on a proof of knowledge (PoK) consensus mechanism at two layers with roadside units (RSU) and vehicles. The first layer was the ground chains (GC) layer, where vehicles collected data from surrounding areas that were considered as federated learning training sets.