Federated learning method and apparatus, communication device, storage medium, and computer program product
By evaluating the contribution of data holders and identifying those participating in model co-training, the problem of insufficient participation of low-computing-power data holders in federated learning is solved, achieving high-quality and efficient model training.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2026-04-02
AI Technical Summary
The lack of incentive mechanisms in existing federated learning leads to low-computing-power data holders being unwilling to participate in collaborative training, affecting model quality and accuracy.
By assessing the contribution of data holders, the data holders who participate in the collaborative training of the model are identified, and the first basic model data is sent according to their contribution, thereby encouraging data holders to actively participate in the training, including contribution assessment, weight determination, and model aggregation.
It increased the enthusiasm of data holders in each round of model collaborative training, ensured the high quality and personalization of the model, solved the problem of difficulty for data holders with low computing power to participate, and achieved efficient utilization of the model and resource optimization.
Smart Images

Figure CN2025090676_02042026_PF_FP_ABST
Abstract
Description
Federated learning method, apparatus, communication device, storage medium and computer program product
[0001] This application claims priority to the Chinese patent application No. 2024113598657, filed on September 27, 2024, and entitled "Federated learning method, apparatus, communication device, storage medium and computer program product", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the field of artificial intelligence, and in particular, to a federated learning method, apparatus, communication device, storage medium and computer program product. BACKGROUND
[0003] As a new distributed machine learning method, federated learning allows data holders to collaboratively train machine learning models without exposing their original data, avoids uploading massive amounts of original data to the cloud, significantly reduces data transmission delay, saves valuable communication resources, and effectively protects user privacy data.
[0004] However, the federated learning of the related art still needs to be further improved to improve the enthusiasm of the data holders in the collaborative training process, and thus obtain a high-quality model. SUMMARY
[0005] The present application provides a federated learning method, apparatus, communication device, storage medium and computer program product.
[0006] In a first aspect, the present application provides a federated learning method, comprising: in each round of model collaborative training, receiving local model data obtained by a plurality of data holders in a previous round of model collaborative training; obtaining a contribution degree of each data holder, the contribution degree being used to represent a value of local model data provided by the data holder in the previous round of model collaborative training; obtaining first basic model data according to the local model data of each data holder and the contribution degree of each data holder; determining a data holder participating in the current round of model collaborative training according to the contribution degree of each data holder, and sending the first basic model data to the data holder participating in the current round of model collaborative training, the first basic model data being used for the data holder participating in the current round of model collaborative training to perform the current round of model collaborative training.
[0007] In one of the embodiments, obtaining the contribution degree of each data holder comprises: performing contribution degree evaluation on each data holder, and determining the contribution degree of each data holder according to the result of the contribution degree evaluation.
[0008] In one of the embodiments, the contribution degree evaluation includes at least one of the following: similarity calculation on the local model data corresponding to each data holder and the basic model data sent to each data holder in the last round of model collaborative training; determination of the semantic information quality of each data holder according to the data feature value sent by each data holder, wherein the data feature value is obtained by each data holder performing feature extraction on sample data in the local training sample set; and determination of the proportion of the number of samples in the local training sample set of each data holder in the total number of samples.
[0009] In one of the embodiments, the determination of the contribution degree of each data holder according to the result of the contribution degree evaluation includes: for each data holder, weighted summation of the sub-contribution degrees obtained by the contribution degree evaluation of the data holder, to obtain the contribution degree of the data holder.
[0010] In one of the embodiments, the determination of the data holder participating in the current round of model collaborative training according to the contribution degree of each data holder includes: taking the data holder whose contribution degree is greater than or equal to a preset contribution threshold as the data holder participating in the current round of model collaborative training.
[0011] In one of the embodiments, the determination of the data holder participating in the current round of model collaborative training according to the contribution degree of each data holder includes: summation of the contribution degrees of each data holder to obtain a total contribution degree; for each data holder, determination of the contribution proportion of the data holder according to the ratio of the contribution degree of the data holder to the total contribution degree; and taking the data holder whose contribution proportion is greater than or equal to a preset proportion threshold as the data holder participating in the current round of model collaborative training.
[0012] In one of the embodiments, the obtaining of the first basic model data according to the local model data of each data holder and the contribution degree of each data holder includes: determination of the weight of each data holder according to the contribution degree of each data holder; and aggregation of the local model data of each data holder according to the weight of each data holder to obtain the first basic model data.
[0013] In one of the embodiments, the method further includes: sending the training number to the data holder participating in the current round of model collaborative training, the training number being used to indicate the iteration number when the data holder participating in the current round of model collaborative training performs the current round of model collaborative training based on the first basic model data.
[0014] In one of the embodiments, the method further comprises: in the current round of model collaborative training, determining whether a training termination condition is met; and if the training termination condition is met, sending the second basic model data obtained in the current round of model collaborative training to the data holders participating in the current round of model collaborative training, so that the data holders participating in the current round of model collaborative training adjust the second basic model data based on the local training sample set to obtain fine-tuned model data.
[0015] In one of the embodiments, the method further comprises: establishing and publishing a model collaborative training task of federated learning; receiving participation requests sent by the data holders willing to participate in the model collaborative training task; and sending initial basic model data to the data holders corresponding to the participation requests, so that the data holders corresponding to the participation requests perform model collaborative training based on the local training sample set and the initial basic model data to obtain local model data.
[0016] In one of the embodiments, the coordinator and the data holders are semantic agents; the first basic model data and the second basic model data are semantic knowledge bases common to all semantic agents; and the fine-tuned model data is an individualized semantic knowledge base formed after being fine-tuned by the local training sample set.
[0017] In a second aspect, the present application provides a federated learning method for a data holder, which comprises: in each round of model collaborative training, sending local model data obtained in the last round of model collaborative training to a coordinator; so that the coordinator obtains first basic model data based on the local model data sent by the data holders and the contribution degrees of the data holders; receiving the first basic model data sent by the coordinator and performing the current round of model collaborative training based on the first basic model data; wherein the data holder is a data holder participating in the current round of model collaborative training determined by the coordinator based on the contribution degrees of the data holders, and the contribution degree is used to represent the value of the local model data provided by the data holder in the last round of model collaborative training.
[0018] In one of the embodiments, the method further comprises: sending at least one of a data feature value and a number of samples in the local training sample set to the coordinator, so that the coordinator evaluates the contribution degrees of the data holders based on at least one of the data feature value and the number of samples to determine the contribution degrees of the data holders; wherein the data feature value is obtained by the data holder after performing feature extraction on sample data in the local training sample set.
[0019] In one of the embodiments, the method further comprises: performing feature extraction on each sample data in the local training sample set respectively to obtain a feature vector corresponding to each sample data; performing alignment processing on the feature vector corresponding to each sample data, and obtaining a feature matrix of the local training sample set according to the feature vector corresponding to each sample data after the alignment processing; and taking the product of the feature matrix and the transpose of the feature matrix as a variable of the sqrt function to obtain the data feature value through the sqrt function.
[0020] In one of the embodiments, the method further comprises: receiving the training number sent by the coordinator; and performing the model collaborative training based on the first basic model data, comprising: performing the model collaborative training based on the first basic model data and the training number.
[0021] In one of the embodiments, the method further comprises: receiving the second basic model data sent by the coordinator, and adjusting the second basic model data based on the local training sample set to obtain the fine-tuning model data.
[0022] In one of the embodiments, the second basic model data is sent by the coordinator under the condition that the training termination condition is met.
[0023] In one of the embodiments, the method further comprises: performing performance evaluation on the fine-tuning model data; and if the fine-tuning model data meets the performance requirement, encapsulating the fine-tuning model data to obtain the encapsulated fine-tuning model data.
[0024] In one of the embodiments, the method further comprises: sending the fine-tuning model data to an affiliate of the data holder; and / or sending the fine-tuning model data to a trusted party trusted by the data holder.
[0025] In one of the embodiments, the method further comprises: sending a participation request to the coordinator after the coordinator publishes the model collaborative training task of the federated learning; receiving the initial basic model data sent by the coordinator; and performing the model collaborative training based on the local training sample set and the initial basic model data to obtain the local model data.
[0026] In a third aspect, the present application provides a federated learning device arranged at a coordinator, the device comprising: a receiving module configured to receive, in each round of model collaborative training, local model data obtained by a plurality of data holders in a previous round of model collaborative training; a first obtaining module configured to obtain a contribution degree of each data holder, the contribution degree being used to represent a value of the local model data provided by the data holder in the previous round of model collaborative training; a second obtaining module configured to obtain first basic model data according to the local model data of each data holder and the contribution degree of each data holder; and a sending module configured to determine, according to the contribution degree of each data holder, a data holder participating in the current round of model collaborative training, and send the first basic model data to the data holder participating in the current round of model collaborative training, the first basic model data being used for the data holder participating in the current round of model collaborative training to perform the current round of model collaborative training.
[0027] In a fourth aspect, the present application provides a federated learning device arranged at a data holder, the device comprising: a sending module configured to send, in each round of model collaborative training, local model data obtained in a previous round of model collaborative training to a coordinator, so that the coordinator obtains first basic model data according to the local model data sent by each data holder and the contribution degree of each data holder; and a receiving module configured to receive the first basic model data sent by the coordinator, and perform the current round of model collaborative training based on the first basic model data; wherein the data holder is a data holder participating in the current round of model collaborative training determined by the coordinator according to the contribution degree of each data holder, and the contribution degree is used to represent a value of the local model data provided by the data holder in the previous round of model collaborative training.
[0028] In a fifth aspect, the present application provides a communication device comprising a transceiver, a memory and a processor, the memory storing a computer program, and the processor, when executing the computer program, controls the transceiver to implement the steps of the method of any one of the first aspect.
[0029] In a sixth aspect, the present application provides a communication device comprising a transceiver, a memory and a processor, the memory storing a computer program, and the processor, when executing the computer program, controls the transceiver to implement the steps of the method of any one of the second aspect.
[0030] In a seventh aspect, the present application further provides a computer readable storage medium having a computer program stored thereon, and the computer program, when executed by a processor, implements the steps of the method of any one of the first aspect or the second aspect.
[0031] In an eighth aspect, the present application also provides a chip, which comprises a programmable logic circuit and / or program instructions, and when the chip is running, the steps of the method of any one of the first aspect or the second aspect described above can be executed.
[0032] In a ninth aspect, the present application also provides a computer program product, comprising a computer program, characterized in that when the computer program is executed by a processor, the steps of the method of any one of the first aspect or the second aspect described above can be implemented.
[0033] The federated learning method, device, communication device, storage medium and computer program product described above, the coordinator receives the local model data obtained by the plurality of data holders in the last round of model collaborative training in each round of model collaborative training, obtains the contribution degrees of the data holders, wherein the contribution degree represents the value of the local model data provided by the data holder in the last round of model collaborative training, then obtains the first basic model data according to the local model data of each data holder and the contribution degrees of the data holders, determines the data holders participating in the current round of model collaborative training according to the contribution degrees of the data holders, and sends the first basic model data to the data holders participating in the current round of model collaborative training, and the first basic model data is used for the data holders participating in the current round of model collaborative training to perform the current round of model collaborative training. In this way, the way of determining the data holders participating in the current round of model collaborative training according to the contribution degrees of the data holders encourages the data holders to actively participate in each round of model collaborative training, and thus a high-quality model can be obtained. BRIEF DESCRIPTION OF DRAWINGS
[0034] FIG. 1 is an application environment diagram of a federated learning method in an embodiment;
[0035] FIG. 2 is a flow diagram of a federated learning method in an embodiment;
[0036] FIG. 3 is a signaling interaction flow diagram when a federated learning is started in an embodiment;
[0037] FIG. 4 is a flow diagram of a federated learning method in another embodiment;
[0038] FIG. 5 is a signaling interaction flow diagram of a federated learning method in an embodiment;
[0039] FIG. 6 is a structural block diagram of a federated learning device in an embodiment;
[0040] FIG. 7 is a structural block diagram of a federated learning device in another embodiment;
[0041] FIG. 8 is an internal structure diagram of a communication device in an embodiment;
[0042] FIG. 9 is a schematic structure of a chip in an embodiment. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0044] Before introducing the specific embodiments of this application, the technical terms involved in this application will be explained:
[0045] The coordinator, data owner, and model user can all be semantic information agents, which are three roles in federated learning training.
[0046] The coordinator coordinates the model training for the data holders and obtains the semantic agent of the final trained model.
[0047] The data holder is a semantic intelligent agent that owns the local data.
[0048] Affiliated parties are entities that have some kind of association or cooperative relationship with the data holder, which may be based on business cooperation, technology sharing, common interests, or legal agreements.
[0049] Trusted parties (with similar abilities) refer to entities that are considered highly trustworthy by data holders, and these entities have demonstrated excellent performance in areas such as data security, privacy protection, technical capabilities, and cooperation history.
[0050] Model users are semantic agents who use the basic model or fine-tuned models, such as coordinators, data holders, affiliates, and trusted parties.
[0051] Data holders, leveraging pre-trained personalized models, can accurately capture and analyze deep semantic features extracted from multimodal information, thereby achieving efficient and precise end-to-end semantic communication. Federated learning, as a novel distributed machine learning approach, allows data holders to collaboratively train machine learning models without exposing their raw data. This avoids uploading massive amounts of raw data to the cloud, significantly reducing data transmission latency, saving valuable communication resources, and effectively protecting user privacy.
[0052] However, although federated learning is a promising machine learning method, the participation of data holders in the process of federated learning will consume a large amount of private resources such as computing power, bandwidth and data. Due to the lack of incentive mechanism, data holders are reluctant to sacrifice their various device resources to assist federated learning. The selfishness of data holders limits the application of federated learning in mobile networks and mobile edge computing scenarios, so further improvement is needed for federated learning, such as designing a reasonable incentive mechanism to improve the enthusiasm of data holders in the collaborative training process, and thus obtaining a high-quality model.
[0053] The incentive mechanism of the current federated learning is mainly aimed at data holders with little difference in storage and computing power. However, in the related art, some low-power data holders also want to participate in the semantic communication system, but due to the inability to complete effective federated learning model training, they cannot obtain personalized models, resulting in low accuracy of extracting semantic information or even being unable to extract semantic information. Therefore, how to use the incentive mechanism to enable these low-power data holders to obtain high-quality personalized models is a problem that needs to be considered.
[0054] Based on this, it is necessary to propose effective technical means to solve the above problems, and the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below. The following several embodiments in an embodiment can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0055] It should be noted that the beneficial effects brought about by the embodiments of the present application or the technical problems solved are not limited to this, but also other implicit or related problems, which can be seen from the description of the following embodiments.
[0056] FIG. 1 is a schematic diagram of an application scenario of a federated learning method provided by an embodiment of the present application. As shown in FIG. 1, in the scenario, there are multiple data holders, a coordinator, and affiliated parties and trusted parties connected to each data holder. Among them, data transmission is performed between each data holder and the coordinator through a network, and data transmission is performed between each data holder and the affiliated parties and trusted parties through a network.
[0057] In an embodiment, as shown in FIG. 2, a federated learning method is provided, which is taken as an example to illustrate the application of the method to the coordinator in FIG. 1, including the following steps:
[0058] Step 201, in each round of model collaborative training, receiving local model data obtained by multiple data holders in the last round of model collaborative training.
[0059] In one embodiment, in each round of model collaborative training, each data holder sends the local model data obtained in the last round of model collaborative training to the coordinator, so that the coordinator receives the local model data obtained by each data holder in the last round of model collaborative training.
[0060] In step 202, the contribution degree of each data holder is obtained, which is used to represent the value of the local model data provided by the data holder in the last round of model collaborative training.
[0061] In one embodiment, the contribution degree of each data holder can be directly sent by each data holder to the coordinator, so that the coordinator receives the contribution degree of each data holder. The contribution degree of each data holder can also be evaluated by the coordinator, and the contribution degree of each data holder is determined according to the evaluation result.
[0062] In step 203, the first basic model data is obtained according to the local model data of each data holder and the contribution degree of each data holder.
[0063] In one embodiment, the first basic model data is the global model data obtained by the coordinator aggregating the local model data of each data holder.
[0064] In one embodiment, the weight of each data holder is determined according to the contribution degree of each data holder, and the local model data of each data holder is aggregated according to the weight of each data holder to obtain the first basic model data.
[0065] In step 204, the data holders participating in the current round of model collaborative training are determined according to the contribution degree of each data holder, and the first basic model data is sent to the data holders participating in the current round of model collaborative training, which is used for the data holders participating in the current round of model collaborative training to perform the current round of model collaborative training.
[0066] In one embodiment, the data holders participating in the current round of model collaborative training can be determined according to the size of the contribution degree, or can be determined according to the contribution ratio.
[0067] In one possible implementation, the data holder whose contribution degree is greater than or equal to a preset contribution threshold is determined as the data holder participating in the current round of model collaborative training.
[0068] In another possible implementation, the contribution degrees of each data holder are summed to obtain a total contribution degree, the contribution ratio of each data holder is determined according to the ratio of the contribution degree of the data holder to the total contribution degree, and the data holder whose contribution ratio is greater than or equal to a preset ratio threshold is determined as the data holder participating in the current round of model collaborative training.
[0069] After determining the data holders participating in the current round of model collaborative training, the coordinator sends the first basic model data to the data holders participating in the current round of model collaborative training. In other words, some data holders whose contribution is less than the preset contribution threshold and whose contribution proportion is less than the preset proportion threshold are not allowed to participate in the current round of model collaborative training.
[0070] After receiving the first basic model data, the data holders participating in the current round of model collaborative training perform the current round of model collaborative training. In an embodiment, the data holders participating in the current round of model collaborative training train the first basic model data using the local training sample set, calculate the local loss function, determine the learning rate used for training, and can use the method of small batch random gradient descent to minimize the local loss function of the data holder on its local training sample set to obtain the trained local model data and upload it to the coordinator.
[0071] The local loss function L i (ω i ,D i ) of the data holder i participating in the current round of model collaborative training is:
[0072] wherein ω i represents the local model data of the data holder i, D i represents the local training sample set of the data holder i, x ij represents the jth sample data of the data holder i, y ij represents the true label of the jth sample data of the data holder i, l i (ω i ,x ij ,y ij ) represents the loss function of the data holder i on the jth sample data.
[0073] The process of the data holder i participating in the current round of model collaborative training training the first basic model data using the local training sample set is:
[0074] wherein t represents the current iteration round during training, α represents the learning rate used for training, represents the average gradient of the data holder i on the local training sample set D i during the current iteration during training.
[0075] In the federated learning method, the coordinator receives local model data of a plurality of data holders obtained in a previous round of model collaborative training, obtains contribution degrees of the data holders, wherein the contribution degrees represent values of the local model data provided by the data holders in the previous round of model collaborative training, obtains first basic model data according to the local model data of the data holders and the contribution degrees of the data holders, determines data holders participating in the current round of model collaborative training according to the contribution degrees of the data holders, and sends the first basic model data to the data holders participating in the current round of model collaborative training, wherein the first basic model data is used for the data holders participating in the current round of model collaborative training to perform the current round of model collaborative training. In this way, the data holders participating in the current round of model collaborative training are determined according to the contribution degrees of the data holders, which encourages the data holders to actively participate in each round of model collaborative training, and thus a high-quality model can be obtained.
[0076] In one embodiment, the step 202 of obtaining the contribution degrees of the data holders includes: performing contribution degree evaluation on the data holders, and determining the contribution degrees of the data holders according to a result of the contribution degree evaluation.
[0077] The contribution degree evaluation includes at least one of the following:
[0078] Similarity calculation is performed on the local model data corresponding to each data holder and basic model data sent to each data holder in the previous round of model collaborative training;
[0079] According to the data feature values sent by each data holder, the semantic information quality of each data holder is determined; wherein the data feature values are obtained by each data holder performing feature extraction on sample data in a local training sample set;
[0080] The proportion of the number of samples in the local training sample set of each data holder to the total number of samples is determined.
[0081] The similarity calculation performed on the local model data corresponding to each data holder and the basic model data sent to each data holder in the previous round of model collaborative training can obtain a first sub-contribution degree of each data holder, which can also be referred to as an update quality of the model provided by each data holder. The similarity can be a cosine similarity.
[0082] In one embodiment, the first sub-contribution degree of the data holder i is .
[0083] wherein ω i represents the local model data of the data holder i, ω hBasic model data sent to each data holder in the last round of model collaborative training.
[0084] According to the data feature value sent by each data holder, the semantic information quality of each data holder is determined, and the second sub-contribution degree of each data holder can be obtained. Wherein, the data feature value sent by the data holder is that the data holder respectively extracts features of each sample data in the local training sample set to obtain a feature vector corresponding to each sample data, then aligns the feature vector corresponding to each sample data, and obtains a feature matrix of the local training sample set according to the aligned feature vector corresponding to each sample data, and then takes the product of the feature matrix and the transpose of the feature matrix as the variable of the sqrt function to obtain through the sqrt function.
[0085] The coordinator can directly determine the data feature value sent by each data holder as the semantic information quality of each data holder, or the coordinator can process the data feature value sent by each data holder to obtain the semantic information quality of each data holder.
[0086] Taking the case that the coordinator directly determines the data feature value sent by each data holder as the semantic information quality of each data holder, the second sub-contribution degree of the data holder i is .
[0087] Wherein, represents the aligned feature vector, |D i |≥d, each sample data has d features. is a Gram determinant value measurement function.
[0088] Determine the proportion of the number of samples in the local training sample set of each data holder in the total number of samples, and the third sub-contribution degree of each data holder can be obtained, which can also be called the number of semantic information in the local training sample set provided by each data holder. Wherein, the number of samples in the local training sample set of each data holder is sent by the data holder to the coordinator.
[0089] In one embodiment, the third sub-contribution degree of the data holder i is:
[0090] Wherein, |D i | represents the number of samples in the local training sample set of the data holder i, |D U | represents the total number of samples of all data holders.
[0091] In one embodiment, the contribution degree of each data holder is determined according to the result of the contribution degree evaluation, including: for each data holder, the first sub-contribution degree or the second sub-contribution degree or the third sub-contribution degree of the data holder can be taken as the contribution degree of the data holder, or the sum of any two or the sum of all of the first sub-contribution degree, the second sub-contribution degree and the third sub-contribution degree of the data holder can be taken as the contribution degree of the data holder.
[0092] In one embodiment, the contribution degree of each data holder is determined according to the result of the contribution degree evaluation, including: for each data holder, the first sub-contribution degree or the second sub-contribution degree or the third sub-contribution degree of the data holder can be taken as the contribution degree of the data holder, or the sum of any two or the sum of all of the first sub-contribution degree, the second sub-contribution degree and the third sub-contribution degree of the data holder can be taken as the contribution degree of the data holder.
[0093] In one embodiment, the contribution degree η i of the data holder i is:
[0094] Wherein, β, λ, μ are weight parameters, which can be dynamically adjusted.
[0095] In this embodiment, the sub-contribution degrees obtained by the contribution degree evaluation of each data holder are weighted and summed, so that the contribution degree of the data holder is considered from multiple angles, and the contribution degree of the data holder obtained in this way is more accurate.
[0096] In one embodiment, as shown in FIG. 2, a method for acquiring first basic model data is provided, and the step 103 acquires the first basic model data according to the local model data of each data holder and the contribution degree of each data holder, including:
[0097] Step 201, determining the weight of each data holder according to the contribution degree of each data holder.
[0098] In one embodiment, for each data holder, the ratio of the contribution degree of the data holder to the sum of the contribution degrees of all data holders is taken as the weight of the data holder.
[0099] Step 202, aggregating the local model data of each data holder according to the weight of each data holder to obtain the first basic model data.
[0100] The objective function F(ω g , D U ) of the first basic model is:
[0101] Wherein, N represents the number of data holders; represents the total contribution degree of all data holders; represents the weight of the data holder i, which can measure the contribution of the data holder i to the first basic model, F(ωg ,D U ) is obtained by aggregating the local model data of different data holders by minimizing the weighted average of the local loss function. g .
[0102] In this embodiment, by determining the weight of each data holder according to the contribution degree of each data holder, and then aggregating the local model data of each data holder according to the weight of each data holder, the quality of the first basic model data can be improved.
[0103] In one of the embodiments, the method further comprises: sending the number of training to the data holders participating in the current round of model collaborative training, the number of training indicating the number of iterations when the data holders participating in the current round of model collaborative training perform the current round of model collaborative training based on the first basic model data.
[0104] In other words, in addition to sending the first basic model data, the coordinator also sends the number of training to the data holders participating in the current round of model collaborative training, and when the data holders participating in the current round of model collaborative training receive the first basic model data and the number of training, they perform the current round of model collaborative training based on the first basic model data and the number of training, that is, the same number of iterations of training on the first basic model data.
[0105] It should be noted that the number of training sent to different data holders participating in the current round of model collaborative training can be the same or different, such as determining the number of training according to the contribution degree of the data holder.
[0106] In this embodiment, by sending the number of training to the data holders participating in the current round of model collaborative training, the number of training of the data holders participating in the current round of model collaborative training on the first basic model data is specified, and flexible control of the model training of the data holders is achieved.
[0107] In one of the embodiments, the method further comprises: determining whether a training termination condition is met in the current round of model collaborative training; and if the training termination condition is met, sending the second basic model data obtained in the current round of model collaborative training to the data holders participating in the current round of model collaborative training, so that the data holders participating in the current round of model collaborative training adjust the second basic model data based on the local training sample set to obtain fine-tuning model data.
[0108] The training termination condition can be the number of collaborative training, the loss value of the second basic model data reaching the loss threshold, or other training termination conditions, which are not limited herein.
[0109] When the training termination condition is met, the second basic model data obtained by the current round of model collaborative training is sent to the data holders participating in the current round of model collaborative training. After receiving the second basic model data, the data holders participating in the current round of model collaborative training adjust the second basic model data based on the local training sample set. For example, the bottom layer weights of the second basic model data are frozen, the top layer weights of the second basic model data are unfrozen and trained, and appropriate learning rate, batch size, training round and other hyperparameters are set according to the characteristics and size of the local training sample set, the weights of the unfrozen layers are updated through the back propagation algorithm, and finally the fine-tuned model data is obtained. The bottom layer weights include at least the weights of the last layer, and the top layer weights include at least the weights of the first layer.
[0110] In this embodiment, by allowing the data holders to adjust the trained second basic model data using the local training sample set, i.e., model fine-tuning, this method ensures that the model can better adapt to the specific needs and environment of the user, thereby providing higher performance in specific application scenarios and further improving the adaptability and personalization level of the model.
[0111] After obtaining the fine-tuned model data, the data holders participating in the current round of model collaborative training perform performance evaluation on the fine-tuned model data. If the fine-tuned model data meets the performance requirements, the fine-tuned model data is packaged to obtain packaged fine-tuned model data.
[0112] In one embodiment, the data holders participating in the current round of model collaborative training determine whether the performance of the fine-tuned model data is greater than or equal to a preset performance threshold. If yes, the performance requirements are met. Then the fine-tuned model data is packaged into a deployable format, such as an API (Application Programming Interface) interface, a Docker container, etc.
[0113] After obtaining the packaged fine-tuned model data, the data holders participating in the current round of model collaborative training send the fine-tuned model data to the affiliates of the data holders; and / or send the fine-tuned model data to the trusted parties trusted by the data holders. In one embodiment, the fine-tuned model data is sent to the affiliates of the data holders using an incentive mechanism; and / or the fine-tuned model data is sent to the trusted parties trusted by the data holders using an incentive mechanism. This not only solves the problem that the resource-limited parties cannot directly participate in model training, but also indirectly obtains the training results through sharing of the fine-tuned model data, realizes efficient utilization of the model, optimizes overall resource allocation, and improves model training efficiency.
[0114] Among them, the affiliated party refers to an entity that has some kind of association or cooperative relationship with the data holder, which may be based on business cooperation, technology sharing, common interests or legal agreements, etc. The affiliated party usually also has certain data processing capabilities, technical resources or data sets, which may be similar or complementary to the data holder's resources. In the framework of model fine-tuning and data sharing, the affiliated party receives the fine-tuned model data provided by the data holder through the incentive mechanism, and may use these data for further training, validation or optimization to improve the performance of their own model or develop new applications.
[0115] The trusted party (with similar capabilities) refers to entities that are highly trusted by the data holder, which have excellent performance in data security, privacy protection, technical strength and cooperation history, etc. Therefore, they are given the right to handle sensitive data or advanced model data. Unlike the affiliated party, the definition of the trusted party emphasizes more on the high requirements in the trust level, rather than just the existence of cooperative relationship. In the process of model fine-tuning and data sharing, the trusted party may be responsible for performing specific data processing tasks such as model evaluation, security audit or data desensitization, etc. to ensure the legality and security of data flow. At the same time, the trusted party may also use its professional knowledge and technical resources to provide valuable feedback and suggestions to the data holder, helping to optimize the model performance or improve the data sharing mechanism.
[0116] It should be noted that the coordinator and each data holder are semantic agents; the first basic model data and the second basic model data are semantic knowledge bases commonly used by all semantic agents; and the fine-tuned model data is a personalized semantic knowledge base formed after fine-tuning of the local training sample set.
[0117] In one of the embodiments, as shown in FIG. 3, the present application also provides a signaling interaction flow diagram at the start of federated learning, including the following steps:
[0118] Step 301, establishing and publishing a model collaborative training task of federated learning.
[0119] Step 302, receiving participation requests sent by each data holder willing to participate in the model collaborative training task.
[0120] Step 303, sending the initial basic model data to each data holder corresponding to the participation request, so that each data holder corresponding to the participation request performs model collaborative training based on the local training sample set and the initial basic model data to obtain the local model data.
[0121] In one embodiment, the coordinator establishes and publishes a model collaborative training task of federated learning, the data holders willing to participate in the model collaborative training task send participation requests to the coordinator, the coordinator receives the participation requests sent by the data holders willing to participate in the model collaborative training task, and sends initial basic model data to the data holders corresponding to the participation requests, after receiving the initial basic model data, the data holders perform model collaborative training based on the local training sample set and the initial basic model data to obtain local model data, and send the local model data to the coordinator. This process can be referred to as the first round of model collaborative training.
[0122] In this embodiment, by allowing all willing data holders to participate in the first round of training, not only the diversity of participants is greatly increased, but also through such extensive participation, data features from different sources can be quickly integrated, thereby improving the generalization and accuracy of the model.
[0123] In one embodiment, as shown in FIG. 4, a federated learning method is provided, which is applied to the data holders in FIG. 1 as an example for illustration, including the following steps:
[0124] Step 401, in each round of model collaborative training, the local model data obtained in the last round of model collaborative training is sent to the coordinator for the coordinator to obtain first basic model data according to the local model data sent by each data holder and the contribution degree of each data holder.
[0125] Step 402, receiving the first basic model data sent by the coordinator, and performing this round of model collaborative training based on the first basic model data; wherein the data holder is a data holder participating in this round of model collaborative training determined by the coordinator according to the contribution degree of each data holder, and the contribution degree is used to represent the value of the local model data provided by the data holder in the last round of model collaborative training.
[0126] In one embodiment, the method further includes: sending at least one of a data feature value and a number of samples in the local training sample set to the coordinator, so that the coordinator evaluates the contribution degree of the data holder based on at least one of the data feature value and the number of samples, and determines the contribution degree of the data holder; wherein the data feature value is obtained after the data holder extracts features from sample data in the local training sample set.
[0127] In one of the embodiments, the method further comprises: performing feature extraction on each sample data in the local training sample set respectively to obtain a feature vector corresponding to each sample data; performing alignment processing on the feature vector corresponding to each sample data, and obtaining a feature matrix of the local training sample set according to the feature vector corresponding to each sample data after the alignment processing; and taking the product of the feature matrix and the transpose of the feature matrix as a variable of a sqrt function to obtain the data feature value through the sqrt function.
[0128] In one of the embodiments, the method further comprises: receiving the training number sent by the coordinator; and performing the model collaborative training in the current round based on the first basic model data, comprising: performing the model collaborative training in the current round based on the first basic model data and the training number.
[0129] In one of the embodiments, the method further comprises: receiving the second basic model data sent by the coordinator, and adjusting the second basic model data based on the local training sample set to obtain the fine-tuned model data.
[0130] In one of the embodiments, the second basic model data is sent by the coordinator under the condition that the training termination condition is met.
[0131] In one of the embodiments, the method further comprises: performing performance evaluation on the fine-tuned model data; and if the fine-tuned model data meets the performance requirement, encapsulating the fine-tuned model data to obtain the encapsulated fine-tuned model data.
[0132] In one of the embodiments, the method further comprises: sending the fine-tuned model data to an affiliate of the data holder; and / or sending the fine-tuned model data to a trusted party trusted by the data holder.
[0133] In one of the embodiments, the method further comprises: after the coordinator publishes the model collaborative training task of the federated learning, sending a participation request to the coordinator; receiving the initial basic model data sent by the coordinator; and performing the model collaborative training based on the local training sample set and the initial basic model data to obtain the local model data.
[0134] The specific implementation of the above-mentioned federated learning method embodiment on the data holder side is described in detail in the federated learning method embodiment on the coordinator side, which will not be repeated here.
[0135] In summary, as shown in FIG. 5, the present application also provides a signaling interaction flow diagram of a federated learning method, comprising the following steps:
[0136] In step 501, in each round of model collaborative training, the data holder sends the local model data obtained in the last round of model collaborative training to the coordinator.
[0137] At step 502, the coordinator obtains the contribution degrees of the data holders, and determines the data holders participating in the current round of model collaborative training according to the contribution degrees of the data holders.
[0138] At step 503, the first basic model data is obtained according to the local model data of each data holder and the contribution degrees of the data holders.
[0139] At step 504, the coordinator sends the first basic model data to the data holders participating in the current round of model collaborative training.
[0140] At step 505, the data holders perform the current round of model collaborative training based on the first basic model data.
[0141] At step 506, steps 502-505 are repeatedly performed, and after the training termination condition is met, the second basic model data is obtained by the coordinator and the data holders.
[0142] At step 507, the data holders adjust the second basic model data to obtain the fine-tuned data model.
[0143] At step 508, the data holders send the fine-tuned data model to the affiliated party / trusted party.
[0144] It should be understood that although each step in the flowcharts of FIGS. 2-5 is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise explicitly stated herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least a part of the steps in FIGS. 2-5 can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least a part of other steps or steps or stages in other steps.
[0145] In one embodiment, as shown in FIG. 6, a federated learning device is provided, which is arranged in a coordinator, and the federated learning device 600 includes a receiving module 601, a first obtaining module 602, a second obtaining module 603, and a sending module 604, wherein:
[0146] The receiving module 601 is configured to, in each round of model collaborative training, receive the local model data obtained by the plurality of data holders in the last round of model collaborative training;
[0147] The first obtaining module 602 is configured to obtain the contribution degrees of the data holders, and the contribution degree is used to represent the value of the local model data provided by the data holder in the last round of model collaborative training;
[0148] The second obtaining module 603 is configured to obtain first basic model data according to the local model data of each data holder and the contribution degree of each data holder.
[0149] The sending module 604 is configured to determine the data holders participating in the current round of model collaborative training according to the contribution degrees of the data holders, and send the first basic model data to the data holders participating in the current round of model collaborative training, where the first basic model data is used for the data holders participating in the current round of model collaborative training to perform the current round of model collaborative training.
[0150] In one of the embodiments, the first obtaining module 602 is specifically configured to evaluate the contribution degrees of the data holders, and determine the contribution degrees of the data holders according to the evaluation results.
[0151] In one of the embodiments, the contribution degree evaluation includes at least one of the following: performing similarity calculation on the local model data corresponding to each data holder and the basic model data sent to each data holder in the last round of model collaborative training; determining the semantic information quality of each data holder according to the data feature values sent by each data holder, where the data feature values are obtained by performing feature extraction on sample data in a local training sample set of the data holder; and determining the proportion of the number of sample data in the local training sample set of each data holder in the total number of sample data.
[0152] In one of the embodiments, the first obtaining module 602 is specifically configured to, for each data holder, perform weighted summation on the sub-contribution degrees obtained by evaluating the contribution degrees of the data holder, to obtain the contribution degree of the data holder.
[0153] In one of the embodiments, the determination of the data holders participating in the current round of model collaborative training according to the contribution degrees of the data holders includes: determining the data holders with a contribution degree greater than or equal to a preset contribution threshold as the data holders participating in the current round of model collaborative training.
[0154] In one of the embodiments, the sending module 604 includes a determination unit, which is specifically configured to: perform summation on the contribution degrees of the data holders to obtain a total contribution degree; for each data holder, determine a contribution proportion of the data holder according to a ratio of the contribution degree of the data holder to the total contribution degree; and determine the data holders with a contribution proportion greater than or equal to a preset proportion threshold as the data holders participating in the current round of model collaborative training.
[0155] In one of the embodiments, the determination unit is further configured to: determine the weights of the data holders according to the contribution degrees of the data holders; and aggregate the local model data of the data holders according to the weights of the data holders to obtain the first basic model data.
[0156] In one of the embodiments, the sending module 604 is further configured to send the number of training times to the data holders participating in the current round of model collaborative training, where the number of training times is used to indicate the number of iterations when the data holders participating in the current round of model collaborative training perform the current round of model collaborative training based on the first basic model data.
[0157] In one of the embodiments, the sending module 604 is further configured to, in the current round of model collaborative training, determine whether a training termination condition is met, and if the training termination condition is met, send the second basic model data obtained in the current round of model collaborative training to the data holders participating in the current round of model collaborative training, so that the data holders participating in the current round of model collaborative training adjust the second basic model data based on the local training sample set to obtain the fine-tuned model data.
[0158] In one of the embodiments, the federated learning device further comprises a publishing module configured to establish and publish a model collaborative training task of federated learning, and the receiving module 601 is further configured to receive participation requests sent by the data holders willing to participate in the model collaborative training task, and the sending module 604 is further configured to send the initial basic model data to the data holders corresponding to the participation requests, so that the data holders corresponding to the participation requests perform model collaborative training based on the local training sample set and the initial basic model data to obtain the local model data.
[0159] In one of the embodiments, the coordinator and the data holders are semantic agents, the first basic model data and the second basic model data are semantic knowledge bases common to all semantic agents, and the fine-tuned model data is a personalized semantic knowledge base formed after the local training sample set is fine-tuned.
[0160] In one of the embodiments, as shown in FIG. 7, a federated learning device is provided, which is arranged at a data holder, and the federated learning device 700 comprises a sending module 701 and a receiving module 702, where:
[0161] The sending module 701 is configured to, in each round of model collaborative training, send the local model data obtained in the last round of model collaborative training to the coordinator, so that the coordinator obtains the first basic model data according to the local model data sent by the data holders and the contribution degrees of the data holders.
[0162] The receiving module 702 is configured to receive the first basic model data sent by the coordinator and perform the current round of model collaborative training based on the first basic model data, where the data holder is a data holder participating in the current round of model collaborative training determined by the coordinator according to the contribution degrees of the data holders, and the contribution degree is used to represent the value of the local model data provided by the data holder in the last round of model collaborative training.
[0163] In one of the embodiments, the sending module 701 is further configured to send, to the coordinator, at least one of the data feature value and the number of samples in the local training sample set, so that the coordinator determines the contribution degree of the data holder based on the at least one of the data feature value and the number of samples; wherein the data feature value is obtained by the data holder after performing feature extraction on the sample data in the local training sample set.
[0164] In one of the embodiments, the federated learning apparatus 700 further comprises a first processing module configured to perform feature extraction on each of the sample data in the local training sample set to obtain a feature vector corresponding to each of the sample data; perform alignment processing on the feature vectors corresponding to the sample data, and obtain a feature matrix of the local training sample set according to the feature vectors corresponding to the sample data after the alignment processing; and take the product of the feature matrix and the transpose of the feature matrix as a variable of a sqrt function to obtain the data feature value by calculation of the sqrt function.
[0165] In one of the embodiments, the receiving module 702 is further configured to receive the number of training times sent by the coordinator; and correspondingly, the receiving module 702 is specifically configured to perform the model collaborative training in the current round based on the first basic model data and the number of training times.
[0166] In one of the embodiments, the receiving module 702 is further configured to receive the second basic model data sent by the coordinator, and adjust the second basic model data based on the local training sample set to obtain the fine-tuned model data.
[0167] In one of the embodiments, the second basic model data is sent by the coordinator under the condition that a training termination condition is met.
[0168] In one of the embodiments, the federated learning apparatus 700 further comprises a second processing module configured to perform performance evaluation on the fine-tuned model data; and if the fine-tuned model data meets a performance requirement, encapsulate the fine-tuned model data to obtain encapsulated fine-tuned model data.
[0169] In one of the embodiments, the sending module 701 is further configured to send the fine-tuned model data to an affiliate of the data holder; and / or send the fine-tuned model data to a trusted party trusted by the data holder.
[0170] In one of the embodiments, the sending module 701 is further configured to send a participation request to the coordinator after the coordinator publishes a model collaborative training task of federated learning; and the receiving module 702 is further configured to receive initial basic model data sent by the coordinator; and perform model collaborative training based on the local training sample set and the initial basic model data to obtain the local model data.
[0171] The specific limitations of the federated learning device can refer to the limitations of the federated learning method described above, which will not be repeated here. Each module in the federated learning device described above can be implemented by software, hardware, and a combination thereof in whole or in part. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor calls and executes the operations corresponding to each of the above modules.
[0172] FIG. 8 is a structural schematic diagram of a communication device provided by an embodiment of the present application. The communication device can include a transceiver 801, a memory 802, a processor 803, and at least one communication bus 804. The communication bus 804 is used to realize the communication connection between the elements. The memory 802 can contain a high-speed RAM memory and can also include a non-volatile storage NVM, such as at least one disk memory. The memory 802 can store various programs for completing various processing functions and implementing the method steps of the present embodiment. In the present embodiment, the transceiver 801 can be a radio frequency processing module or a baseband processing module in the communication device. The transceiver 801 can be coupled to the processor 803 and can realize the receiving or transmitting action under the indication or control of the processor 803.
[0173] In one embodiment, a communication device is provided, and the processor 803 implements the steps of the method described in any of the above coordinator side or data holder side when executing the computer program.
[0174] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by the processor to implement the steps of the method described in any of the above coordinator side or data holder side.
[0175] In one embodiment, a computer program product containing instructions is also provided, which, when running on a computer, causes the computer to perform the steps of the method described in any of the above coordinator side or data holder side.
[0176] In one embodiment, a chip is provided, and FIG. 9 is a schematic structural diagram of the chip of an embodiment of the present application. The chip 900 shown in FIG. 9 includes a processor 901. The processor 901 can call and run a computer program from a memory to implement the method in the present embodiment.
[0177] In one embodiment, as shown in FIG. 9, the chip 900 can also include a memory 902. The processor 901 can call and run a computer program from the memory 902 to implement the method in the present embodiment. The memory 902 can be a separate device independent of the processor 901, or can be integrated in the processor 901.
[0178] In an embodiment, the chip 900 can further include an input interface 903. The processor 901 can control the input interface 903 to communicate with other devices or chips, and specifically, can acquire information or data sent by other devices or chips. In an embodiment, the chip 900 can further include an output interface 904. The processor 901 can control the output interface 904 to communicate with other devices or chips, and specifically, can output information or data to other devices or chips.
[0179] In an embodiment, the chip 900 can be applied to the communication device in the embodiments of the present application, and the chip 900 can implement the corresponding procedures implemented by the communication device in the various methods of the embodiments of the present application. For brevity, details are not repeated here.
[0180] It should be understood that the chip 900 mentioned in the embodiments of the present application can also be referred to as a system chip, a system chip, a chip system or a system on chip, etc. It should be understood that the processor of the embodiments of the present application can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method embodiments can be completed by integrated logic circuits of hardware in the processor or instructions in the form of software. The processor mentioned above can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a ready programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can be any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware coding processor for execution, or a combination of hardware and software modules in the coding processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method.
[0181] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, storage, database or other medium used in each embodiment provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0182] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of each technical feature in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0183] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A federated learning method for a coordinator, the method comprising: receiving, in each round of model collaborative training, local model data obtained by a plurality of data holders in a previous round of model collaborative training; obtaining a contribution degree of each of the data holders, the contribution degree being used to represent a value of local model data provided by the data holder in the previous round of model collaborative training; obtaining first basic model data according to the local model data of each of the data holders and the contribution degree of each of the data holders; determining data holders participating in the current round of model collaborative training according to the contribution degree of each of the data holders, and sending the first basic model data to the data holders participating in the current round of model collaborative training, the first basic model data being used for the data holders participating in the current round of model collaborative training to perform the current round of model collaborative training.
2. The method of claim 1, wherein, The obtaining of the contribution degree of each of the data holders comprises: performing contribution degree evaluation on each of the data holders, and determining the contribution degree of each of the data holders according to a result of the contribution degree evaluation.
3. The method of claim 2, wherein, The contribution degree evaluation comprises at least one of: performing similarity calculation on local model data corresponding to each of the data holders and basic model data sent to each of the data holders in the previous round of model collaborative training; determining semantic information quality of each of the data holders according to data feature values sent by each of the data holders, wherein the data feature values are obtained by performing feature extraction on sample data in a local training sample set by the data holder; determining a proportion of a number of samples in the local training sample set of each of the data holders to a total number of samples.
4. The method of claim 2, wherein, The determining of the contribution degree of each of the data holders according to the result of the contribution degree evaluation comprises: for each of the data holders, performing weighted summation on sub-contribution degrees obtained by each item of contribution degree evaluation on the data holder to obtain the contribution degree of the data holder.
5. The method of claim 1, wherein, The determining of the data holders participating in the current round of model collaborative training according to the contribution degree of each of the data holders comprises: taking a data holder whose contribution degree is greater than or equal to a preset contribution threshold as a data holder participating in the current round of model collaborative training.
6. The method of claim 1, wherein, The determining of the data holders participating in the current round of model collaborative training according to the contribution degree of each of the data holders comprises: performing summation on the contribution degrees of each of the data holders to obtain a total contribution degree; for each of the data holders, determining a contribution proportion of the data holder according to a ratio of the contribution degree of the data holder to the total contribution degree; taking a data holder whose contribution proportion is greater than or equal to a preset proportion threshold as a data holder participating in the current round of model collaborative training.
7. The method of claim 1, wherein, The obtaining of the first basic model data according to the local model data of each of the data holders and the contribution degree of each of the data holders comprises: determining a weight of each of the data holders according to the contribution degree of each of the data holders; performing aggregation on the local model data of each of the data holders according to the weight of each of the data holders to obtain the first basic model data.
8. The method of claim 1, further comprising: sending, to the data holders participating in the current round of model collaborative training, a training number indicating the number of iterations for the data holders participating in the current round of model collaborative training to perform the current round of model collaborative training based on the first basic model data.
9. The method of claim 1, further comprising: in the current round of model collaborative training, determining whether a training termination condition is met; if the training termination condition is met, sending the second basic model data obtained in the current round of model collaborative training to the data holders participating in the current round of model collaborative training, so that the data holders participating in the current round of model collaborative training adjust the second basic model data based on the local training sample set to obtain fine-tuned model data.
10. The method of claim 1, further comprising: establishing and publishing a model collaborative training task of federated learning; receiving participation requests sent by the data holders willing to participate in the model collaborative training task; sending initial basic model data to the data holders corresponding to the participation requests, so that the data holders corresponding to the participation requests perform model collaborative training based on the local training sample set and the initial basic model data to obtain local model data.
11. The method of claim 9, wherein, The coordinator and the data holders are semantic agents; the first basic model data and the second basic model data are semantic knowledge bases common to all semantic agents; and the fine-tuned model data is an individualized semantic knowledge base formed after fine-tuning of the local training sample set.
12. The method of claim 1, wherein, The contribution degrees of the data holders are obtained by: receiving the contribution degrees of the data holders sent directly by the data holders.
13. A federated learning method for data holders, the method comprising: in each round of model collaborative training, sending, to a coordinator, local model data obtained in the previous round of model collaborative training, so that the coordinator obtains first basic model data based on the local model data sent by the data holders and the contribution degrees of the data holders; receiving the first basic model data sent by the coordinator and performing the current round of model collaborative training based on the first basic model data; wherein the data holders are data holders participating in the current round of model collaborative training determined by the coordinator based on the contribution degrees of the data holders, and the contribution degrees represent the value of the local model data provided by the data holders in the previous round of model collaborative training.
14. The method of claim 13, further comprising: sending at least one of a data feature value and a number of samples in the local training sample set to the coordinator, so that the coordinator evaluates the contribution degrees of the data holders based on at least one of the data feature value and the number of samples to determine the contribution degrees of the data holders; wherein the data feature value is obtained by the data holders after feature extraction of sample data in the local training sample set.
15. The method of claim 14, further comprising: performing feature extraction on each sample data in the local training sample set to obtain a feature vector corresponding to each sample data. align the feature vectors corresponding to the sample data, and obtain a feature matrix of the local training sample set according to the feature vectors corresponding to the aligned sample data; take the product of the feature matrix and the transpose of the feature matrix as a variable of a sqrt function to obtain the data eigenvalue through the sqrt function.
16. The method of claim 13, further comprising: receiving the number of training times sent by the coordinator; the model collaborative training based on the first basic model data comprises: performing the model collaborative training based on the first basic model data and the number of training times.
17. The method of claim 13, further comprising: receiving second basic model data sent by the coordinator, and adjusting the second basic model data based on the local training sample set to obtain fine-tuned model data.
18. The method of claim 17, wherein, The second basic model data is sent by the coordinator under the condition that a training termination condition is met.
19. The method of claim 17, further comprising: performing performance evaluation on the fine-tuned model data; if the fine-tuned model data meets a performance requirement, packaging the fine-tuned model data to obtain packaged fine-tuned model data.
20. The method of claim 17 or 19, further comprising: sending the fine-tuned model data to an affiliate of the data holder; and / or, sending the fine-tuned model data to a trusted party trusted by the data holder.
21. The method of claim 13, further comprising: after the coordinator publishes a model collaborative training task of federated learning, sending a participation request to the coordinator; receiving initial basic model data sent by the coordinator; performing model collaborative training based on the local training sample set and the initial basic model data to obtain local model data.
22. The method of claim 17, wherein, The coordinator and the data holder are both semantic agents; the first basic model data and the second basic model data are both semantic knowledge bases common to all semantic agents; and the fine-tuned model data is an individualized semantic knowledge base formed after fine-tuning by the local training sample set.
23. A federated learning device arranged in a coordinator, the device comprising: a receiving module configured to receive, in each round of model collaborative training, local model data obtained by a plurality of data holders in a previous round of model collaborative training; a first obtaining module configured to obtain a contribution degree of each of the data holders, the contribution degree being used to represent a value of local model data provided by the data holder in the previous round of model collaborative training; a second obtaining module configured to obtain first basic model data according to the local model data of each of the data holders and the contribution degree of each of the data holders; a sending module configured to determine data holders participating in the current round of model collaborative training according to the contribution degree of each of the data holders, and send the first basic model data to the data holders participating in the current round of model collaborative training, the first basic model data being used for the data holders participating in the current round of model collaborative training to perform the current round of model collaborative training.
24. A federated learning device arranged at a data holder, the device comprising: a sending module configured to send, in each round of model collaborative training, local model data obtained in a previous round of model collaborative training to a coordinator for the coordinator to obtain first base model data based on the local model data sent by each data holder and a contribution degree of each data holder; a receiving module configured to receive the first base model data sent by the coordinator and perform the current round of model collaborative training based on the first base model data. The data holder is a data holder participating in the current round of model collaborative training determined by the coordinator based on the contribution degree of each data holder, and the contribution degree is used to represent the value of the local model data provided by the data holder in the previous round of model collaborative training.
25. A communication device comprising a transceiver, a memory, and a processor, the memory storing a computer program, wherein, The processor, when executing the computer program, realizes the steps of the method of any one of claims 1 to 12 by controlling the transceiver.
26. A communication device comprising a transceiver, a memory, and a processor, the memory storing a computer program, wherein, The processor, when executing the computer program, realizes the steps of the method of any one of claims 13 to 22 by controlling the transceiver.
27. A computer readable storage medium having stored thereon a computer program, wherein, The computer program, when executed by the processor, realizes the steps of the method of any one of claims 1 to 12 or 13 to 22.
28. A computer program product comprising a computer program, wherein, The computer program, when executed by the processor, realizes the steps of the method of any one of claims 1 to 12 or 13 to 22.
Citation Information
Patent Citations
Fair privacy calculation method based on federated node contribution
CN116306910A
Federal learning method
CN116502707A
Byzantine robust federated learning method and system based on block chain
CN116796830A
Fair federal learning method based on node contribution clustering
CN117196058A
Federal learning security aggregation method based on cosine similarity and homomorphic encryption
CN117216779A