Pruning-based federal learning model aggregation arrangement method and system
By monitoring and analyzing model training logs, identifying and filtering weight layers, and performing pruning and extraction, the problem of high resource consumption and impact on learning effects in federated learning is solved, achieving more efficient model aggregation and reducing costs.
Patent Information
- Application Number
- CN202410608142.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-09-06
AI Technical Summary
Federated learning consumes a large amount of encryption computing resources and communication resources during the model aggregation process, resulting in high resource costs that are difficult to reduce. There are also problems with model consistency and learning effects.
By monitoring and analyzing model training logs, we can identify and distinguish the training status feature information of the weight layer, screen the weight layer that meets the preset learning status conditions, perform pruning and extraction, reduce unnecessary weight layer aggregation, and reduce the amount of model transmission data and Resource consumption.
It improves the reliability of model aggregation, reduces the consumption of encryption and communication resources, and reduces the overall cost of federated learning.
Smart Images

Figure CN118607616A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of neural networks, and in particular to a method and system for aggregating and organizing federated learning models based on pruning. Background Art
[0002] Federated learning technology uses distributed training, weight upload aggregation and other operation steps to enable all participants in federated learning to use their own data for joint modeling without sharing data, thus achieving collaborative training of neural network models and breaking down data silos. Since training is distributed and each participant in federated learning has the need for data confidentiality, the model needs to be encrypted and decrypted in a complex manner during transmission. The model consumes a large amount of communication resources during the aggregation process, and the problem of model consistency needs to be dealt with. This places high demands on the hardware performance of federated learning, requiring a large amount of encryption computing resources and communication resources as support for federated learning, and cannot reduce the resource cost of federated learning. Summary of the invention
[0003] The purpose of the present invention is to provide a method and system for aggregating and organizing federated learning models based on pruning, which monitors model training logs from all model training ends participating in federated learning, analyzes the model training logs, obtains training state feature information of all weight layers under the model trained by the model training end, and accurately identifies the training process of the weight layer; based on the training state feature information, it screens weight layers that meet preset learning state conditions, and distinguishes them into first-class weight layers and second-class weight layers, thereby identifying weight layers with poor and good learning effects, and providing a reliable idea for subsequent pruning and aggregation of weight layers; it also prunes the first-class weight layers and extracts the second-class weight layers to obtain a model that has completed aggregation and organization, accurately screens weight layers for aggregation, avoids aggregating weights with poor learning effects and affects the reliability of aggregation, and can also reduce the amount of model transmission data and the consumption of encryption resources and communication resources, thereby reducing the cost of federated learning.
[0004] The present invention is achieved through the following technical solutions:
[0005] The aggregation and organization method of federated learning models based on pruning includes:
[0006] Monitor all model training terminals participating in federated learning to obtain model training logs of all model training terminals; analyze the model training logs to obtain training status feature information of all weight layers under the model trained by the model training terminals;
[0007] Based on the training state characteristic information, all weight layers that meet the preset learning state conditions are screened; parameter update states of all weight layers that meet the preset learning state conditions are identified, thereby distinguishing a number of first-type weight layers and a number of second-type weight layers;
[0008] All first-class weight layers within the model are pruned, and all second-class weight layers within the model are extracted to obtain a model that has completed aggregation and organization; based on the running information of the federated learning, the models that have completed aggregation and organization at all model training ends are aggregated.
[0009] Optionally, all model training terminals participating in federated learning are monitored to obtain model training logs of all model training terminals; the model training logs are analyzed to obtain training status feature information of all weight layers of the model trained by the model training terminals, including:
[0010] Based on the network address information of all model training terminals participating in federated learning, the training process of the model training terminals is monitored to obtain the model training logs corresponding to the model training operations that have been executed by all model training terminals;
[0011] The model training log is analyzed to obtain the training operation process status information of all weight layers under the model trained by the model training end, which has completed the training operation process during the training process, and use this as the training status feature information.
[0012] Optionally, monitor all model training terminals participating in federated learning to obtain the model training logs of all model training terminals, including:
[0013] Step S1, using the following formula (1), based on the monitoring of all model training terminals participating in federated learning, controls the normal generation cycle of all normal model training logs.
[0014]
[0015] In the above formula (1), T p Indicates the normal generation cycle of all model training logs, that is, each model training end is generated according to T p After a certain length of time, a normal model training log is generated, where T p The unit is hours; T(a) represents the time from input to output of each data when the a-th model training end is monitoring, where T(a) is in seconds; n represents the total number of model training ends; It means to find the maximum value of the duration from input to output of each data when monitoring all model training ends; INT*+ means to round down the value in brackets;
[0016] Step S2, using the following formula (2), according to the time node of the special event of each model training end participating in the federated learning, generate the node model training log generation cycle of each model training end,
[0017]
[0018] In the above formula (2), T J (a) represents the node model training log generation cycle of the a-th model training end; t k (a) represents the time node of the kth special event at the ath model training end; t k+1 (a) represents the time node of the k+1th special event of the ath model training end; m represents the total number of special events generated by the ath model training end until the current moment; It means to substitute the value of k from 1 to m-1 into t k+1 (a)-t k (a) obtains the minimum value among all the values after substitution;
[0019] Step S3, using the following formula (3), according to the node model training log generation cycle of each model training end and the common generation cycle of all common model training logs, each model training log that is repeatedly generated is eliminated.
[0020] Y(a)={(x∈Z)&&(y∈Z)&&[x×T p =y×T J (a)]}|y(3)
[0021] In the above formula (3), Y(a) means to control and eliminate the node logs generated by the a-th model training end in the Y(a)-th cycle; Z represents a set of positive integers; x and y both represent variables; {(x∈Z)&&(y∈Z)&&[x×T p =y×T J (a)]}|y represents the calculation of the p =y×T J (a) The value of y when x and y are both positive integers; && represents the logical relationship and.
[0022] Optionally, based on the training state characteristic information, all weight layers that meet the preset learning state conditions are screened; parameter update states of all weight layers that meet the preset learning state conditions are identified, thereby distinguishing and obtaining a plurality of first-type weight layers and a plurality of second-type weight layers, including:
[0023] Based on the completed training operation process status information, the type information and quantity information of the completed training operations of the weight layer in the training process are obtained; based on the type information and the quantity information, it is determined whether the weight layer has completed all training operations within a model learning cycle, and if so, it is determined that the weight layer meets the preset learning state condition; if not, it is determined that the weight layer does not meet the preset learning state condition;
[0024] Based on the parameter update records of all weight layers that meet the preset learning state conditions, the parameter update speed status information of all weight layers that meet the preset learning state conditions is determined; then based on the parameter update speed status information, the average parameter update speed of all weight layers that meet the preset learning state conditions is determined; the average parameter update speed is compared with the preset update speed threshold; if the average parameter update speed is less than the preset update speed threshold, it is determined that the corresponding weight layer belongs to the first type of weight layer; otherwise, it is determined that the corresponding weight layer belongs to the second type of weight layer.
[0025] Optionally, pruning all first-class weight layers within the model and extracting all second-class weight layers within the model to obtain a model that has completed aggregation and organization; based on the running information of the federated learning, aggregating the models that have completed aggregation and organization at all model training ends, including:
[0026] Based on the network position information of all first-class weight layers connected to the model, the corresponding connection neuron node positions of all first-class weight layers in the model are determined; based on the connection neuron node positions, all first-class weight layers in the model are pruned; and based on the weight information of all second-class weight layers in the model, all second-class weight layers are extracted, so as to obtain a model that has been completed and aggregated;
[0027] The learning log of the federated learning is analyzed to determine whether all model training terminals participating in the federated learning have completed the corresponding learning and training tasks; if so, all model training terminals complete the aggregation and sorting of the models for aggregation.
[0028] The federated learning model aggregation and organization system based on pruning includes:
[0029] The training end monitoring module is used to monitor all model training ends participating in federated learning and obtain the model training logs of all model training ends;
[0030] A training state identification module is used to analyze the model training log to obtain the training state characteristic information of all weight layers under the model trained by the model training end;
[0031] A weight layer screening module, used to screen all weight layers that meet preset learning state conditions based on the training state feature information;
[0032] A weight layer distinguishing module is used to identify the parameter update state of all weight layers that meet the preset learning state conditions, thereby distinguishing a number of first-class weight layers and a number of second-class weight layers;
[0033] A pruning and aggregation execution module, used to prune all first-class weight layers within the model and extract all second-class weight layers within the model, so as to obtain a model that completes aggregation and arrangement;
[0034] The joint modeling execution module is used to aggregate the models that have been aggregated and sorted by all model training ends based on the operation information of the federated learning.
[0035] Optionally, the training end monitoring module is used to monitor all model training ends participating in federated learning, and obtain the model training logs of all model training ends, including:
[0036] Based on the network address information of all model training terminals participating in federated learning, the training process of the model training terminals is monitored to obtain the model training logs corresponding to the model training operations that have been executed by all model training terminals;
[0037] The training state identification module is used to analyze the model training log to obtain the training state feature information of all weight layers under the model trained by the model training end, including:
[0038] The model training log is analyzed to obtain the training operation process status information of all weight layers under the model trained by the model training end, which has completed the training operation process during the training process, and use this as the training status feature information.
[0039] Optionally, the weight layer screening module is used to screen all weight layers that meet preset learning state conditions based on the training state feature information, including:
[0040] Based on the completed training operation process status information, the type information and quantity information of the completed training operations of the weight layer in the training process are obtained; based on the type information and the quantity information, it is determined whether the weight layer has completed all training operations within a model learning cycle, and if so, it is determined that the weight layer meets the preset learning state condition; if not, it is determined that the weight layer does not meet the preset learning state condition;
[0041] The weight layer distinguishing module is used to identify the parameter update state of all weight layers that meet the preset learning state conditions, thereby distinguishing a number of first-type weight layers and a number of second-type weight layers, including:
[0042] Based on the parameter update records of all weight layers that meet the preset learning state conditions, the parameter update speed status information of all weight layers that meet the preset learning state conditions is determined; then based on the parameter update speed status information, the average parameter update speed of all weight layers that meet the preset learning state conditions is determined; the average parameter update speed is compared with the preset update speed threshold; if the average parameter update speed is less than the preset update speed threshold, it is determined that the corresponding weight layer belongs to the first type of weight layer; otherwise, it is determined that the corresponding weight layer belongs to the second type of weight layer.
[0043] Optionally, the pruning and aggregation execution module is used to prune all first-type weight layers within the model and extract all second-type weight layers within the model, so as to obtain a model that completes aggregation and arrangement, including:
[0044] Based on the network position information of all first-class weight layers connected to the model, the corresponding connection neuron node positions of all first-class weight layers in the model are determined; based on the connection neuron node positions, all first-class weight layers in the model are pruned; and based on the weight information of all second-class weight layers in the model, all second-class weight layers are extracted, so as to obtain a model that has been completed and aggregated;
[0045] The joint modeling execution module is used to aggregate the models aggregated and sorted by all model training terminals based on the operation information of the federated learning, including:
[0046] The learning log of the federated learning is analyzed to determine whether all model training terminals participating in the federated learning have completed the corresponding learning and training tasks; if so, all model training terminals complete the aggregation and sorting of the models for aggregation.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] The pruning-based federated learning model aggregation and organization method and system provided in the present application monitors the model training logs from all model training terminals participating in the federated learning, analyzes the model training logs, obtains the training state feature information of all weight layers under the model trained by the model training terminal, and accurately identifies the training process of the weight layer; based on the training state feature information, the weight layers that meet the preset learning state conditions are screened, and they are divided into the first type of weight layers and the second type of weight layers, from which the weight layers with poor and good learning effects are identified, providing a reliable idea for the subsequent pruning and aggregation of the weight layers; the first type of weight layers are pruned, and the second type of weight layers are extracted, so as to obtain a model that has been completed and aggregated, accurately screen the weight layers to be aggregated, avoid aggregating weights with poor learning effects and affecting the reliability of aggregation, and can also reduce the amount of data transmitted by the model and the consumption of encryption resources and communication resources, thereby reducing the cost of federated learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0050] Figure 1 A schematic diagram of the flow of the pruning-based federated learning model aggregation and organization method provided by the present invention.
[0051] Figure 2 A schematic diagram of the structure of the pruning-based federated learning model aggregation and organization system provided by the present invention. DETAILED DESCRIPTION
[0052] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some structures related to the present application are shown in the accompanying drawings, rather than all structures. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0053] The terms "including" and "having" and any variations thereof in this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0054] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0055] See also Figure 1 As shown, an embodiment of the present application provides a method for aggregating and organizing federated learning models based on pruning. The method for aggregating and organizing federated learning models based on pruning includes:
[0056] Monitor all model training terminals participating in federated learning to obtain the model training logs of all model training terminals; analyze the model training logs to obtain the training status feature information of all weight layers under the model trained by the model training terminal;
[0057] Based on the training state characteristic information, all weight layers that meet the preset learning state conditions are screened; parameter update states of all weight layers that meet the preset learning state conditions are identified, thereby distinguishing a number of first-type weight layers and a number of second-type weight layers;
[0058] All first-class weight layers within the model are pruned, and all second-class weight layers within the model are extracted to obtain a model that has completed aggregation and organization. Based on the running information of the federated learning, the models that have completed aggregation and organization on all model training ends are aggregated.
[0059] The beneficial effects of the above embodiments are as follows: the pruning-based federated learning model aggregation and organization method obtains model training logs from all model training terminals participating in federated learning, and analyzes the model training logs to obtain the training state feature information of all weight layers under the model trained by the model training terminal, and accurately identifies the training process of the weight layer; based on the training state feature information, the weight layers that meet the preset learning state conditions are screened, and they are divided into the first type of weight layers and the second type of weight layers, from which the weight layers with poor and good learning effects are identified, providing a reliable idea for the subsequent pruning and aggregation of the weight layers; the first type of weight layers are pruned, and the second type of weight layers are extracted to obtain a model that has completed aggregation and organization, accurately screen the weight layers to be aggregated, avoid aggregating weights with poor learning effects and affecting the reliability of aggregation, and can also reduce the amount of model transmission data and the consumption of encryption resources and communication resources, thereby reducing the cost of federated learning.
[0060] In another embodiment, all model training terminals participating in federated learning are monitored to obtain model training logs of all model training terminals; the model training logs are analyzed to obtain training status feature information of all weight layers of the model trained by the model training terminal, including:
[0061] Based on the network address information of all model training terminals participating in federated learning, the training process of the model training terminal is monitored to obtain the model training logs corresponding to the model training operations that have been executed by all model training terminals;
[0062] The model training log is analyzed to obtain the training operation process status information of all weight layers under the model trained by the model training end, which has completed the training operation process during the training process, and use this as the training status feature information.
[0063] The beneficial effect of the above embodiment is that in the process of federated learning, all model training terminals participating in the federated learning independently use their own data to perform model training, and each training model terminal will train the network layer inside the model during the independent model training process. Whenever the network layer completes a training, parameter updates and changes will occur, and the speed of parameter update changes is positively correlated with the learning effect of the network layer, that is, when the learning effect of the network layer is better, its parameter update changes faster. In addition, the model training terminal will form a corresponding model training log during the model training process, and the model training log comprehensively and accurately records the training operation information of the model training terminal. For this purpose, the network address information of all model training terminals participating in the federated learning is used as a sharp turn, and all model training terminals are respectively monitored to obtain the model training operations that have been executed by each, so that the training information that the model has accepted can be accurately extracted. Then the model training log is analyzed to obtain the training operation process status information of all weight layers under the model corresponding to the training of the model training terminal, so as to quantify and determine the training type and number of trainings that have been executed by the model training terminal for the corresponding model, and provide a reliable basis for the training integrity of the subsequent recognition model.
[0064] In another embodiment, all model training terminals participating in federated learning are monitored to obtain respective model training logs of all model training terminals, including:
[0065] Step S1, using the following formula (1), based on monitoring of all model training terminals participating in federated learning, controls the normal generation cycle of all normal model training logs.
[0066]
[0067] In the above formula (1), T p Indicates the normal generation cycle of all model training logs, that is, each model training end is generated according to T p After a certain length of time, a normal model training log is generated, where T p The unit is hours; T(a) represents the time from input to output of each data when the a-th model training end is monitoring, where T(a) is in seconds; n represents the total number of model training ends; It means to find the maximum value of the time from input to output of each data when monitoring all model training ends; INT*+ means to round down the value in the brackets;
[0068] Step S2, using the following formula (2), according to the time node of the special event of each model training end participating in the federated learning, generate the node model training log generation cycle of each model training end,
[0069]
[0070] In the above formula (2), T J (a) represents the node model training log generation cycle of the a-th model training end; t k (a) represents the time node of the kth special event at the ath model training end; t k+1 (a) represents the time node of the k+1th special event of the ath model training end; m represents the total number of special events generated by the ath model training end until the current moment; It means to substitute the value of k from 1 to m-1 into t k+1 (a)-t k (a) obtains the minimum value among all the values after substitution;
[0071] Step S3, using the following formula (3), according to the node model training log generation cycle of each model training end and the common generation cycle of all common model training logs, each model training log that is repeatedly generated is eliminated.
[0072] Y(a)={(x∈Z)&&(y∈Z)&&[x×T p =y×T J (a)]}|y(3)
[0073] In the above formula (3), Y(a) means to control and eliminate the node logs generated by the a-th model training end in the Y(a)-th cycle; Z represents a set of positive integers; x and y both represent variables; {(x∈Z)&&(y∈Z)&&[x×T p =y×T J (a)]}|y represents the calculation of the p =y×T J (a) The value of y when x and y are both positive integers; && represents the logical relationship and.
[0074] The beneficial effect of the above embodiment is that the above formula (1) is used to control the normal generation cycle of all common model training logs according to the monitoring of all model training terminals participating in federated learning, thereby ensuring that logs can be output according to time nodes of integer hours when no special events are generated, thereby ensuring the overall reliable operation of the system; then the above formula (2) is used to generate the node model training log generation cycle of each model training terminal according to the time node situation of the special events of each model training terminal participating in federated learning, thereby including the single time node of the special event in the periodic generation log as much as possible, which is convenient for the subsequent reliable analysis of the log; then the above formula (3) is used to eliminate each model training log that is repeatedly generated according to the node model training log generation cycle of each model training terminal and the normal generation cycle of all common model training logs, thereby automatically removing the duplication and reducing the complexity of the subsequent analysis of the system.
[0075] In another embodiment, based on the training state characteristic information, all weight layers that meet the preset learning state conditions are screened; parameter update states of all weight layers that meet the preset learning state conditions are identified, thereby distinguishing and obtaining a plurality of first-type weight layers and a plurality of second-type weight layers, including:
[0076] Based on the completed training operation process status information, the type information and quantity information of the completed training operations of the weight layer in the training process are obtained; based on the type information and the quantity information, it is determined whether the weight layer has completed all training operations within a model learning cycle, and if so, it is determined that the weight layer meets the preset learning state condition; if not, it is determined that the weight layer does not meet the preset learning state condition;
[0077] Based on the parameter update records of all weight layers that meet the preset learning state conditions, the parameter update speed status information of all weight layers that meet the preset learning state conditions is determined; then based on the parameter update speed status information, the average parameter update speed of all weight layers that meet the preset learning state conditions is determined; the average parameter update speed is compared with the preset update speed threshold; if the average parameter update speed is less than the preset update speed threshold, it is determined that the corresponding weight layer belongs to the first type of weight layer; otherwise, it is determined that the corresponding weight layer belongs to the second type of weight layer.
[0078] The beneficial effect of the above embodiment is that the data and forms used by different model training terminals for model training are relatively independent, so that the completed training operation process status information corresponding to different model training terminals is also completely different. For this reason, the completed training operation process status information is parsed and processed to obtain the type information and quantity information of the completed training operation of the corresponding weight layer in the training process by the model training terminal, and then the type information and quantity information of the completed training operation are used as a benchmark to determine whether the weight layer has completed all training operations within a model learning cycle; all training operations within a model learning cycle correspond to specific types and specific numbers of training operations, so as to accurately determine the training progress of the weight layer, effectively identify the weight layer that has completed all training operations within a model learning cycle, and use this as the weight layer of the preset learning state condition, so as to avoid the subsequent comparison of the parameter update speed of all weight layers and increase the recognition workload of the weight layer, and effectively reduce the range of objects for the comparison of the parameter update speed of the weight layer. Based on the parameter update records of all weight layers that meet the preset learning state conditions, the parameter update speed state information of all weight layers that meet the preset learning state conditions is determined to determine the average parameter update speed of the weight layer. The average parameter update speed of the weight layer is related to the degree of learning effect of the weight layer. The larger the average parameter update speed of the weight layer, the better the learning effect of the weight layer, and vice versa. The average parameter update speed of the weight layer is then compared with the preset update speed threshold to distinguish the first type of weight layer and the second type of weight layer; wherein, the average parameter update speed of the first type of weight layer is low, indicating that the learning effect of the first type of weight layer is poor, and its contribution to the improvement of the learning effect of the model is small, that is, it can be used as a priority to be removed; the average parameter update speed of the second type of weight layer is high, indicating that the learning effect of the second type of weight layer is good, and its contribution to the improvement of the learning effect of the model is large, that is, it needs to be retained first. By distinguishing the first type of weight layer from the second type of weight layer, effective and accurate guidance can be provided for subsequent pruning and aggregation operations, and the reliability of model optimization and joint modeling can be improved.
[0079] In another embodiment, all first-class weight layers in the model are pruned, and all second-class weight layers in the model are extracted, so as to obtain a model that has been aggregated and sorted; based on the running information of the federated learning, the models that have been aggregated and sorted by all model training ends are aggregated, including:
[0080] Based on the network position information of all first-class weight layers connected to the model, the corresponding connection neuron node positions of all first-class weight layers in the model are determined; based on the connection neuron node positions, all first-class weight layers in the model are pruned; and based on the weight information of all second-class weight layers in the model, all second-class weight layers are extracted, so as to obtain a model that has been completed and aggregated;
[0081] The learning log of the federated learning is analyzed to determine whether all model training terminals participating in the federated learning have completed the corresponding learning and training tasks; if so, all model training terminals complete the aggregation and sorting of models for aggregation.
[0082] The beneficial effect of the above embodiment is that the network location information of all first-class weight layers connected to the model is used as a benchmark to determine the corresponding connection neuron node positions of all first-class weight layers in the model, so that the neuron coverage area of the first-class weight layer in the model can be accurately calibrated, thereby ensuring that the first-class weight layer is completely and accurately pruned in the model, avoiding the situation where the first-class weight layer is not pruned thoroughly and remains in the model; all second-class weight layers are extracted based on the weight information of all second-class weight layers in the model, ensuring that all second-class weight layers are accurately aggregated and sorted. Then the learning log of the federated learning is analyzed to determine whether all model training terminals participating in the federated learning have completed the corresponding learning and training tasks, so as to ensure that only models that have completed the learning and training tasks can be aggregated, and the reliability of the final modeling results obtained by the federated learning is maximized.
[0083] See also Figure 2 As shown, an embodiment of the present application provides a pruning-based federated learning model aggregation and organization system. The pruning-based federated learning model aggregation and organization system includes:
[0084] The training end monitoring module is used to monitor all model training ends participating in federated learning and obtain the model training logs of all model training ends;
[0085] The training state identification module is used to analyze the model training log to obtain the training state characteristic information of all weight layers under the model trained by the model training end;
[0086] A weight layer screening module is used to screen all weight layers that meet preset learning state conditions based on the training state feature information;
[0087] A weight layer distinguishing module is used to identify the parameter update state of all weight layers that meet the preset learning state conditions, thereby distinguishing a number of first-class weight layers and a number of second-class weight layers;
[0088] A pruning and aggregation execution module is used to prune all first-class weight layers within the model and extract all second-class weight layers within the model, so as to obtain a model that completes aggregation and arrangement;
[0089] The joint modeling execution module is used to aggregate the models that have been aggregated and sorted by all model training ends based on the running information of the federated learning.
[0090] The beneficial effects of the above embodiments are as follows: the pruning-based federated learning model aggregation and organization system obtains model training logs from all model training terminals participating in federated learning, and analyzes the model training logs to obtain the training status feature information of all weight layers under the model trained by the model training terminal, and accurately identifies the training process of the weight layer; based on the training status feature information, the weight layers that meet the preset learning state conditions are screened, and they are divided into the first type of weight layers and the second type of weight layers, from which the weight layers with poor and good learning effects are identified, providing a reliable idea for the subsequent pruning and aggregation of the weight layers; the first type of weight layers are pruned, and the second type of weight layers are extracted to obtain a model that has completed aggregation and organization, accurately screen the weight layers to be aggregated, avoid aggregating weights with poor learning effects and affecting the reliability of aggregation, and can also reduce the amount of model transmission data and the consumption of encryption resources and communication resources, thereby reducing the cost of federated learning.
[0091] In another embodiment, the training end monitoring module is used to monitor all model training ends participating in federated learning, and obtain the model training logs of all model training ends, including:
[0092] Based on the network address information of all model training terminals participating in federated learning, the training process of the model training terminal is monitored to obtain the model training logs corresponding to the model training operations that have been executed by all model training terminals;
[0093] The training state identification module is used to analyze the model training log to obtain the training state feature information of all weight layers under the model trained by the model training end, including:
[0094] The model training log is analyzed to obtain the training operation process status information of all weight layers under the model trained by the model training end, which has completed the training operation process during the training process, and use this as the training status feature information.
[0095] The beneficial effect of the above embodiment is that in the process of federated learning, all model training terminals participating in the federated learning independently use their own data to perform model training, and each training model terminal will train the network layer inside the model during the independent model training process. Whenever the network layer completes a training, parameter updates and changes will occur, and the speed of parameter update changes is positively correlated with the learning effect of the network layer, that is, when the learning effect of the network layer is better, its parameter update changes faster. In addition, the model training terminal will form a corresponding model training log during the model training process, and the model training log comprehensively and accurately records the training operation information of the model training terminal. For this purpose, the network address information of all model training terminals participating in the federated learning is used as a sharp turn, and all model training terminals are respectively monitored to obtain the model training operations that have been executed by each, so that the training information that the model has accepted can be accurately extracted. Then the model training log is analyzed to obtain the training operation process status information of all weight layers under the model corresponding to the training of the model training terminal, so as to quantify and determine the training type and number of trainings that have been executed by the model training terminal for the corresponding model, and provide a reliable basis for the training integrity of the subsequent recognition model.
[0096] In another embodiment, the weight layer screening module is used to screen all weight layers that meet the preset learning state conditions based on the training state characteristic information, including:
[0097] Based on the completed training operation process status information, the type information and quantity information of the completed training operations of the weight layer in the training process are obtained; based on the type information and the quantity information, it is determined whether the weight layer has completed all training operations within a model learning cycle, and if so, it is determined that the weight layer meets the preset learning state condition; if not, it is determined that the weight layer does not meet the preset learning state condition;
[0098] The weight layer distinguishing module is used to identify the parameter update state of all weight layers that meet the preset learning state conditions, thereby distinguishing a number of first-class weight layers and a number of second-class weight layers, including:
[0099] Based on the parameter update records of all weight layers that meet the preset learning state conditions, the parameter update speed status information of all weight layers that meet the preset learning state conditions is determined; then based on the parameter update speed status information, the average parameter update speed of all weight layers that meet the preset learning state conditions is determined; the average parameter update speed is compared with the preset update speed threshold; if the average parameter update speed is less than the preset update speed threshold, it is determined that the corresponding weight layer belongs to the first type of weight layer; otherwise, it is determined that the corresponding weight layer belongs to the second type of weight layer.
[0100] The beneficial effect of the above embodiment is that the data and forms used by different model training terminals for model training are relatively independent, so that the completed training operation process status information corresponding to different model training terminals is also completely different. For this reason, the completed training operation process status information is parsed and processed to obtain the type information and quantity information of the completed training operation of the corresponding weight layer in the training process by the model training terminal, and then the type information and quantity information of the completed training operation are used as a benchmark to determine whether the weight layer has completed all training operations within a model learning cycle; all training operations within a model learning cycle correspond to specific types and specific numbers of training operations, so as to accurately determine the training progress of the weight layer, effectively identify the weight layer that has completed all training operations within a model learning cycle, and use this as the weight layer of the preset learning state condition, so as to avoid the subsequent comparison of the parameter update speed of all weight layers and increase the recognition workload of the weight layer, and effectively reduce the range of objects for the comparison of the parameter update speed of the weight layer. Based on the parameter update records of all weight layers that meet the preset learning state conditions, the parameter update speed state information of all weight layers that meet the preset learning state conditions is determined to determine the average parameter update speed of the weight layer. The average parameter update speed of the weight layer is related to the quality of the learning effect of the weight layer. The larger the average parameter update speed of the weight layer, the better the learning effect of the weight layer, and vice versa. The average parameter update speed of the weight layer is then compared with the preset update speed threshold to distinguish the first type of weight layer and the second type of weight layer; wherein, the average parameter update speed of the first type of weight layer is low, indicating that the learning effect of the first type of weight layer is poor, and its contribution to the improvement of the learning effect of the model is small, that is, it can be used as a priority to be removed; the average parameter update speed of the second type of weight layer is high, indicating that the learning effect of the second type of weight layer is good, and its contribution to the improvement of the learning effect of the model is large, that is, it needs to be retained first. By distinguishing the first type of weight layer from the second type of weight layer, effective and accurate guidance can be provided for subsequent pruning and aggregation operations, and the reliability of model optimization and aggregation can be improved.
[0101] In another embodiment, the pruning and aggregation execution module is used to prune all first-class weight layers within the model and extract all second-class weight layers within the model, thereby obtaining a model that completes aggregation and arrangement, including:
[0102] Based on the network position information of all first-class weight layers connected to the model, the corresponding connection neuron node positions of all first-class weight layers in the model are determined; based on the connection neuron node positions, all first-class weight layers in the model are pruned; and based on the weight information of all second-class weight layers in the model, all second-class weight layers are extracted, so as to obtain a model that has been completed and aggregated;
[0103] The joint modeling execution module is used to aggregate the models that have been aggregated and sorted by all model training ends based on the operation information of the federated learning, including:
[0104] The learning log of the federated learning is analyzed to determine whether all model training terminals participating in the federated learning have completed the corresponding learning and training tasks; if so, all model training terminals complete the aggregation and sorting of models for aggregation.
[0105] The beneficial effect of the above embodiment is that the network location information of all first-class weight layers connected to the model is used as a benchmark to determine the corresponding connection neuron node positions of all first-class weight layers in the model, so that the neuron coverage area of the first-class weight layer in the model can be accurately calibrated, thereby ensuring that the first-class weight layer is completely and accurately pruned in the model, avoiding the situation where the first-class weight layer is not pruned thoroughly and remains in the model; all second-class weight layers are extracted based on the weight information of all second-class weight layers in the model, ensuring that all second-class weight layers are accurately aggregated and sorted. Then the learning log of the federated learning is analyzed to determine whether all model training terminals participating in the federated learning have completed the corresponding learning and training tasks, so as to ensure that only models that have completed the learning and training tasks can be aggregated, and the reliability of the final modeling results obtained by the federated learning is maximized.
[0106] In general, the pruning-based federated learning model aggregation and organization method and system monitors the model training logs from all model training ends participating in federated learning, analyzes the model training logs, obtains the training state feature information of all weight layers under the model trained by the model training end, and accurately identifies the training process of the weight layer; based on the training state feature information, the weight layers that meet the preset learning state conditions are screened, and they are divided into the first type of weight layers and the second type of weight layers, from which the weight layers with poor and good learning effects are identified, providing a reliable idea for the subsequent pruning and aggregation of the weight layers; the first type of weight layers are pruned, and the second type of weight layers are extracted, so as to obtain a model that has completed aggregation and organization, accurately screen the weight layers to be aggregated, avoid aggregating weights with poor learning effects and affecting the reliability of aggregation, and can also reduce the amount of data transmitted by the model and the consumption of encryption resources and communication resources, thereby reducing the cost of federated learning.
[0107] The above is only a specific implementation of the present invention, and any other improvements made based on the concept of the present invention are considered to be within the protection scope of the present invention.
Claims
1. A pruning-based federated learning model aggregation and organization method, characterized in that: include: Monitor all model training terminals participating in federated learning and obtain the model training logs of all model training terminals; Analyze the model training log to obtain training status characteristic information of all weight layers under the model trained by the model training end; Based on the training state characteristic information, all weight layers that meet the preset learning state conditions are screened; parameter update states of all weight layers that meet the preset learning state conditions are identified, thereby distinguishing a number of first-type weight layers and a number of second-type weight layers; Prune all first-class weight layers within the model, and aggregate all second-class weight layers within the model to obtain an aggregated model; based on the running information of the federated learning, aggregate the models that have completed the aggregation and organization at all model training ends.
2. The pruning-based federated learning model aggregation and organization method according to claim 1, characterized in that: Monitor all model training terminals participating in federated learning and obtain the model training logs of all model training terminals; The model training log is analyzed to obtain the training status characteristic information of all weight layers of the model trained by the model training end, including: Based on the network address information of all model training terminals participating in federated learning, the training process of the model training terminals is monitored to obtain the model training logs corresponding to the model training operations that have been executed by all model training terminals; The model training log is analyzed to obtain the training operation process status information of all weight layers under the model trained by the model training end, which has completed the training operation process during the training process, and use this as the training status feature information.
3. The pruning-based federated learning model aggregation and organization method according to claim 1, characterized in that: Monitor all model training terminals participating in federated learning and obtain the model training logs of all model training terminals, including: Step S1, using the following formula (1), based on the monitoring of all model training terminals participating in federated learning, controls the normal generation cycle of all normal model training logs. In the above formula (1), T p Indicates the normal generation cycle of all model training logs, that is, each model training end is generated according to T p After a certain time, a normal model training log is generated, where T p The unit is hours; T(a) represents the time from input to output of each data when the a-th model training end is monitoring, where T(a) is in seconds; n represents the total number of model training ends; Indicates finding the maximum value of the duration from input to output of each data when monitoring at all model training ends; INT{} means rounding down the value in brackets; Step S2, using the following formula (2), according to the time node of the special event of each model training end participating in the federated learning, generate the node model training log generation cycle of each model training end, In the above formula (2), T J (a) represents the node model training log generation cycle of the a-th model training end; t k (a) represents the time node of the kth special event at the ath model training end; t k+1 (a) represents the time node of the k+1th special event of the ath model training end; m represents the total number of special events generated by the ath model training end until the current moment; It means to substitute the value of k from 1 to m-1 into t k+1 (a)-t k (a) obtains the minimum value among all the values after substitution; Step S3, using the following formula (3), according to the node model training log generation cycle of each model training end and the common generation cycle of all common model training logs, each model training log that is repeatedly generated is eliminated. Y(a)={(x∈Z)&&(y∈Z)&&[x×T p =y×T J (a)]}|and(3) In the above formula (3), Y(a) means to control and eliminate the node logs generated by the a-th model training end in the Y(a)-th cycle; Z represents a set of positive integers; x and y both represent variables; {(x∈Z)&&(y∈Z)&&[x×T p =y×T J (a)]}|y represents the calculation of the p =y×T J (a) The value of y when x and y are both positive integers; && represents the logical relationship and.
4. The pruning-based federated learning model aggregation and organization method according to claim 2 or 3, characterized in that: Based on the training state characteristic information, all weight layers that meet the preset learning state conditions are screened; parameter update states of all weight layers that meet the preset learning state conditions are identified, thereby distinguishing and obtaining a plurality of first-type weight layers and a plurality of second-type weight layers, including: Based on the completed training operation process status information, the type information and quantity information of the completed training operations of the weight layer in the training process are obtained; based on the type information and the quantity information, it is determined whether the weight layer has completed all training operations within a model learning cycle, and if so, it is determined that the weight layer meets the preset learning state condition; if not, it is determined that the weight layer does not meet the preset learning state condition; Based on the parameter update records of all weight layers that meet the preset learning state conditions, the parameter update speed status information of all weight layers that meet the preset learning state conditions is determined; then based on the parameter update speed status information, the average parameter update speed of all weight layers that meet the preset learning state conditions is determined; the average parameter update speed is compared with the preset update speed threshold; if the average parameter update speed is less than the preset update speed threshold, it is determined that the corresponding weight layer belongs to the first type of weight layer; otherwise, it is determined that the corresponding weight layer belongs to the second type of weight layer.
5. The pruning-based federated learning model aggregation and organization method according to claim 4, characterized in that: Pruning all first-class weight layers within the model, and aggregating all second-class weight layers within the model, thereby obtaining a model that has completed aggregation and arrangement; Based on the operation information of the federated learning, the models that have completed the aggregation and sorting at all model training ends are aggregated, including: Based on the network position information of all first-class weight layers connected to the model, the corresponding connection neuron node positions of all first-class weight layers in the model are determined; based on the connection neuron node positions, all first-class weight layers in the model are pruned; and based on the weight information of all second-class weight layers in the model, all second-class weight layers are extracted, so as to obtain a model that has been completed and aggregated; Analyze the learning log of the federated learning to determine whether all model training terminals participating in the federated learning have completed corresponding learning and training tasks; If so, all models trained on the model side will be aggregated.
6. The federated learning model aggregation and sorting system based on pruning is characterized by: include: The training end monitoring module is used to monitor all model training ends participating in federated learning and obtain the model training logs of all model training ends; A training state identification module is used to analyze the model training log to obtain the training state characteristic information of all weight layers under the model trained by the model training end; A weight layer screening module, used to screen all weight layers that meet preset learning state conditions based on the training state feature information; A weight layer distinguishing module is used to identify the parameter update state of all weight layers that meet the preset learning state conditions, thereby distinguishing a number of first-class weight layers and a number of second-class weight layers; a pruning and aggregation execution module is used to prune all first-class weight layers within the model and extract all second-class weight layers within the model, thereby obtaining a model that has completed aggregation and sorting; The aggregation execution module is used to aggregate the models that have completed the aggregation and sorting at all model training ends based on the operation information of the federated learning.
7. The pruning-based federated learning model aggregation and arrangement system according to claim 6, characterized in that: The training end monitoring module is used to monitor all model training ends participating in federated learning, and obtain the model training logs of all model training ends, including: Based on the network address information of all model training terminals participating in federated learning, the training process of the model training terminals is monitored to obtain the model training logs corresponding to the model training operations that have been executed by all model training terminals; The training state identification module is used to analyze the model training log to obtain the training state feature information of all weight layers under the model trained by the model training end, including: The model training log is analyzed to obtain the training operation process status information of all weight layers under the model trained by the model training end, which has completed the training operation process during the training process, and use this as the training status feature information.
8. The pruning-based federated learning model aggregation and arrangement system according to claim 7, characterized in that: The weight layer screening module is used to screen all weight layers that meet the preset learning state conditions based on the training state feature information, including: Based on the completed training operation process status information, the type information and quantity information of the completed training operations of the weight layer in the training process are obtained; based on the type information and the quantity information, it is determined whether the weight layer has completed all training operations within a model learning cycle, and if so, it is determined that the weight layer meets the preset learning state condition; if not, it is determined that the weight layer does not meet the preset learning state condition; The weight layer distinguishing module is used to identify the parameter update state of all weight layers that meet the preset learning state conditions, thereby distinguishing a number of first-type weight layers and a number of second-type weight layers, including: Based on the parameter update records of all weight layers that meet the preset learning state conditions, the parameter update speed status information of all weight layers that meet the preset learning state conditions is determined; then based on the parameter update speed status information, the average parameter update speed of all weight layers that meet the preset learning state conditions is determined; the average parameter update speed is compared with the preset update speed threshold; if the average parameter update speed is less than the preset update speed threshold, it is determined that the corresponding weight layer belongs to the first type of weight layer; otherwise, it is determined that the corresponding weight layer belongs to the second type of weight layer.
9. The pruning-based federated learning model aggregation and arrangement system according to claim 8, characterized in that: The pruning and aggregation execution module is used to prune all first-class weight layers within the model and extract all second-class weight layers within the model, so as to obtain a model that completes aggregation and arrangement, including: Based on the network position information of all first-class weight layers connected to the model, the corresponding connection neuron node positions of all first-class weight layers in the model are determined; based on the connection neuron node positions, all first-class weight layers in the model are pruned; and based on the weight information of all second-class weight layers in the model, all second-class weight layers are extracted, so as to obtain a model that has been completed and aggregated; The joint modeling execution module is used to perform joint modeling on the models aggregated and sorted by all model training terminals based on the operation information of the federated learning, including: The learning log of the federated learning is analyzed to determine whether all model training terminals participating in the federated learning have completed the corresponding learning and training tasks; if so, all model training terminals complete the aggregation and sorting of the models for aggregation.
