Federated learning modeling optimization method, device, medium and computer program product

By clustering and clustering cluster aggregation of training feature representations in federated learning, the problems of low model adaptation and slow convergence caused by data differences among various participants are solved, and more efficient federated learning computing efficiency is achieved.

CN113095512BActive Publication Date: 2025-04-25WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110443709.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-23
Publication Date
2025-04-25
Estimated Expiration
2041-04-23

AI Technical Summary

Technical Problem

In federated learning, due to the large differences in the training data of each participant, the adaptation between the aggregation model and the training data of each participant is low, which makes the aggregation model converge slowly during the iteration process and has low computational efficiency.

Method used

By receiving local model parameters generated by the iterative training of local prediction models by each participant device, and clustering and generating clustering clusters based on training feature representations, clustering clustering of local model parameters is performed, clustering clustering is obtained, and aggregating the aggregated model parameters are obtained, and feedback to the participant device to optimize the local prediction model.

Benefits of technology

By clustering the training feature representations before aggregation and screening participants with similar data distributions or the same, the adaptability of the aggregation model and its corresponding training data is improved, the convergence speed of the model is improved, and the computational efficiency of federated learning is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113095512B_ABST
    Figure CN113095512B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, medium and computer program product for optimizing federated learning modeling, which is applied to a coordinating device, and includes: receiving local model parameters generated by iteratively training a local prediction model of each participating device; clustering each feature representation clustering cluster generated by clustering the training feature representations sent by each participating device, clustering each local model parameter, and obtaining the aggregate model parameters corresponding to each feature representation clustering cluster; feeding back each aggregate model parameter to the corresponding participating device, so that the participating device can optimize the local prediction model according to the aggregate model parameter to obtain a federated prediction model. The present application solves the technical problem of low computational efficiency during federated learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology in financial technology (Fintech), and in particular to a federated learning modeling optimization method, device, medium and computer program product. Background Art

[0002] With the continuous development of financial technology, especially Internet technology finance, more and more technologies (such as distributed, artificial intelligence, etc.) are applied in the financial field, but the financial industry also puts forward higher requirements on technology, such as higher requirements on the distribution of corresponding to-do items in the financial industry.

[0003] With the continuous development of computer technology, the application of artificial intelligence is becoming more and more extensive. At present, when conducting federated learning, the coordinator usually directly aggregates the local models of each participant to generate an aggregated model. However, since the training data of each participant usually have large differences, the degree of adaptation between the aggregated model and the training data of each participant will be low. After each aggregation, the aggregated model still needs to continue iterative training and optimization based on the local training data, which will cause the aggregated model to converge slowly during the iteration process and the computational efficiency of federated learning will be low. Summary of the invention

[0004] The main purpose of this application is to provide a federated learning modeling optimization method, device, medium and computer program product, aiming to solve the technical problem of low computational efficiency in federated learning in the prior art.

[0005] To achieve the above-mentioned purpose, the present application provides a federated learning modeling optimization method, which is applied to a coordinating device, and the federated learning modeling optimization method includes:

[0006] Receive local model parameters generated by iteratively training local prediction models of devices of each participant;

[0007] Based on each feature representation cluster cluster generated by clustering the training feature representations sent by each of the participant devices, clustering each of the local model parameters to obtain an aggregated model parameter corresponding to each of the feature representation cluster clusters;

[0008] The parameters of each aggregation model are fed back to the corresponding participant device respectively, so that the participant device can optimize the local prediction model according to the aggregation model parameters to obtain the federal prediction model.

[0009] The present application also provides a federated learning modeling optimization device, which is a virtual device and is applied to a coordinating device. The federated learning modeling optimization device includes:

[0010] A receiving module, used to receive local model parameters generated by iteratively training a local prediction model of each participating device;

[0011] A clustering module for clustering the local model parameters based on the feature representation clusters generated by clustering the training feature representations sent by the participating devices, to obtain the aggregated model parameters corresponding to the feature representation clusters;

[0012] The feedback module is used to feed back each of the aggregation model parameters to the corresponding participant device, so that the participant device can optimize the local prediction model according to the aggregation model parameters to obtain the federal prediction model.

[0013] To achieve the above-mentioned purpose, the present application provides a federated learning modeling optimization method, which is applied to a participant device and includes:

[0014] Acquire a local prediction model, and iteratively train the local prediction model to a preset iteration number threshold, and acquire local model parameters of the local prediction model;

[0015] The local model parameters are sent to the coordinator device, so that the coordinator device can cluster the clusters based on the characteristic representations, and cluster the local model parameters sent by the participant devices to obtain the aggregated model parameters;

[0016] Receive the aggregation model parameters corresponding to the cluster to which the participant device belongs, and optimize the local prediction model according to the aggregation model parameters to obtain a federal prediction model.

[0017] The present application also provides a federated learning modeling optimization device, which is a virtual device and is applied to a participant device. The federated learning modeling optimization device includes:

[0018] An iterative training module, used to obtain a local prediction model, and iteratively train the local prediction model to a preset iteration number threshold to obtain local model parameters of the local prediction model;

[0019] A sending module, used for sending the local model parameters to the coordinating device, so that the coordinating device can cluster the local model parameters sent by each participating device based on each feature characterization cluster, and obtain each aggregated model parameter;

[0020] The model optimization module is used to receive the aggregation model parameters corresponding to the cluster to which the participant device belongs, and optimize the local prediction model according to the aggregation model parameters to obtain the federal prediction model.

[0021] The present application also provides a federated learning modeling optimization device, which is a physical device, and includes: a memory, a processor, and a program of the federated learning modeling optimization method stored in the memory and executable on the processor. When the program of the federated learning modeling optimization method is executed by the processor, the steps of the federated learning modeling optimization method as described above can be implemented.

[0022] The present application also provides a medium, which is a readable storage medium, on which is stored a program for implementing a federated learning modeling optimization method, and when the program of the federated learning modeling optimization method is executed by a processor, the steps of the federated learning modeling optimization method as described above are implemented.

[0023] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned federated learning modeling optimization method when executed by a processor.

[0024] The present application provides a federated learning modeling optimization method, device, medium and computer program product. Compared with the technical means adopted in the prior art in which the coordinator directly aggregates the local models of each participant to generate an aggregated model, the present application first receives the local model parameters generated by the iterative training of the local prediction model of each participant device, and then based on the feature representation clustering clusters generated by clustering the training feature representations sent by each of the participant devices, clusters the local model parameters to obtain the aggregated model parameters corresponding to each of the feature representation clustering clusters. That is, before aggregation, the present application achieves the purpose of screening the participant devices with similar or identical training data distribution in the participant devices by clustering the training feature representations sent by each of the participant devices to generate each feature representation clustering cluster, and then clusters the local model parameters to obtain the aggregated model parameters corresponding to each of the feature representation clustering clusters. The local model parameters of the participating devices with training data with similar or identical data distribution can be aggregated separately, so that the aggregated model and its corresponding training data have a high degree of adaptability, and then the aggregated model parameters are fed back to the corresponding participating devices respectively, so that the participating devices can optimize the local prediction model according to the aggregated model parameters to obtain the federal prediction model, thereby achieving the purpose of updating the corresponding aggregated model based on the training data with higher adaptability, and improving the model convergence speed. Therefore, it overcomes the problem that the training data of each participant usually have large differences, which will lead to a low degree of adaptability between the aggregated model and the training data of each participant, and because after each aggregation, the aggregated model still needs to continue iterative training and optimization based on the local training data, which will lead to the technical defect of slow convergence of the aggregated model during the iteration process, thereby improving the computational efficiency of federated learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0027] Figure 1 This is a flowchart of the first embodiment of the federated learning modeling optimization method of the present application;

[0028] Figure 2 A schematic diagram of the hardware architecture involved in the clustering process in the federated learning modeling optimization method of this application;

[0029] Figure 3 This is a flow chart of the second embodiment of the federated learning modeling optimization method of the present application;

[0030] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the federated learning modeling optimization method in the embodiment of the present application.

[0031] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0032] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0033] The present application embodiment provides a federated learning modeling optimization method. In the first embodiment of the federated learning modeling optimization method of the present application, refer to Figure 1 The federated learning modeling optimization method is applied to a coordinating device, and the federated learning modeling optimization method includes:

[0034] Step S10, receiving local model parameters generated by iteratively training the local prediction model of each participant's device;

[0035] In this embodiment, it should be noted that the participant device is a participant in federated learning, the coordinator device is a coordinator in federated learning, and the federated learning includes vertical federated learning and horizontal federated learning.

[0036] Receive local model parameters generated by iterative training of a local prediction model by each participating device. Specifically, based on the training data, the participating device iteratively trains the local prediction model to a preset iteration number threshold, obtains local model parameters of the local prediction model after iterative training, and sends the local model parameters to the coordinating device, and then the coordinating device receives the local model parameters sent by each participating device, wherein the number of the participating devices is at least 2, and the local model parameters include at least one of a network weight parameter, a model loss, and a model gradient.

[0037] Step S20, based on each feature representation cluster generated by clustering the training feature representations sent by each of the participant devices, clustering each of the local model parameters to obtain an aggregated model parameter corresponding to each of the feature representation clusters;

[0038] In this embodiment, it should be noted that the training feature representation is a feature vector generated by the participating device for feature extraction of local training data, which is used to characterize the data distribution of the training data, and the feature representation cluster cluster is a cluster category generated by the coordinating device for clustering each training feature representation, wherein the distance between the training feature representations belonging to the same feature representation cluster cluster is less than a preset inter-class distance threshold, and the clustering between the training feature representations belonging to different feature representation clusters is greater than the preset inter-cluster distance threshold.

[0039] Based on each feature representation cluster cluster generated by clustering the training feature representations sent by each of the participating devices, each of the local model parameters is clustered and aggregated to obtain the aggregated model parameters corresponding to each of the feature representation cluster clusters. Specifically, each feature representation cluster cluster generated by clustering the training feature representations sent by each of the participating devices is obtained, and then the local model parameters sent by the participating devices corresponding to each of the training feature representations belonging to the same feature representation cluster cluster are respectively aggregated to obtain the aggregated model parameters corresponding to each of the feature representation cluster clusters. For example, assuming that participating devices A, B, and C correspond to feature representation cluster cluster M, and participating devices C and D correspond to feature representation cluster cluster N, the local model parameters sent by participating devices A, B and C are aggregated to obtain the aggregated model parameter X, and the local model parameters sent by participating devices C and D are aggregated to obtain the aggregated model parameter Y.

[0040] The step of clustering the local model parameters based on the feature representation clusters generated by clustering the training feature representations sent by the participating devices to obtain the aggregated model parameters corresponding to the feature representation clusters includes:

[0041] Step S21, selecting from the local model parameters the model parameters to be aggregated corresponding to the feature representation clusters;

[0042] In this embodiment, the model parameters to be aggregated corresponding to each of the feature representation clusters are selected from the local model parameters. Specifically, based on the subordinate relationship between each feature representation cluster and the training feature representation sent by each of the participating devices, the model parameters to be aggregated corresponding to each of the feature representation clusters are selected from the local model parameters sent by each of the participating devices, wherein one of the training feature representations uniquely corresponds to one of the feature representation clusters, and one of the feature representation clusters corresponds to at least one of the training feature representations.

[0043] Step S22, respectively aggregate the model parameters to be aggregated corresponding to the feature representation clusters to obtain the aggregated model parameters.

[0044] In this embodiment, the model parameters to be aggregated corresponding to each of the feature characterization clustering clusters are aggregated respectively to obtain each of the aggregated model parameters. Specifically, based on preset aggregation rules, the model parameters to be aggregated corresponding to each of the feature characterization clustering clusters are aggregated to obtain each of the aggregated model parameters, wherein the preset aggregation rules include weighted averaging and summing, etc.

[0045] Step S30, feeding back each of the aggregation model parameters to the corresponding participant device, so that the participant device optimizes the local prediction model according to the aggregation model parameters to obtain a federal prediction model.

[0046] In this embodiment, each of the aggregate model parameters is fed back to the corresponding participant device, so that the participant device can optimize the local prediction model according to the aggregate model parameters to obtain the federal prediction model. Specifically, each of the aggregate model parameters is sent to the corresponding participant device, and then the participant device receives the aggregate model parameters, and updates the model parameters of the local prediction model according to the aggregate model parameters, and determines whether the updated local prediction model meets the preset iterative training end condition. If so, the local prediction model is used as the federal prediction model. If not, the step of iterating the training of the local prediction model based on the training data to a preset iteration number threshold is returned, wherein the preset iterative training end condition includes reaching the maximum iteration number threshold and the loss function convergence, etc.

[0047] Wherein, before the step of clustering the local model parameters based on the feature representations sent by the participating devices to generate the feature representation clusters, and obtaining the aggregated model parameters corresponding to the feature representation clusters, the federated learning modeling optimization method further includes:

[0048] Step A10, receiving the training feature representation sent by each of the participant devices, wherein the training feature representation is generated by the participant device performing feature extraction on the training data corresponding to the local prediction model;

[0049] In this embodiment, a training feature representation sent by each of the participating devices is received, wherein the training feature representation is generated by the participating device by performing feature extraction on the training data corresponding to the local prediction model. Specifically, the participating device obtains the training data corresponding to the local prediction model, and performs feature extraction on the training data based on a feature extraction model constructed by federated learning, so as to map the training data to a vector space of a preset dimension, so as to perform dimensionality reduction on the training data and obtain the training feature representation, and then the training feature representation is sent to the coordinating device, and then the coordinating device receives the training feature representation sent by each of the participating devices, wherein the data dimension of the training feature representation is smaller than the data dimension of the training data.

[0050] Step A20: clustering the training feature representations to obtain clusters of the feature representations.

[0051] In this embodiment, each of the training feature representations is clustered to obtain each of the feature representation cluster clusters. Specifically, each of the training feature representations is clustered to divide each of the training feature representations into a preset number of cluster clusters, so that the distance between each of the training feature representations belonging to the same cluster cluster is less than a preset intra-cluster distance threshold, and the distance between each of the training feature representations that do not belong to the same cluster cluster is greater than a preset inter-cluster distance threshold, and each of the feature representation cluster clusters is obtained, wherein the clustering method includes K-Means clustering, Mean-Shift clustering, and agglomerative hierarchical clustering, etc. Figure 2 FIG. 1 is a schematic diagram of the hardware architecture involved in the clustering process of an embodiment of the present application, wherein: Figure 2 The single device in the upper middle is the coordinating device. Figure 2 The multiple devices in the middle and lower part are participating devices.

[0052] The embodiment of the present application provides a method for optimizing federated learning modeling. Compared with the technical means adopted in the prior art in which the coordinator directly aggregates the local models of each participant to generate an aggregated model, the embodiment of the present application first receives the local model parameters generated by the iterative training of the local prediction model of each participant device, and then based on the feature representation clustering clusters generated by clustering the training feature representations sent by each of the participant devices, clusters the local model parameters to obtain the aggregated model parameters corresponding to each of the feature representation clustering clusters. That is, before aggregation, the present application achieves the purpose of screening the participant devices with similar or identical training data distribution in the participant devices by clustering the training feature representations sent by each of the participant devices to generate each feature representation clustering cluster. Then, by clustering the local model parameters to obtain the aggregated model parameters corresponding to each of the feature representation clustering clusters, The local model parameters of the participating devices with similar or identical training data distribution are aggregated respectively, so that the aggregated model and its corresponding training data have a high degree of adaptability, and then the aggregated model parameters are fed back to the corresponding participating devices respectively, so that the participating devices can optimize the local prediction model according to the aggregated model parameters to obtain the federal prediction model, thereby achieving the purpose of updating the corresponding aggregated model based on the training data with higher adaptability, and improving the model convergence speed. Therefore, the problem that the training data of each participant usually have large differences, which will lead to a low degree of adaptability between the aggregated model and the training data of each participant, and the technical defect that the aggregated model still needs to continue iterative training optimization based on the local training data after each aggregation, which will lead to slow convergence of the aggregated model during the iteration process, is overcome, thereby improving the computational efficiency of federated learning.

[0053] Further, refer to Figure 3 In another embodiment of the present application, the federated learning modeling optimization method is applied to a participant device, and the federated learning modeling optimization method includes:

[0054] Step B10, obtaining a local prediction model, and iteratively training the local prediction model to a preset iteration number threshold, to obtain local model parameters of the local prediction model;

[0055] In this embodiment, it should be noted that the local prediction model is a trained machine learning model, and the preset iteration number threshold is a pre-set number of iterations, wherein each participating device locally performs model iteration training for the preset iteration number threshold, and each participating device aggregates the local model parameters once by interacting with the coordinating device.

[0056] Obtain a local prediction model, and iteratively train the local prediction model to a preset iteration number threshold, and obtain local model parameters of the local prediction model. Specifically, obtain a local prediction model and training data, and iteratively train the local prediction model based on the training data, and accumulate the number of iterations of the iterative training of the local prediction model, and then when the number of iterations of the local prediction model reaches a preset iteration number threshold, obtain the local model parameters of the local prediction model after iterative training with the preset iteration number threshold.

[0057] Step B20, sending the local model parameters to the coordinator device, so that the coordinator device can cluster the local model parameters sent by each participant device based on each feature characterization cluster, and obtain each aggregated model parameter;

[0058] In this embodiment, the local model parameters are sent to the coordinating device so that the coordinating device can cluster the local model parameters sent by each participating device based on each feature characterization clustering cluster to obtain each aggregated model parameter. Specifically, the local model parameters are sent to the coordinating device, and then the coordinating device receives the local model parameters sent by each participating device, and respectively aggregates each local model parameter corresponding to the same feature characterization clustering cluster to obtain the aggregated model parameters corresponding to each feature characterization clustering cluster. The coordinating device clusters the local model parameters sent by each participating device based on each feature characterization clustering cluster to obtain each aggregated model parameter. For details, please refer to the specific contents of step S20 and its detailed steps, which will not be repeated here.

[0059] Wherein, before the step of sending the local model parameters to the coordinator device so that the coordinator device can characterize clusters based on each feature, cluster the local model parameters sent by each participant device, and obtain each aggregated model parameter, the federated learning modeling optimization method further includes:

[0060] Step C10, obtaining training data corresponding to the local prediction model, and extracting features from the training data based on a feature extraction model constructed by federated learning to obtain training feature representation;

[0061] In this embodiment, it should be noted that the training data is data used for iterative training of the local prediction model.

[0062] The training data corresponding to the local prediction model is obtained, and based on the feature extraction model constructed by federated learning, the training data is subjected to feature extraction to obtain a training feature representation. Specifically, the training data used for iteratively training the local prediction model is obtained, and the training data is input into the feature extraction model constructed based on federated learning to perform feature extraction on the training data, so as to extract the output of the target hidden layer in the feature extraction model as the training feature representation, wherein the target hidden layer is a hidden layer arranged at a preset position in the feature extraction model agreed upon by the participating devices. For example, assuming that the feature extraction model has 10 hidden layers, the participating devices may agree to use the second hidden layer as the target hidden layer, wherein the data dimension of the training feature representation is smaller than the data dimension of the training data.

[0063] In addition, it should be noted that the feature extraction model is constructed by federated learning of each participating device based on local training data. The feature extraction model includes an input layer, multiple hidden layers and an output layer, wherein the output of any hidden layer can be used as the training feature representation.

[0064] Step C20: sending the training feature representation to the coordinator device, so that the coordinator device clusters the training feature representations sent by each of the participant devices to obtain clusters of the feature representations.

[0065] In this embodiment, the training feature representation is sent to the coordinating device so that the coordinating device clusters the training feature representations sent by each of the participating devices to obtain each of the feature representation clustering clusters. Specifically, the training feature representation is sent to the coordinating device, and then the coordinating device receives the training feature representations sent by each of the participating devices, and clusters each of the training feature representations to divide each of the training feature representations into each of the feature representation clustering clusters. The specific steps of the coordinating device clustering the training feature representations sent by each of the participating devices to obtain each of the feature representation clustering clusters can refer to the specific contents of steps A10 to A20, which will not be repeated here.

[0066] Wherein, after the step of sending the training feature representation to the coordinator device so that the coordinator device clusters the training feature representations sent by each of the participant devices to obtain clusters of each of the feature representations, the federated learning modeling optimization method further includes:

[0067] Step D10: if the preset cluster update condition is met, obtaining second training data, and performing feature extraction on the second training data based on the feature extraction model to obtain a second training feature representation;

[0068] In this embodiment, it should be noted that the preset clustering cluster update condition is a step for determining whether each feature representation needs to be updated, wherein the preset clustering cluster update condition includes that the data distribution of the training data in the participant device changes and the number of model iterations reaches a preset second iteration number threshold, etc.

[0069] If the preset clustering cluster update condition is met, the second training data is obtained, and based on the feature extraction model, feature extraction is performed on the second training data to obtain a second training feature representation. Specifically, if the preset clustering cluster update condition is met, the current training data is obtained as the second training data, and by inputting the second training data into the feature extraction model, feature extraction is performed on the second training data to extract the output of the target hidden layer in the feature extraction model as the second training feature representation.

[0070] Step D20: sending the second training feature representation to the coordinator device, so that the coordinator device updates each feature representation cluster by clustering the second training feature representation sent by each of the participant devices.

[0071] In this embodiment, the second training feature representation is sent to the coordinator device so that the coordinator device updates each feature representation cluster cluster by clustering the second training feature representation sent by each participating device. Specifically, the second training feature representation is sent to the coordinator device, and then the coordinator device receives the second training feature representation sent by each participating device, and divides each second training feature representation into second feature representation cluster clusters by clustering each second training feature representation, and replaces and updates each feature representation cluster cluster with each second feature representation cluster cluster. The specific steps of clustering the second training feature representation sent by each participating device by the coordinator device can refer to the specific contents of steps A10 to A20, which will not be repeated here.

[0072] Step B30, receiving the aggregation model parameters corresponding to the cluster to which the participant device belongs, and optimizing the local prediction model according to the aggregation model parameters to obtain a federal prediction model.

[0073] In this embodiment, it should be noted that the belonging cluster is a feature representation cluster corresponding to the training feature representation generated by the participant device.

[0074] Receive the aggregation model parameters corresponding to the cluster to which the participant device belongs, and optimize the local prediction model based on the aggregation model parameters to obtain a federal prediction model. Specifically, receive the aggregation model parameters corresponding to the cluster to which the participant device belongs, and update the model parameters of the local prediction model based on the aggregation model parameters until the local prediction model meets the preset iterative training end conditions to obtain a federal prediction model.

[0075] The step of optimizing the local prediction model according to the aggregation model parameters to obtain the federated prediction model includes:

[0076] Step B31, based on the aggregate model parameters, updating the local prediction model, and determining whether the updated local prediction model meets a preset iterative training end condition;

[0077] In this embodiment, it should be noted that the aggregated model parameters are model network weight parameters of the local prediction model.

[0078] Based on the aggregated model parameters, the local prediction model is updated, and it is determined whether the updated local prediction model meets the preset iterative training end conditions. Specifically, the model parameters of the local prediction model are replaced and updated with the aggregated model parameters, and it is determined whether the replaced and updated local prediction model meets the preset iterative training end conditions. The determination of whether the updated local prediction model meets the preset iterative training end conditions will continue throughout the iterative training process of the local prediction model until the iterative training is completed. The preset iterative training end conditions include reaching the maximum iteration number threshold and the convergence of the loss function.

[0079] Step B32: if satisfied, use the local prediction model as the federal prediction model;

[0080] Step B33: If not satisfied, return to the step of iteratively training the local prediction model to a preset iteration number threshold to obtain local model parameters of the local prediction model.

[0081] In this embodiment, specifically, if it is satisfied, it proves that the iterative training of the local prediction model is completed, and then the local prediction model is used as the federal prediction model. If it is not satisfied, the step of iteratively training the local prediction model to a preset iteration number threshold and obtaining the local model parameters of the local prediction model is returned until the updated local prediction model meets the preset iterative training end conditions.

[0082] The embodiment of the present application provides a method for optimizing federated learning modeling. Compared with the technical means adopted in the prior art in which the coordinator directly aggregates the local models of each participant to generate an aggregated model, the embodiment of the present application first obtains a local prediction model, and iteratively trains the local prediction model to a preset iteration number threshold, obtains local model parameters of the local prediction model, and then sends the local model parameters to the coordinator device, so that the coordinator device can cluster the local model parameters sent by each participant device based on each feature characterization cluster, and obtain each aggregated model parameter.

[0083] Among them, since each feature representation clustering cluster is generated by clustering based on the training feature representation sent by each participating device, it is possible to screen participating devices with training data with similar or identical data distribution among each participating device, thereby achieving the purpose of aggregating the local model parameters of the participating devices with training data with similar or identical data distribution, so that the aggregated model and its corresponding training data have a high degree of adaptability, and then receive the aggregated model parameters corresponding to the clustering cluster to which the participating device belongs, and optimize the local prediction model based on the aggregated model parameters to obtain the federal prediction model, thereby achieving the purpose of updating the corresponding aggregated model based on training data with higher adaptability, thereby improving the model convergence speed. Therefore, it overcomes the problem that the training data of each participant usually have large differences, which will lead to a low degree of adaptability between the aggregated model and the training data of each participant, and since after each aggregation, the aggregated model still needs to continue iterative training optimization based on the local training data, which will lead to the technical defect of slow convergence of the aggregated model during the iteration process, thereby improving the computational efficiency of federated learning.

[0084] Reference Figure 4 , Figure 4 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0085] like Figure 4 As shown, the federated learning modeling optimization device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0086] Optionally, the federated learning modeling optimization device may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0087] Those skilled in the art will understand that Figure 4 The structure of the federated learning modeling optimization device shown in the figure does not constitute a limitation of the federated learning modeling optimization device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0088] like Figure 4 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, and a federated learning modeling optimization program. The operating system is a program that manages and controls the hardware and software resources of the federated learning modeling optimization device, and supports the operation of the federated learning modeling optimization program and other software and / or programs. The network communication module is used to realize communication between the components inside the memory 1005, and communication with other hardware and software in the federated learning modeling optimization system.

[0089] exist Figure 4 In the federated learning modeling optimization device shown, the processor 1001 is used to execute the federated learning modeling optimization program stored in the memory 1005 to implement the steps of any of the above-mentioned federated learning modeling optimization methods.

[0090] The specific implementation methods of the federated learning modeling optimization device of the present application are basically the same as the embodiments of the above-mentioned federated learning modeling optimization method, and will not be repeated here.

[0091] The embodiment of the present application further provides a federated learning modeling optimization device, which is applied to a coordination party device, and the federated learning modeling optimization device includes:

[0092] A receiving module, used to receive local model parameters generated by iteratively training a local prediction model of each participating device;

[0093] A clustering module for clustering the local model parameters based on the feature representation clusters generated by clustering the training feature representations sent by the participating devices, to obtain the aggregated model parameters corresponding to the feature representation clusters;

[0094] The feedback module is used to feed back each of the aggregation model parameters to the corresponding participant device, so that the participant device can optimize the local prediction model according to the aggregation model parameters to obtain the federal prediction model.

[0095] Optionally, the clustering module is further used for:

[0096] Selecting each model parameter to be aggregated corresponding to each of the feature representation clusters from each of the local model parameters;

[0097] The model parameters to be aggregated corresponding to the feature representation clusters are aggregated to obtain the aggregated model parameters.

[0098] Optionally, the federated learning modeling optimization device is also used for:

[0099] Receiving a training feature representation sent by each of the participant devices, wherein the training feature representation is generated by the participant device performing feature extraction on the training data corresponding to the local prediction model;

[0100] Clustering is performed on each of the training feature representations to obtain each of the feature representation clustering clusters.

[0101] The specific implementation of the federated learning modeling optimization device of the present application is basically the same as the various embodiments of the above-mentioned federated learning modeling optimization method, and will not be repeated here.

[0102] The embodiment of the present application further provides a federated learning modeling optimization device, which is applied to a participant device, and the federated learning modeling optimization device includes:

[0103] An iterative training module, used to obtain a local prediction model, and iteratively train the local prediction model to a preset iteration number threshold to obtain local model parameters of the local prediction model;

[0104] A sending module, used for sending the local model parameters to the coordinating device, so that the coordinating device can cluster the local model parameters sent by each participating device based on each feature characterization cluster, and obtain each aggregated model parameter;

[0105] The model optimization module is used to receive the aggregation model parameters corresponding to the cluster to which the participant device belongs, and optimize the local prediction model according to the aggregation model parameters to obtain the federal prediction model.

[0106] Optionally, the federated learning modeling device is further used for:

[0107] Acquire training data corresponding to the local prediction model, and extract features from the training data based on a feature extraction model constructed by federated learning to obtain training feature representation;

[0108] The training feature representation is sent to the coordinator device, so that the coordinator device clusters the training feature representations sent by each of the participant devices to obtain each of the feature representation clusters.

[0109] Optionally, the federated learning modeling device is further used for:

[0110] If the preset cluster update condition is met, obtaining second training data, and performing feature extraction on the second training data based on the feature extraction model to obtain a second training feature representation;

[0111] The second training feature representation is sent to the coordinator device, so that the coordinator device updates each of the feature representation clusters by clustering the second training feature representations sent by each of the participant devices.

[0112] Optionally, the model optimization module is further used to:

[0113] Based on the aggregate model parameters, updating the local prediction model, and determining whether the updated local prediction model meets a preset iterative training end condition;

[0114] If satisfied, the local prediction model is used as the federal prediction model;

[0115] If not satisfied, return to the step of iteratively training the local prediction model to a preset iteration number threshold to obtain local model parameters of the local prediction model.

[0116] The specific implementation of the federated learning modeling optimization device of the present application is basically the same as the various embodiments of the above-mentioned federated learning modeling optimization method, and will not be repeated here.

[0117] An embodiment of the present application provides a medium, which is a readable storage medium, and the readable storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of the federated learning modeling optimization method described in any one of the above items.

[0118] The specific implementation methods of the readable storage medium of the present application are basically the same as the embodiments of the above-mentioned federated learning modeling optimization method, and will not be repeated here.

[0119] An embodiment of the present application provides a computer program product, and the computer program product includes one or more computer programs, and the one or more computer programs can also be executed by one or more processors to implement the steps of any of the above-mentioned federated learning modeling optimization methods.

[0120] The specific implementation methods of the computer program product of the present application are basically the same as the embodiments of the above-mentioned federated learning modeling optimization method, and will not be repeated here.

[0121] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A federated learning modeling optimization method, characterized in that: The federated learning modeling optimization method is applied to a coordinating device, and the federated learning modeling optimization method includes: Receive local model parameters generated by iteratively training local prediction models of devices of each participant; Based on each feature representation cluster cluster generated by clustering the training feature representations sent by each of the participating devices, each of the local model parameters is clustered and aggregated to obtain the aggregated model parameters corresponding to each of the feature representation cluster clusters, wherein the feature representation cluster cluster is a cluster category generated by clustering each of the training feature representations by the coordinating device, wherein the distance between the training feature representations belonging to the same feature representation cluster cluster is less than a preset inter-class distance threshold, and the distance between the training feature representations belonging to different feature representation clusters is greater than a preset inter-cluster distance threshold; Feeding back each of the aggregate model parameters to the corresponding participant device, so that the participant device optimizes the local prediction model according to the aggregate model parameters to obtain a federated prediction model; The step of clustering the local model parameters based on the feature representation clusters generated by clustering the training feature representations sent by the participating devices to obtain the aggregated model parameters corresponding to the feature representation clusters includes: Selecting each model parameter to be aggregated corresponding to each of the feature representation clusters from each of the local model parameters; The model parameters to be aggregated corresponding to the feature representation clusters are aggregated to obtain the aggregated model parameters.

2. The federated learning modeling optimization method according to claim 1, characterized in that: Before the step of clustering the local model parameters based on the feature representations sent by the participating devices to generate the feature representation clusters, and obtaining the aggregated model parameters corresponding to the feature representation clusters, the federated learning modeling optimization method further includes: Receiving a training feature representation sent by each of the participant devices, wherein the training feature representation is generated by the participant device performing feature extraction on the training data corresponding to the local prediction model; Clustering is performed on each of the training feature representations to obtain each of the feature representation clustering clusters.

3. A federated learning modeling optimization method, characterized in that: The federated learning modeling optimization method is applied to a participant device, and the federated learning modeling optimization method includes: Acquire a local prediction model, and iteratively train the local prediction model to a preset iteration number threshold, and acquire local model parameters of the local prediction model; The local model parameters are sent to the coordinating device, so that the coordinating device can generate each feature representation cluster cluster based on the training feature representations sent by each participating device, and each model parameter to be aggregated corresponding to each feature representation cluster cluster is selected from each local model parameter; each model parameter to be aggregated corresponding to each feature representation cluster cluster is aggregated to obtain each aggregated model parameter, wherein the feature representation cluster cluster is a cluster category generated by clustering each training feature representation by the coordinating device, wherein the distance between the training feature representations belonging to the same feature representation cluster cluster is less than a preset inter-class distance threshold, and the clustering between the training feature representations belonging to different feature representation clusters is greater than a preset inter-cluster distance threshold; Receive the aggregation model parameters corresponding to the cluster to which the participant device belongs, and optimize the local prediction model according to the aggregation model parameters to obtain a federal prediction model.

4. The federated learning modeling optimization method according to claim 3, characterized in that: Before the step of sending the local model parameters to the coordinator device so that the coordinator device can characterize clusters based on each feature, cluster the local model parameters sent by each participant device, and obtain each aggregated model parameter, the federated learning modeling optimization method further includes: Acquire training data corresponding to the local prediction model, and extract features from the training data based on a feature extraction model constructed by federated learning to obtain training feature representation; The training feature representation is sent to the coordinator device, so that the coordinator device clusters the training feature representations sent by each of the participant devices to obtain each of the feature representation clusters.

5. The federated learning modeling optimization method according to claim 3, characterized in that: After the step of sending the training feature representation to the coordinator device so that the coordinator device clusters the training feature representations sent by each of the participant devices to obtain clusters of each of the feature representations, the federated learning modeling optimization method further includes: If the preset cluster update condition is met, obtaining second training data, and performing feature extraction on the second training data based on the feature extraction model to obtain a second training feature representation; The second training feature representation is sent to the coordinator device, so that the coordinator device updates each of the feature representation clusters by clustering the second training feature representations sent by each of the participant devices.

6. The federated learning modeling optimization method according to claim 3, characterized in that: The step of optimizing the local prediction model according to the aggregation model parameters to obtain the federated prediction model comprises: Based on the aggregate model parameters, updating the local prediction model, and determining whether the updated local prediction model meets a preset iterative training end condition; If satisfied, the local prediction model is used as the federal prediction model; If not satisfied, return to the step of iteratively training the local prediction model to a preset iteration number threshold to obtain local model parameters of the local prediction model.

7. A federated learning modeling optimization device, characterized in that: The federated learning modeling optimization device includes: a memory, a processor, and a program stored in the memory for implementing the federated learning modeling optimization method. The memory is used to store a program for implementing a federated learning modeling optimization method; The processor is used to execute a program for implementing the federated learning modeling optimization method to implement the steps of the federated learning modeling optimization method as described in any one of claims 1 to 2 or 3 to 6.

8. A medium, the medium being a readable storage medium, characterized in that: The readable storage medium stores a program for implementing the federated learning modeling optimization method, and the program for implementing the federated learning modeling optimization method is executed by a processor to implement the steps of the federated learning modeling optimization method as described in any one of claims 1 to 2 or 3 to 6.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the federated learning modeling optimization method as described in any one of claims 1 to 2 or 3 to 6 are implemented.

Citation Information

Patent Citations

  • Joint risk assessment method based on client classification and aggregation and related equipment

    CN112465626A