Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Outlook

To achieve large-scale commercial deployment of federated learning, substantial research work is still needed. For instance, since we cannot inspect the distributed data in federated learning, it is very difficult to select model hyperparameters and configure optimizers, and we can only resort to simulation-based approaches for model tuning and testing. For deployment on mobile devices, individual users have very little labeled data, and sometimes data labels cannot even be obtained, raising the question of how federated learning can be applied to unsupervised learning. Furthermore, due to inconsistent data distributions across participants, training a single global model makes it difficult to evaluate the model’s quality for each participant. Additionally, data has always been a core asset for companies, and different companies have been dedicated to collecting data and creating data silos, so how to effectively incentivize companies or institutions to participate in federated learning systems remains an open question. Below we introduce some efforts undertaken by MindSpore Federated and related work in the field.

Federated Learning in Heterogeneous Scenarios

The horizontal and vertical federated learning approaches discussed earlier all involve different participants collaboratively building a shared machine learning model. However, enterprise-level federated learning frameworks often need to adapt to various heterogeneous scenarios, such as data heterogeneity (inconsistent data scales and distributions across different clients), device heterogeneity (inconsistent computing capabilities and communication efficiency across different client devices), and model heterogeneity (inconsistent features learned by different local client models).

Two relatively mainstream directions of work in heterogeneous federated learning scenarios are:

  1. Personalized federated learning strategies with local models that are highly robust to heterogeneous data:

Federated learning trains a global model to obtain a globally optimal solution based on all data. However, the data volume and distribution of different participants are different, and in many scenarios, the global model cannot capture the overall picture while also accommodating such differences. When one party’s data deviates significantly from the overall distribution, the performance of federated learning may indeed be inferior to that of local training. How to maximize the overall benefit of all participants while also maximizing individual benefits is the goal of personalized federated learning.

Personalized federated learning does not require that all participants ultimately use the same model. For example, it allows each participant to fine-tune the model based on their own data after participating in federated learning, thereby generating a unique personalized model. After personalized fine-tuning, the model typically performs better on the local test set. Under this approach, different participants’ models share the same structure but may have different parameters. Some other approaches allow all participants to share the same feature extraction layers but have different task classification layers. Another line of thinking introduces knowledge distillation into federated learning, using the global model from federated learning as the teacher model and the personalized model as the student model, which can alleviate the overfitting problem during personalization.

  1. Research on model aggregation strategies for heterogeneous models:

Generally, under the FedAvg federated aggregation paradigm, fewer local iteration training steps and more frequent aggregation lead to better model convergence accuracy, especially when the data across different participating clients is non-IID. However, aggregation incurs communication costs, and there is a trade-off between communication cost and model accuracy in federated learning. Therefore, many researchers focus on designing adaptive aggregation schemes that find the optimal balance between local updates and global communication under a given training time budget to minimize the generalization error of the global model.

Communication Efficiency Improvement

In the federated learning process, during each global training round, every participant needs to send the complete parameters to the server, and the server then distributes the aggregated parameters. Modern deep learning networks easily have millions or even more parameters, and transmitting such a large number of parameters incurs enormous communication overhead. To reduce communication overhead, MindSpore Federated has adopted several methods to improve communication efficiency:

  1. Intelligent frequency adjustment strategy: Improve federated learning efficiency by changing the number of global model aggregation rounds, reducing the communication overhead required for training tasks to converge. One intuition is that in the early stages of the federated learning process, parameter changes across different participants are relatively consistent, so setting a lower aggregation frequency can reduce communication costs; in the later stages of federated learning, parameter changes across different participants become more inconsistent, so setting a higher aggregation frequency can enable the model to converge quickly.

  2. Communication compression scheme: Quantize and sparsify weight differences, i.e., only upload a small portion of quantized weight differences in each communication round. The reason for choosing weight differences for quantization and sparsification is that their distribution is easier to fit than weight values, and they have higher sparsity. Quantization maps float32 data types to int8 or even lower-bit representations, reducing storage and communication overhead on one hand, and enabling better use of compression encoding methods for transmission on the other (such as Huffman coding, finite state entropy coding, etc.). A commonly used sparsification method is Top-K sparsification, which sorts gradients by absolute value in ascending order and only uploads the top k parameters per round. Communication compression schemes generally incur some accuracy loss, and selecting an appropriate k is a challenging problem.

Federated Ecosystem

In the preceding chapters, we introduced some technologies and practices in the field of privacy-preserving federated learning. However, as exploration deepens, the field of federated learning has become increasingly inclusive, encompassing machine learning, model compression and deployment, information security, encryption algorithms, game theory, and more. As more and more companies, universities, and institutions become involved, federated learning today is no longer merely a technical solution but a privacy-preserving ecosystem. For example, different participants wish to join the federated learning process in a sustainable manner, and there are questions about how to design incentive mechanisms to ensure that profits can be shared relatively fairly among participants while effectively deterring participants who engage in malicious attacks or destructive behavior.

Furthermore, as more laws and regulations on user data privacy protection and proper use are being introduced, establishing technical standards for federated learning has become increasingly important. Such standards can build a bridge between legal regulators and technical developers, letting enterprises know which technologies to adopt in order to better share information while complying with regulations.

At the end of 2020, the international standard for federated learning (IEEE P3652.1), approved by the IEEE Standards Committee, was officially published and implemented. This standard aims to provide guidelines for building federated learning architectures and applications, with main content including: descriptions and definitions of federated learning, scenario requirement classification and security evaluation, quantification of personalized metrics for federated learning evaluation, and requirements for joint governance. This is also the first international standard established for AI collaborative technology frameworks, marking the beginning of a new chapter for large-scale industrial application of federated learning.