A communication-efficient federated learning method based on semantic block contribution metrics

By using a federated learning method based on semantic block contribution metrics, model parameters are filtered and communication overhead is reduced, solving the problem of unreliable model performance in existing federated learning methods and achieving efficient and interpretable model training and aggregation.

CN123180285APending Publication Date: 2026-11-27SOUTHWEST JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611535347.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2026-04-29
Filing Date
2026-09-30
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing federated learning methods, while reducing communication overhead, struggle to guarantee model performance. They lack quantitative measurements and performance impact analysis of the contributions of each component in model updates, making it difficult to determine the reliability of model training and aggregation results. Furthermore, they fail to pass compliance reviews in domains with strict requirements for decision interpretability.

Method used

We employ an efficient federated learning method for communication based on semantic block contribution metrics. By calculating client importance scores and semantic block contribution, we select model parameters to participate in communication, reducing uplink communication overhead. Furthermore, we provide clear parameter selection criteria and model update mechanisms through an interpretable semantic block discarding algorithm.

Benefits of technology

It significantly reduces communication overhead, improves model training efficiency, enhances the transparency and reliability of the training process, ensures model performance, and is suitable for fields with strict requirements for decision interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180285A_ABST
    Figure CN123180285A_ABST
Patent Text Reader

Abstract

The application provides a communication efficient federated learning method based on semantic block contribution measurement, and belongs to the technical field of federated learning communication optimization, and comprises the following steps: global model initialization; client local model training; participant client screening; client local model semantic block division; global model aggregation update; global model training completion; the application introduces interpretable semantic block contribution calculation and client importance screening, reduces the model parameter transmission amount through the semantic block contribution calculation, reduces the number of participating clients through the client importance screening, enhances the model training transparency and reliability, reduces the training communication overhead while ensuring the global model performance, and improves the training efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of federated learning communication optimization technology, and in particular relates to an efficient federated learning method for communication based on semantic block contribution measurement. Background Technology

[0002] Traditional machine learning methods require all data to be centralized in one place (such as a data center) for model training. This centralized approach seriously infringes on user privacy and data security. With the widespread application of the Internet of Things and smart terminals, massive amounts of data are scattered across different devices, forming a decentralized data structure that is difficult to aggregate. Against this backdrop, Federated Learning (FL) has emerged as a distributed machine learning paradigm. It allows devices to complete model training locally, interacting only with model parameters or gradients, thereby collaboratively training a global model without transmitting the original data.

[0003] In federated learning frameworks, participating devices train data locally and only upload model updates. While this distributed training method protects user privacy, it also introduces significant communication overhead. Due to the limitations of wireless network bandwidth, clients often need to upload millions of model parameters; for example, the weights of a speech recognition model can reach hundreds of megabytes. After hundreds of iterations, the cumulative communication volume of a single client can grow to the petabyte level. Limited communication resources cannot support such a huge amount of parameter transmission, thus forming a bottleneck that restricts the efficiency of model training.

[0004] The communication bottleneck mainly lies in the difference in transmission rates between the uplink and downlink. Taking 5G wireless networks as an example, the downlink rate is approximately 110.6 Mbps, while the uplink rate is only 14.0 Mbps. Currently, the uplink is the bottleneck restricting communication efficiency, which in turn seriously affects model training efficiency. In large-scale distributed training, frequent uploading of model updates not only consumes a large amount of network resources but may also cause delays or even interruptions in the training process. Therefore, designing an effective uplink communication overhead optimization scheme is a key problem that urgently needs to be solved in federated learning.

[0005] However, while existing federated learning communication optimization methods (such as client selection and gradient sparsification) can reduce communication volume to some extent, they lack quantitative measurement and performance impact analysis of the contributions of each component of the model update in the complete federated learning process from training to aggregation. These methods focus on reducing data transmission volume and optimizing the communication process itself. For example, while client selection directly reduces the number of clients participating in communication, it does not measure the contribution of the data features of participating clients to the model update. Gradient sparsification usually uses gradient magnitude as an importance criterion to select parameters to be transmitted; however, gradient magnitude only reflects the first-order local sensitivity of the loss to the parameters, and does not characterize the true sensitivity determined by second-order information such as curvature. In practice, federated learning is susceptible to stochastic gradient noise, making it difficult to guarantee the consistency between the amplitude and the true contribution of parameters. The lack of quantitative measurement of contribution and performance impact analysis will lead to a series of consequences: First, the reliability of model training and aggregation results is difficult to judge, making it difficult for users to build trust in the model; second, when the model performs abnormally, the quantitative basis and performance impact of parameter selection, client selection, and other processes cannot be traced, resulting in a lack of clear improvement directions for debugging and optimization; third, in fields such as healthcare and finance, where there are strict requirements for decision interpretability, the lack of quantitative measurement of contribution and performance impact analysis may cause the model to fail compliance review, thereby limiting the practical application of federated learning. Summary of the Invention

[0006] To address the aforementioned shortcomings in existing technologies, this invention provides a communication-efficient federated learning method based on semantic block contribution measurement. This method solves the problem that existing federated learning training methods struggle to guarantee model performance while reducing communication overhead, and it also ensures theoretical interpretability. Here, a semantic block refers to a parameter group (such as the sequence of "convolution, pooling, normalization, and activation" layers in a convolutional neural network) that consists of continuous network layers and carries functional semantics. The method of this invention selects model parameters participating in communication based on semantic block contribution, thereby reducing uplink communication overhead and improving model training efficiency. On the other hand, it explains the entire process of federated learning from training to aggregation based on semantic block contribution measurement, making the parameter selection criteria and model update mechanism clear and traceable, thus making up for the lack of theoretical basis in existing communication optimization methods. The method of this invention lays the foundation for building a federated learning communication mechanism that combines high communication efficiency and interpretability, and helps to achieve secure, transparent, reliable, and trustworthy federated learning.

[0007] To achieve the above objectives, this invention provides an efficient federated learning method for communication based on semantic block contribution metrics, comprising the following steps: S1. Global Model Initialization: The central server initializes the global model parameters and sends the initialized global model parameters to the clients participating in the training. S2, Local Model Training: The client uses the local dataset to iteratively train the global model to obtain the local model, calculates the maximum mean difference between the local model and the global model, and calculates the client importance score in combination with the training loss, and uploads it to the central server. S3. Participating Client Selection: The central server selects clients based on their importance scores to reduce the number of clients participating in communication and to determine the set of clients participating in subsequent updates. S4. Local Model Semantic Block Division: The selected client divides the network structure of the trained local model into semantic blocks, calculates the contribution of each semantic block, sets a semantic block contribution threshold, and discards the semantic block if the contribution of the semantic block is lower than the threshold to reduce the uploaded parameters; otherwise, the semantic block is retained, quantized, and uploaded to the central server. S5. Global Model Aggregation Update: The central server dequantizes and reassembles the received semantic blocks, performs model aggregation, and updates the global model parameters. S6. Global model training complete: The central server determines whether the current training has reached the preset communication round or whether the model meets the convergence condition. If not, the updated global model is redeployed to the client and the process returns to step S2 to continue the next round of training. Otherwise, the training process ends and the federated learning global model training is completed.

[0008] The beneficial effects of this invention are as follows: This invention filters clients through a client importance scoring mechanism based on the maximum mean difference and training loss calculation, thereby identifying and reducing unnecessary client updates during training and lowering communication overhead. Simultaneously, selected clients calculate semantic block contributions, retaining high-contribution semantic blocks and discarding low-contribution ones. Model parameters participating in communication are selected based on semantic block contribution, reducing the amount of uploaded model parameters to lower uplink communication overhead and improve model training efficiency. Addressing the problems of high communication overhead and redundant model parameter transmission in traditional federated learning, this invention introduces an interpretable semantic block discarding algorithm, providing clear interpretability support for the model training and parameter transmission process. Based on semantic block contribution metrics, the entire federated learning process from training to aggregation is explained, making the parameter selection criteria and model update mechanism clear and traceable. This compensates for the lack of theoretical basis in existing communication optimization methods, reveals the differences in the contribution of different semantic blocks to model performance, and enhances the transparency and reliability of the training process. This invention significantly reduces communication overhead and improves training efficiency while ensuring model performance.

[0009] Further, S2 includes the following steps: S201. The client performs a preset number of local iterative training rounds on the local model participating in the training of the client based on the local dataset. S202. The client calculates the maximum mean difference between the local model and the global model based on the trained local model parameters and the global model parameters from the previous round. S203. The client calculates its importance score based on the maximum mean difference between the local model and the global model, combined with a tradeoff between training loss and dynamic adjustment.

[0010] The beneficial effects of the above-mentioned further solution are as follows: In the client, the maximum mean difference between the local model and the global model is calculated to evaluate the correlation between the local model and the global model. Combined with the training loss and dynamically adjusted trade-off factors, a comprehensive client score that can evaluate the correlation and training loss is calculated. In the central server, the comprehensive client score is used to identify unnecessary client updates and model updates, effectively reducing uplink communication overhead, reducing bandwidth consumption, and improving the performance of the global model. Furthermore, the comprehensive client score selects the local model with higher correlation and stronger global representativeness, avoiding irrelevant or biased models from interfering with the global optimization process, thereby improving the stability and convergence efficiency of training.

[0011] Furthermore, step S4 includes the following steps: S401. The selected client regards the sequence of layers that provide important semantic functions in the client's local model as semantic blocks, and defines the marginal gain or value of the semantic block to the performance improvement of the global model as the semantic block contribution. S402. To calculate the contribution of the semantic block, the selected client introduces an interpretable neuron Shapley value approximation calculation method. By randomly generating a neuron arrangement, the marginal contribution of the neuron in different arrangements is calculated and the average value is taken to obtain the Shapley value of each neuron. Based on this, the key neurons in the semantic block and their Shapley values ​​are selected. S403. The selected client calculates the Shapley value of the key neurons in each semantic block and performs normalization processing to quantify the semantic block contribution of the local model in the client, revealing the difference in contribution of different semantic blocks to model performance, and enhancing the transparency and reliability of the training process. S404. The selected client, based on the semantic block contribution size and semantic block discard rate, considers semantic blocks with contributions higher than a preset threshold as retained blocks, and discards semantic blocks with contributions lower than the preset threshold. The retained blocks are quantified and uploaded to the central server.

[0012] Furthermore, the expression for the semantic block contribution is as follows: ; in, Represents semantic blocks Contribution Represents a semantic block.G Represents semantic blocks The number of key neurons in the middle, Indicates the first g The normalized Shapley value of each key neuron.

[0013] The beneficial effects of the above-mentioned further solutions are as follows: In the client, the present invention defines semantic blocks and semantic block contributions, and evaluates neuron contributions to achieve fine-grained interpretation of model importance features at the neuron level; it also uses the approximate calculation method of neuron Shapley value and Monte Carlo estimation to calculate the Shapley value of neurons, accurately identifying semantic blocks that have a significant impact on model performance, thereby improving the training efficiency of the model; and it combines semantic block discarding, discarding semantic blocks with contributions below a threshold, and treating semantic blocks with contributions above a threshold as retained blocks, quantifying them and uploading them to the central server, thereby reducing the amount of data transmitted in each communication.

[0014] Furthermore, step S402 includes the following steps: S4021. The selected client calculates the marginal contribution of the neuron based on the approximate calculation method of the neuron's Shapley value, and uses Monte Carlo estimation to calculate the average value of the marginal contribution of the neuron through random sampling to obtain the Shapley value of each neuron. S4022. The selected client adopts early truncation. In the process of calculating the marginal contribution of neurons, by defining a performance threshold and combining it with the performance metric when the neuron is activated, the set of early neurons that do not meet the preset performance threshold is truncated to obtain the truncated set of neurons. S4023. The selected client, based on the truncated set of neurons, uses adaptive sampling, combined with the Shapley value of each neuron, to calculate the moving average and moving variance of the marginal contribution of the neurons, and calculates the confidence interval of the neurons based on the standard estimation limit, to obtain the key neurons in the semantic block. S4024. The selected client obtains the Shapley value of the key neuron based on the Shapley value of each neuron and the key neuron in the semantic block.

[0015] Furthermore, the expression for calculating the Shapley value of each neuron is as follows: ; ; in, Indicates the first a The Shapley value of each neuron. Indicates the number of random sampling permutations. Indicates the first q In the second sampling a The marginal contribution of each neuron Indicates the firstq The ordering of neurons in the second sampling. Indicates the first a The marginal contribution of each neuron Indicates sorting The Middle a The set of all key neurons preceding a given neuron. Indicates in set Add the a Performance metrics of a local model with a given number of neurons Indicates in set Performance metrics for local models.

[0016] The beneficial effects of the above-mentioned further scheme are as follows: In the client, the present invention utilizes early truncation and adaptive sampling methods to obtain key neurons in each semantic block by truncating neurons that do not significantly improve model performance and calculating the confidence interval of neurons based on standard estimation limits, thereby improving the calculation efficiency of neuron Shapley values ​​and achieving accurate selection of key neurons.

[0017] Furthermore, step S5 includes the following steps: S501. The central server dequantizes the quantized retained blocks and performs semantic block reorganization with the unchanged blocks from the previous round to obtain the client semantic block reorganization model. S502. The central server performs model aggregation on all semantic block reorganization models according to the aggregation algorithm, and generates an updated global model using selective model aggregation.

[0018] Furthermore, the expression for the updated global model is as follows: ; in, This indicates the total number of clients selected by the central server. Indicates the first Round of updates h The selected client's dequantization hold block, This represents the updated global model.

[0019] The beneficial effects of the above-mentioned further solution are as follows: In the central server, the present invention recovers the accuracy lost during the quantization process by dequantizing the received semantic blocks; and by recombining the semantic blocks with the unchanged blocks of the previous round of global model, the low-contribution blocks not uploaded by the client are completed, and a complete client model is obtained; then, client model aggregation is performed to achieve efficient updating of the global model, which significantly reduces uplink communication overhead while ensuring model accuracy.

[0020] Furthermore, step S6 includes the following steps: S601. The central server checks whether the current training round has reached the preset communication round or whether the global model meets the convergence condition. If it has not reached the preset round or has not converged, the updated global model parameters for this round are sent to the clients participating in the training, and the process returns to step S2 to continue the next round of training. If the preset round has been reached or the process has converged, the process proceeds to step S602. S602. The central server terminates the iteration process, outputs the current global model as the final model, and completes the global model training of federated learning.

[0021] The beneficial effects of the above-mentioned further solutions are as follows: In the central server, the present invention realizes the automatic termination of the training process by using the central server to check the training rounds and convergence conditions, avoiding the additional computation and communication overhead caused by invalid iterations; and outputs the final global model in a timely manner, ensuring that the model stops training when it reaches the optimal or preset performance, thereby improving the overall efficiency of federated learning.

[0022] On the other hand, an interpretable federated learning communication overhead optimization device based on semantic block contributions is provided, characterized in that it includes: a memory, a processor, and a computer program stored in the memory and executable on the processor; When the computer program is executed by the processor, it implements the steps of the communication-efficient federated learning method based on semantic block contribution metric as described in any of the preceding claims.

[0023] The beneficial effects of the above-mentioned further solutions are as follows: This invention provides a practical product through an interpretable federated learning communication overhead optimization device based on semantic block contributions, which solves the problems of low model training efficiency, large network resource consumption, and frequent delays and interruptions during training in existing federated learning communication. Moreover, it provides interpretability support based on Shapley values ​​for semantic block-level model updates, thereby enhancing the transparency of model updates. Attached Figure Description

[0024] Figure 1 This is a flowchart of the method of the present invention.

[0025] Figure 2 This is a flowchart of the FedSBC training process in this embodiment. Detailed Implementation

[0026] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0027] Before describing this embodiment, the following terms will be explained: FL: Federated Learning; SV: Shapley value; MMD: Maximum mean difference; SGD: Stochastic Gradient Descent; HFL: Horizontal Federated Learning; FedSBC: Effective Federated Learning for Communication Based on Semantic Block Contributions.

[0028] Example In this embodiment, the research object is the FedSBC framework: the client divides the neural network model into semantic blocks, the client uses the Shapley value of neurons to quantify the marginal contribution of each semantic block to the performance of the global model, the client retains high contribution blocks and discards low contribution blocks according to the preset semantic block discard rate; at the same time, the client obtains the client importance score by calculating the MMD between the local model and the global model and combining it with the training loss, and realizes model aggregation based on selective model aggregation through the central server.

[0029] like Figure 1 As shown, this invention provides an efficient federated learning method for communication based on semantic block contribution measurement, the implementation of which is as follows: S1. Global Model Initialization: The central server initializes the global model parameters and sends the initialized global model parameters to the clients participating in the training.

[0030] In this embodiment, as Figure 2 As shown, clients are randomly selected to participate in the training. The central server initializes the global model parameters and then sends the initialized global model parameters to the clients participating in the training.

[0031] In this embodiment, the central server defines the number of clients participating in the training. Number of training rounds Local training rounds neuron set Semantic block loss rate Client aggregation rate .

[0032] S2. Local Model Training: The client uses the local dataset to iteratively train the global model, obtaining a local model. The maximum mean difference between the local and global models is calculated, and the client's importance score is calculated based on the training loss. This score is then uploaded to the central server. The specific steps are as follows: S201. The client performs a preset number of local iterative training rounds on the local model participating in the training of the client based on the local dataset. S202. The client calculates the maximum mean difference between the local model and the global model based on the trained local model parameters and the global model parameters from the previous round. S203. The client calculates its importance score based on the maximum mean difference between the local model and the global model, combined with a tradeoff between training loss and dynamic adjustment.

[0033] In this embodiment, the client performs the first stage of local training on the local model based on the local dataset. Local training is conducted, and the central server is used to select clients. In the early stages of training, clients with larger training losses are preferred to improve model performance. In the later stages of training, clients with greater correlation to the global model are preferred to promote model convergence and stability. Therefore, this invention uses the maximum mean difference between the local model and the global model to evaluate the correlation between the local model and the global model, and combines the training loss with dynamically adjusted tradeoff factors to evaluate the training loss, thus obtaining a comprehensive client score that can evaluate both correlation and loss. The expression for calculating the maximum mean difference is as follows: ; in, Indicates the client In the The relevance score after the end of the update cycle. Indicates the client currently participating in the computation. This indicates the current training epoch of the global model. This indicates the previous training iteration of the global model. Indicates the first Global model parameters after the first update cycle. Indicates the client In the Local model parameters after the update round ends. Represents the global model. n Indicates the size of the global model parameters. m Indicates the size of the local model parameters. Represents the first parameter in the global model parameters. i A vector, This indicates the global model parameters in the kernel function. i A vector, Indicates the first parameter in the local model. j A vector, This indicates the local model parameters in the kernel function. j A vector, Represents the kernel function; The formula for calculating the overall client score is as follows: ; in, Indicates the client Overall score This represents a dynamically adjusted tradeoff factor. When selecting clients to participate in model aggregation, adjusting this tradeoff factor can consider not only clients that perform well in terms of local loss, but also the differences between client models and the global model. Indicates the client In the The average training loss of the client after each round of updates.

[0034] S3. Participating Client Selection: The central server selects clients based on their importance scores to reduce the number of clients participating in communication and to determine the set of clients participating in subsequent updates.

[0035] In this embodiment, the central server selects clients based on their comprehensive client scores, determining which clients need to upload local models.

[0036] S4. Local Model Semantic Block Partitioning: The selected client performs semantic block partitioning on the network structure of the trained local model, calculates the contribution of each semantic block, and sets a semantic block contribution threshold. If the contribution of a semantic block is lower than the threshold, the semantic block is discarded to reduce the number of uploaded parameters; otherwise, the semantic block is retained, quantized, and uploaded to the central server. The specific steps are as follows: S401. The selected client regards the sequence of layers that provide important semantic functions in the client's local model as semantic blocks, and defines the marginal gain or value of the semantic block to the performance improvement of the global model as the semantic block contribution.

[0037] In this embodiment, the selected client defines a sequence of consecutive layers in its local model that provide semantic functions as a semantic block. In the neural network model, the convolutional layer is responsible for extracting features, the pooling layer is used to remove redundant information and noise and enhance feature robustness, and the activation function layer performs nonlinear transformations on the features. Therefore, the convolutional layer, pooling layer, and activation function layer are regarded as a whole semantic block, which can be transmitted or discarded as a whole. The remaining layers are regarded as separate semantic blocks. In federated learning, contribution refers to the marginal gain or value of a participant (or its data) to the improvement of the global model performance during the federated learning process; Therefore, the marginal gain or value of a specific semantic block in improving the performance of the global model is defined as the semantic block contribution.

[0038] S402. To calculate the contribution of semantic blocks, the selected client introduces an interpretable neuron Shapley value approximation method. By randomly generating neuron arrangements, the marginal contribution of neurons in different arrangements is calculated and averaged to obtain the Shapley value of each neuron. Based on this, key neurons in the semantic block and their Shapley values ​​are selected. The specific steps are as follows: S4021. The selected client calculates the marginal contribution of the neuron based on the approximate calculation method of the neuron's Shapley value, and uses Monte Carlo estimation to calculate the average value of the marginal contribution of the neuron through random sampling to obtain the Shapley value of each neuron. S4022. The selected client adopts early truncation. In the process of calculating the marginal contribution of neurons, by defining a performance threshold and combining it with the performance metric when the neuron is activated, the set of early neurons that do not meet the preset performance threshold is truncated to obtain the truncated set of neurons. S4023. The selected client, based on the truncated set of neurons, uses adaptive sampling, combined with the Shapley value of each neuron, to calculate the moving average and moving variance of the marginal contribution of the neurons, and calculates the confidence interval of the neurons based on the standard estimation limit, to obtain the key neurons in the semantic block. S4024. The selected client obtains the Shapley value of the key neuron based on the Shapley value of each neuron and the key neuron in the semantic block.

[0039] In this embodiment, the selected client uses a semantic block contribution algorithm, introducing the approximate calculation of the neuron Shapley value to evaluate the marginal contribution of each neuron to the model performance. To improve computational efficiency, the algorithm further employs adaptive sampling and early truncation techniques to quickly identify the first few (preset as...) k The most valuable key neurons were identified. Subsequently, the contribution of each semantic block was quantified based on the semantic blocks in which these key neurons resided. The selected client is based on Monte Carlo estimation for each neuron. a Randomly generate a large number of sorts Calculate each permutation Middle neuron a The marginal contribution is then calculated, and the average value is obtained through multiple random sampling arrangements. By calculating the average marginal contribution of each neuron, the Shapley estimate for each neuron can be obtained. The expression for calculating the marginal contribution of key neurons is as follows: ; in, Indicates the first a The marginal contribution of each neuron Indicates sorting The Middlea The set of all key neurons preceding a given neuron. Indicates in set Add the a Performance metrics of a local model with a given number of neurons Indicates in set Performance metrics for local models; The expression for calculating the Shapley value of each neuron is as follows: ; in, Indicates the first a The Shapley value of each neuron. Indicates the number of random sampling permutations. Indicates the first q In the second sampling a The marginal contribution of each neuron Indicates the first q The ordering of neurons in the second sampling.

[0040] In this embodiment, the early truncation method, due to the arrangement of neurons Early elements The subset containing the neuron is usually very small. If adding the neuron to the subset does not significantly improve the model's performance, then the subsequent marginal contribution of that neuron can be considered negligible. Therefore, the selected client defines a preset performance threshold. By truncating the margin, we can avoid calculating negligible marginal contributions and save a lot of computing resources. If we calculate the performance metric when all neurons are activated in the subset before calculating the marginal contribution, then... The inequalities are as follows: ; If the inequality holds, then the performance improvement from adding more neurons is considered negligible, and therefore the computation of these neurons can be skipped.

[0041] In this embodiment, the adaptive sampling method transforms the problem into a multi-armed slot machine problem, enabling rapid identification of the most contributing factors. G A key neuron, without needing to precisely calculate the Shapley value of all neurons; from a set of bounded random variables Identify the bounded subset of random variables with the largest expected value. , This includes the most important aspects of the Shapley value. G A candidate set of neurons; The expression for the candidate set is as follows: ; in, Indicates the first The Shapley value of a random variable. Indicates the first The expected value of the Shapley value of a random variable This indicates the number of preset key neurons; The selected client calculates the moving average and moving variance of the marginal contribution of the neuron; the first The expressions for the moving average and moving variance of the marginal contribution of each neuron are as follows: ; ; in, Indicates the first The moving average of the marginal contribution of each neuron. The ordering of neurons is represented. Indicates the round, This represents the performance of the u-th neuron in round t. No. The moving variance of the marginal contribution of each neuron; The selected client calculates the confidence interval of the neuron based on the standard estimation bound, and the expression for the confidence interval is as follows: ; in, Indicates the lower bound of confidence. Indicates the upper bound of confidence. Indicates tolerance rate, Indicates the ranking in the current iteration Large Shapley values; if the confidence interval of the current neuron's Shapley value is similar to the one ranked in the current iteration. The overlap of Shapley values ​​in large neurons indicates that the current neuron may be the [number]th [neuron]. One of the largest neurons will be selected for further sampling. As the sampling process continues, the Shapley value and its confidence interval for each neuron will be updated; if the confidence interval of a neuron is no longer consistent with that of the first neuron... If large Shapley values ​​overlap, then remove the neuron from the candidate set. Removing neurons from the middle ensures that only neurons that may have a significant impact on the final result are further evaluated, thereby improving the computational efficiency of neuron Shapley values. The selected client obtains the preset number of semantic blocks through the aforementioned adaptive sampling and early truncation methods. G The key neurons and their Shapley values.

[0042] S403. The selected client calculates the Shapley value of the key neurons in each semantic block and performs normalization processing to quantify the semantic block contribution of the local model in the client, revealing the difference in contribution of different semantic blocks to model performance, and enhancing the transparency and reliability of the training process. S404. The selected client, based on the semantic block contribution size and semantic block discard rate, considers semantic blocks with contributions higher than a preset threshold as retained blocks, and discards semantic blocks with contributions lower than the preset threshold. The retained blocks are quantified and uploaded to the central server.

[0043] In this embodiment, the selected client normalizes the Shapley values ​​of key neurons in the semantic block to obtain normalized Shapley values ​​of the key neurons. The expression for the normalized Shapley values ​​of the key neurons is as follows: ; in, Indicates the first g The Shapley value of a key neuron. This represents the minimum Shapley value among the key neurons. This represents the maximum Shapley value among the key neurons. Indicates the first g Shapley values ​​of key neurons after normalization; The selected client quantifies the contribution of a semantic block by calculating the normalized Shapley value of the key neurons in each semantic block, thus accurately identifying semantic blocks that have a significant impact on model performance. The expression for the semantic block contribution is as follows: ; in, Represents semantic blocks x Contribution express, G This indicates a semantic block. x The number of key neurons in the middle, Indicates the first g Shapley values ​​of key neurons after normalization; The selected client sets a preset threshold and discards semantic blocks whose contribution is below the preset threshold based on the contribution of each semantic block, combined with the semantic block discard rate. Semantic blocks whose contribution exceeds a preset threshold are considered reserved blocks. Quantize the reserved blocks and then convert the quantized reserved blocks. Uploaded to the central server.

[0044] S5. The central server dequantizes and reassembles the received semantic blocks, performs client model aggregation, and updates the global model using selective model aggregation. The specific steps are as follows: S501. The central server dequantizes the quantized retained blocks and performs semantic block reorganization with the unchanged blocks from the previous round to obtain the client semantic block reorganization model. S502. The central server performs model aggregation on all semantic block reorganization models according to the aggregation algorithm, and generates an updated global model using selective model aggregation.

[0045] In this embodiment, the central server dequantizes the quantized reserved blocks, and then converts the dequantized reserved blocks into... Compared to the previous global model Unchanged block Semantic block reorganization is performed to obtain a semantic block reorganization model. ; The central server reorganizes the model based on semantic blocks, reconstructing the local models of all clients. And using FedAvg's aggregation algorithm, the global model is updated to obtain the first-stage updated global model; FedAvg is an existing, communication-efficient federated learning algorithm. The client performs multiple rounds of iterative training locally; subsequently, the client transmits the trained model parameters to the server, which aggregates the received model parameters using a weighted average method; the aggregation rate is then utilized. and the number of clients participating in training The number of clients aggregated in the global model is calculated. This also represents the total number of clients selected by the central server; The central server employs selective model aggregation, which uses an aggregation algorithm to obtain the updated global model expression as shown below: ; in, This indicates the total number of clients selected by the central server. Indicates the first Round of updates h The selected client's dequantization hold block, This represents the updated global model; In the process of federated learning, the communication overhead problem of selective model aggregation is not only reflected in the amount of model parameters transmitted, but also closely related to the quality of the client models participating in the aggregation. Therefore, selective model aggregation based on loss and correlation is introduced. like Figure 2As shown, selective model aggregation specifically involves: calculating the MMD, then calculating the client's comprehensive score, obtaining the set of key neurons, obtaining the selected clients, and using an aggregation algorithm to aggregate them to obtain the updated global model.

[0046] S6. The central server determines whether the current training has reached the preset communication rounds or whether the model meets the convergence condition. If not, the updated global model is redeployed to the client and the process returns to step S2 to continue the next round of training. Otherwise, the training process ends, and the federated learning global model training is completed. The specific steps are as follows: S601. The central server checks whether the current training round has reached the preset communication round or whether the global model meets the convergence condition. If it has not reached the preset round or has not converged, the updated global model parameters for this round are sent to the clients participating in the training, and the process returns to step S2 to continue the next round of training. If the preset round has been reached or the process has converged, the process proceeds to step S602. S602. The central server terminates the iteration process, outputs the current global model as the final model, and completes the global model training of federated learning.

[0047] In this embodiment, the central server checks whether the current training round of the global model has reached the preset communication round, or whether the global model meets the convergence condition. If the current round has not reached the preset round and the model has not yet converged, the updated global model parameters for this round are sent to the clients participating in the training, and the process returns to step S2 to continue the next round of training. If the current training round has reached the preset communication round, or the global model has met the convergence condition, the process proceeds to termination. During the termination process, the central server immediately stops the iteration process, does not initiate a new round of client selection and training, and outputs the currently held global model as the final model. This final model has been sufficiently trained, achieving efficient federated learning while ensuring model accuracy. Through the aforementioned server judgment and timely termination mechanism, this invention avoids invalid training rounds, saves unnecessary communication resources and computational overhead, and ensures that the model automatically terminates when it reaches the preset performance or maximum number of rounds, thereby improving the overall efficiency and automation of federated learning.

Claims

1. A communication-efficient federated learning method based on semantic block contribution measurement, characterized in that, Includes the following steps: S1. Global Model Initialization: The central server initializes the global model parameters and sends the initialized global model parameters to the clients participating in the training. S2, Local Model Training: The client uses the local dataset to iteratively train the global model to obtain the local model, calculates the maximum mean difference between the local model and the global model, and calculates the client importance score in combination with the training loss, and uploads it to the central server. S3. Participating Client Selection: The central server selects clients based on their importance scores to reduce the number of clients participating in communication and to determine the set of clients participating in subsequent updates. S4. Local Model Semantic Block Division: The selected client divides the network structure of the trained local model into semantic blocks, calculates the contribution of each semantic block, sets a semantic block contribution threshold, and discards the semantic block if the contribution of the semantic block is lower than the threshold to reduce the uploaded parameters; otherwise, the semantic block is retained, quantized, and uploaded to the central server. S5. Global Model Aggregation Update: The central server dequantizes and reassembles the received semantic blocks, performs model aggregation, and updates the global model parameters. S6. Global model training complete: The central server determines whether the current training has reached the preset communication round or whether the model meets the convergence condition. If not, the updated global model is redeployed to the client and the process returns to step S2 to continue the next round of training. Otherwise, the training process ends and the federated learning global model training is completed.

2. The efficient federated learning method for communication based on semantic block contribution measurement according to claim 1, characterized in that, S2 includes the following steps: S201. The client performs a preset number of local iterative training rounds on the local model participating in the training of the client based on the local dataset. S202. The client calculates the maximum mean difference between the local model and the global model based on the trained local model parameters and the global model parameters from the previous round. S203. The client calculates its importance score based on the maximum mean difference between the local model and the global model, combined with a tradeoff between training loss and dynamic adjustment.

3. The efficient federated learning method for communication based on semantic block contribution measurement according to claim 1, characterized in that, S4 includes the following steps: S401. The selected client regards the sequence of layers that provide important semantic functions in the client's local model as semantic blocks, and defines the marginal gain or value of the semantic block to the performance improvement of the global model as the semantic block contribution. S402. To calculate the contribution of the semantic block, the selected client introduces an interpretable neuron Shapley value approximation calculation method. By randomly generating a neuron arrangement, the marginal contribution of the neuron in different arrangements is calculated and the average value is taken to obtain the Shapley value of each neuron. Based on this, the key neurons in the semantic block and their Shapley values ​​are selected. S403. The selected client calculates the Shapley value of the key neurons in each semantic block and performs normalization processing to quantify the semantic block contribution of the local model in the client, revealing the difference in contribution of different semantic blocks to model performance, and enhancing the transparency and reliability of the training process. S404. The selected client, based on the semantic block contribution size and semantic block discard rate, considers semantic blocks with contributions higher than a preset threshold as retained blocks, and discards semantic blocks with contributions lower than the preset threshold. The retained blocks are quantified and uploaded to the central server.

4. The efficient federated learning method for communication based on semantic block contribution measurement according to claim 3, characterized in that, The expression for the semantic block contribution is as follows: in, Represents semantic blocks Contribution Represents a semantic block. G Represents semantic blocks The number of key neurons in the middle, Indicates the first g The normalized Shapley value of each key neuron.

5. The efficient federated learning method for communication based on semantic block contribution measurement according to claim 4, characterized in that, S402 includes the following steps: S4021. The selected client calculates the marginal contribution of the neuron based on the approximate calculation method of the neuron's Shapley value, and uses Monte Carlo estimation to calculate the average value of the marginal contribution of the neuron through random sampling to obtain the Shapley value of each neuron. S4022. The selected client adopts early truncation. In the process of calculating the marginal contribution of neurons, by defining a performance threshold and combining it with the performance metric when the neuron is activated, the set of early neurons that do not meet the preset performance threshold is truncated to obtain the truncated set of neurons. S4023. The selected client, based on the truncated set of neurons, uses adaptive sampling, combined with the Shapley value of each neuron, to calculate the moving average and moving variance of the marginal contribution of the neurons, and calculates the confidence interval of the neurons based on the standard estimation limit, to obtain the key neurons in the semantic block. S4024. The selected client obtains the Shapley value of the key neuron based on the Shapley value of each neuron and the key neuron in the semantic block.

6. The efficient federated learning method for communication based on semantic block contribution measurement according to claim 5, characterized in that, The expression for calculating the Shapley value of each neuron is as follows: in, Indicates the first a The Shapley value of each neuron. Indicates the number of random sampling permutations. Indicates the first q In the second sampling a The marginal contribution of each neuron Indicates the first q The ordering of neurons in the second sampling. Indicates the first a The marginal contribution of each neuron Indicates sorting The Middle a The set of all key neurons preceding a given neuron. Indicates in set Add the a Performance metrics of a local model with a given number of neurons Indicates in set Performance metrics for local models.

7. The efficient federated learning method for communication based on semantic block contribution measurement according to claim 1, characterized in that, S5 includes the following steps: S501. The central server dequantizes the quantized retained blocks and performs semantic block reorganization with the unchanged blocks from the previous round to obtain the client semantic block reorganization model. S502. The central server performs model aggregation on all semantic block reorganization models according to the aggregation algorithm, and generates an updated global model using selective model aggregation.

8. The efficient federated learning method for communication based on semantic block contribution measurement according to claim 7, characterized in that, The updated global model expression is as follows: in, This indicates the total number of clients selected by the central server. Indicates the first Round of updates h The selected client's dequantization hold block, This represents the updated global model.

9. The efficient federated learning method for communication based on semantic block contribution measurement according to claim 1, characterized in that, S6 includes the following steps: S601. The central server checks whether the current training round has reached the preset communication round or whether the global model meets the convergence condition. If it has not reached the preset round or has not converged, the updated global model parameters for this round are sent to the clients participating in the training, and the process returns to step S2 to continue the next round of training. If the preset round has been reached or the process has converged, the process proceeds to step S602. S602. The central server terminates the iteration process, outputs the current global model as the final model, and completes the global model training of federated learning.

10. A device for optimizing communication overhead in interpretable federated learning based on semantic block contributions, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor; When the computer program is executed by the processor, it implements the steps of the communication-efficient federated learning method based on semantic block contribution metric as described in any one of claims 1 to 9.