A novel approach for federated machine learning using Raspberry Pi

The problems of privacy and security is becoming a major challenge when it comes to the distributed systems, federated machine learning system especially when data are been transmitted or learned on a network , this necessitated the reasons for this research work which is all about wireless federated machine learning process using a Raspberry Pi. The Raspberry Pi 4 is a single hardware board with built in Linux operating system. We used data set of names from nine (9) different languages and then develop a training model using recurrent neural network to train this names compare to the names in the existing language like French, Scottish to predict if the names are from any of this language, this is done wirelessly with the Wi-Fi network in a federated machine learning environment for experimental setup with PySft’s that is installed in the python environment. The system was able to predict that name from which the language it originate from, the methodology that is implore in the research work is the Rapid Application Development (RAD). The benefits of this system are to ensure privacy, reduces the computing power, ensure real time learning and most importantly it is cost effective.


Introduction
Applied learning strategies include integrating training data into a specified database or database. For example, if the first e-commerce company wants to set up its customer information module for purchasing its products, it would run the information on the data collected from the application or website. The data may be related to the time spent on the actual product page Products that have been searched but not purchased and products that have been purchased. The data should be sent and received through an encoder or data source [1].
Although the comparisons could be quite simple, computer history could substitute for what Federated Learning is all about. There has been a huge gap in the early days of information technology, making the most advanced computer simulations. Finally, the researcher switched to a remote system where computers were distributed between client computers, clients, and internal servers [2].
The Federated Learning structure uses the same model. Machine learning machines are distributed over the systems of computer equipment, rather than on large, centralized systems. This computer model, while initially thought of, would not have been hand-made, as the mobile computer would be too slow to run any Machine Learning module.
Consequently, learning improved in the near-to-late 2018s. Since billions of downloads, equipped with AI chips and high-capacity computers, starting with the Samsung S9, or Apple X series, some of the machine learning(ML) models should run in that and focus on such phones, delivered in the next 3-5 years.

Review of Related Works
Heyam H. Al-Baity et al [3] proposed an effective web service discovery using feature selection, it aims is to employ feature selection in order to search for subset characteristics that can increase the accuracy classification and also enhanced the pace of the traditional classifiers using machine learning.
Laachemi et al [4] apply the use of support vector machine with the classification that improved on its accuracy level based on a stochastic local search (SLS),at the initial stage, the web service quality dataset attributes utilizes the support vector machine classifier to find solutions that is optimal as they have been scaled and its values resized. SLS-SVM approach has an accuracy which was 84.86%, that is far better than the SVM with similar classifier.
Liu et al. [5] proposed the integrated of SVM classifier and the latent Dirichlet allocation (LDA) based models which is used big-scale services to classify and reduced the cost of labeling manual services for training. Algorithm of LDA was used to remove high-level topics from services. The base classifier for this technique is the SVM was used due to the facts that its does well on the classification text. Web services classifier is an important aspect based on its descriptions. Furthermore, with the introduction of a database-based learning strategy that is active was used to reduced manual labeling services cost that is needed to build and trained the set. Manually labeling of services was done in the preprocessing stage, with descriptions information based on its capabilities. Their research takes a looked at the groups with high numbers of services and then select 10 groups. These resulted to increase in the service number of the LDA-SVM which provides the results that are more accurate compare to the SVM. The efficacy of classification frame work in its active learning service was clearly shown in their experimental result that was obtained.
Mustafa et al. [6] opined multi-layer perception neural network (MLPNN) novel classification model which applies optimization through search tabu. It utilizes multi-layer perception neural network model to inspire the neuroscience which was utilize in the prediction of process. MLPs were utilized back propagation in conjunction with Levenberg-Marquardt algorithm that trained the multi-layer perception classifier and TS in the optimization of the classifier. The quality of web-service dataset is like the dataset used [4]. The MLP-TS demonstrated better results of experiment.

System Design
In this research paper work we will define all the technical and functional requirements. All the software and hardware specifications that are used must be setup in this phase. In starting this design phase, we get the initial overview of the processes of using the software. For this project, Raspbian will be used as operating system for Raspberry Pi and coding will be done in python.

Experiment Setup
In the experiment set up section, we present the setting of the experiment process for hardware and software process on collected datasets. The Federated Learning was first implemented on the laptop (coordinating server) before using the Raspberry pi. A Raspberry PI 4 running Raspbian 20.04 connected to the internet via SSH and Wi-Fi network with each PI having is configured with a static IP address configured on them for convenience of addressing. The static IP address are 192.168.0.77 and 192.168.0.78 respectively. Figure 2 show a laptop running on Ubuntu Linux connected to the same LAN with the Raspberry Pi via Wi-Fi

Training the Recurrent Neural Network on Raspberry Pi
The Recurrent Neural Network will be trained for classification of a person's surname to its most likely language of origin in a federated way, using workers sever running on the two Raspberry PIs that are already equipped with python3.6, PySyft, and Pytorch. A character-level Recurrent Neural Network treats words as a series of characters, outputting a prediction and "hidden state" for every character, feeding its previous state into each next step. We then take the final prediction, which is the output, i.e. which class the word belongs to. Hence the training process continuous sequentially in a character-by-character manner through the different hidden layers.

Result and Discussion
We plot the results using Matplotlib's pyplot. The plot will show us the learning rate of our recurrent neural network. The plot will show us the learning rate of our network.

Testing the Trained RNN (Predicting names)
We can do inference locally by getting model back from Raspberry Pi and we can test using different models from each worker or we could also find average all the model parameter from different worker, figure 5 shows testing on two (2) separate model from two (2) Raspberry Pi("bob", "alice"). We defined a function that take in a name and return the likely languages base on our database list created

Evaluation Performance
We created a confusion matrix to see how our Recurrent Neural Network has performed on different categories. The bright spots off the main axis indicate that languages the guesses is incorrect while the other spots on the main axis guesses correctly as shown in the figure 6 below:

Figure 6
A screenshot of graph guess evaluation performance

Conclusion
In conclusion, it is usually tasks demanding to perform classification of text using Recurrent Neural Network(RNN) algorithm with long-Short Time Memory Network(LSTM) in python due to the fact that the sequence of input text or name over spaces of time is sometime vary in length with a very large vocabulary of input symbols as a result its usually require a complex model to learn the long-term dependencies or context between symbols in its input sequences. Our develop system was able to achieve the following: A platform for text name classification to predict name in language A platform that integrate the Raspberry Pi 4 with the preloaded Ubuntu Linux Operating System to ensure privacy of the user training model