A semi-federated learning method, transmitter-receiver structure, system, and optimization method
By introducing a semi-federated learning method into the federated learning system, user equipment can send local gradients and data samples on the same time-frequency resources. The base station then decodes and aggregates these samples. Combined with centralized learning, this solves the problem of underutilized base station computing resources and achieves more efficient model training and spectrum resource utilization.
Patent Information
- Application Number
- CN202210399704.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-15
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-04-15
AI Technical Summary
In existing federated learning systems, the computing resources of base stations are not fully utilized, resulting in limited system performance improvement and failing to effectively combine local data from user devices for centralized learning.
A semi-federated learning approach is adopted, in which user equipment sends local gradients and data samples on the same time-frequency resources, the base station decodes and aggregates them, and combines centralized learning to use the base station's computing resources for global model updates.
By making full use of base station computing resources, the training effect of the global model was improved, the learning performance and spectrum resource utilization of the system were enhanced, user energy consumption was saved, and the convergence speed of the model was accelerated.
Smart Images

Figure CN116028802B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless communication technology, and in particular to a semi-federated learning method, a transmitter-receiver structure, a system and optimization method, a control device and an electronic device. Background Technology
[0002] In future 6G networks, edge AI offers limitless possibilities for achieving intelligent interconnection. Federated learning is a representative distributed learning paradigm for edge AI, enabling distributed edge devices to collaborate in training a shared model.
[0003] In existing federated learning systems, each user device trains its model using local data and then uploads the trained local gradients to the base station. The base station aggregates the local gradients from all user devices to obtain the global gradient and uses this gradient to update the global model. After updating, the base station distributes the global model to all user devices. In this way, model training can be performed using the local data of each user device while ensuring the data privacy of each user device.
[0004] However, in existing federated learning systems, the base station is only responsible for aggregating the local gradients uploaded by each user device, without considering the full utilization of the base station's idle computing resources. This leads to a waste of the abundant computing resources in the base station, which in turn limits the further improvement of the federated learning system's performance.
[0005] Therefore, there is an urgent need for an improved federated learning system that can fully utilize the idle computing resources of the base station while the user equipment performs local model training for federated learning, thereby improving the training effect of the global model. Summary of the Invention
[0006] The purpose of this invention is to provide a semi-federated learning method, a control device and an electronic device, a transmitter-receiver structure suitable for a semi-federated learning system, and a semi-federated learning system optimization method to improve the training effect of traditional federated learning systems.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] Firstly, this invention provides a semi-federated learning method that combines traditional federated learning and centralized learning. The system applying the semi-federated learning method includes: a base station and at least one user equipment; the method includes:
[0009] Within each training round, the user equipment first calculates the local gradient using a batch of local data samples; then, the user equipment selects another batch of local data samples and uploads the batch of data samples and the local gradient to the base station; wherein, a training round includes a local training cycle and a communication round, and the uploading process of data samples and local gradients of each user equipment is carried out on the same time-frequency resources.
[0010] After receiving the superimposed signal, which includes data samples and local gradients, uploaded by each user equipment, the base station first decodes the local data uploaded by each user equipment and subtracts the local data of each user equipment from the received superimposed signal. Then, the base station aggregates the remaining local gradients of each user equipment in the superimposed signal to obtain the federated learning aggregated gradient. Next, the base station uses the decoded local data uploaded by each user equipment to perform centralized learning to obtain the centralized learning gradient. Finally, the base station merges the federated learning aggregated gradient and the centralized learning gradient to obtain the global gradient and uses the global gradient to update the global model.
[0011] Secondly, the present invention also provides a transmitter-receiver structure suitable for a semi-federated learning system, the transmitter-receiver structure comprising:
[0012] Each user equipment uses two parallel power allocation factors to control the transmission power of the local gradient and the transmission power of the data sample respectively. The local gradient and the data sample after transmission power control of each device are transmitted to the base station on the same time-frequency resources.
[0013] Based on the received superimposed signals, the base station first equips each user equipment with a beamforming vector to decode data samples for centralized learning in parallel, and then uses another beamforming vector to complete local gradient aggregation based on over-the-air computation.
[0014] Thirdly, the present invention also provides a semi-federated learning system, including K user equipments and a base station, wherein the user equipments and the base station adopt the above-described transmitter-receiver structure to implement the above-described semi-federated learning method.
[0015] Fourthly, the present invention also provides an optimization method for a semi-federated learning system, the optimization method comprising the following steps:
[0016] Upon entering each preset communication round, the base station obtains the channel gain vector from each user equipment to the base station in the current communication round. Based on the convergence criterion of the semi-federated learning system, and under the premise of satisfying the power constraints, transmission delay constraints, and aggregated gradient error constraints of each user equipment, the first optimization problem of the semi-federated learning system is constructed.
[0017] Solve the first optimization problem of the semi-federated learning system to obtain the optimization method of the semi-federated learning system; wherein, the optimization method of the semi-federated learning system includes: the configuration scheme of the two power allocation factors of each user equipment, and the configuration scheme of each beamforming vector of the base station;
[0018] The base station controls each user equipment and itself to configure the corresponding power or beamforming vector according to the semi-federated learning system optimization method, so that each user equipment sends local gradients and local data samples to the base station to complete the semi-federated learning.
[0019] Fifthly, the present invention also provides a control device for a semi-federated learning system, the control device comprising the following modules:
[0020] The information acquisition module is used to acquire the channel gain vector from each user equipment to the base station in the current communication round;
[0021] The semi-federated learning system optimization module is used to determine the power allocation factor configuration scheme for each user equipment when transmitting the local gradient and the local data sample in the current communication round, and the beamforming vector configuration scheme for the base station when receiving the local gradient and the local data sample; wherein, the semi-federated learning system optimization module includes two sub-modules:
[0022] The configuration scheme determination submodule is used to determine the configuration scheme of the power allocation factor of each user equipment in the second half of the current communication round, as well as the configuration scheme of the base station beamforming vector, based on the channel gain vector from each user equipment to the base station, the preset power constraints of each user equipment, the preset transmission delay constraints of each user equipment, and the preset aggregation gradient error constraints.
[0023] The configuration scheme execution submodule is used to control each user equipment and base station to configure the corresponding power or beamforming vector according to the configuration scheme of the power allocation factor and the configuration scheme of the base station beamforming vector.
[0024] The local data decoding module is used to control the base station to decode the local data samples uploaded by each user equipment for centralized learning in parallel after completing the beamforming vector configuration, and to subtract all local data sample signals from the superimposed signal received by the base station.
[0025] The local gradient aggregation module is used to control the base station to aggregate the local gradient in the superimposed signal received by the base station based on the over-the-air computing method after completing the beamforming vector configuration, so as to obtain the aggregated gradient.
[0026] The global model update module controls the base station to obtain a centralized learning gradient based on the decoded local data signal, and obtains the global gradient for the current training round by merging the aggregated gradient with the centralized learning gradient. Finally, the global gradient is used to update the global model.
[0027] Sixthly, the present invention also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus; wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; wherein,
[0028] The memory is used to store computer programs;
[0029] When the processor executes the program stored in the memory, it implements the aforementioned semi-federated learning method, system optimization method, and system control method.
[0030] In a seventh aspect, the present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the above-described semi-federated learning method, system optimization method, and system control.
[0031] Eighthly, the present invention also provides a computer program product containing instructions that, when run on a computer, causes the computer to perform the steps of the above-described semi-federated learning method, system optimization method, and system control.
[0032] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0033] As can be seen from the above, by applying the solution provided by this invention, when user equipment in a semi-federated learning system sends local gradients and local data samples, it can first preset the communication time interval between each device and the base station, i.e., the total time of each communication round. Thus, upon entering the current communication round, the base station obtains the channel gain vector from each user equipment to the base station in the current communication round and determines the local gradients and local data samples to be sent. Furthermore, before each device sends its local gradients and local data samples, the base station, based on the channel gain vector from each user equipment to the base station, preset power constraints for each user equipment, transmission delay constraints for each user equipment, and aggregated gradient error constraints, obtains a semi-federated learning system optimization method, including: configuration schemes for the two power allocation factors of each user equipment and configuration schemes for each beamforming vector of the base station. Subsequently, the base station controls each user equipment and itself to configure their corresponding power or beamforming vectors according to the semi-federated learning system optimization method. In this way, each user equipment (UE) can simultaneously transmit its local gradient and local data samples to the base station on the same time-frequency resources, according to the configuration scheme of the two power allocation factors. Then, when the base station receives the superimposed signal of the local gradients and local data samples from each UE, it first decodes the local data of each UE for centralized training according to the beamforming vector configuration scheme, and then aggregates the local gradients of each UE. Finally, the base station merges the federated learning aggregated gradient with the centralized learning gradient to obtain the global gradient, and uses the global gradient to update the global model. Thus, the semi-federated learning within this communication round is completed.
[0034] In this system, because the transmit / receive structure of each user equipment and base station is configured according to the semi-federated learning system architecture, the base station aggregates the local gradients of each user equipment and performs centralized learning based on the local data samples uploaded by each user equipment, which is beneficial for making full use of the base station's computing resources. Furthermore, since the base station can jointly use federated learning to aggregate gradients and centralized learning to update the global model, the overall learning performance of the system is improved. At the same time, the local gradients and local data samples of each user equipment are sent to the base station on the same time-frequency resources, which helps to improve the system's spectrum resource utilization.
[0035] Furthermore, the pre-defined power constraints for each user equipment help conserve user energy while completing the semi-federated learning task. Moreover, because the transmit power configuration of each user equipment and the beamforming vector of the base station are jointly optimized, the convergence process of semi-federated learning is globally optimized, improving its convergence and achieving better training results. Based on this, applying the solution provided in this invention can improve the rationality of base station computing resource allocation, fully utilize idle base station computing resources, and enable the base station to collaborate with various devices in semi-federated learning model training, thus improving the training effect of semi-federated learning compared to traditional federated learning. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0037] Figure 1 A schematic diagram of a semi-federated learning method and system structure provided in an embodiment of the present invention;
[0038] Figure 2 This is a schematic diagram of the transmitter and receiver structure of a semi-federated learning system provided in an embodiment of the present invention;
[0039] Figure 3 A flowchart illustrating a semi-federated learning system optimization method provided in an embodiment of the present invention;
[0040] Figure 4 This is a schematic diagram illustrating the solution process for the power allocation factor of each user equipment and the configuration scheme of each beamforming vector of the base station in a semi-federated learning system optimization method provided in an embodiment of the present invention.
[0041] Figure 5 A schematic diagram of the structure of a semi-federated learning system control device provided in an embodiment of the present invention;
[0042] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] To better understand this technical solution, the method of the present invention will be described in detail below with reference to the accompanying drawings.
[0045] like Figure 1 As shown, this semi-federated learning system includes K user devices and one base station. Specifically, in the current t-th training round, each of the K user devices has a local federated learning dataset D. f,1 D f,2 ,...,D f,K and the local data sample set D used for centralized learning. c,1 D c,2 ,...,D c,K .
[0046] The training round includes a local training cycle and a communication round.
[0047] In this process, the k-th user device is trained based on a local federated learning dataset, which yields local gradients. Each user equipment (UE) uploads its local gradient and local data samples to the base station within the same time-frequency resources. Upon receiving the superimposed signals from each UE, the base station first decodes the local data samples for centralized learning and aggregates the local gradient information from each UE. Finally, the base station merges the centralized learning gradient and the federated learning gradient to obtain the global gradient for the current training epoch, and uses this global gradient to update the global model.
[0048] Understandably, since traditional federated learning systems do not consider centralized learning by uploading local data samples from user equipment to the base station, a reasonable design of the transmitter-receiver structure in both the user equipment and the base station is needed to adapt to the transmission requirements of local gradients and local data samples from user equipment, in order to support the task of semi-federated learning. Based on this, a transmitter-receiver structure provided in this invention can be used to complete the transmission and reception of local gradients and local data samples between the user equipment and the base station.
[0049] Figure 2 This is a schematic diagram of a transmitter-receiver structure suitable for a semi-federated learning system, provided as an embodiment of the present invention. Figure 2As shown, in the current t-th training round, the k-th user device first uses the sample set D f,k Perform federated learning and local training to obtain local gradients. In addition, for the local data sample set D that needs to be uploaded c,k The local data samples are processed to obtain the local data sample signal vector d. t,k Then, the k-th user equipment is assigned a power allocation factor p. t,f,k and p t,c,k The base station allocates transmission power for the local gradient and the local data sample signal vector, respectively. Each communication round is divided into Q time slots, and within each time slot, the user equipment transmits the local gradient and one dimension of the local data sample signal vector, after transmission power control, to the base station on the same time-frequency resources.
[0050] In the q-th time slot of the current t-th communication round, the base station receives superimposed signals y from various user equipment. t,q Specifically:
[0051]
[0052] Where, p t,f,k and p t,c,k These are the q-th dimension components s of the transmitted local gradient signal vector. t,k,q and the q-th dimension component d of the data sample signal vector. t,k,q Power allocation factor at time; n t,q Let be an additive white Gaussian noise vector with noise power σ. 2 h t,k Let be the channel gain vector between the k-th user equipment and the base station within the current communication round. It is assumed that each channel gain vector remains unchanged within a communication round.
[0053] Based on the superimposed signals y received from each user t,q The base station first equips each user device with a beamforming vector to decode data samples for centralized learning in parallel, and then uses another beamforming vector to complete local gradient aggregation based on over-the-air computation.
[0054] Specifically, each user equipment is equipped with a beamforming vector f. t,k Used for parallel processing of superimposed signals y t,q And after processing, the local data sample uploaded by the kth user device is decoded. Among them, signal y t,q After decoding the beamforming vector f t,k The processed signal is:
[0055]
[0056] Where, d t,k,q It is the local data sample signal vector d from the k-th user equipment. t,k The q-th dimension component. In the formula, The first term is the local data sample received by the base station from the k-th user, the second term is the local data sample from other user equipment, the third term is the superimposed local gradient from each user equipment, and the fourth term is noise. In the current q-th time slot, the base station decodes the local data sample signal vector d from the k-th user equipment. t,k The q-th dimension component d t,k,q After decoding through a total of Q time slots, the base station reconstructs the local data sample signal vector d uploaded by the k-th user in the current t-th communication round. t,k And recover the local data sample set D uploaded by the kth user. c,k .
[0057] After decoding and obtaining local data samples from each user equipment, the base station extracts them from the superimposed signal y. t,q Subtract from the middle and use another beamforming vector b t The remaining signal is processed to perform local gradient aggregation based on aerial computation, thereby obtaining federated learning aggregated gradients.
[0058] Specifically, after the beamforming vector b is converged... t Processed signal for:
[0059]
[0060] Among them, s t,k,q It is the local gradient signal vector s t,k The q-th dimension component. The base station accumulates and reconstructs the federated learning aggregated gradient over Q time slots. Meanwhile, the base station uses local data samples d uploaded by each user equipment. t,k Perform centralized learning and calculate the centralized learning gradient. Finally, the base station will aggregate gradients through federated learning. By merging with the centralized learning gradient, the global gradient g can be calculated. t And utilize the global gradient g t This is used to update the global model. Specifically, the base station calculates the global gradient g according to the following formula. t :
[0061]
[0062] Subsequently, the base station updates the global model according to the following calculation formula:
[0063] w t+1 =w t -ηg t ,
[0064] Among them, w t η is the vector consisting of the parameters of the global model, and η is the learning rate.
[0065] Based on the semi-federated learning system transmitter-receiver structure provided in this embodiment of the invention, each user equipment can simultaneously transmit local gradients and local data samples using the same time-frequency resources. The base station can decode the local data samples uploaded by each user from the received superimposed signal and aggregate the local gradients of each user equipment based on an over-the-air computation method. Furthermore, the base station can use the local data samples uploaded by each user equipment for centralized learning, which is beneficial for fully utilizing the base station's computing resources. Finally, the base station can jointly use federated learning to aggregate gradients and centralized learning gradients to update the global model, thereby accelerating the convergence speed of the full-set model and improving the performance of the global model. In addition, in this transmitter-receiver structure, the local gradients and local data samples of each user equipment are transmitted to the base station on the same time-frequency resources, which helps to improve the system's spectrum resource utilization.
[0066] The aforementioned transmitter-receiver structure can be an improvement upon existing transmitter-receiver structures in user equipment and base stations. Furthermore, the transmitter-receiver structure provided in this invention is also applicable to any scenario requiring user equipment to simultaneously transmit analog and digital signals for tasks other than semi-federated learning. This invention does not impose specific limitations on these aspects.
[0067] Corresponding to the above-mentioned semi-federated learning method and a transmitter-receiver structure suitable for a semi-federated learning system, this invention provides an optimization method for a semi-federated learning system.
[0068] Figure 3 This is a flowchart illustrating a semi-federated learning system optimization method provided in an embodiment of the present invention. Figure 3 As shown, the optimization method for semi-federated learning systems can include the following steps:
[0069] S301: When entering each preset communication round, the base station obtains the channel gain vector from each user equipment to the base station in the current communication round, and each user equipment obtains the local data sample to be sent and calculates the local gradient.
[0070] A training round of a semi-federated learning system includes a local training cycle and a communication round. Each user equipment completes one local training session of federated learning in a local training cycle, and each user equipment communicates with the base station once in a communication round. When the above communication is performed, the time interval between each user equipment and the base station can be preset, which is the total length of each communication round. Thus, when entering each preset communication round, the base station can obtain the channel gain vector from each user equipment to the base station.
[0071] The length of the aforementioned communication rounds can be any duration set according to the needs of the actual application; however, this embodiment of the invention does not impose any specific limitations on this.
[0072] The base station can obtain the aforementioned channel gain vector in various ways. This embodiment of the invention does not impose specific limitations on this method.
[0073] For example, a base station can use a channel estimation method to obtain the aforementioned channel gain vector. The channel estimation method can be any method capable of obtaining global channel state information (CSI), and this embodiment of the invention does not impose specific limitations on the channel estimation method.
[0074] Each user equipment (UE) needs to determine the local data samples to be sent in the current communication round, calculate the local gradient, and inform the base station of the number of local data samples to be sent. Each UE can select a small batch of data samples from its entire local data sample set based on arbitrary selection criteria to calculate the local gradient, and can also select a portion of the local data samples from its entire local data sample set based on arbitrary selection criteria to send to the base station. This embodiment of the invention does not impose specific restrictions on the selection criteria.
[0075] S302: The base station obtains the optimization method for the target semi-federated learning system based on the channel gain vector from each user equipment to itself, the preset convergence criterion, the preset power constraints of each user equipment, the transmission delay constraints of each user equipment, and the aggregated gradient error constraints.
[0076] The semi-federated learning system optimization method includes: configuration schemes for the two power allocation factors of each user equipment and configuration schemes for each beamforming vector of the base station; preset convergence criteria include: the expected difference between the loss function F(w) of the (T+1)th training round and the global optimal loss function; preset power constraints for each user equipment include: the limited transmission power of each user equipment in the current communication round; transmission delay constraints for each user equipment include: the upper bound of delay that each user equipment must satisfy when uploading data samples to the base station in the current communication round; and aggregated gradient error constraints include: the tolerance of the base station for aggregated gradient error when receiving user information in the current communication round does not exceed a threshold.
[0077] After the base station obtains the channel gain vector in the current communication round, it can determine the configuration scheme of the power allocation factor of each user equipment in the semi-federated learning system and the configuration scheme of the base station's beamforming vector in the current communication round based on the obtained channel gain vector, as well as the preset convergence criteria, preset power constraints of each user equipment, transmission delay constraints of each user equipment, and aggregation gradient error constraints. Thus, the optimization method of the target semi-federated learning system in the current communication round is obtained.
[0078] The convergence criterion includes: the loss function F(w) in the (T+1)th training epoch and the globally optimal loss function F(w). * The expected value of the difference.
[0079] Optionally, in one specific implementation, the above convergence criterion can be expressed in the following form:
[0080]
[0081] in:
[0082]
[0083]
[0084]
[0085] G and ξ1 are non-negative constants, while μ, L and ξ2 are positive constants.
[0086] Based on this, in the specific implementation, in the obtained target semi-federated learning system optimization method, the expected difference between the loss function F(w) of the (T+1)th training round and the global optimal loss function has an upper bound. By optimizing the two power allocation factors of each user equipment and the beamforming vectors of each base station, the difference between the semi-federated learning loss function and the global optimal loss function can be reduced, thereby accelerating the convergence speed of semi-federated learning and improving the performance of federated learning.
[0087] The preset power constraints for each user device include: the limited transmission power of each user device within the current communication round. That is, in the obtained semi-federated learning system optimization method, the transmission power of each user device is finite, and the power allocation factor should be reasonably configured so that the transmission power of each user device does not exceed the maximum transmission power.
[0088] Optionally, in one specific implementation, the power constraints of the aforementioned user equipment may include:
[0089] |p f,k | 2 +|p c,k | 2 ≤P max
[0090] Where, p f,k and p c,k P represents the power allocation factor when the k-th user equipment transmits the local gradient and local data sample signal vector within the current communication round. max Let K be the maximum transmit power of the user equipment. k∈K, K={1,2,...,K}, where K is the total number of user equipments.
[0091] Based on this, in the specific implementation, in the obtained target semi-federated learning system optimization method, each user equipment configures its power allocation factor so that its transmission power is no greater than P. max .
[0092] The transmission delay constraints for each user equipment include: the upper bound of delay that each user equipment must satisfy when uploading data samples to the base station within the current communication round. That is, in the obtained semi-federated learning system optimization method, the delay generated during the transmission process of each device sending local data samples to the base station should have an upper bound and cannot exceed the total time of one communication round.
[0093] Optionally, in one specific implementation, the transmission delay constraints of the aforementioned user equipment may include:
[0094]
[0095] Where m is the number of bits in each item of the local data sample vector, and N c,k γ represents the size of the local data sample uploaded by the k-th user equipment in the current communication round. k Let T be the signal-to-interference-plus-noise ratio (SIR) when the k-th user equipment transmits, W be the transmission bandwidth of each user equipment, b1 and b2 be constants describing channel capacity loss, and T be the signal-to-interference-plus-noise ratio (SIR) when the k-th user equipment transmits. c The total time for each communication round.
[0096] Based on this, in this specific implementation, in the obtained optimization method for the target semi-federated learning system, the transmission delay generated by each user device when uploading local data samples is less than T. c .
[0097] The so-called aggregated gradient error constraint includes: within the current communication round, the tolerance of the base station for aggregated gradient error when receiving user information does not exceed a threshold. That is, in the obtained semi-federated learning system optimization method, the base station can tolerate a certain error in the aggregated gradient of federated learning based on over-the-air computation due to the influence of the wireless channel when receiving user information, but the tolerance cannot exceed the threshold.
[0098] Optionally, in one specific implementation, the above-mentioned aggregated gradient error constraint may include:
[0099] MSE≤ò
[0100] Where MSE is the mean square error between the actual aggregated gradient signal and the ideal aggregated gradient signal, and ò is the maximum tolerable mean square error value.
[0101] Based on this, in the specific implementation, in the obtained target semi-federated learning system optimization method, when the base station aggregates the local gradients of each device, the aggregated gradient error does not exceed the threshold ò.
[0102] S303: The base station controls each user equipment and itself to optimize according to the semi-federated learning system method, so that each user configures the transmission power with reference to the power allocation factor configuration scheme, and the base station configures the beamforming vector with reference to the beamforming vector configuration scheme, so that each user equipment sends local gradients and local data samples to the base station, thus completing the semi-federated learning.
[0103] After obtaining the above-mentioned target semi-federated learning system optimization method, the base station can control each user equipment to set the power allocation factor to the power allocation factor included in the target semi-federated learning system optimization method, and control the base station to set its own beamforming vector according to the beamforming vector included in the target semi-federated learning system optimization method.
[0104] In this way, each user equipment can send local gradients and local data samples to the base station according to the power allocation factor included in the target semi-federated learning system optimization method. Then, the base station can decode the local data samples uploaded by each user equipment according to the beamforming vector included in the target semi-federated learning system optimization method, and aggregate the local gradients uploaded by each user equipment based on over-the-air computation.
[0105] Optionally, in one specific implementation, after determining the aforementioned target semi-federated learning system optimization method, the base station can broadcast the power allocation factor configuration scheme to each user equipment, so that each user equipment can send local gradients and local data samples to the base station according to the power allocation factors included in the target semi-federated learning system optimization method.
[0106] As can be seen from the above, the system optimization method provided by the embodiments of the present invention can configure the power allocation factor of each user and the beamforming vector of the base station. Furthermore, the base station can achieve gradient aggregation through federated learning and utilize local data samples from each user for centralized learning, which is beneficial for fully utilizing the base station's computing resources. Since the base station can jointly use federated learning aggregated gradients and centralized learning gradients to update the global model, the overall learning performance of the system can be improved. Simultaneously, the local gradients and local data samples of each user device are sent to the base station on the same time-frequency resources, which helps to improve the system's spectrum resource utilization.
[0107] Furthermore, the pre-defined power constraints for each user equipment help conserve user energy while completing semi-federated learning. Moreover, the joint optimization of the transmit power configuration of each user equipment and the beamforming vector of the base station globally optimizes the convergence process of semi-federated learning, improving its convergence and achieving better training results.
[0108] Based on this, by applying the solution provided in the examples of this invention, the rationality of base station computing resource allocation can be improved, the idle computing resources of the base station can be fully utilized, and the base station can collaborate with various devices to train semi-federated learning models, which improves the learning effect compared with traditional federated learning.
[0109] Corresponding to step S302, Figure 4 This is a flowchart illustrating the process of solving the power allocation factors of each user equipment and the configuration scheme of each beamforming vector of the base station in a semi-federated learning system optimization method provided in an embodiment of the present invention. Figure 4As shown, in one specific implementation, the first optimization problem of the semi-federated learning system can be decomposed into a first sub-optimization problem, a second sub-optimization problem, and a third sub-optimization problem, which are solved separately.
[0110] The first optimization problem of the semi-federated learning is:
[0111]
[0112] Among them, {p f,k} and {p c,k} are the power allocation factors for the k-th user equipment transmitting local gradient and local data sample signal vectors in the current communication round;
[0113] b and {f k} is the beamforming vector used by the base station to receive and decode local gradients and local data samples;
[0114]
[0115] Where G is a nonnegative constant, L is a positive constant, and σ 2 It is the preset power of additive white Gaussian noise; K is the total number of user devices, N f,k N is the number of samples used by the k-th user for federated learning. f and N c This is the total number of samples used for both federated and centralized learning.
[0116] Specifically, the solution process for the power allocation factor of each user equipment and the configuration scheme of each beamforming vector of the base station includes the following steps:
[0117] S401: The first sub-optimization problem is solved using the interior point method to obtain the beamforming vector of the base station's aggregated local gradient;
[0118] The first sub-optimization problem is:
[0119]
[0120] The first sub-optimization problem has constraints, specifically:
[0121]
[0122] in:
[0123]
[0124]
[0125] Solve the first sub-optimization problem to determine the beamforming vector b of the base station aggregating local gradients in the target semi-federated learning system optimization method.
[0126] S402: Determine the argument of the power allocation factor for each user equipment and transform it into a second sub-optimization problem; solve the transformed second sub-optimization problem by variable substitution to obtain the amplitude of the power allocation factor for each user equipment; combine the argument and amplitude to obtain the power allocation factor for each user equipment.
[0127] The second sub-optimization problem is:
[0128]
[0129] The second sub-optimization problem has constraints:
[0130]
[0131] To solve the second sub-optimization problem, optionally, the argument of the power allocation factor for each user equipment is first determined, and the second sub-optimization problem is transformed into a convex sub-optimization problem. Then, the variables in the transformed convex sub-optimization problem are replaced to determine the amplitude of the power allocation factor for each user equipment.
[0132] Specifically, determine the power allocation factor p for each user equipment. f,k and p c,k The argument is:
[0133] ∠p f,k =-∠(b H h k )
[0134] ∠p c,k =0
[0135] Among them, ∠p f,k and ∠p c,k Power allocation factor p f,k and p c,k Argument angle.
[0136] Therefore, the variable substitution is performed as follows:
[0137] α k =|p f,k |
[0138] β k =|p c,k | 2
[0139] Among them, |p f,k | and |p c,k | is the power allocation factor pf,k and p c,k Radius.
[0140] By substituting variables, the transformed second sub-optimization problem becomes:
[0141]
[0142] The transformed second sub-optimization problem has the following constraints:
[0143]
[0144] Where K = {1,2,...,K}, K is the total number of user equipment;
[0145]
[0146] γ min,k This represents the minimum signal-to-interference-plus-noise ratio (SIR) of the local data sample received by the k-th user equipment.
[0147] Solve the transformed second sub-optimization problem to determine the amplitude of the power allocation factor for each user device in the target semi-federated learning system optimization method. Then, by combining the obtained argument and amplitude, obtain the power allocation factor {p} for each user device in the target semi-federated learning system optimization method. f,k} and {p c,k}
[0148] The combined argument and amplitude are used to obtain the power allocation factor p of the user equipment. f,k and p c,k The method is as follows:
[0149]
[0150]
[0151] S403: If convergence is not achieved, continue executing S401;
[0152] S404: Introduce auxiliary variables to transform the third sub-optimization problem; use the continuous convex approximation method to solve the transformed third sub-optimization problem and obtain the beamforming vector of the base station decoding local data sample;
[0153] Regarding the aforementioned third sub-optimization equation, one optional implementation involves first introducing auxiliary variables to transform the third sub-optimization problem. Then, a continuous convex approximation method is used to solve it, thereby determining the beamforming vector {f} of the base station's aggregated local gradient in the target semi-federated learning system optimization method. k}
[0154] The third sub-optimization problem is as follows:
[0155] find f k
[0156] The third sub-optimization problem has constraints:
[0157]
[0158] in:
[0159]
[0160] To solve the second sub-optimization problem, optionally, an auxiliary variable is first introduced to transform the third sub-optimization problem, and the transformed third sub-optimization problem is solved using the continuous convex approximation method.
[0161] Specifically, an auxiliary variable ν is introduced. k The above third sub-optimization problem is transformed into
[0162]
[0163] Where, ν k ≤0 indicates an auxiliary variable introduced.
[0164] The transformed third sub-optimization problem has the following constraints:
[0165]
[0166] Furthermore, the continuous convex approximation method is used to solve the transformed third sub-optimization problem.
[0167] Optionally, the constraints of the third sub-optimization problem can be approximated using a second-order Taylor expansion:
[0168]
[0169] in, This is a feasible solution after the nth iteration of the continuous convex approximation.
[0170] Solving the transformed third sub-optimization problem, and determining the beamforming vector {f} of the base station's aggregated local gradient in the semi-federated learning system optimization method. k}
[0171] S405: If convergence is not achieved, continue executing S404;
[0172] S406: If convergence is achieved, the optimization process ends.
[0173] Corresponding to the semi-federated learning method, the transmitter-receiver structure suitable for a semi-federated learning system, and the semi-federated learning system optimization method provided in the above embodiments of the present invention, the present invention provides a control device suitable for a semi-federated learning system.
[0174] Figure 5 This is a schematic diagram of a control device for a semi-federated learning system provided in an embodiment of the present invention. Figure 5 As shown, the control device for the semi-federated learning system includes:
[0175] The information acquisition module 510 is used to acquire the channel gain vector from each user equipment to the base station in the current communication round;
[0176] The semi-federated learning system optimization module 520 is used to determine the semi-federated learning system optimization method in the current communication round, including the power allocation factor configuration scheme of each user equipment when sending the local gradient and the local data sample, and the beamforming vector configuration scheme of the base station when receiving the local gradient and the local data sample.
[0177] The local data decoding module 530 is used to control the base station to decode the local data samples uploaded by each user equipment for centralized learning in parallel after completing the beamforming vector configuration, and to subtract all local data sample signals from the superimposed signal received by the base station.
[0178] The local gradient aggregation module 540 is used to control the base station to aggregate the local gradient in the superimposed signal received by the base station based on the over-the-air computing method after completing the beamforming vector configuration, so as to obtain the aggregated gradient.
[0179] The global model update module 550 is used to control the base station to obtain the centralized learning gradient based on the decoded local data signal, and to obtain the global gradient of the current training round by merging the aggregated gradient and the centralized learning gradient, and finally use the global gradient to update the global model.
[0180] Optionally, in one specific implementation, the semi-federated learning system optimization module includes:
[0181] The configuration scheme determination submodule is used to solve the preset first optimization problem of semi-federated learning by using the acquired channel gain vectors from each user equipment to the base station, preset power constraints for each user equipment, preset transmission delay constraints for each user equipment, and preset aggregation gradient error constraints. The optimization method of the target semi-federated learning system under the current communication round is obtained, that is, the configuration scheme of the power allocation factor of each user equipment in the semi-federated learning system under the current communication round, and the configuration scheme of the base station beamforming vector.
[0182] The configuration scheme execution submodule is used to control each user equipment and base station to configure the corresponding power or beamforming vector according to the power allocation factor configuration scheme and the base station beamforming vector configuration scheme.
[0183] The first optimization problem in semi-federated learning is:
[0184]
[0185] Among them, {p f,k} and {p c,k} are the power allocation factors for the k-th user equipment transmitting local gradient and local data sample signal vectors in the current communication round;
[0186] b and {f k} is the beamforming vector used by the base station to receive and decode local gradients and local data samples;
[0187]
[0188] Where G is a nonnegative constant, L is a positive constant, and σ 2 It is the preset power of additive white Gaussian noise;
[0189] K is the total number of user devices, N f,k N is the number of samples used by the k-th user for federated learning. f and N c This is the total number of samples used for both federated and centralized learning.
[0190] Optionally, the configuration scheme determination submodule includes:
[0191] The scheme decomposition unit is used to split the pre-defined semi-federated learning first optimization problem into a first sub-optimization problem, a second sub-optimization problem, and a third sub-optimization problem; wherein, the optimization variable of the first sub-optimization problem is the beamforming vector b of the base station aggregating local gradients, and the optimization variable of the second sub-optimization problem is the power allocation factor {p} of each user equipment. f,k} and {p c,k The optimization variable of the third sub-optimization problem is the beamforming vector {f} of the local data samples decoded by the base station. k};
[0192] The solution unit is used to solve the first sub-optimization problem, the second sub-optimization problem, and the third sub-optimization problem respectively, using the acquired channel gain vectors from each user equipment to the base station, preset power constraints for each user equipment, preset transmission delay constraints for each user equipment, and preset aggregation gradient error constraints, according to the process of solving the configuration scheme of the power allocation factors of each user equipment and the beamforming vectors of each base station, to obtain the target semi-federated learning system optimization method under the current communication round, including: the configuration scheme of the two power allocation factors of each user equipment and the configuration scheme of the beamforming vectors of each base station.
[0193] Optionally, in one specific implementation, the first sub-optimization problem is:
[0194]
[0195] The constraints for this subproblem are:
[0196]
[0197] in:
[0198]
[0199]
[0200] Optionally, in one specific implementation, the second sub-optimization problem is:
[0201]
[0202] The constraints for this subproblem are:
[0203]
[0204] Optionally, in one specific implementation, the third sub-optimization problem is:
[0205] find f k
[0206] The constraints for this subproblem are:
[0207]
[0208] in,
[0209]
[0210] In accordance with the semi-federated learning method, the semi-federated learning system optimization method, and the control device suitable for a semi-federated learning system provided in the above embodiments of the present invention, the present invention also provides an electronic device.
[0211] Figure 6 An electronic device provided in an embodiment of the present invention includes: a processor 601, a communication interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.
[0212] Memory 603 is used to store computer programs;
[0213] When the processor 601 executes the program stored in the memory 603, it implements the semi-federated learning method flow provided in the above embodiments of the present invention, and implements the steps of any semi-federated learning system optimization method provided in the above embodiments of the present invention.
[0214] The communication bus mentioned in the control equipment above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0215] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0216] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0217] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0218] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any half of the federated learning method provided in the embodiments of the present invention.
[0219] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of any half of the federated learning method provided in the embodiments of the present invention.
[0220] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital terminal equipment line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid state disks (SSDs)).
[0221] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0222] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments, electronic device embodiments, computer-readable storage medium embodiments, and computer program product embodiments are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0223] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A semi-federated learning method, characterized in that, This method combines traditional federated learning and centralized learning, and includes the following steps: Within each training round, each user equipment (UE) calculates its local gradient using a batch of local data samples. Subsequently, the UE selects another batch of local data samples and uploads this batch along with its local gradient to the base station. Each training round comprises one local training cycle and one communication round. The uploading process of data samples and local gradients by each UE is performed on the same time-frequency resources. The process by which the UE uploads this batch of data samples and its local gradient to the base station is as follows: Before uploading the local gradient, each user device first performs a normalization process on the gradient. The normalization process is performed using the following formula: dimensionality Local gradient vector The q-th term, q = 1, 2, ..., Q, This represents the average gradient uploaded to the base station by all user equipment. For its variance, The resulting normalized gradient vector The qth dimension component; Subsequently, the k-th user equipment constructs a local gradient signal vector s from the normalized local gradient according to the following calculation formula. t,k : in, N f The total number of samples used for federated learning training across all user devices; Meanwhile, the k-th user device, in addition to uploading its local gradient, also uploads N... c,k A set D consists of local data samples. c,k D c,k Each sample is m bits in size; the k-th user equipment undergoes modulation and normalization to obtain the data sample signal vector d. t,k The signal vector has zero mean and unit variance in any dimension of its components; The base station divides the communication rounds into Q time slots. In the q-th time slot, the user equipment will input the q-th dimension component s of the local gradient signal vector. t,k,q and the q-th dimension component d of the data sample signal vector t,k,q Uploaded to the base station within the same time-frequency resources; After receiving the superimposed signal, including data samples and local gradients, uploaded by each user equipment, the base station first decodes the local data uploaded by each user equipment and subtracts the local data of each user equipment from the received superimposed signal. Then, the base station aggregates the remaining local gradients of each user equipment in the superimposed signal to obtain the federated learning aggregated gradient. Next, the base station uses the decoded local data uploaded by each user equipment to perform centralized learning to obtain the centralized learning gradient. Finally, the base station merges the federated learning aggregated gradient and the centralized learning gradient to obtain the global gradient and uses the global gradient to update the global model.
2. The semi-federated learning method according to claim 1, characterized in that, User equipment calculates the local gradient using the following formula: in, This refers to the local gradient obtained by the k-th user device in the current t-th training epoch through federated learning. A total of K user devices participate in the semi-federated learning, and the labels of each user device form a set K = {1, 2, ..., K}. f,k It is the set of data samples used by the k-th user device during federated learning training, N f,k g represents the number of data samples used for federated learning. t,k,n It is the gradient obtained by training the user device on the nth data sample in the current training round.
3. The semi-federated learning method according to claim 1, characterized in that, The process by which the base station decodes the local data uploaded by each user device is as follows: The base station received the superimposed signals from each user equipment as follows: Among them, y t,q p is the signal received by the base station in the q-th time slot of the t-th communication round; t,f,k and p t,c,k These are the q-th dimension components s of the local gradient signal vector, respectively. t,k,q and the q-th dimension component d of the data sample signal vector t,k,q Power allocation factor at time; n t,q Let be an additive white Gaussian noise vector with noise power σ. 2 h t,k This is the channel gain vector between the k-th user equipment and the base station; The base station decodes the q-th dimension component d of the data sample signal vector uploaded by each user equipment from the superimposed signals in parallel. t,k,q After decoding a total of Q time slots, the base station reconstructs the local data sample set D uploaded by the k-th user equipment. c,k And based on the data samples therein, centralized learning is carried out.
4. The semi-federated learning method according to claim 1, characterized in that, The process by which the base station aggregates the local gradients of each user device to obtain a centralized learning gradient and updates the global model is as follows: The base station uses an over-the-air computation method to perform local gradient aggregation. Afterwards, the base station performs inverse normalization on the aggregated gradient vector; for the q-th dimension component of the aggregated gradient vector... The base station performs inverse normalization according to the following formula to obtain the estimated value of the q-th dimension component of the aggregated gradient vector. After the base station obtains the aggregated gradient vector by inverse normalizing all Q-dimensional components of the aggregated gradient vector, it obtains the aggregated gradient vector. Based on local data samples uploaded by all user devices, the base station obtains the following centralized learning gradient according to the following calculation formula: in, Let g be the centralized learning gradient. t,k,n For sample D c,k The gradient obtained from training the nth data in the dataset. N c Set the total number of samples uploaded by all users for centralized learning; The base station calculates the global gradient g according to the following formula. t : The base station updates the global model according to the following calculation formula: In t+ 1=in t -ηg t Among them, w t η is the vector consisting of the parameters of the global model, and η is the learning rate.
5. A transmitter-receiver structure for a semi-federated learning system, characterized in that, Each user equipment is equipped with two parallel power allocation factors. The base station provides each user equipment with a decoding beamforming vector and an aggregation beamforming vector to implement the semi-federated learning method described in any one of claims 1-4. The two parallel power allocation factors control the transmission power of the local gradient and the transmission power of the data samples, respectively. For the k-th user equipment, the power allocation factor controlling the transmission power of the local gradient is p. t,f,k The power allocation factor controlling the transmission power of the data sample is p. t,c,k The local gradients of each device after power control and the data samples after power control are transmitted to the base station on the same time-frequency resources. Based on the received superimposed signals, the base station decodes beamforming vectors in parallel to generate data samples for centralized learning, and then uses aggregated beamforming vectors to complete local gradient aggregation based on over-the-air computation; for the k-th user equipment, the decoded beamforming vector is f. t,k Processed signal for: In the formula, the first term is the local data sample received by the base station from the k-th user, the second term is the local data sample from other user equipment, the third term is the superimposed local gradient from each user equipment, and the fourth term is noise. After beamforming vector b t Processed signal for:
6. A semi-federated learning system, comprising K user devices and one base station, characterized in that, The user equipment and base station employ the transmitter-receiver structure described in claim 5 to implement the semi-federated learning method described in any one of claims 1-4.
7. The optimization method for a semi-federated learning system according to claim 6, characterized in that, Upon entering each preset communication round, the base station obtains the channel gain vector from each user equipment to the base station in the current communication round. Based on the convergence criterion of the semi-federated learning system, and under the premise of satisfying the power constraints, transmission delay constraints, and aggregated gradient error constraints of each user equipment, the first optimization problem of the semi-federated learning system is constructed. Solving this optimization problem yields the optimization method for the semi-federated learning system. The convergence criterion for the semi-federated learning system is the difference between the loss function F(w) in the (T+1)th training round and the globally optimal loss function F(w). * The expected value of the difference is as follows: in, G and ξ1 are non-negative constants, while μ, L and ξ2 are positive constants; The power constraints for each user equipment are as follows: |p f,k | 2 +|p c,k | 2 ≤P max Among them, P max This represents the maximum transmit power of the user equipment; this constraint indicates that the transmit power of the user equipment in the system is limited. The transmission delay constraints for each user equipment are as follows: Where W is the transmission bandwidth of each user equipment, b1 and b2 are constants describing channel capacity loss, and T c The total time for each communication round; this constraint represents the upper bound of latency that the user equipment must satisfy when uploading data samples to the base station during semi-federated learning. The aggregation gradient error constraint condition is as follows: MSE≤ò Wherein, MSN is the mean square error between the actual aggregated gradient signal and the ideal aggregated gradient signal, and ò is the maximum tolerable mean square error value; this constraint condition indicates that when the base station receives user information, its tolerance for aggregated gradient error does not exceed a threshold. Under the constraints described above, the first optimization problem of the semi-federated learning system is constructed as follows: Solving the first optimization problem of the semi-federated learning system involves decomposing it into three sub-optimization problems; the three sub-optimization problems are: solving for the base station beamforming vector b. t The first sub-optimization problem of the configuration scheme is to solve for the power allocation factor {p} of each user equipment. t,f,k } and {p t,c,k The second sub-optimization problem of the configuration scheme is to solve for the base station beamforming vector {f}. t,k The third sub-optimization problem of the configuration scheme; The solution of the base station beamforming vector b t The first sub-optimization problem of the configuration scheme is: The constraints for this subproblem are: in: The optimization variable for the first sub-optimization problem is the beamforming vector b, which aggregates the local gradient at the base station. t Solve the first sub-optimization problem to obtain the beamforming vector b of the base station when aggregating local gradients in federated learning. t Configuration scheme; The solution of the power allocation factor {p} for each user equipment t,f,k } and {p t,c,k The second sub-optimization problem of the configuration scheme is: The constraints for this subproblem are: The optimization variable for the second sub-optimization problem is the power allocation factor {p} of the user equipment. t,f,k } and {p t,c,k Solve the second sub-optimization problem to determine the power allocation scheme for each user equipment when transmitting the local gradient and the local data sample; The solution of the base station beamforming vector {f t,k The third sub-optimization problem of the configuration scheme is: find f t,k The constraints for this subproblem are: in, The optimization variable for the third sub-optimization problem is the beamforming vector f that the base station decodes the local data sample. t,k Solve the third sub-optimization problem to determine the beamforming vector {f} of the base station when receiving and decoding local data samples from each user. t,k Configuration scheme.
8. The control device for the semi-federated learning system according to claim 6, characterized in that, Includes the following modules: The information acquisition module is used to acquire the channel gain vector from each user equipment to the base station in the current communication round; The semi-federated learning system optimization module is used to determine the power allocation factor configuration scheme for each user equipment when transmitting the local gradient and the local data sample in the current communication round, and the beamforming vector configuration scheme for the base station when receiving the local gradient and the local data sample; wherein, the semi-federated learning system optimization module includes two sub-modules: The configuration scheme determination submodule is used to determine the configuration scheme of the power allocation factor of each user equipment in the second half of the current communication round, as well as the configuration scheme of the base station beamforming vector, based on the channel gain vector from each user equipment to the base station, the preset power constraints of each user equipment, the preset transmission delay constraints of each user equipment, and the preset aggregation gradient error constraints. The configuration scheme execution submodule is used to control each user equipment and base station to configure the corresponding power or beamforming vector according to the power allocation factor configuration scheme and the base station beamforming vector configuration scheme. The local data decoding module is used to control the base station to decode the local data samples uploaded by each user equipment for centralized learning in parallel after completing the beamforming vector configuration, and to subtract all local data sample signals from the superimposed signal received by the base station. The local gradient aggregation module is used to control the base station to aggregate the local gradient in the superimposed signal received by the base station based on the over-the-air computing method after completing the beamforming vector configuration, so as to obtain the aggregated gradient. The global model update module controls the base station to obtain a centralized learning gradient based on the decoded local data signal, and obtains the global gradient for the current training round by merging the aggregated gradient with the centralized learning gradient. Finally, the global gradient is used to update the global model.
9. An electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; characterized in that, The memory is used to store computer programs; When the processor executes the program stored in the memory, it implements the semi-federated learning method according to any one of claims 1-4.