Efficient collaborative learning training method and device
By calculating the gradient mean and covariance matrix between the aggregation node and the local node, the optimal number of local updates is determined, the training efficiency of the artificial intelligence model is optimized, the problem of data islands and scarce transmission resources is solved, and efficient collaborative learning is achieved.
Patent Information
- Application Number
- CN202411289287.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-09-14
AI Technical Summary
In current artificial intelligence model training, due to the data island effect formed by the distribution of data resources among different social entities, the quantity and diversity of data are limited, which in turn limits the improvement of the ability of artificial intelligence algorithms, and the pressure of data transmission during multi-party collaborative training Huge, reducing the training efficiency of efficient collaborative learning.
By calculating the gradient mean and covariance matrix between the aggregation node and the local node, the optimal number of local updates of each local node is determined, and the aggregation algorithm is used to optimize the global model parameters, improve information transmission efficiency and gradient signal-to-noise ratio, and optimize Use of Internet transmission resources.
It improves the efficiency of information transmission, optimizes the gradient signal-to-noise ratio, improves the convergence speed of the collaborative learning model, solves the problems of data islands and scarce transmission resources, and achieves efficient collaborative learning.
Smart Images

Figure CN118798397A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of collaborative learning, and in particular to a training method and device for efficient collaborative learning. Background Art
[0002] As artificial intelligence technology gradually becomes an important part of people's daily life, the data resources that drive its development are gradually becoming the basic resources of social production. In the training of artificial intelligence models, rich and diverse data can inject more information into the model, so that the output model has more comprehensive and powerful transaction processing capabilities. However, the current data resources are distributed among different social entities such as individuals, enterprises and government units. The data island effect formed by them limits the amount and diversity of data, which fundamentally limits the improvement of the ability of artificial intelligence algorithms. In order to solve this problem, people began to introduce multi-party collaborative training methods. As one of the important means of data element circulation, collaborative learning attempts to break the data island and further release the potential value of data elements.
[0003] However, breaking data silos requires organizing, transmitting and aggregating data from multiple parties, which will put tremendous pressure on the use of Internet transmission resources. Especially when the number of participating nodes increases, the contradiction between huge transmission demand and scarce transmission resources will become more severe, which further reduces the training efficiency of efficient collaborative learning. Summary of the invention
[0004] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.
[0005] To this end, the first aspect of the present disclosure proposes an efficient collaborative learning training method, wherein the participants of the collaborative learning include an aggregation node and multiple local nodes, and the method includes the following steps: S1, sending the initial model parameters of the global model to each of the local nodes through the aggregation node to determine the local model of each of the local nodes, wherein the parameters of the local model are the initial model parameters; S2, using the local sample data on each of the local nodes to calculate the gradient mean vector and the covariance matrix of the gradient vector of the corresponding local model; S3, calculating a global gradient mean vector and a global covariance matrix according to the gradient mean vectors and the covariance matrix of the gradient vectors of the plurality of local models; S4, determining the optimal number of local updates of each local node according to the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model; S5, each of the local nodes performs local updates according to the respective optimal local update times, and uploads the updated model parameters of each local node to the aggregation node; S6, the aggregation node determines the model parameters of the global model according to the updated model parameters of the multiple local nodes.
[0006] In some embodiments of the present disclosure, the optimal number of local updates of each local node is determined by the following formula according to the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model:
[0007]
[0008] in, For the The optimal local time ratio of local nodes, is the global gradient mean vector, is the global covariance matrix, For the The mean gradient vector of the local model on the local nodes, For the The covariance matrix of the local model gradient vector on the local nodes, is the batch size, is the global update step size, For the The optimal number of local updates for each local node.
[0009] In some embodiments of the present disclosure, the aggregation node determines the model parameters of the global model according to the updated model parameters of the multiple local nodes, including: S61, the aggregation node performs an aggregation operation on the updated model parameters of the multiple local nodes using an aggregation algorithm to obtain a first model parameter of the global model; S62, determining the interaction rounds between the current aggregation node and the plurality of local nodes; S63, in response to the interaction round reaching a maximum interaction round, determining the first model parameter as a model parameter of the global model; or, S64, in response to the interaction round not reaching the maximum interaction round, taking the first model parameters as new initial model parameters, repeating steps S1-S5 and step S61 for training until the interaction round reaches the maximum interaction round, and determining the first model parameters as the model parameters of the global model.
[0010] In some embodiments of the present disclosure, the method also includes: comparing the optimal local update number of each local node with a quality assessment threshold; confirming the local nodes whose optimal local update number is greater than or equal to the quality assessment threshold as high-quality nodes, and confirming the local nodes whose optimal local update number is less than the quality assessment threshold as non-high-quality nodes.
[0011] The second aspect of the present disclosure provides a training device for efficient collaborative learning, wherein the participants of the collaborative learning include an aggregation node and a plurality of local nodes, including: A first determination module, configured to send the initial model parameters of the global model to each of the local nodes through the aggregation node to determine the local model of each of the local nodes, wherein the parameters of the local model are the initial model parameters; A second determination module is used to calculate the gradient mean vector and the covariance matrix of the gradient vector of the corresponding local model using the local sample data on each of the local nodes; A third determination module is used to calculate a global gradient mean vector and a global covariance matrix according to the gradient mean vectors and the covariance matrix of the gradient vectors of the plurality of local models; A fourth determination module, used to determine the optimal number of local updates of each local node according to the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model; An updating module, configured to perform local updates on each of the local nodes according to the respective optimal local update times, and upload the updated model parameters of each of the local nodes to the aggregation node; A fifth determination module is used for the aggregation node to determine the model parameters of the global model according to the updated model parameters of the multiple local nodes.
[0012] In some embodiments of the present disclosure, the fourth determination module is specifically used to determine the optimal number of local updates of each local node according to the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model by the following formula:
[0013]
[0014] in, For the The optimal local time ratio of local nodes, is the global gradient mean vector, is the global covariance matrix, For the The mean gradient vector of the local model on the local nodes, For the The covariance matrix of the local model gradient vector on the local nodes, is the batch size, is the global update step size, For the The optimal number of local updates for each local node.
[0015] In some embodiments of the present disclosure, the fifth determination module includes: An acquisition unit, configured to perform an aggregation operation on the updated model parameters of the plurality of local nodes using an aggregation algorithm at the aggregation node to obtain a first model parameter of the global model; A first determining unit, configured to determine an interaction round between the current aggregation node and the plurality of local nodes; The second determining unit is configured to determine the first model parameters as model parameters of the global model in response to the interaction round reaching a maximum interaction round.
[0016] In some embodiments of the present disclosure, the device also includes a quality assessment module; the quality assessment module is used to: compare the optimal local update number of each local node with a quality assessment threshold; confirm the local nodes whose optimal local update number is greater than or equal to the quality assessment threshold as high-quality nodes, and confirm the local nodes whose optimal local update number is less than the quality assessment threshold as non-high-quality nodes.
[0017] A third aspect of the present disclosure provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method described in the first aspect.
[0018] The fourth aspect of the present disclosure provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the method described in the first aspect.
[0019] The training method for efficient collaborative learning provided by the present disclosure uses the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model to allocate the optimal number of local updates to local nodes with different information richness. The local model updated with the optimal number of local updates can carry more effective information to the aggregation node, thereby improving the efficiency of information transmission, optimizing the gradient signal-to-noise ratio, improving the efficiency of the use of Internet transmission resources, and accelerating the convergence speed of the collaborative learning model.
[0020] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which: Figure 1 A flowchart of an efficient collaborative learning training method provided by an embodiment of the present disclosure; Figure 2 A schematic diagram of a collaborative learning business scenario provided by an embodiment of the present disclosure; Figure 3 A schematic diagram of an efficient collaborative learning training device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0023] Specifically, the training method and device for efficient collaborative learning according to an embodiment of the present disclosure are described below with reference to the accompanying drawings.
[0024] The purpose of collaborative learning technology is to aggregate data information from multiple parties while ensuring the data privacy of all parties involved, so as to train an artificial intelligence model with comprehensive capabilities and superior effects. In the next generation of Internet application security fields such as malicious traffic detection and risk fraud detection, intelligent models based on collaborative learning have shown good performance. In the process of multi-party collaboration, since the original data contains all data information, including effective information related to the target task and privacy information related to privacy security, the strategy of directly sharing data will cause greater privacy risks. In this case, collaborative learning technology sends the optimization process to the local of each participating user. Specifically, the aggregation node in the collaborative learning participant sends a global model to the local of each participant, and then the participants use the local training data to optimize the sent model multiple times. Finally, the participants upload the optimized results to the aggregation node. Since the uploaded model interacts with the original data during the local training process, the uploaded model will contain the information of the original data; at the same time, since this uploaded information is processed data information, it contains less privacy information, so it takes into account privacy security and can promote the circulation of data value on the basis of respecting individual privacy.
[0025] Due to local processing, the aggregation node cannot understand the data information of each participating user in detail through the uploaded model, which will affect the efficiency of information aggregation. At the same time, each participant is unable to understand the global goal, which will cause the uploaded model to carry too much information irrelevant to the task, thereby reducing the information transmission efficiency of a single model transmission, and further reducing the training efficiency of the collaborative learning model. To this end, the present disclosure proposes a training method and device for efficient collaborative learning, which specifically involves research fields such as next-generation Internet application security, cyberspace security, artificial intelligence security, and data element circulation. According to the gradient vector of each local node, the optimal number of local updates is allocated to local nodes with different information richness, so that they can carry more effective information and upload it to the aggregation node during model transmission, thereby improving information transmission efficiency.
[0026] Figure 1 The flowchart of an efficient collaborative learning training method provided by the embodiment of the present disclosure is shown in FIG. The participants of the collaborative learning include an aggregation node and multiple local nodes. Figure 1 As shown, the training method for efficient collaborative learning may include the following steps: Step 101: Initial model parameters of the global model are sent to each local node through the aggregation node to determine the local model of each local node. The parameters of the local model are the initial model parameters.
[0027] It should be noted that if the current training is the first round of training, the preset random initialization function can be used to set the initial model parameters. If the current training is not the first round of training, the existing initial model parameters can be directly sent. .
[0028] Step 102, using the local sample data on each local node, calculates the gradient mean vector and the covariance matrix of the gradient vector corresponding to the local model.
[0029] In one implementation, the gradient mean vector and the covariance matrix of the gradient vector of each local model may be determined by the conditional expectation theorem through the following steps: Step a1: The local nodes sample the data set, sample B local sample data, and construct the sample set Among them, 1 , is the number of local nodes, and B is the batch size for training the aggregation nodes.
[0030] Step a2, using The local node Local sample data ( Calculate the The local model of the local node is The gradient vector at :
[0031] in, To utilize the The local node The corresponding local model (model parameters are ), Set the training loss function for the aggregation node.
[0032] Step a3, according to The gradient vector calculated for each local sample data on the local node is calculated The mean gradient vector of local nodes:
[0033] in, For the The mean gradient vector of the local model corresponding to the local nodes.
[0034] Step a4, according to the gradient vector and gradient mean vector calculated in step a3, calculate the first The covariance matrix of the local nodes :
[0035] Step a5, The local nodes upload the mean vector and covariance matrix obtained in step a3 and step a4 to the aggregation node to form a mean vector set and the covariance matrix set .
[0036] Step 103, calculating a global gradient mean vector and a global covariance matrix according to the gradient mean vectors and the covariance matrix of the gradient vectors of multiple local models.
[0037] In one implementation, after each local node confirms the gradient mean vector and the covariance matrix of the gradient vector of its own local model, it uploads the gradient mean vector and the covariance matrix of the gradient vector to the aggregation node. The aggregation node can use the gradient mean vector and the covariance matrix uploaded by each party to determine the global gradient mean vector and the global covariance matrix through the following steps: Step b1, calculate the global gradient vector using the mean vector set and user importance:
[0038] in, is the global gradient mean vector, Set the corresponding node importance for each participating user for the aggregation node (i.e. node importance of local nodes), For the The mean gradient vector of the local model corresponding to the local nodes.
[0039] Step b2, using the mean vector set , covariance set And the covariance matrix of the global gradient calculated by user importance:
[0040] in, is the global covariance matrix, For the The node importance of each local node, For the The covariance matrix of local nodes, For the The mean gradient vector of the local model corresponding to the local nodes, is the global gradient mean vector.
[0041] Step 104, determining the optimal number of local updates for each local node according to the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model.
[0042] In some embodiments of the present disclosure, the similarity between the global gradient and the gradient of each node can be used to characterize the information richness of each local node. If the similarity is higher than a certain threshold, the corresponding node can be determined as an information-rich local node, and if the similarity is lower than a certain threshold, the corresponding node can be determined as an information-poor local node. The optimal number of local updates is assigned to each node based on the similarity between the global gradient and the gradient of each node. For information-rich local nodes, it is desirable to maintain a high number of updates so that their corresponding local models can carry more information in multiple updates, thereby improving the information transmission efficiency of a single model transmission. For information-poor local nodes, it is desirable to reduce the number of updates to avoid noise problems caused by multiple updates to less data, which affects the training of efficient collaborative learning.
[0043] In one implementation, based on the above idea, the following formula can be derived to determine the optimal number of local updates for each local node according to the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model:
[0044]
[0045] in, For the The optimal local frequency ratio of local nodes (or can also be understood as the optimal gradient signal-to-noise ratio), is the global gradient mean vector, is the global covariance matrix, For the The mean gradient vector of the local model on the local nodes, For the The covariance matrix of the local model gradient vector on the local nodes, is the batch size, is the global update step size, For the The optimal number of local updates for each local node. Determine the optimal number of local updates After that, the aggregation node sends the optimal local update times of different nodes to the corresponding nodes, and each local node determines the optimal local update times of each local node according to the optimal local update times ratio. .
[0046] Figure 2 A schematic diagram of a collaborative learning business scenario provided by an embodiment of the present disclosure. Figure 2As shown, by implementing the training method of efficient collaborative learning of this embodiment, based on the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model, the difference between the global gradient and the gradient of each node is utilized, and the optimal number of local updates is allocated to local nodes with different information richness without providing other information. This allows information-rich local nodes to carry more information when uploading updated model parameters to the aggregation node through multiple updates, and avoids information-poor local nodes from carrying too much task-irrelevant information in a single model transmission, thereby optimizing the data transmission signal-to-noise ratio. Each local node can use the maximum information transmission capacity in the current state to transmit information, that is, maximize the signal-to-noise ratio, thereby achieving the purpose of improving the efficiency of transmission resource utilization.
[0047] Step 105 : Each local node performs local update according to its own optimal local update number, and uploads the updated model parameters of each local node to the aggregation node.
[0048] Step 106: The aggregation node determines the model parameters of the global model according to the updated model parameters of the multiple local nodes.
[0049] In some embodiments of the present disclosure, after receiving the updated model parameters of each local node, the aggregation node uses an aggregation algorithm to perform aggregation operations on the updated model parameters of multiple local nodes to obtain the first model parameters of the global model. The interaction rounds between the current aggregation node and the multiple local nodes are determined. If the interaction rounds reach the maximum interaction round R, the first model parameters are determined as the model parameters of the global model. If the interaction rounds do not reach the maximum interaction round R, the first model parameters are used as new initial model parameters, and steps S1-S5 and step S61 are repeatedly executed for training until the interaction rounds reach the maximum interaction rounds, and the first model parameters are determined as the model parameters of the global model.
[0050] Optionally, in some embodiments of the present disclosure, the optimal number of local updates can also be used to evaluate the information quality of each local node. In a possible implementation, the optimal number of local updates of each local node can be compared with a quality evaluation threshold. Local nodes whose optimal number of local updates is greater than or equal to the quality evaluation threshold are identified as high-quality nodes with rich information, and local nodes whose optimal number of local updates is less than the quality evaluation threshold are identified as non-high-quality nodes with poor information, thereby further promoting the efficient circulation and use of data resources.
[0051] By implementing the embodiments of the present disclosure, the process of uploading the model is regarded as an information transmission process, thereby converting the local training process of collaborative learning into an optimization problem of information transmission efficiency. The global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model are used to allocate the optimal number of local updates to local nodes with different information richness. The local model updated with the optimal number of local updates can carry more valid information to the aggregation node, thereby improving the information transmission efficiency, optimizing the gradient signal-to-noise ratio, improving the utilization efficiency of Internet transmission resources, and accelerating the convergence speed of the collaborative learning model.
[0052] Figure 3 Schematic diagram of an efficient collaborative learning training device provided by an embodiment of the present disclosure. The participants in the collaborative learning include an aggregation node and multiple local nodes. Figure 3 As shown, the training device for efficient collaborative learning includes: a first determination module 301 , a second determination module 302 , a third determination module 303 , a fourth determination module 304 , an updating module 305 and a fifth determination module 306 .
[0053] The first determination module 301 is used to send the initial model parameters of the global model to each local node through the aggregation node to determine the local model of each local node, and the parameters of the local model are the initial model parameters.
[0054] The second determination module 302 is used to calculate the gradient mean vector and the covariance matrix of the gradient vector corresponding to the local model by using the local sample data on each local node.
[0055] The third determination module 303 is used to calculate a global gradient mean vector and a global covariance matrix according to the gradient mean vectors and the covariance matrix of the gradient vectors of multiple local models.
[0056] The fourth determination module 304 is used to determine the optimal local update number of each local node according to the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model.
[0057] The updating module 305 is used for each local node to perform local updates according to its own optimal local update number, and upload the updated model parameters of each local node to the aggregation node.
[0058] The fifth determination module 306 is used for the aggregation node to determine the model parameters of the global model according to the model parameters updated by the multiple local nodes.
[0059] In some embodiments of the present disclosure, the fourth determination module 304 is specifically used to determine the optimal number of local updates for each local node according to the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model by the following formula:
[0060]
[0061] in, For the The optimal local time ratio of local nodes, is the global gradient mean vector, is the global covariance matrix, For the The mean gradient vector of the local model on the local nodes, For the The covariance matrix of the local model gradient vector on the local nodes, is the batch size, is the global update step size, For the The optimal number of local updates for each local node.
[0062] In some embodiments of the present disclosure, the fifth determination module 306 includes: An acquisition unit, configured to perform an aggregation operation on the updated model parameters of multiple local nodes using an aggregation algorithm at an aggregation node to obtain a first model parameter of a global model; A first determining unit, used to determine the interaction rounds between the current aggregation node and the multiple local nodes; The second determining unit is configured to determine the first model parameter as a model parameter of the global model in response to the interaction round reaching a maximum interaction round.
[0063] In some embodiments of the present disclosure, if the interaction round does not reach the maximum interaction round, the first model parameters are used as new initial model parameters, and the steps in the first determination module 301, the second determination module 302, the third determination module 303, the fourth determination module 304, the update module 305 and the acquisition unit are repeatedly executed for training until the interaction round reaches the maximum interaction round, and the first model parameters are determined as the model parameters of the global model.
[0064] In some embodiments of the present disclosure, the training device for efficient collaborative learning is as follows: Figure 3On the basis shown, a quality assessment module may also be included. The quality assessment module is used to: compare the optimal local update number of each local node with the quality assessment threshold; confirm the local node whose optimal local update number is greater than or equal to the quality assessment threshold as a high-quality node, and confirm the local node whose optimal local update number is less than the quality assessment threshold as a non-high-quality node.
[0065] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0066] In order to implement the above embodiments, the present disclosure also proposes an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.
[0067] In order to implement the above embodiments, the present disclosure further proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.
[0068] In order to implement the above embodiments, the present disclosure also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.
[0069] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this disclosure shall comply with the relevant laws and regulations and shall not violate public order and good morals.
[0070] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0071] The present disclosure anticipates providing implementation schemes for users to selectively block the use or access of personal information data. That is, the present disclosure anticipates providing hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, risks can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.
[0072] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they contradict each other.
[0073] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0074] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.
[0075] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0076] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0077] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0078] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0079] The storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.
Claims
1. A training method for efficient collaborative learning, wherein the participants of the collaborative learning include an aggregation node and multiple local nodes, characterized in that: The method comprises the following steps: S1, sending the initial model parameters of the global model to each of the local nodes through the aggregation node to determine the local model of each of the local nodes, wherein the parameters of the local model are the initial model parameters; S2, using the local sample data on each of the local nodes to calculate the gradient mean vector and the covariance matrix of the gradient vector of the corresponding local model; S3, calculating a global gradient mean vector and a global covariance matrix according to the gradient mean vectors and the covariance matrix of the gradient vectors of the plurality of local models; S4, determining the optimal number of local updates of each local node according to the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model; S5, each of the local nodes performs local updates according to the respective optimal local update times, and uploads the updated model parameters of each local node to the aggregation node; S6, the aggregation node determines the model parameters of the global model according to the updated model parameters of the multiple local nodes.
2. The method according to claim 1, characterized in that According to the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model, the optimal local update number of each local node is determined by the following formula: in, For the The optimal local time ratio of local nodes, is the global gradient mean vector, is the global covariance matrix, For the The mean gradient vector of the local model on the local nodes, For the The covariance matrix of the local model gradient vector on the local nodes, is the batch size, is the global update step size, For the The optimal number of local updates for each local node.
3. The method according to claim 1, characterized in that The aggregation node determines the model parameters of the global model according to the updated model parameters of the multiple local nodes, including: S61, the aggregation node performs an aggregation operation on the updated model parameters of the multiple local nodes using an aggregation algorithm to obtain a first model parameter of the global model; S62, determining the interaction rounds between the current aggregation node and the plurality of local nodes; S63, in response to the interaction round reaching a maximum interaction round, determining the first model parameter as a model parameter of the global model; or, S64, in response to the interaction round not reaching the maximum interaction round, taking the first model parameters as new initial model parameters, repeating steps S1-S5 and step S61 for training until the interaction round reaches the maximum interaction round, and determining the first model parameters as the model parameters of the global model.
4. The method according to claim 1, characterized in that: Also includes: Comparing the optimal number of local updates of each of the local nodes with a quality assessment threshold; A local node whose optimal local update number is greater than or equal to the quality evaluation threshold is confirmed as a high-quality node, and a local node whose optimal local update number is less than the quality evaluation threshold is confirmed as a non-high-quality node.
5. A training device for efficient collaborative learning, wherein the participants of the collaborative learning include an aggregation node and multiple local nodes, characterized in that: include: A first determination module, configured to send the initial model parameters of the global model to each of the local nodes through the aggregation node to determine the local model of each of the local nodes, wherein the parameters of the local model are the initial model parameters; A second determination module is used to calculate the gradient mean vector and the covariance matrix of the gradient vector of the corresponding local model using the local sample data on each of the local nodes; A third determination module is used to calculate a global gradient mean vector and a global covariance matrix according to the gradient mean vectors and the covariance matrix of the gradient vectors of the plurality of local models; A fourth determination module, used to determine the optimal number of local updates of each local node according to the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model; An updating module, configured to perform local updates on each of the local nodes according to the respective optimal local update times, and upload the updated model parameters of each of the local nodes to the aggregation node; A fifth determination module is used for the aggregation node to determine the model parameters of the global model according to the updated model parameters of the multiple local nodes.
6. The device according to claim 5, characterized in that The fourth determination module is specifically used to determine the optimal local update number of each local node according to the global gradient mean vector, the global covariance matrix, and the gradient mean vector and the covariance matrix of the gradient vector of each local model by the following formula: in, For the The optimal local time ratio of local nodes, is the global gradient mean vector, is the global covariance matrix, For the The mean gradient vector of the local model on the local nodes, For the The covariance matrix of the local model gradient vector on the local nodes, is the batch size, is the global update step size, For the The optimal number of local updates for each local node.
7. The device according to claim 5, characterized in that The fifth determining module comprises: An acquisition unit, configured to perform an aggregation operation on the updated model parameters of the plurality of local nodes using an aggregation algorithm at the aggregation node to obtain a first model parameter of the global model; A first determining unit, configured to determine an interaction round between the current aggregation node and the plurality of local nodes; The second determining unit is configured to determine the first model parameters as model parameters of the global model in response to the interaction round reaching a maximum interaction round.
8. The device according to claim 5, characterized in that It also includes a quality assessment module; the quality assessment module is used to: Comparing the optimal number of local updates of each of the local nodes with a quality assessment threshold; A local node whose optimal local update number is greater than or equal to the quality evaluation threshold is confirmed as a high-quality node, and a local node whose optimal local update number is less than the quality evaluation threshold is confirmed as a non-high-quality node.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 4 when executed by a processor.
Citation Information
Patent Citations
Equipment detection method and device based on neural network, computer equipment and medium
CN116390139A
Information processing method and communication device
CN116882487A
Method and device for preventing member reasoning attack and nonvolatile storage medium
CN117057428A
Robust training method and device for collaborative learning
CN117150566A
Multi-party collaborative optimization-oriented data privacy enhancement method and device
CN117371046A
