FedFog - A federated learning based resource management framework in fog computing for zero touch networks

Fog computing offers an optimal answer to the expansion challenge of today’s networks. It boasts scaling and reduced latency. Since the concept is still nascent, many research questions remain unanswered. One of these is the challenge of Resource Management. There is a pressing need for a reliable and scalable architecture that meets the Resource Management challenge without compromising the Quality of Service. Among the proposed solutions, Artificial Intelligence based path selection techniques and automated link detection methods can provide lasting and reliable answer. An optimal approach for introducing intelligence in the networks is the infusion of Machine learning methods. Such futuristic, intelligent networks form the backbone of the next generation of Internet. These self-learning and self-healing networks are termed as the Zero-Touch networks. This paper proposes FedFog, a Federated Learning based optimal, automated Resource Management framework in Fog Computing for Zero-touch Networks. The paper describes a series of experiments focusing on Quality of Service parameters such as Network latency, Resources processed, Energy consumption and Network usage. The simulation results from these experiments depict superiority of the proposed architecture over traditional, existing architecture.


Introduction
Federated learning is the term coined by Google in 2016 [1,2]. It models a distributed, de-centralized paradigm for data analysis and decision making [3]. An application of Machine learning in general and Deep Reinforcement learning in particular, Federated learning provides a viable solution to many emerging challenges in the next wave of Internet [4]. Few of the notable challenges include data privacy, data sensitivity and data silos [5]. Contrary to the traditional machine learning approach where data and processing occurs at the central server, this approach works on localized data training [6]. This model provides an ideal platform for wireless communications since it conserves the network's bandwidth and protects users' privacy [4]. Data aggregation at the centralized server corresponds to Cloud while distributed, localized training happens at the Edge devices or Fog nodes [7]. Since the data is localized and only a model is updated on the Central server, privacy of end-user data is ensured [6,8]. In other words, Federated Learning involves developing a centralized model without sending data to the server [9].
The paper proposes FedFog-A Federated learning based Framework in Fog Computing for Zero-Touch Network. The paper is structured as follows: Section 1 contains Introduction, Section 2 provides the background study and literature review. Section 3 describes FedFog, along with the Experimental Setup. Section 4 contains the Results and Analysis and Section 5 contains the Future Directions and Research Areas.

Background and Literature Review
The huge leaps in the development of Internet of Things (IoT) has made it greatly impactful for the future generations [10]. Varied types of sensors gather and capture data and automate the processing [11].The easiest approach to handle majority of the challenges in this paradigm is through the Cloud of Things (CoT), which connects IoT with the Cloud [12]. The CoT permits IoT data collection and processing while enabling moderate configuration and integration for further complicated data processing and implementation [13]. After then, the massive data is examined in order to make judgments about various processes. To transport all of this data to the Cloud, a lot of network bandwidth is required. Fog computing is used to overcome these problems. Cisco coined the phrase "Fog Computing" [14]. It's a recent development with a broad array of applications mainly in the Internet of Things. Like Cloud computing, Fog computing allows IoT users' data storage and processing within the local loop. Storage, computations and networking functions are provided by both the Cloud and the Fog [15]. Fog computing aims to enhance efficiency while lowering the quantity of content to be routed to the Cloud. The complementary hierarchy of Fog-Cloud reduces the transmission of operational data to the Cloud. As a result, instead of being routed to the Cloud for analysis and temporary storage, collected data will received by the end device at edge, decreasing network traffic and latency [16]. The convergence of Fog computing and the Internet of Things has resulted in a new economic enterprise known as Fog as a Service (FaaS). In this paradigm a network is built by a service provider of Fog nodes throughout its global presence and serves as a landlord to clients in a variety of vertical industries. Each Fog node has its own processing, networking, and storage resources [17]. The challenges in Cloud networks that call for network expansion and growth are numerous. These range from communication costs to administrative policies. These challenges are briefly discussed below: • Price of Data Routing and Communication: The cost of transmitting data from End user to the Cloud is hefty considering the delay due to network traffic and physical limitations of the Network. Hence there is need for localized data transmission for immediate decision making and updates concept [18,19].
• Reliability: In case of connectivity interruption, various suboptimal routing paths and data processing options must be available [18,9].
• Data Privacy and Security Concerns: To train a data model, users are required to share their raw, sensitive and confidential data with Cloud or third party. This leads to security concerns as data can be tempered, misused or abused much to the loss of its user [2, 6].
• Administrative Policies: Legalization of individual information cannot be guaranteed under traditional Machine Learning models, since they require data sharing and cannot generate models without sharing of this data [7,18].
• Downtime: The downtime faced by intermittent Cloud Connectivity services brings the network to a standstill. Hence an expansion focusing on fault tolerance is needed [4,20].
• Course-Grained Control: Users of the current networks have a course-grained control on their networks. Thus, the networks lack customization and personalization [20,2].
One possible solution to these existing Network problems lies in Machine learning Algorithms [21]. This paradigm has provided promising solutions to many existing network bottlenecks. Among these machine learning algorithms, Federated learning is an important paradigm [7]. Introducing Machine learning into the existing networks implies that networks are selfresponding which is the essence of Zero-Touch Networks [22].

Federated Learning
Federated Learning roots from the de-centralized, distributed architecture. It is an advancement of Deep Quality Neural Network that focuses on training multiple clusters simultaneously [1]. An example of this decentralized, distributed architecture is Google Android keyboard.
Federated learning is majorly depicted in Fig.s 1 and  2 below. It is based on localized data updates [23,19]. Essentially, Federated learning involves periodic updates of the data model to the Server instead of consistent data synchronization [24], [25]. It implies that the Server initially broadcasts a basic model to all the participating nodes. Based on the received data, each participating node creates its local copy. This localized version is updated by individual nodes based on their local data sets and parameters. At predetermined time intervals, the Server updates its global model after receiving updates from the participating nodes. This implies one round of Federated Learning. It is described in Fig. 1 and 2 below.
The simplest type of Federated learning is termed as Synchronous Federated Learning. It implies that the server halts the execution unless the slowest member updates. In the Asynchronous Federated Learning, the updates to the server occur in asynchronous manner [26].
Node 1 Node 3 Step 2:Initial Model is broadcast to the participating Nodes Central Server Step1:Central Server decides the TrainingModel Step 3 :Devices train the model with local data Node 2

Fig. 1. Federated Learning
Node 1 Node 2 Node 3 Step 4:Server collects the updated model from the participating devices and updates the global model,to be broadcasted for the next round Central Server

Fig. 2. Federated Learning(cont'd)
Among various applications of Federated Learning, few noticeable ones are as follows: Smart Phones: Next word prediction, user behavior prediction and thereby updating the global model without exchanging user data forms the core application of Federated learning [27,28].
Organizations: Organizations can be viewed as individual "nodes". These organizations range from hospitals containing sensitive patient data and confidential health records to financial institutions like banks. Federated Learning provides an ideal solution since the localized update, rather than data is sent to the central server [27,28].
Internet of Things: Another very exceptional application of Federated learning lies in the Internet of Things (IoT), the next generation of internet boasting device-Cloud continuum with "talk able devices" [20,18].

Cloud and Fog
Computing: This defines one of the fundamental and core applications for Federated Learning, Since the device data is updated locally, the overall network latency is reduced, bandwidth is conserved and the system reliability improves [27,18,28].

Natural Language Processing (NLP):
The concept of localized updates and privacy prevention makes Federated learning an ideal candidate for NLP.
Few notable challenges in the Federated learning include its excessive use of energy and resources in mobile clients, for updating the model locally. Additionally, the limited resource management capacity of participating nodes will have a challenge in training each Agent for localized model update [29]. More over the training data is highly heterogenous [30], adding to probable deviations in the global model. Device heterogeneity can be reflected in varying storage capacity, data processing capacity and computational capacity. Statistical heterogeneity is another challenge, implying variations in generated data. Application specific updates can also contribute as a challenge. It corresponds to situations where models adapt to their environment in a shallow, lightweight manner. It is due to constrained resources available to participating Nodes [31]. Since traditional Federated learning model assumes all participating devices to contribute equally heterogeneity remains a challenge that hinders the optimal performance of Federated Learning [3].

FedFog-Proposed Federated Learning based Framework in Fog Computing for Zero-touch Networks
The paper proposes FedFog, a Federated learning-based Resource Management framework in Fog computing for Zero-Touch Networks. It revolves around finding an optimal solution to the resource management problem in Fog Networks. It does so by suggesting an extension to the current Cloud-Fog framework. This section describes the simulation that proves the superiority of the proposed architecture over the traditional Cloud-Fog framework.
The FedFog algorithm works in a series of steps. This begins by an update of generic, global copy of the model being broadcast to all participating Fog nodes. These Fog nodes are directly connected to heterogenous user devices. Each device generates data a different rate so the receiving rate and parameters are monitored at the Fog node. These varied parameters create localized, updated model for the received global model. At specified intervals, these updates are forwarded to the Cloud. This constitutes one round of Federated learning. Participating nodes are termed as Clients and the Fog device acts as a coordinator [23,19]. For every round the participating nodes are elected randomly. Instead of transferring data to the Cloud and sharing data with horizontally connected devices, an updated data model is sent. This ensures lesser data thrashing and fewer updates. The FedFog algorithm is depicted in Fig. 3 below.

Network Topology and Experiment
The proposed network topology is simulated in iFogSim [32]. The major objective of this experiment is to analyze the performance enhancement achieved by incorporating Federated Learning into the Cloud-Fog network. The experiment considers contrasting scenarios, one of which depicts traditional Cloud-Fog approach and the other introduces Federated Learning into the Cloud-Fog Network, namely FedFog framework. At different time intervals namely 5000 ms,10,000 ms,15,000ms and 20,000ms, the network responses are recorded in a tabular manner. The conducted experiment considers three different cluster sizes. The first considers a cluster size of 3 Fog Nodes (n=3 where n is the Cluster Size). The second considers a cluster size of 4 Fog Nodes(n=4) and the third considers cluster size of 5 Fog nodes(n=5).
The first topology comprises of a central Cloud server, CloudServer with three connected Fog Nodes, namely FogServer1, FogServer2 and FogServer3, hence the cluster size of 3. These Fog nodes are depicting local data center. These FogServers connect to a total of 10 sensors and 6 actuators. It is important to note that these connected sensors and actuators are connected to only one FogServer at a time. This depicts static connections from an organization to a local Fog network. The arrangement of the devices is as follows: FogServer1 connects Actuator1 and Sensor1, Sensor7 and Sensor8.FogServer2 connects Actuator2, Actuator3, Sensor2, Sensor3, Sensor9, Sensor10. FogServer3 connects Actuator4, Actuator5, Actuator6, Sensor4, Sensor5, Sensor6.This topology depicts following features: • There is no horizontal communication among devices at the same level, implying the strength of vertical architecture of Things-Fog-Cloud.
• The vertical transmission also ensures data independency and atomicity within one layer.
• The topology also depicts cluster heterogeneity as the number of sensors and actuators are different within each group.
The topology for n=3 cluster is depicted in Fig. 4 below. Table 1 below shows the parameter used for experiment.

Results and Discussion
The following graphs depict the results.

System Latency
Meeting latency targets form the core of future networks. It is a critical performance parameter that determines the quality of service of a Network. It is defined as the time lapse from beginning of a service until it is terminated. Fig. 5a through 5e depict the latency response of the system for varying cluster size and at different time instances.
Each graph depicts variable cluster size of n=3,4, and 5 being tested at a specified time of 5000ms, 10000ms, 15000ms and 20,000ms.
Moreover, the accumulative latency response depicts the combined system responses for varying cluster size and at varying time interval. This chart is helpful in predicting a future value by studying system response under a single chart.    These results indicate that the simulation was run at different, variable time intervals. The existing architecture has the minimum latency of 223ms, even for the minimum simulation time. Comparatively, the proposed architecture has a variable latency depending on the simulation time. Moreover, the proposed architecture takes lesser time to converge. This is evident by the improvement in the response time at time 5000 ms and 15000 ms.

Resources Processed
In iFogSim, the number of resources processed indicate number of current threads in execution. Fig. 6a-6e depict the number of resources processed for varying cluster size and at different time instances.
As indicated by the statistics generated from the simulation, the number of resources processed by a traditional Cloud-Fog system is much lesser than those processed by the FedFog. Moreover, the difference in performance is constant as the simulation time changes. This indicates that the generated values have minimum deviation from the mean values, indicating system stability.   Resources Processed at 5000ms

Energy Consumption
Efficient energy consumption and thrift use of resources is an open research challenge. In terms of these highly complex and connected systems, energy losses could be far more destructive. These losses include transmission losses and energy lost as heat. Fig. 7a-7e depict the energy consumption of the system for varying cluster size and at different time instances.
The accumulative chart contains the combined responses of the system at varying cluster size and different time. FedFog ensures the proposed system is efficient than available, traditional one. In comparison to the previous system, it produces efficient outcomes in terms of energy usage. The proposed approach consumes less energy as it placed on the networks edge, rather than routing the entire traffic towards the Cloud. The energy consumption is an important parameter as it determines the electrical energy consumed by the architecture. The superiority of FedFog is evident from the generated results.
The table also provides an insight to the challenge in Federated learning, namely Energy consumption. The energy consumption of the traditional system is roughly above 10,000 Joules even for the minimum simulation time. FedFog has a consistent energy consumption consistently below 10,000 even for the longest running simulation time. The clustering of the values around a mean indicates stability and predictability of the propose architecture namely FedFog.

Network Usage
The network usage, also termed as Bandwidth Utilization implies the amount of traffic generated on the network versus the highest amount that the network can handle.      The traditional Cloud-Fog architecture indicates a minimum bandwidth consumption in order of 500000KBPS as compared to FedFog that requires minimum bandwidth in orders of 10000KBPS.
This implies that the FedFog framework will saturate at a much later time, will process more active threads and the user experience of slower devices will be reduced. This implies faster response times and smoother running of the operations.
The simulated experiment indicates that FedFog has latency responses of nearly half the value as compared to basic Cloud-Fog Network. In terms of number of resources processed FedFog is processing resources nearly three times more than a traditional Cloud-Fog Network. Energy consumption is nearly constant for varying node size and varying time intervals. In terms of bandwidth utilization, the architecture is thrift as compared to traditional Cloud-Fog networks.
Hence the experiment concludes with superiority of proposed architecture over existing systems.

Future Directions
Fog offers a promising implementation ground for envisioning Internet of Things at its fullest [33]. Applications are limitless. Some prominent applications include Smart home [34],Green Internet of Things [35] among many others. Many challenges lie ahead in its implementation along other Edge related technologies [36].These include efficient load balancing [37], [38],Energy management [39],Cybersecurity [40], [41] and scheduling [42].The proposed approach brings out an optimal, efficient machine learning algorithm in solving a resource management problem. This approach addresses a challenge [43] and can be utilized for improving the task scheduling [44].