Model aggregation in federated learning is a process where multiple client devices train their own models on local data and then combine their results to form a global model. Instead of sharing raw data, which poses privacy and security risks, clients send updates to a central server. These updates typically consist of model weights, gradients, or summaries that reflect what the client learned from its local dataset. The server then aggregates these updates to create a new, improved global model that benefits from the collective knowledge of all participating clients.
The most common method for model aggregation is the Federated Averaging (FedAvg) algorithm. In this approach, each client trains its model for a set number of epochs using its local dataset. After training, the client sends its model weights to the server. The server collects weights from all clients and computes an average, weighted by the number of data points each client used during training. For example, if one client has significantly more data than others, its contribution to the global model will have more influence. This ensures that the final model reflects the distribution of data across all clients, helping to improve the model's performance and robustness.
After the aggregation process, the global model is sent back to the clients, who can then use it to make predictions or continue training. This cycle of local training and global aggregation can be repeated multiple times, refining the model progressively. By balancing local learning and collective knowledge, federated learning allows for building powerful models while keeping sensitive data localized, thus addressing privacy concerns in sectors like healthcare and finance where data sensitivity is paramount.