Federated learning | strategies & algorithms

Federated learning | strategies & algorithms

Wed Jun 14 2023

Artificial intelligence and ML models are used in various business programs, customer conversation robots, and prediction and information in decision making. For artificial intelligence models to be effective, they typically need to learn a lot of data. This can be a challenge for organizations that manage sensitive or proprietary customer data, as they may be reluctant to share this data with third parties or even other departments within the same organization.

Federated learning is a machine learning technique that enables businesses to train artificial intelligence models on decentralized data. This means that organizations can use AI to make better decisions without creating data privacy issues and the risk of personal data breaches.

This article discusses the strategies, characteristics, and challenges of federated learning and provides a broad overview of current algorithms.

What is federated learning?

Federated learning is an emerging approach used to train a distributed machine learning model on various edge devices such as smartphones, vehicles, and IoT machine learning. Federated learning, sometimes called cooperative learning, jointly trains a common model while storing training data locally without sharing it with a central location.

This approach creates an alternative to the traditional centralized approach to building machine learning models, where data is collected from multiple sources and stored on a server. Then the model is trained on a single server.

With federated learning, the model is applied to the data, learning from the user's interaction with the devices.

What is federated learning?

How federated learning work?

This approach stores a general base model on the central server. Client devices receive copies of this model, and the models are then trained using the local data those devices produce. Over time, individual device models become personalized and provide a better user experience.

In the next step, updates from locally trained models are shared with the master model on the central server using secure aggregation techniques. This model combines and averages multiple inputs to generate new learning. The model's generalizability increases because the data is collected from multiple sources.

When the central model is retrained on the new parameters, it is shared with the client devices for subsequent iterations. With each cycle, the models collect different amounts of information and improve without violating privacy.

How federated learning works?

Federated learning strategies

Federated Learning uses several strategies to enable efficient and collaborative model training across distributed devices or entities while maintaining privacy. Here are some of the key strategies used in federated learning:

Centralized Federal Learning

This learning requires a centralized service. This option initially synchronizes client devices and collects model updates during training. Communication occurs only between the central server and individual edge devices. This approach seems simple and produces accurate models, but the central server is a problem, and network failures can stop the entire process.

Distributed Federated Learning

Although model updates are only exchanged among connected edge devices, decentralized, federated learning does not require a central vote server to coordinate learning. The final model is obtained on an edge device by collecting local updates from connected edge devices. This approach avoids the possibility of single point failure, but the model's accuracy completely depends on the topology of the network of edge devices.

Heterogeneous Federated Learning

Heterogeneous federated learning has heterogeneous clients such as mobile phones, computers, or IoT devices. These devices may differ in hardware, software, computational capabilities, and data types.

Federated learning strategies

Federated learning algorithms


In traditional SGD, gradients are computed on mini-clusters, which are a fraction of the data samples from the total samples. These mini-clusters can be viewed as different client devices containing local data in federated environments.

This approach distributes the central model among clients, and each client computes gradients using local data. These gradients are then transmitted to the central server, which collects the gradients according to the number of samples in each client to compute the gradient descent step.


The Federated Carey Average is an extension of the FedSGD algorithm. Clients can perform more than one local steep update. The weights established in the local model are shared with the central server instead of the gradients. Finally, the server adds the weights of the clients.

If all clients start from the same initial value, averaging the gradients is equivalent to averaging the weights. As a result, this federated averaging opens up space to adjust local weights before sending them to the central server for averaging.


Regularization in traditional machine learning aims to add a penalty to the loss function to improve generalization. In federated learning, the global loss should be calculated based on the local losses generated by heterogeneous devices.

Due to the heterogeneity of customers, global loss minimization differs from local loss minimization. Therefore, this method generates a regularization expression for local losses by adjusting data statistics such as data amount or communication cost. This local loss term allows the local losses to converge to the global loss through dynamic regularization.

Federated learning algorithms

Challenges and Limitations of federated learning

Federated learning provides a path to collaborative machine learning, but remember that this approach comes with its own set of challenges.

Inefficient communication

Communication is important in federated learning networks, where generated data remains on each local device. To train a model using machine-generated data, techniques must be developed that support efficient communication and reduce the total number of communication rounds. Also, small model updates should be sent as part of the training process instead of sending the entire data set.

Inclusion of heterogeneous systems

The user devices involved in the training process may vary widely regarding memory, processing power, power supply, and network connectivity.

As a result, this approach must be fault-tolerant since user devices may fail before the training cycle is completed. It should anticipate lower levels of participation and withstand heterogeneous hardware. The chat should be resilient to the departure of participating devices.

Data scrubbing and tagging constraints

The privacy aspect of federated learning is a major advantage, i.e., data engineers do not have access to the raw user data, so they cannot clean the data to identify missing values or remove irrelevant aspects.

Since participants in federated learning are not expected to tag their own data, federated learning is best applied to unsupervised algorithms where the outcome can be determined based on user behavior.

Challenges and Limitations of federated learning

Empowering Innovation:

Unleash the Potential of Deep Learning and Machine Learning at Saiwa

At Saiwa, we are proud to present "Deep Learning service", an exceptional service that is at the forefront of revolutionizing the field of deep learning and machine learning. With our cutting-edge platform, we offer comprehensive solutions tailored to your needs, enabling the training of neural networks using personalized datasets. Our service guarantees optimal performance and unmatched accuracy, empowering individuals and organizations alike to unlock valuable insights and drive innovation. With Saiwa's expertise in deep learning and machine learning, you can trust us to elevate your projects to new heights of success.

Experience trying Deep Learning at Saiwa for personalized neural network training. Unleash innovation with Saiwa's expertise in deep learning service.
Follow us for the latest updates
No comments yet!

saiwa is an online platform which provides privacy preserving artificial intelligence (AI) and machine learning (ML) services

© 2024 saiwa. All Rights Reserved.