Page 27 - Read Online
P. 27
Qi et al. Intell Robot 2021;1(1):18-57 I http://dx.doi.org/10.20517/ir.2021.02 Page 22
where indicates the number of training data samples of the -th participant has and denotes the total
number of samples contained in all the datasets. Finally, the coordinator sends the aggregated model weights
¯ ( + 1) back to the participants. The aggregation process is performed at a predetermined interval or iter-
ation round. Additionally, FL leverages privacy-preserving techniques to prevent the leakage of gradients or
model weights. For example, the existing encryption algorithms are added on top of the original FedAvg to
provide secure FL [13,14] .
2.2. Architecture of federated learning
[7]
According to the application characteristics, the architecture of FL can be divided into two types , i.e., client-
server model and peer-to-peer model.
As shown in Figure 1, there are two major components in the client-server model, i.e., participants and coor-
dinators. The participants are the data owners and can perform local model training and updates. In different
scenarios, the participants are made up of different devices, the vehicles in the internet of vehicles (IoV), or
the smart devices in the IoT. In addition, participants usually possess at least two characteristics. Firstly, each
participant has a certain level of hardware performance, including computation power, communication and
storage. The hardware capabilities ensure that the FL algorithm operates normally. Secondly, participants are
independent of one another and located in a wide geographic area. In the client-server model, coordinator can
be considered as a central aggregation server, which can initialize a model and aggregate model updates from
participants [12] . As participants train both based on local data sets concurrently and share their experience
through the coordinator with the model aggregation mechanism, it will greatly enhance the efficiency of the
training and enhance the performance of the model. However, since participants won’t be able to communi-
cate directly, the coordinator must perform well to train the global model and maintain communication with
all participants. Therefore, the model has security challenges such as a single point of failure. If the coordinator
fails to complete the model aggregation task, the local model of participant has difficulty meeting target per-
formance. The basic workflow of the client-server model can be summarized in the following five steps. The
process continues to repeat the steps from 2 to 5 until the model converges, or until the maximum number of
iterations is reached.
• Step 1: In the process of setting up a client-server-based learning system, the coordinator creates an initial
model and sends it to each participant. Those participants who join later can access the latest global model.
• Step 2: Each participant trains a local model based on their respective dataset.
• Step 3: Updates of model parameters are sent to the central coordinator.
• Step 4: The coordinator combines the model updates using specific aggregation algorithms.
• Step 5: The combined model is sent back to the corresponding participant.
The peer-to-peer based FL architecture does not require a coordinator as illustrated in Figure 2. Participants
can directly communicate with each other without relying on a third party. Therefore, each participant in the
architecture is equal and can initiate a model exchange request with anyone else. As there is no central server,
participantsmustagreeinadvanceontheorderinwhichmodelshouldbesentandreceived. Commontransfer
modes are cyclic transfer and random transfer. The peer-to-peer model is suitable and important for specific
scenarios. For example, multiple banks jointly develop an ML-based attack detection model. With FL, there
is no need to establish a central authority between banks to manage and store all attack patterns. The attack
record is only held at the server of the attacked bank, but the detection experience can be shared with other
participants through model parameters. The FL procedure of the peer-to-peer model is simpler than that of
the client-server model.
• Step 1: Each participant initializes their local model depending on its needs.
• Step 2: Train the local model based on the respective dataset.
• Step 3: Create a model exchange request to other participants and send local model parameters.
• Step 4: Aggregate the model received from other participants into the local model.