A method of distributed collaboration for communication optimization
By using adaptive quantization encoding and model freshness factor aggregation methods, the problem of high communication costs in federated learning is solved, achieving stable training and efficient transmission in bandwidth-constrained environments, and improving model convergence and training stability.
Patent Information
- Application Number
- CN202310457962.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2043-04-25
AI Technical Summary
In bandwidth-constrained environments, existing federated learning methods cannot effectively reduce communication costs. In particular, in vehicle-to-everything (V2X) systems, frequent client-server interruptions lead to training failures, and the transmission of gradient information is redundant, with insufficient communication resources to support the rapid transmission of model parameters.
An adaptive quantization coding and aggregation method with a model freshness factor are adopted. The decision to transmit the model layer is made by calculating the relative entropy and local loss of the model layer. Quantization is performed based on the quantization level and noise estimation. By combining time-adaptive and client-adaptive quantization, communication costs are optimized.
It effectively reduces communication costs, ensures normal model training in bandwidth-constrained environments, reduces redundant gradient transmission, and improves model convergence and training stability.
Smart Images

Figure CN116468133B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine learning and relates to a distributed collaboration method with optimized communication. Background Technology
[0002] To address the data empowerment problem caused by data silos, collaborative training of machine learning models by multiple data holders has become increasingly popular in recent years. However, schemes where multiple data holders provide data and a central server integrates the data from all parties to train the model raise data privacy and security concerns. To address these challenges, the federated learning framework, where "the data remains stationary while the model moves," has emerged and is gradually becoming a new paradigm for multi-party collaborative model training. In federated learning, each participant shares model gradient updates in each round to collaboratively train the federated model. Since each participant's data remains local, data privacy and security are guaranteed.
[0003] Federated learning, a promising privacy-preserving learning method in distributed scenarios, involves multiple independent participants collaborating to achieve a common learning objective. It is widely used due to its strong privacy protection. Despite the significant benefits federated learning brings to mobile networks, it still faces considerable challenges. On the one hand, the rapid increase in the number of mobile devices has rendered existing infrastructure inadequate, preventing operators from providing reliable and inexpensive network connectivity. On the other hand, machine learning applications deployed on mobile devices increasingly utilize complex deep neural networks, resulting in each client uploading model parameters or gradients that consumes significantly more bandwidth, making communication a major bottleneck. Against this backdrop, this paper aims to design an efficient federated learning training method from a communication perspective to ensure timely transmission of model parameters within limited communication bandwidth.
[0004] Currently, there are some research works on efficient federated learning. ZHOUY, YEQ, LVJ proposed Overlap-FedAvg in "Communication efficient federated learning with compensated overlap-FedAvg" [in IEEE Transactions on Parallel and Distributed Systems, vol. 33, no. 1, pp. 192-205, 2022]. This method adopts a hierarchical computation strategy, a data compensation mechanism, and a Nesterov accelerated gradient algorithm. At the same time, it relaxes the chain constraint of federated learning and runs the model training phase and the model communication phase (i.e., uploading the local model and downloading the global model) in parallel, so that the latter phase can be completely covered by the former phase, thereby reducing communication overhead. EISIZADEHA, MOKHTARIA, and HASSANI H, in "FedPAQ: a communication-efficient federated learning method with periodic averaging and quantization" [in International Conference on Artificial Intelligence and Statistics], proposed FedPAQ, an efficient communication-based federated learning method with periodic averaging and quantization capabilities. FedPAQ uses periodic averaging, partial device participation, and quantized message passing to address the communication and scalability challenges in federated learning, and provides near-optimal theoretical guarantees for loss functions of both strongly convex and non-convex nature. HEN M, SHLEZINGER N, and POOR HV, in "Communication-efficient federated learning" [in Proceedings of the National Academy of Sciences, vol. 118, no. 17, pp. e202478911, 2021], proposed a communication-efficient federated learning framework. This framework designs a probabilistic device selection scheme, giving devices that significantly improve convergence speed and training loss a higher probability of being selected for machine learning model transmission. It also proposes a quantization method to shorten the convergence time of federated learning.While the methods described above do achieve some effect in reducing communication costs, these studies are based on the premise that the client's spatial location is relatively static and there will be no training interruption. However, these methods are no longer applicable in specific environments, and most of the gradient information is redundant. Gradient compression can be further used to reduce communication costs.
[0005] The number of parameters in a federated learning model is related to the selected machine learning model. As machine learning evolves, models become increasingly complex, with a growing number of parameters, leading to increased communication resource consumption for transmitting these parameters. In resource-constrained scenarios, communication resources may be insufficient to support rapid parameter transmission for training. In vehicle-to-everything (V2X) systems, frequent client-server training interruptions can cause training failures. Therefore, a federated learning method is needed to ensure both normal model training and efficient communication. Summary of the Invention
[0006] In view of this, the purpose of this invention is to provide a distributed collaboration method with optimized communication. First, the relative entropy is calculated based on the difference between the global model from the previous round and the local model in the current round. The result of the relative entropy determines whether to transmit the current model layer. Then, the server specifies different quantization levels in different rounds to achieve time-adaptive quantization. For different clients in the same round, different quantization levels are further specified to achieve client-adaptive quantization, thereby solving the problem of excessively high communication costs in bandwidth-constrained environments. Furthermore, assuming normal local training on the client side, and considering the possibility of frequent unexpected interruptions during transmission, federated learning can still train normally even when the client's geographical location changes.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] A distributed collaboration method with communication optimization includes adaptive quantization encoding and aggregation with a model freshness factor;
[0009] The adaptive quantization coding specifically includes the following steps:
[0010] S11: Determine the quantization level for different clients in the current round: Before sending the global model, the server determines the time-adaptive quantization level based on the client's average running loss, and determines the client-adaptive quantization level based on the cumulative quantization parameters and quantization error. At the same time, the server sends the global model and quantization level to the client.
[0011] S12: Calculate the relative entropy of the model layer and determine whether the model layer has been transmitted: When the local model parameters do not change, the moving vehicle node uploads the gradient value in each iteration. The relative entropy of the same layer parameters between the local update and the global update is calculated to calculate the contribution value, and the model layer is determined to be transmitted based on the comparison of the contribution values.
[0012] S13: Calculate noise estimation of local loss and quantize parameters: The client calculates noise estimation from local loss based on the received global model parameters and quantization level, quantizes parameters according to quantization level, and then sends the quantized parameters and noise estimation to the server for aggregation.
[0013] Optionally, S11 specifically includes: time-adaptive quantization and client-adaptive quantization; time-adaptive quantization uses a different quantization level q for each round t of federated learning training. t ; make q t The q function monotonically increases as a function of t, and the training loss is used to adaptively change q. t Size; G(p) t The estimated value is the average local loss, G(p). t The noise estimate for ) is:
[0014]
[0015] Where S t It is the set of client samples in the t-th round, |D k | is the size of the local dataset, F k (p t This is a localized loss. Where f pt (d) is the loss function; tracking running average loss.
[0016] For q min ∈N, first initialize q1 = q min Determine training in Convergence occurs over time; for some φ∈N, the comparison is determined. The number of rounds t; at convergence, set q t =2q t-1 And keep at least φ rounds of quantization level fixed so that the reduction of G is in This is reflected in the convergence of the training loss; to avoid unconstrained quantization during convergence, the quantization level is restricted to q. max The specific time-adaptive quantization is represented as follows:
[0017]
[0018] Client-side adaptive quantization applies each parameter p on the client side. iCumulative weighted average Quantizing Federated Learning Accumulated Quantization Parameters Where q is the quantization level, and quantization error is defined. The communication cost for each client is a linear function of the quantization level q, and the communication cost for each round is proportional to Q = Kq, where Q is the communication budget and is used as a measure of communication cost.
[0019] Client-adaptive quantization dynamically adjusts the quantization level for each client; within a single round, each client c k Different quantization levels q were assigned k The preceding definition is generalized to
[0020] The prior convergence results of distributed training and federated learning depend on The upper bound b determines the convergence speed, which makes Become the choice q k Time-optimized natural indicators; first optimize closely related measurements. Use parameters q1…q K The expectation above replaces the upper limit; given q, choose q. k Make Q obey minimize;
[0021] Theorem 1 provides the quantification levels p1…p K The analytical formula;
[0022] Theorem 1: Given parameters p1…p K ~U[-t,t] and quantization level q, subject to Impact pass Minimize, where and
[0023] Theorem 1 is used to reduce communication costs while maintaining the same loss as static quantization at a fixed q; to ensure that the quantization level is a natural number, the optimal real solution is approximated as...
[0024] The server combines time-adaptive and client-adaptive quantization algorithms; in each round t, time-adaptive quantization determines the initial quantization level q. t Client-side adaptive quantization finds the target Impact Minimum client quantization level k∈{1,…,K}.
[0025] Optionally, S12 specifically includes: calculating the relative entropy of the same-layer models between local updates and global updates, and determining the model layer that needs to be uploaded based on a threshold; calculating the relative entropy of the same-layer parameters between local updates and global updates, expressed as:
[0026]
[0027] Where P j (t) is the gradient distribution of the j-th layer in the t-th iteration of the local model, G j (t-1) is the gradient distribution of the j-th layer in the t-th iteration of the global model. It is a local update of the gradient parameter with index i in the j-th layer of the t-th iteration. It is the sum of the gradient parameter values of the j-th layer in the t-th iteration. It is the sum of the gradient parameter values of the j-th layer in the t-th iteration. It is the gradient parameter with index i in the j-th layer of the t-th iteration;
[0028] After assessing the similarity of each layer of the model, the network model layer used for transmission is determined based on a threshold. The threshold is selected based on the mean of the first 5 rounds of model pre-training. The threshold ET = {et} is set according to the model layer. 1 ,…et j ,…et l The model has a total of l layers; for simplicity, we use... This represents the similarity of entropy in the local round t at the j-th layer of the model; when At that time, the client's model based on the training data changes significantly in the current round, and the j-th layer of the model is uploaded to the edge server; when At that time, the local model on the client changes little and there is a large amount of redundant gradient data, so the real values of the j-th layer of the model are filled with 0.
[0029] Optionally, S13 specifically includes: based on the client's local loss To calculate noise estimation Where |D k | represents the size of the local dataset. It is the loss function; the client combines the quantization parameters and noise estimation. Send it to the server for aggregation.
[0030] Optionally, the aggregation with the model freshness factor specifically refers to:
[0031] When the server receives the gradient parameters uploaded by the client, it aggregates the gradients based on the periodicity label. The aggregation formula is as follows:
[0032]
[0033] Among them G t This represents the global parameter for the server's aggregation in round t. This is the amount of local training data in round t. This represents the local gradient parameters uploaded by client i in round t. It is a weighting function for evaluating the freshness of the model, where Client i is the last to participate in the latest global round. U represents the set of clients received by the server within a time threshold, and |U| represents the number of clients. A weighting equation is designed to evaluate the freshness of the model, expressed as:
[0034]
[0035] A first freshness factor is assigned. When a vehicle hasn't uploaded its data for multiple rounds, this first freshness factor decreases, resulting in a smaller weight in the global model. When gradients haven't been uploaded for multiple rounds, a second freshness factor is assigned. The second freshness factor decreases faster than the first freshness factor. At that time, the server does not aggregate nodes. The value range is (0,1).
[0036] The beneficial effects of this invention are as follows:
[0037] (1) The adaptive quantization coding method proposed in this invention transmits the original gradient parameters using low-bit encoded values, which greatly reduces the transmission and communication costs compared to the original 32-bit encoded values. By proposing a dual adaptive quantization method, the quantization level can be dynamically changed between different times and different clients, resulting in high computational efficiency.
[0038] (2) The asynchronous aggregation method proposed in this invention changes the measurement factors of the aggregation weight factor in the traditional aggregation method, and improves the convergence of the model while ensuring the accuracy of the model.
[0039] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0040] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:
[0041] Figure 1 This is a model diagram of a hierarchical federated learning system for intelligent connected vehicles provided by the present invention;
[0042] Figure 2 A flowchart of sparse quantization encoding of model parameters provided by the present invention;
[0043] Figure 3 The diagrams shown are client-side adaptive quantization diagrams designed for this invention; (a) is static quantization; (b) is client-side adaptive quantization. Detailed Implementation
[0044] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0045] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0046] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0047] Please see Figure 1 This is a model diagram of a hierarchical federated learning system for intelligent connected vehicles, which specifically includes the following modules:
[0048] Central server: Receives gradient parameters from edge servers and performs global aggregation. The aggregation method adopted is synchronous aggregation, and the specific aggregation method is parameter averaging. After averaging all parameters, the global parameters are broadcast to the edge servers. It is mainly composed of base stations and other devices with powerful computing capabilities.
[0049] Edge server: Collects parameters from clients and performs edge local aggregation. The aggregation form adopted is asynchronous aggregation. The specific aggregation method is parameter averaging based on the freshness factor. It waits for clients to send gradient parameters within a time threshold range. The client set for each round of aggregation is different. The gradient parameters are decoded before each round of edge aggregation. It is mainly composed of roadside units and other devices with certain computing power.
[0050] Client: After receiving global parameters from the edge server, it trains the local model based on local data. After training, it performs sparsification and quantization encoding on the parameters and sends the local gradient parameters and noise estimates to the edge server. It mainly consists of devices with limited computing power, such as mobile vehicles.
[0051] Please see Figure 2 The flowchart for sparse quantization encoding of model parameters includes the following steps:
[0052] 1) Data collection: The client collects data on the surrounding environment based on local sensors and performs preprocessing on the data, mainly including the collection of information such as roadside infrastructure, driver behavior and various road conditions.
[0053] 2) Local training: The client performs local iterative training based on local data, and updates the local model based on the global model broadcast by the edge server in different global rounds.
[0054] 3) Gradient sparsity: After the local iterative training is completed on the client, the model is layered. The similarity between the current model layer and the global model layer of the previous round is judged locally. Only the model layer with low similarity is transmitted, and the other model layers that are not uploaded are replaced with 0.
[0055] 4) Gradient quantization encoding: After the local model sparsification is completed, the local sparse parameters are further quantized and encoded. The gradient parameters are processed according to the quantization level determined by the server, and the noise estimate is calculated based on the local loss.
[0056] 5) Perform edge aggregation: After receiving the encoded gradient transmitted by the client, the edge server determines the quantization level for the next round based on noise estimation. Based on time adaptation, it further determines the quantization level for different clients based on the parameters and loss sent by the client. Then, it performs asynchronous parameter averaging based on the model freshness factor and broadcasts the local aggregated parameters to the client to continue model training.
[0057] 6) Perform global aggregation: After receiving the local aggregation model transmitted by the edge server, the central server performs global aggregation, specifically using the parameter averaging method.
[0058] Please see Figure 3The diagram below illustrates the adaptive encoding and decoding process designed in this invention. (a) represents static quantization; (b) represents client-side adaptive quantization, which specifically includes the following steps:
[0059] Client-side adaptive quantization applies each parameter p on the client side. i Cumulative weighted average Quantizing Federated Learning Accumulated Quantization Parameters Where q is the quantization level, for which the quantization error is defined. The communication cost for each client is roughly a linear function of the quantization level q, which means that the communication cost per round is proportional to Q = Kq, where Q is the communication budget and is used as a measure of communication cost.
[0060] Client-adaptive quantization dynamically adjusts the quantization level for each client. This means that even within a single round, each client's c k Different quantization levels q can also be assigned. k Then, the previous definition is generalized to
[0061] The prior convergence results of distributed training and federated learning depend on The upper bound b determines the convergence speed, which makes Become the choice q k Time-optimized natural metrics. First, closely related measurements were optimized. It uses parameters q1…q K The expectation above replaces the upper bound. Design an algorithm to choose q given q. k Make Q obey Minimize. Therefore, this method effectively minimizes communication costs while maintaining quantization error similar to static quantization.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A distributed cooperation method with optimized communication, characterized in that: This method includes adaptive quantization encoding and aggregation with a model freshness factor; The adaptive quantization coding specifically includes the following steps: S11: Determine the quantization level for different clients in the current round: Before sending the global model, the server determines the time-adaptive quantization level based on the client's average running loss, and determines the client-adaptive quantization level based on the cumulative quantization parameters and quantization error. At the same time, the server sends the global model and quantization level to the client. S12: Calculate the relative entropy of the model layer and determine whether the model layer has been transmitted: When the local model parameters do not change, the moving vehicle node uploads the gradient value in each iteration. The relative entropy of the same layer parameters between the local update and the global update is calculated to calculate the contribution value, and the model layer is determined to be transmitted based on the comparison of the contribution values. S13: Calculate the noise estimate of the local loss and quantize the parameters: The client calculates the noise estimate from the local loss based on the received global model parameters and quantization level, and quantizes the parameters according to the quantization level. Then, the quantized parameters and noise estimate are sent to the server for aggregation. The aggregation with the model freshness factor specifically refers to: When the server receives the gradient parameters uploaded by the client, it aggregates the gradients based on the periodicity label. The aggregation formula is as follows: Among them G t This represents the global parameter for the server's aggregation in round t. This is the amount of local training data in round t. This represents the local gradient parameters uploaded by client i in round t. It is a weighting function for evaluating the freshness of the model, where Client i is the last to participate in the latest global round. U represents the set of clients received by the server within a time threshold, and |U| represents the number of clients. A weighting equation is designed to evaluate the freshness of the model, expressed as: A first freshness factor is assigned. When a vehicle hasn't uploaded its data for multiple rounds, this first freshness factor decreases, resulting in a smaller weight in the global model. When gradients haven't been uploaded for multiple rounds, a second freshness factor is assigned. The second freshness factor decreases faster than the first freshness factor. At that time, the server does not aggregate nodes. The value range is (0,1).
2. The distributed cooperation method with communication optimization according to claim 1, characterized in that: S11 specifically includes: time-adaptive quantization and client-adaptive quantization; time-adaptive quantization uses a different quantization level q for each round t of federated learning training. t ; make q t The q function monotonically increases as a function of t, and the training loss is used to adaptively change q. t Size; G(p) t The estimated value is the average local loss, G(p). t The noise estimate for ) is: Where S t It is the set of client samples in the t-th round, |D k | is the size of the local dataset, F k (p t This is a localized loss. Where f pt (d) is the loss function; tracking running average loss. For q min ∈N, first initialize q1 = q min Determine training in Convergence occurs over time; for some φ∈N, the comparison is determined. The number of rounds t; at convergence, set q t =2q t-1 And keep at least φ rounds of quantization level fixed so that the reduction of G is in This is reflected in the convergence of the training loss; to avoid unconstrained quantization during convergence, the quantization level is restricted to q. max The specific time-adaptive quantization is represented as follows: Client-side adaptive quantization applies each parameter p on the client side. i Cumulative weighted average Quantizing Federated Learning Accumulated Quantization Parameters Where q is the quantization level, and quantization error is defined. The communication cost for each client is a linear function of the quantization level q, and the communication cost for each round is proportional to Q = Kq, where Q is the communication budget and is used as a measure of communication cost. Client-adaptive quantization dynamically adjusts the quantization level for each client; within a single round, each client c k Different quantization levels q were assigned k The preceding definition is generalized to The prior convergence results of distributed training and federated learning depend on The upper bound b determines the convergence speed, which makes Become the choice q k Time-optimized natural indicators; first optimize closely related measurements. Use parameters q1…q K The expectation above replaces the upper limit; given q, choose q. k Make Q obey minimize; Theorem 1 provides the quantification levels p1…p K The analytical formula; Theorem 1: Given parameters p1…p K ~U[-t,t] and quantization level q, subject to Impact pass Minimize, where and Theorem 1 is used to reduce communication costs while maintaining the same loss as static quantization at a fixed q; to ensure that the quantization level is a natural number, the optimal real solution is approximated as... The server combines time-adaptive and client-adaptive quantization algorithms; in each round t, time-adaptive quantization determines the initial quantization level q. t Client-side adaptive quantization finds the target Impact Minimum client quantization level k∈{1,…,K}.
3. The distributed cooperation method with communication optimization according to claim 2, characterized in that: S12 specifically includes: calculating the relative entropy of the same-layer model between local updates and global updates, and determining the model layer that needs to be uploaded based on a threshold; calculating the relative entropy of the same-layer parameters between local updates and global updates, expressed as: Where P j (t) is the gradient distribution of the j-th layer in the t-th iteration of the local model, G j (t-1) is the gradient distribution of the j-th layer in the t-th iteration of the global model. It is a local update of the gradient parameter with index i in the j-th layer of the t-th iteration. It is the sum of the gradient parameter values of the j-th layer in the t-th iteration. It is the sum of the gradient parameter values of the j-th layer in the t-th iteration. It is the gradient parameter with index i in the j-th layer of the t-th iteration; After assessing the similarity of each layer of the model, the network model layer used for transmission is determined based on a threshold. The threshold is selected based on the mean of the first 5 rounds of model pre-training. The threshold ET = {et} is set according to the model layer. 1 ,…et j ,…et l The model has a total of l layers; for simplicity, we use... This represents the similarity of entropy in the local round t at the j-th layer of the model; when At that time, the client's model based on the training data changes significantly in the current round, and the j-th layer of the model is uploaded to the edge server; when At that time, the local model on the client changes little and there is a large amount of redundant gradient data, so the real values of the j-th layer of the model are filled with 0.
4. The distributed cooperation method with communication optimization according to claim 3, characterized in that: S13 specifically includes: based on the client's local loss To calculate noise estimation Where |D k | represents the size of the local dataset. It is the loss function; the client combines the quantization parameters and noise estimation. Send it to the server for aggregation.
Citation Information
Patent Citations
User selection and resource allocation method based on federated learning
CN111866954A
Federated learning gradient quantification method, efficient communication federated learning method and related devices
CN115392348A