Low-overhead multipoint time-frequency positioning method based on federated learning framework

By performing model pruning and personalized subnet model aggregation in the federated learning framework, the convergence and communication overhead of federated learning in complex electromagnetic environments are solved, and the performance and adaptability of time-frequency positioning are improved.

CN119277324AActive Publication Date: 2025-01-07XIDIAN UNIV

Patent Information

Application Number
CN202411380984.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-07
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

In complex and dynamically changing electromagnetic environments, traditional federated learning methods are difficult to converge in time-frequency positioning, resulting in degradation of detection performance and excessive communication overhead, especially in multi-point collaborative learning scenarios, data heterogeneity and model Complexity increases difficulty.

Method used

The low-overhead multi-point time-frequency positioning method based on the federated learning framework is adopted. By pruning the model on the secondary user side, dynamically pruning the time-frequency positioning model, reducing the amount of uploaded parameters, and aggregating the personalized subnet model on the central server side. Form a global model, reduce communication overhead, and adapt to heterogeneous data distribution.

Benefits of technology

It effectively reduces the communication overhead of wireless links, improves the perceived performance of secondary users, improves the prediction accuracy of the time-frequency positioning model, adapts to data heterogeneity in complex electromagnetic environments, and reduces resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119277324A_ABST
    Figure CN119277324A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of wireless communication, in particular to a low-overhead multipoint time-frequency positioning method based on a federated learning framework, which comprises the following steps: establishing a broadband cognitive network system model, and selecting a time-frequency positioning model; the central server initializes network parameters of the time-frequency positioning model and issues the network parameters to each secondary user; a secondary user carries out local training on a local time-frequency positioning model based on a local data set, determines the weight of a subnet model, then extracts the gradient variation of each BN layer, carries out sorting based on the gradient variation, carries out dynamic pruning on the local time-frequency positioning model according to a target pruning rate, obtains a model mask, and uploads the model mask to a central server; and the central server complements the model by using each model mask, aggregates each subnet model weight to obtain a global weight, forms a personalized subnet model of each secondary user, and issues the personalized subnet model, thereby realizing low-overhead multi-point time-frequency positioning. According to the method, the communication overhead of the wireless link is effectively reduced, and the communication efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of wireless communication technology, and in particular to a low-overhead multi-point time-frequency positioning method based on a federated learning framework. Background Art

[0002] Spectrum sensing is a key technology in cognitive radio (CR). In cognitive radio, in order to improve spectrum utilization and enable secondary users (SUs) to access in time without interfering with primary users (PUs), it is necessary to frequently sense the spectrum of this frequency band. With the increasing demand for broadband spectrum in the development of communications, the demand for spectrum sensing has also shifted from narrowband to broadband. In order to detect multiple channels while adapting to the dynamically changing wireless environment, a broadband spectrum sensing method based on time-frequency positioning has emerged. This method can not only detect the presence of primary users in the frequency band, but also simultaneously detect the time and frequency range of multiple signals in the time-frequency spectrum, which is more convenient for the implementation of downstream tasks.

[0003] In order to expand the sensing range and avoid the influence of fluctuations in channel conditions on the sensing results of a single sensing node, multiple sensing nodes are generally used for sensing in actual scenarios, that is, multiple sensor nodes conduct collaborative learning, thereby utilizing available data to improve the accuracy of spectrum sensing. Traditional centralized learning methods generate huge communication overheads, and sharing user sensitive data will cause privacy issues. Federated learning can effectively solve these problems. Federated learning trains models on local devices and does not share original data. Instead, it obtains a global model by aggregating the parameters of local models, thereby protecting privacy data and reducing communication costs. Therefore, federated learning is very suitable for distributed spectrum sensing tasks.

[0004] However, in a complex and dynamically changing electromagnetic environment, the power, type, and quantity of signals sensed by SUs vary, and the data set used for federated learning training will not be independent and identically distributed. This will make it difficult for the global model trained by federated learning to converge, and the detection performance may be reduced. The target detection model used in time-frequency positioning has a complex structure and a large number of parameters. Frequent interactions with the central server will bring huge communication pressure to the wireless communication link. The problems of data heterogeneity and excessive communication costs in the training process need to be solved urgently. Summary of the invention

[0005] In view of this, the embodiments of the present application propose a low-overhead multi-point time-frequency positioning method based on a federated learning framework, and design a federated learning architecture for heterogeneous data, which effectively reduces the communication overhead of the wireless link and greatly improves the communication efficiency, thereby improving the perception performance of secondary users in complex electromagnetic environments.

[0006] In order to achieve the above-mentioned purpose, the embodiment of the present application proposes a low-overhead multi-point time-frequency positioning method based on a federated learning framework, comprising the following steps: establishing a broadband cognitive network system model consisting of M primary users, N secondary users and a central server, and selecting a time-frequency positioning model; wherein M and N are both integers greater than 1; the central server initializes the network parameters of the time-frequency positioning model and sends them to each secondary user; the secondary user locally trains the local time-frequency positioning model based on the local data set, determines the updated subnet model weight, and saves the accumulated gradient change; the secondary user extracts each BN layer The gradient change amount is calculated, and each BN layer is sorted based on the gradient change amount. The local time-frequency positioning model is dynamically pruned according to the target pruning rate to obtain the subnet model parameters and model mask, and the model mask and subnet model weight are uploaded to the central server; the central server uses each model mask to complete the global time-frequency positioning model, aggregates the subnet model weights, and obtains the aggregated global weights. Based on the aggregated global weights and each model mask, a personalized subnet model for each secondary user is formed and sent to the corresponding secondary user; the secondary user performs time-frequency positioning based on the personalized subnet model, thereby realizing low-overhead multi-point time-frequency positioning.

[0007] In order to achieve the above-mentioned purpose, an embodiment of the present application also proposes an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the low-overhead multi-point time-frequency positioning method based on the federated learning framework as described above.

[0008] To achieve the above objectives, an embodiment of the present application also proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the low-overhead multi-point time-frequency positioning method based on the federated learning framework as described above.

[0009] The low-overhead multi-point time-frequency positioning method based on the federated learning framework proposed in the embodiment of the present application creates a broadband spectrum perception scenario, accurately locates the non-independent and identically distributed problem existing in distributed time-frequency positioning, and combines the model pruning strategy with federated learning to control the amount of uploaded parameters. When each secondary user performs local training of the time-frequency positioning model, it is necessary to dynamically prune the BN layer. When uploading, the subnet model weights and the model mask that can represent the pruning results are uploaded to the central server together. This design reduces the amount of model parameters that need to be uploaded to the central server and effectively reduces the communication overhead of the wireless link. This is especially important for resource-constrained devices and can effectively reduce the time and cost required for data transmission. In addition, the heterogeneity of data distribution among secondary users is also taken into account. After aggregation, the central server combines the model mask to form a personalized subnet model for each secondary user and sends it down, retaining the personalized characteristics of the model, thereby better adapting to the heterogeneity of local data, thereby effectively improving the prediction accuracy of the time-frequency positioning model, and thus greatly improving the perception performance of secondary users in complex electromagnetic environments.

[0010] In some optional embodiments, the time-frequency localization model consists of two parts: a feature extraction structure and a prediction structure; the feature extraction structure selects the Darknet-53 architecture, which consists of a convolutional layer, a residual block, a BN layer, a ReLU activation function layer and a final 1×1 convolutional layer, and residual connections are established between the residual blocks to suppress gradient disappearance; the prediction structure consists of prediction layers added at different depths, located at different layers of the feature extraction structure, to correspond to feature maps of different sizes and detect targets of different sizes.

[0011] In some optional embodiments, in the tth round of communication, the central server randomly selects m secondary users from the secondary users participating in the tth round of communication to form a secondary user set S t ; where t is an integer greater than 1, and m is an integer greater than 1 and less than M; each secondary user divides the local data set into several batches, and the size of each batch is B; in the tth round of communication, S t The secondary users in the process calculate the gradient of the loss function for each batch of local data, perform gradient descent updates, repeat E rounds, determine the updated subnetwork model weights, and save the accumulated gradient changes; repeating E rounds means that each batch of local data will be used E times for update;

[0012] The updated subnetwork model weight is expressed by the following formula:

[0013]

[0014] in, Indicates S tThe subnet model weight updated by the i-th secondary user in the t-1th round of communication, η is the preset learning rate, g i Indicates S t The back propagation error during training of the i-th secondary user in, Indicates S t The subnetwork model weight updated by the i-th secondary user in the t-th round of communication;

[0015] Saving the cumulative gradient change is achieved through the following formula:

[0016]

[0017] in, Indicates S t The gradient change of the i-th secondary user in the e-th round of gradient descent update, Indicates S t The cumulative gradient change of the i-th secondary user in .

[0018] In some optional embodiments, the secondary user extracts the gradient change of each BN layer, sorts the BN layers based on the gradient change, dynamically prunes the local time-frequency positioning model according to the target pruning rate, and obtains the subnet model parameters and model mask, including: in the tth round of communication, S t The secondary users in extract the gradient change of each BN layer of their own subnet model and sort them from large to small according to the gradient change; according to the target pruning rate r target Determine the target parameter size P target , based on P target Dynamically prune the local time-frequency positioning model and reduce the gradient change to less than P target The BN layer is determined as the BN layer that needs to be cut off, and the subnet model parameter P is obtained at the same time. i ; Among them, |P target -P i |≤ξ, ξ is the preset pruning check threshold; establish a vector of size V, V is the total number of BN layers, the elements in the vector represent the BN layers arranged in ascending order, set the value of the element in the vector representing the BN layer to be retained to 1, and set the value of the element in the vector representing the BN layer to be pruned to 0, and obtain the model mask

[0019] In some optional embodiments, the central server completes the global time-frequency positioning model using each model mask, aggregates the weights of each subnet model, and obtains the aggregated global weight, which is implemented by the following formula:

[0020]

[0021] Among them, Di represents the local dataset of the i-th secondary user, D j represents the local dataset of the jth secondary user, w t+1 Represents the global weight after aggregation.

[0022] In some optional embodiments, the central server forms a personalized subnet model for each secondary user based on the aggregated global weight and each model mask, which is implemented by the following formula:

[0023]

[0024] Among them, ⊙ represents element-by-element multiplication, represents the personalized sub-network model weight of the i-th secondary user.

[0025] In some optional embodiments, S t After the secondary users in obtain the subnet model parameters and the model mask, the method further includes: fine-tuning the pruned subnet model based on the local data set.

[0026] In some optional embodiments, after the central server forms a personalized subnet model for each secondary user based on the aggregated global weights and each model mask, and sends it to the corresponding secondary user, the method further includes: each secondary user completes the received personalized subnet model based on the model mask, determines whether the completed personalized subnet model meets the convergence conditions, and terminates local training if it is determined that the convergence conditions are met; each secondary user performs time-frequency positioning based on the corresponding completed personalized subnet model, thereby achieving low-overhead multi-point time-frequency positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 is a flowchart of a low-overhead multi-point time-frequency positioning method based on a federated learning framework provided in one embodiment of the present application;

[0029] Figure 2 is a scene diagram of a broadband cognitive network system model provided in one embodiment of the present application;

[0030] Figure 3 is a schematic diagram of model pruning classification provided in one embodiment of the present application;

[0031] Figure 4 is a flowchart of model pruning provided in one embodiment of the present application;

[0032] Figure 5 is a schematic diagram of federated learning provided in one embodiment of the present application;

[0033] Figure 6 is a schematic diagram of a multi-model performance comparison provided in an embodiment of the present application;

[0034] Figure 7 It is a structural schematic diagram of an electronic device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0035] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.

[0036] Spectrum sensing is a key technology in cognitive radio. With the development of broadband technology and the improvement of bandwidth flexibility, spectrum sensing technology needs to detect the utilization of spectrum resources within a large bandwidth. Therefore, broadband wireless broadband technology has received widespread attention. Many machine learning-based methods, especially those based on time-frequency positioning, have emerged. Time-frequency positioning methods can identify frequency hopping patterns, signal widths, and signal dwell times without prior knowledge, facilitating downstream spectrum management tasks. Therefore, broadband spectrum sensing based on time-frequency positioning has also attracted the attention of researchers.

[0037] In practical scenarios, multiple sensor nodes often collaborate to learn and utilize available data to improve the accuracy of spectrum sensing. However, traditional centralized learning methods generate huge communication overhead and cause privacy issues due to the sharing of user sensitive data. Federated learning can effectively solve these problems. Federated learning trains models on local devices and does not share original data. It obtains a global model by aggregating local model parameters, thereby protecting privacy data and reducing communication costs. Therefore, federated learning is very suitable for distributed spectrum sensing tasks.

[0038] Current research focuses on narrowband spectrum sensing methods within the federated learning framework. Troglia et al. proposed a distributed sensing architecture for in-situ detection in citizen broadband radio service systems, which showed that federated learning can improve detection performance. Chen et al. first introduced federated learning into collaborative spectrum and proposed a complete process for spectrum sensing under the federated learning framework, proving the effectiveness of the federated learning framework for collaborative spectrum sensing performance. Miao et al. used the k-means algorithm to cluster SUs, which participated in federated learning to sense 5G downlink signals. Zhang Y et al. pointed out that the received signal strength values ​​measured by SUs at different locations represent different characteristics of PU activity patterns. The features of the same PU samples are aligned in the aggregation stage, so that the global model learns the complete features of the PU activity pattern to improve the perception effect. On this basis, Zhang Z et al. proposed a truncated longitudinal federated learning framework to achieve fast convergence under limited communication and computing resources.

[0039] The above studies simply illustrate that the communication cost of federated learning is reduced compared to other distributed architectures, without considering the communication cost of wireless links in federated learning. However, it is necessary to consider whether the wireless link can afford the communication overhead of model upload in combination with model size and communication frequency. The above studies are based on the advantages of federated learning and combined with multi-point spectrum sensing to improve the efficiency of spectrum sensing. However, in a complex and changeable electromagnetic environment, since different sensing nodes are in different geographical locations, the perceived data will be very different. The data collected by these sensing nodes are not independent and identically distributed, and data heterogeneity will have a significant adverse effect on the federated learning algorithm. Zhang Y, Zhang Z et al. considered the data heterogeneity phenomenon of SUs with different power distributions in narrowband spectrum sensing, but the same solution is difficult to alleviate the data heterogeneity problem of broadband spectrum sensing. Because broadband spectrum sensing has complex data heterogeneity scenarios, and the shape, size, position and texture of the time-frequency block in the time-frequency positioning method are complicated, aligning all features will greatly increase the workload.

[0040] In the case of data heterogeneity, we found that the reason for the unstable performance of the global model is that the parameters sent to SUs are the same. If the structure and parameters of the global model are not adjusted, the model cannot adapt to local data. Through the model pruning method, each SU obtains a personalized model adapted to local data, alleviating the impact of data heterogeneity. At the same time, model pruning can remove redundant weights and connections of the model, effectively reducing the number of parameters uploaded to the central server, and further reducing the model communication overhead.

[0041] Based on this, an embodiment of the present application proposes a low-overhead multi-point time-frequency positioning method based on a federated learning framework. The implementation details of the low-overhead multi-point time-frequency positioning method based on a federated learning framework proposed in this embodiment are described in detail below. The following content is only the implementation details provided for the convenience of understanding and is not necessary for the implementation of this solution.

[0042] The specific process of the low-overhead multi-point time-frequency positioning method based on the federated learning framework proposed in this embodiment can be as follows: Figure 1 As shown, including:

[0043] Step 101, establish a broadband cognitive network system model consisting of M primary users, N secondary users and a central server, and select a time-frequency positioning model.

[0044] In the specific implementation, the scenarios of the broadband cognitive network system model are as follows: Figure 2 As shown in the figure, the broadband cognitive network system model consists of M primary users, N secondary users and a central server, where M and N are both integers greater than 1. The primary users can dynamically select the center frequency and bandwidth in the broadband spectrum according to service requirements or anti-interference. The secondary users are responsible for using machine learning detection heads to perceive the spectrum occupancy in the broadband and upload the local model to the central server after a certain number of rounds of local training.

[0045] During a spectrum sensing period, the primary user independently determines its bandwidth and center frequency. At the same time, each secondary user collects K signal samples. The signal of a primary user sensed by a secondary user can be modeled as follows:

[0046] x n (k) = h*s m (k)+ε(k);

[0047] 0<n≤N;

[0048] 0<m≤M;

[0049] Among them, x n (k) represents the kth signal sample perceived by the nth secondary user, s m (k) represents the kth signal sample sent by the mth primary user, h represents the channel gain between the primary user and the secondary user, and ε(k) represents the noise in the sample. Based on this formula, we can further explain the phenomenon of data heterogeneity. When SU ​​perceives, s m(k) is controlled by factors such as signal system, center frequency, signal bandwidth, and transmission power. At the same time, the geographical location and environment of the secondary user and the primary user in the electromagnetic environment will affect the degree of signal path loss and multipath effect, resulting in different channel fading and ultimately affecting the size of h. Therefore, the signal x that the secondary user can perceive is n (k) Affected by many factors, different secondary users will experience different signal data distributions when receiving the same primary user’s signal, and the data between secondary users will not be independent and identically distributed. Therefore, for this scenario, heterogeneous data naturally exists, and the impact of this problem needs to be considered.

[0050] After receiving the signal, we also need to process the signal to extract its two-dimensional information in the time domain and frequency domain. Among them, short-time Fourier transform (STFT) is a commonly used time-frequency analysis method that can provide time and frequency information at the same time. STFT divides the signal into multiple short time periods by using a sliding window and performs Fourier transform on each short time period to obtain the spectrum information of the signal in different time periods. Therefore, we assume that the sliding window function used is w(k), L represents the time index of each window function, and I represents the number of Fourier transform points of the short time period. The result of the signal received by the secondary user after STFT is as follows:

[0051]

[0052] Wherein, S(i, k) represents the result obtained after STFT of the k-th signal sample perceived by the i-th secondary user.

[0053] In the STFT result, the horizontal axis does not represent time, and the vertical axis represents frequency. The time-frequency block obtained after visualization can clearly indicate the usage of time and frequency, display the time-frequency characteristics of the signal, and facilitate the time-frequency positioning task.

[0054] Time-frequency localization requires locating specific time-frequency blocks in the time-frequency spectrum obtained after STFT. This task can be compared to the target detection task in the image, so the time-frequency localization model can adopt the target detection model. Based on the requirement of broadband time-frequency localization tasks to obtain results quickly, the YOLO model, as a single-stage detection method, can directly output the target. The algorithm is efficient and the model structure is complete, so it can be used as a model for time-frequency localization. YOLO generally includes two key steps in the time-frequency localization task: the backbone network extracts the location information and semantic information of the input time-frequency spectrum, and then performs target classification and bounding box regression to obtain a multidimensional vector containing the bounding box location and signal category information. After the time-frequency localization model is determined, it needs to be deployed in the framework of federated learning. Inspired by federated learning combined with narrowband time-frequency localization, we combine broadband time-frequency localization with federated learning to train efficient time-frequency localization models on the basis of protecting data privacy and reducing overhead.

[0055] In one example, the time-frequency localization model consists of two parts: a feature extraction structure and a prediction structure. The feature extraction structure uses the Darknet-53 architecture, which consists of a convolutional layer, a residual block, a BN layer, a ReLU activation function layer, and a final 1×1 convolutional layer. Residual connections are established between residual blocks to suppress gradient disappearance. The prediction structure consists of prediction layers added at different depths, located at different layers of the feature extraction structure, to correspond to feature maps of different sizes and detect targets of different sizes.

[0056] Step 102: The central server initializes the network parameters of the time-frequency positioning model and sends them to each secondary user.

[0057] In a specific implementation, the central server initializes the network parameter W0 of the time-frequency positioning model and sends it to all secondary users in the broadband cognitive network system model.

[0058] In one example, in the tth round of communication, the central server randomly selects m secondary users from the secondary users participating in the tth round of communication to form a secondary user set S t , where t is an integer greater than 1, and m is an integer greater than 1 and less than M. S t The secondary users in are the secondary users participating in this round of federated learning.

[0059] Step 103: The secondary user performs local training on the local time-frequency positioning model based on the local data set, determines the updated sub-network model weights, and saves the accumulated gradient changes.

[0060] In step 104, the secondary user extracts the gradient change of each BN layer, sorts the BN layers based on the gradient change, dynamically prunes the local time-frequency positioning model according to the target pruning rate, obtains the subnet model parameters and model mask, and uploads the model mask and subnet model weight to the central server.

[0061] In the specific implementation, the secondary users perform local training on the local time-frequency positioning model in the federated learning. Each secondary user sends the local dataset (using D i represents the local data set of the i-th secondary user) is divided into several batches, each of which has a size of B. In the t-th round of communication, S t Each secondary user in the S calculates the gradient of the loss function for each batch of local data and performs gradient descent update, repeating E rounds, that is, each batch of local data will be used E times for update, determine the updated subnetwork model weights, and save the accumulated gradient changes. t The secondary users in the extract the gradient change of each BN layer of their own subnet model and sort them from large to small according to the gradient change. target Determine the target parameter size P target , based on P target Dynamically prune the local time-frequency positioning model and reduce the gradient change to less than P target The BN layer is determined as the BN layer that needs to be cut off, and the subnet model parameter P is obtained at the same time. i Among them, |P target -P i |≤ξ, ξ is the preset pruning check threshold. Then, a vector of size V is established, where V is the total number of BN layers. The elements in the vector represent the BN layers arranged in ascending order. The values ​​of the elements in the vector representing the BN layers to be retained are set to 1, and the values ​​of the elements in the vector representing the BN layers to be pruned are set to 0, and the model mask is obtained.

[0062] In one example, the updated subnetwork model weight is expressed by the following formula:

[0063]

[0064] in, Indicates S t The subnet model weight updated by the i-th secondary user in the t-1th round of communication, η is the preset learning rate, g i Indicates S t The back propagation error during training of the i-th secondary user in, Indicates S t The subnetwork model weight updated by the i-th secondary user in the t-th round of communication.

[0065] In one example, the accumulated gradient change is saved using the following formula:

[0066]

[0067] in, Indicates S t The gradient change of the i-th secondary user in the e-th round of gradient descent update, Indicates S t The cumulative gradient change of the i-th secondary user in .

[0068] Due to the limited overhead of wireless communication links, the demand for model parameters should be reduced. Our first choice is model pruning in model compression. Model pruning can reduce the parameters and computational complexity of the metamodel, and ensure that the loss of the submodel is within a controllable range, which helps to reduce communication pressure and computational efficiency. At the same time, in the process of pruning, we can also find the model that best suits the local data set, remove redundant parameters and connections, and make the model personalized to adapt to heterogeneous data.

[0069] like Figure 3 As shown, model pruning is divided into structured pruning and unstructured pruning. Unstructured pruning is usually performed at the parameter level, directly pruning a single weight in the model without considering the location of the weight or the influence of other weights, and ignoring the connection between weights. Therefore, the model can be very sparse, but it also destroys the structure of the original model, and requires specific hardware support to achieve improved computing efficiency. Structured pruning is usually performed by pruning the entire channel or filter, and does not simply prune the scattered weights. Although the previous eigenvalue and the next eigenvalue will change accordingly, the internal structure of the channel is not destroyed. Structured pruning cannot achieve the model compression level of unstructured pruning, but it can be better used in conjunction with modern hardware acceleration optimization technology to achieve improved computing efficiency. Therefore, this embodiment adopts a pruning strategy for a structured pruning channel to obtain a sub-network of a local local model and reduce the amount of model parameters uploaded.

[0070] In this embodiment, the personalized pruning operation will be performed throughout the entire local training process of the secondary user to ensure that the parameters uploaded to the central server each time are the sparse model after pruning. Therefore, we added the personalized pruning operation to the normal training, so that the model gradually becomes streamlined during the model training process. The standard process is as follows: Figure 4 As shown, the following focuses on the training + importance sorting, mask acquisition and fine-tuning process.

[0071] The first is the training + importance sorting process. The training that introduces the pruning operation is different from the normal local training process. The difference between the two is that the process of model sensitivity analysis is added, which requires analyzing specific weights during the training process to determine the importance. Compared with sorting by weight size, the pruning method of this application abandons this direct and crude method, and instead uses a more sophisticated sorting method based on the amount of change in weight gradient. This method can be dynamically adjusted during the training process and can adapt to the needs of different training stages as the gradient changes.

[0072] This application uses the change in weight gradient as the ranking criterion for importance. The definitions of gradient and gradient accumulation are shown in the following formula:

[0073]

[0074]

[0075] Among them, w i is the i-th element in the model parameters, T is the number of iterations, and w (t) is the parameter value at the tth iteration. The gradient itself represents the local rate of change of the loss function to the model parameters, and the size of the gradient can reflect the local sensitivity of the loss function to the model parameters. If the gradient of a parameter is large, it means that the change of the loss function is more significant in the neighborhood of the parameter, indicating that the parameter has a greater impact on the model output. In the local training process, a large cumulative update of the parameter means that it plays a key role in model training.

[0076] The pruning involved in this application is an operation performed on the entire channel, so there is no need to observe the gradient changes of each weight at a small scale. Since the convolution layer and the BN layer usually appear in pairs in the structure of the model, and there is a corresponding relationship between the output of the convolution layer and the input of the BN layer, this application seeks a breakthrough in the importance ranking of channel pruning from the BN layer. The BN layer pair is a normalization operation on the data of the convolution layer. During the training process, each feature channel w i The input data z in Normalize it so that the output data has a mean value z out Close to 0, the standard deviation is close to 1. The process is:

[0077] First, the mean and variance of all data in the feature channel are calculated to obtain μ z and Then the input data z in Standardize it and take its mean μ z Move to 0, and the variance is scaled to 1, as follows:

[0078]

[0079] Here, ε is a small positive number used to prevent the denominator from being zero.

[0080]

[0081] Finally, the BN layer introduces two parameters γ and β that can be changed during training, which are the scaling factor and the offset factor, respectively, to adjust the normalized values ​​so that the model can restore its learning ability. γ is responsible for scaling the normalized data. If the value of γ is close to 1, it has little effect on the output of the channel. If the value of γ is close to 0, it means that the output of the channel is greatly reduced and may contribute little to the final model output. If the gradient of y changes greatly over multiple iterations, it may indicate that the model is actively adjusting to the training data. Therefore, we use the weight changes of the BN layer as a ranking of importance. By resetting the weights of the BN layer to 0, it is equivalent to turning off the output of the channel, which has little contribution to the input of subsequent layers.

[0082] In summary, in addition to the normal training process, in this training link, by sorting the weight gradient changes in the BN layer and finding the threshold for weight pruning according to the target pruning rate, the weights of unimportant models are forced to be 0, and the unimportant channels in the model are sparse. This method allows dynamic adjustment of which channels are important and which are unimportant during training, which provides flexibility for the model to adjust its behavior according to training data and task requirements.

[0083] The next step is to obtain the mask. During sparse training, the importance of each channel needs to be evaluated. The standard is usually to compare the channel weight with the threshold of the importance channel weight determined by the target pruning rate, and select to retain those channels with high importance and remove those with less important channels. This process is achieved by multiplying the weight by the mask. The mask is a tensor of the same shape as the weight, where the value is either 0 or 1. The mask is used to determine which weights and biases should be retained and which should be set to zero. After multiplication, some channels in the model are pruned, thereby reducing the scale of the model and maintaining the model performance as much as possible.

[0084] Finally, fine-tuning, S t After obtaining the subnet model parameters and model mask, the secondary users in the network need to fine-tune the pruned subnet model based on the local dataset. This is because channel pruning may cause a slight decrease in model performance. Fine-tuning is to restore performance while maintaining model compression. The above steps are repeated until the ideal compression model is achieved.

[0085] In step 105, the central server uses each model mask to complete the global time-frequency positioning model, aggregates the weights of each subnet model, obtains the aggregated global weight, forms a personalized subnet model for each secondary user based on the aggregated global weight and each model mask, and sends it to the corresponding secondary user.

[0086] In the specific implementation, Figure 5 As shown in the figure, after each secondary user completes local training and uploads the model mask and subnet model weight, the central server starts aggregate training. First, the global time-frequency positioning model is completed using each model mask, and the weights of each subnet model are aggregated to obtain the aggregated global weight. Then, based on the aggregated global weight and each model mask, a personalized subnet model for each secondary user is formed and sent to the corresponding secondary user.

[0087] In one example, the central server uses the masks of each model to complete the global time-frequency positioning model, aggregates the weights of each subnet model, and obtains the aggregated global weight, which is implemented by the following formula:

[0088]

[0089] Among them, D i represents the local dataset of the i-th secondary user, D j represents the local dataset of the jth secondary user, w t+1 Represents the global weight after aggregation.

[0090] In one example, the central server forms a personalized subnet model for each secondary user based on the aggregated global weight and each model mask, which is implemented by the following formula:

[0091]

[0092] Among them, ⊙ represents element-by-element multiplication, represents the personalized sub-network model weight of the i-th secondary user.

[0093] In one example, after the central server forms a personalized subnet model for each secondary user based on the aggregated global weights and model masks and sends it to the corresponding secondary user, each secondary user completes the received personalized subnet model based on the model mask and determines whether the completed personalized subnet model meets the convergence conditions. If it is determined that the convergence conditions are met, the local training ends.

[0094] Step 106: The secondary user performs time-frequency positioning based on the personalized subnet model, thereby achieving low-overhead multi-point time-frequency positioning.

[0095] In a specific implementation, each secondary user in the broadband cognitive network system model can perform time-frequency positioning based on the corresponding completed personalized subnet model, thereby achieving low-overhead multi-point time-frequency positioning.

[0096] In this embodiment, a broadband spectrum sensing scenario is created, and the non-independent and identically distributed problem existing in distributed time-frequency positioning is accurately located. The model pruning strategy is combined with federated learning to control the amount of uploaded parameters. When each secondary user performs local training of the time-frequency positioning model, the BN layer needs to be dynamically pruned. When uploading, the subnet model weights and the model mask that can represent the pruning results are uploaded to the central server together. This design reduces the amount of model parameters that need to be uploaded to the central server and effectively reduces the communication overhead of the wireless link. This is especially important for resource-constrained devices and can effectively reduce the time and cost required for data transmission. In addition, the heterogeneity of data distribution among secondary users is also considered. After aggregation, the central server combines the model mask to form a personalized subnet model for each secondary user and sends it down, retaining the personalized characteristics of the model, thereby better adapting to the heterogeneity of local data, thereby effectively improving the prediction accuracy of the time-frequency positioning model, and thus greatly improving the perception performance of secondary users in complex electromagnetic environments.

[0097] The step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this application.

[0098] In one embodiment, we used the signal dataset published by Nguyen for simulation experiments. The dataset contains five different signal categories, including bluetooth, zigbee, wifi, wmic, and lightbridge signals. The signal processing process is consistent with the requirements. The corresponding signal time-frequency spectrum is obtained through time-frequency analysis. At the same time, the label indicates the signal category and the coordinates of the signal in the spectrum. This dataset simulates the real signal data in scenarios with different signal-to-noise ratios by adjusting parameters such as transmission power and burst time, which is sufficient to divide heterogeneous datasets for SUs.

[0099] In order to ensure that the local data of SUs is not independent and identically distributed, the data set is divided into public and non-public parts according to categories. The public part represents the category samples that exist in each SU, and the non-public part means that some SUs lack such samples. We stipulate that Wifi, bluetooth and their overlapping cases are divided into the public part. The specific data set division can be shown in Table 1:

[0100] Table 1: Dataset division

[0101]

[0102] Each SU saves the received 375 picture spectrograms locally, where the local training set and the local test set are divided into a ratio of 4:1.

[0103] In order to demonstrate the advantages of the federated learning architecture and the effectiveness of introducing pruning-based federated learning in the federated architecture, single-point model training, classic federated learning, and pruning-based federated learning model training are performed. The following are the parameter settings for the training process:

[0104] Classic federated training: Set up a federated learning system with 3 clients participating in the training. Each client participates in the training in each communication round, and the model is iterated and updated 5 times on the local dataset. The maximum number of communication rounds between the client and the server is 100. The client local training uses the Adam optimizer with a learning rate of 0.001 and a batch size of 16 randomly selected for all datasets.

[0105] Single-node model training: The training parameters of each single node are the same as those of each client in classic federated training.

[0106] Federated training based on pruning (this application): Set up a federated learning system with 3 clients participating in the training, add structured pruning operations, and set different target pruning rates while ensuring that at least 1% of the channels are retained in each layer. The remaining parameters are the same as those of classic federated learning training.

[0107] The performance comparison of these three methods is as follows: Figure 6 As shown, from Figure 6 It can be seen that the single-point model, the federated learning model and the federated model after pruning perform well in the local data set, among which the effect of the federated learning training model is outstanding. This shows that the client after federated learning can learn the global distribution characteristics of the data well and enhance the perception ability of the model. In addition, the pruned federated training model will generally improve in performance compared with normal federated learning, that is, the federated model after adding the pruning strategy can better adapt to the local data set and have stronger personalization ability. It can be proved that the pruning operation can be used in the federated learning framework to enhance the personalization ability of the model, obtain a personalized model that adapts to the local data set, and improve the poor performance of the global model obtained by federated learning in heterogeneous data sets. Therefore, the effectiveness of multi-point collaborative training and the effectiveness of structured pruning can be verified. The addition of federation improves the perception ability of global data distribution. The model pruning operation enables it to increase the recognition performance of local data on the basis of having the perception of global data distribution.

[0108] Another difficult problem solved by this application is the limited communication overhead on the wireless link. Through structured pruning, the amount of model parameters uploaded and downloaded can be controlled, further reducing the communication overhead generated during the collaborative training process.

[0109] Table 2: Changes in model parameters with a target pruning rate of 30%

[0110]

[0111] Table 2 shows the change of overhead through specific data, and the parameter ratio is reduced by 31.45% under the control of the target pruning rate. Therefore, the model pruning method in this application not only improves the performance, but also effectively reduces the overhead, removes the redundant parameters and connections of the model, and facilitates efficient communication in the case of limited resources in the wireless link.

[0112] It can be seen from Table 2 that the channel elimination rate is different from the target pruning rate. This is because the channel sizes and parameter sizes are different in different convolutional layers. If a smaller feature map is pruned, the model compression is small, but if a larger feature map is pruned, the model will be greatly compressed. Therefore, the relationship between the pruning rate and the model size is not a linear relationship, but a positive correlation. When the pruning rate increases, the model parameter size will definitely decrease, and the degree of change is uncertain.

[0113] Another embodiment of the present application provides an electronic device, whose specific structure can be as follows: Figure 7 As shown, it includes: at least one processor 201; and a memory 202 that is communicatively connected to the at least one processor 201; wherein the memory 202 stores instructions that can be executed by the at least one processor 201, and the instructions are executed by the at least one processor 201 so that the at least one processor 201 can execute a low-overhead multi-point time-frequency positioning method based on a federated learning framework described in the above-mentioned method embodiments.

[0114] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors and various circuits in the memory together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits together, which are all well known in the art, so this article will not describe them further. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor.

[0115] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0116] Another embodiment of the present application proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement a low-overhead multi-point time-frequency positioning method based on a federated learning framework as described in the above method embodiment.

[0117] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer or chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes, but is not limited to: Read-Only Memory (ROM), Random Access Memory (RAM), U disk, mobile hard disk, disk or optical disk and other media that can store program codes.

[0118] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.

Claims

1. A low-overhead multi-point time-frequency positioning method based on a federated learning framework, characterized in that: include: A broadband cognitive network system model consisting of M primary users, N secondary users and a central server is established, and a time-frequency positioning model is selected; wherein M and N are both integers greater than 1; The central server initializes the network parameters of the time-frequency positioning model and sends them to each secondary user; The secondary user performs local training on the local time-frequency positioning model based on the local data set, determines the updated subnetwork model weights, and saves the accumulated gradient changes; The secondary user extracts the gradient change of each BN layer, sorts the BN layers based on the gradient change, dynamically prunes the local time-frequency positioning model according to the target pruning rate, obtains the subnet model parameters and model mask, and uploads the model mask and subnet model weight to the central server; The central server uses the masks of each model to complete the global time-frequency positioning model, aggregates the weights of each subnet model, obtains the aggregated global weight, forms the personalized subnet model of each secondary user based on the aggregated global weight and each model mask, and sends it to the corresponding secondary user; Secondary users perform time and frequency positioning based on personalized subnet models, thereby achieving low-overhead multi-point time and frequency positioning.

2. The low-overhead multi-point time-frequency positioning method based on the federated learning framework as claimed in claim 1, characterized in that: The time-frequency localization model consists of two parts: feature extraction structure and prediction structure; The feature extraction structure uses the Darknet-53 architecture, which consists of a convolutional layer, a residual block, a BN layer, a ReLU activation function layer, and a final 1×1 convolutional layer. Residual connections are established between residual blocks to suppress gradient disappearance. The prediction structure consists of prediction layers added at different depths, located at different layers of the feature extraction structure, to correspond to feature maps of different sizes and detect objects of different sizes.

3. The low-overhead multi-point time-frequency positioning method based on the federated learning framework as claimed in claim 2, characterized in that: In the tth round of communication, the central server randomly selects m secondary users from the secondary users participating in the tth round of communication to form the secondary user set S t ; Wherein, t is an integer greater than 1, and m is an integer greater than 1 and less than M; Each secondary user divides the local data set into several batches, and the size of each batch is B; In the tth round of communication, S t The secondary users in the process calculate the gradient of the loss function for each batch of local data, perform gradient descent updates, repeat E rounds, determine the updated subnetwork model weights, and save the accumulated gradient changes; repeating E rounds means that each batch of local data will be used E times for update; The updated subnetwork model weight is expressed by the following formula: in, Indicates S t The subnet model weight updated by the i-th secondary user in the t-1th round of communication, η is the preset learning rate, g i Indicates S t The back propagation error during training of the i-th secondary user in, Indicates S t The subnetwork model weight updated by the i-th secondary user in the t-th round of communication; Saving the cumulative gradient change is achieved through the following formula: in, Indicates S t The gradient change of the i-th secondary user in the e-th round of gradient descent update, Indicates S t The cumulative gradient change of the i-th secondary user in .

4. The low-overhead multi-point time-frequency positioning method based on the federated learning framework as claimed in claim 3, characterized in that: The secondary user extracts the gradient change of each BN layer, sorts the BN layers based on the gradient change, dynamically prunes the local time-frequency positioning model according to the target pruning rate, and obtains the subnet model parameters and model mask, including: In the tth round of communication, S t The secondary users in extract the gradient change of each BN layer of their own subnet model and sort them from large to small according to the gradient change; According to the target pruning rate r target Determine the target parameter size P target , based on P target Dynamically prune the local time-frequency positioning model and reduce the gradient change to less than P target The BN layer is determined as the BN layer that needs to be cut off, and the subnet model parameter P is obtained at the same time. i ; Among them, |P target -P i |≤ξ, ξ is the preset pruning check threshold; Create a vector of size V, where V is the total number of BN layers. The elements in the vector represent the BN layers arranged in ascending order. Set the values ​​of the elements in the vector that represent the BN layers to be retained to 1, and set the values ​​of the elements in the vector that represent the BN layers to be cut to 0 to obtain the model mask.

5. The low-overhead multi-point time-frequency positioning method based on the federated learning framework as claimed in claim 4, characterized in that: The central server uses the masks of each model to complete the global time-frequency positioning model, aggregates the weights of each subnet model, and obtains the aggregated global weight, which is achieved through the following formula: Among them, D i represents the local dataset of the i-th secondary user, D j represents the local dataset of the jth secondary user, w t+1 Represents the global weight after aggregation.

6. The low-overhead multi-point time-frequency positioning method based on the federated learning framework as claimed in claim 5, characterized in that: The central server forms a personalized subnet model for each secondary user based on the aggregated global weight and each model mask, which is achieved through the following formula: Among them, ⊙ represents element-by-element multiplication, represents the personalized sub-network model weight of the i-th secondary user.

7. The low-overhead multi-point time-frequency positioning method based on a federated learning framework as claimed in any one of claims 3 to 6, characterized in that: S t After the secondary users in the network obtain the subnet model parameters and the model mask, the method further includes: fine-tuning the pruned subnet model based on the local data set.

8. The low-overhead multi-point time-frequency positioning method based on a federated learning framework according to any one of claims 1 to 6, characterized in that: After the central server forms a personalized subnet model for each secondary user based on the aggregated global weight and each model mask, and sends it to the corresponding secondary user, the method further includes: Each secondary user completes the received personalized subnet model based on the model mask, and determines whether the completed personalized subnet model meets the convergence condition. If it is determined that the convergence condition is met, the local training ends; Each secondary user performs time-frequency positioning based on its corresponding completed personalized subnet model, thereby achieving low-overhead multi-point time-frequency positioning.

9. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; In which, the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a low-overhead multi-point time-frequency positioning method based on a federated learning framework as described in any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it can implement a low-overhead multi-point time-frequency positioning method based on a federated learning framework as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Federal learning system and method based on model pruning and transmission compression optimization

    CN115564062A

  • Federal learning model pruning method and device and nonvolatile storage medium

    CN116306884A

  • Federal learning method

    CN116542322A

  • Cooperative broadband spectrum sensing method based on federal pruning transfer learning and secondary Nyquist sampling

    CN118555574A

Cited By

  • Detection method and device based on visual model

    CN120635764A

  • Generalized time-frequency positioning method for distributed training scene

    CN121692206A

  • Layered self-adaptive federal learning method and device and medium

    CN122311358A

  • A hierarchical adaptive federated learning method, device, and medium

    CN122311358B