A method, system, device and medium for detecting a byzantine participant in federated learning based on dct

By using DCT in a federated learning system to transform model gradients to the frequency domain for analysis, and utilizing the energy distribution differences in the spectrogram to detect Byzantine participants, the problem of detection schemes failing in real-world environments in existing technologies is solved, achieving effective detection and defense under arbitrary Byzantine participant ratios and Non-IID conditions.

CN116707947BActive Publication Date: 2026-04-17XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIDIAN UNIV
Filing Date
2023-06-27
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing federated learning systems struggle to effectively detect Byzantine participants in real-world applications, especially when Byzantine participants comprise more than 50% of the total or when local data is non-IID. In such cases, existing detection methods fail, leading to decreased global model accuracy or failure to converge.

Method used

A DCT-based approach is used to transform the model gradient to the frequency domain for analysis. Byzantine participants are detected by the energy distribution differences in the spectrogram. The local model parameters are decomposed into the sum of cosine functions with different amplitudes and frequencies using DCT, generating a spectrogram and identifying malicious models by the energy distribution differences.

Benefits of technology

It can accurately detect Byzantine participants under arbitrary Byzantine participant ratios and Non-IID conditions, avoiding their negative impact on the global model, improving the robustness and reliability of the federated learning system, and ensuring the integrity of the global model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116707947B_ABST
    Figure CN116707947B_ABST
Patent Text Reader

Abstract

A DCT-based federated learning Byzantine participant detection method, system, device and medium, the method converts model gradients to the frequency domain for analysis using DCT, and detects Byzantine participants by analyzing the energy distribution difference of the frequency spectrum, thereby avoiding the negative impact of malicious model gradient parameters generated by Byzantine participants on the global model, ensuring the integrity of the global model and improving the robustness of the federated learning system; the system, device and medium based on the DCT-based federated learning Byzantine participant detection method detect Byzantine participants; the present application can still accurately detect under the condition of any Byzantine participant ratio and Non-IID local data of participants, has high detection accuracy, wide applicability and high reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of cyberspace security technology, and in particular relates to a method, system, device and medium for detecting Byzantine participants in federated learning based on DCT. Background Technology

[0002] Federated learning is a distributed machine learning framework built on distributed datasets, consisting of multiple participants and a server. In this framework, participants train models using local data, and after each training round, they upload their local model parameters to the server. The server aggregates the uploaded model parameters and distributes the aggregated global model to all participants for the next training round. This model parameter exchange and aggregation method not only prevents data privacy leaks but also effectively solves the data silo problem. However, due to the distributed nature of federated learning, it is vulnerable to Byzantine attacks. Byzantine participants can generate malicious models during model training and uploading, causing these malicious models to aggregate with normal models, thereby reducing the accuracy of the global model or preventing it from converging properly. Therefore, effective methods are needed to detect and prevent Byzantine participant behavior in federated learning systems to ensure the reliability and security of the system.

[0003] Most existing poisoning attack detection schemes for the parties in the federated learning system impose many constraints on the federated learning system, including that the server has a validation dataset, the local data of each party satisfies independent and identically distributed (IID), and the proportion of Byzantine parties does not exceed 50%. In 2020, [Wang Y, Zhu TQ, Chang WH, Shen S, Ren W. Model poisoning defense on federated learning: A validation based approach. In: Proc. of the 14th Int’l Conf. on Network and System Security. Melbourne: Springer, 2020. 207–223.] proposed that the aggregation server collects a small part of the validation dataset to verify the classification accuracy of the model parameters uploaded by each party. If the classification accuracy is lower than the threshold, it is detected as a malicious local model. [Khazbak Y, Tan TX, Cao GH. MLGuard: Mitigating poisoning attacks in privacy preserving distributed collaborative learning. In: Proc. of the 29th Int’l Conf. on Computer Communications and Networks (ICCCN). Honolulu: IEEE, 2020. 1–9.] calculates the similarity score based on the cosine similarity of the model parameters between parties. The higher the similarity score, the closer the two model parameters are. Finally, the top n - m parties with the highest scores are selected for aggregation (m < n / 2). These constraints usually cannot be satisfied in the actual application environment of the federated learning system, resulting in the inability to effectively detect Byzantine parties in the actual application environment of the federated learning system. Summary of the Invention

[0004] In order to overcome the deficiencies of the above-mentioned prior art, the purpose of the present invention is to provide a method, system, device and medium for detecting Byzantine parties in federated learning based on DCT. The DCT is used to transform the model gradient into the frequency domain for analysis, and the Byzantine parties are detected by analyzing the energy distribution difference of the spectrogram, so as to avoid the negative impact of the malicious model generated by the Byzantine parties on the global model, ensure the integrity of the global model and improve the robustness of the federated learning system, with the advantages of wide applicability and high reliability.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] A federated learning Byzantine participant detection method based on DCT (Discrete Cosine Transform) utilizes DCT to transform local model parameters. Based on frequency decomposition into the sum of cosine functions with different amplitudes and frequencies; through DCT transformation, the local model parameters are... Converting it into its corresponding spectrogram, thus obtaining the parameters of the local model. The energy distribution at different frequencies was analyzed; then, the Byzantine participants were detected by analyzing the differences in energy distribution in the spectrum.

[0007] A Federated Learning Byzantine Participant Detection Method Based on DCT, with the following assumptions:

[0008] 1) Assume there are n participants in the system, and the set of participants is represented as {u1, u2, ..., un}. n The Byzantine participants can launch an attack in any round provided t>1 (where t represents the current training round number);

[0009] 2) Assume that all participants in the system have the same local model structure and type;

[0010] 3) It is assumed that the server in the system is honest and trustworthy and will not collude with other participants in the system.

[0011] A method for detecting Byzantine participants in federated learning based on DCT includes the following steps:

[0012] Step 1: The server initializes the global model and distributes it to all participating parties.

[0013] Step 2: Participants train their local models using local data based on the global model to obtain updated local models, and then update the local model parameters. Uploaded to the server;

[0014] Step 3: Anomaly detection. The server receives the local model parameters from each participant. Then, the local model parameters The information is used for DCT calculation to obtain the corresponding local model parameters. The spectrum diagram is obtained; then the energy distribution of the spectrum diagram is calculated, and local models whose energy distribution difference value exceeds the set threshold are marked as malicious local models, and local models whose energy distribution difference value does not exceed the set threshold are marked as normal participants; the information of normal participants will be stored in the normal participant list;

[0015] Step 4: Based on the information in the list of normal participants in Step 3, the server aggregates the local models uploaded by the normal participants into a global model using the federated average aggregation rules, and then distributes the global model to each participant.

[0016] The specific method of step 1 is as follows: The server specifies the model structure, optimizer and loss function, initializes the global model and distributes the global model to the participants {u1, u2, ... u...} n}

[0017] The specific method for step 2 is as follows: After receiving the latest global model distributed in step 1, the normal participants u i Using local data d i The model is trained to obtain an updated local model; after the local model training is complete, all participants share the local model parameters. Uploaded to the server, whereby the Byzantine participants updated the local model parameters. Poisoning involves modifying model information to reduce the model's accuracy.

[0018] The specific method for step 3 is as follows:

[0019] 3.1) The server receives data from participant u i Local model parameters Then, the local model parameters Perform DCT transformation to obtain the corresponding spectrogram:

[0020] 3.1.1) Assume local model parameters The matrix is ​​a two-dimensional matrix P×Q. First, we analyze the rows of the matrix, treating it as a discrete signal composed of P sampling points. The Fourier transform of this discrete signal is expressed as:

[0021]

[0022] X(k) are the coefficients after the Fourier transform. Expanding the exponential function in formula (1), we get:

[0023]

[0024] Local model parameters If the matrix is ​​an even function signal of a real number, and the imaginary part of formula (2) is an odd function, then... Therefore, by removing the sine function from formula (2), we get:

[0025]

[0026] Apply formula (3) again to the local model parameters Analyzing the columns completes the analysis of the local model parameters. The coefficients obtained from the DCT calculation are considered as local model parameters. Projection onto the cosine basis functions;

[0027] 3.1.2) Using DCT to extract local model parameters Based on frequency decomposition into the sum of cosine functions with different amplitudes and frequencies; through DCT transformation, the local model parameters are... Converting it into its corresponding spectrogram, thus obtaining the parameters of the local model. Energy distribution at different frequencies;

[0028] 3.2) At t=1, calculate the participant u i The low-frequency energy value E_Low1[i] and high-frequency energy value E_High1[i] of the local model parameter spectrum are obtained and saved;

[0029] When t>1, calculate the difference in low-frequency energy ratio between the local model parameter spectrum uploaded in round t and round 1 according to formula (4), calculate the difference in high-frequency energy ratio between the local model parameter spectrum uploaded in round t and round 1 according to formula (5), and calculate the total energy difference between high-frequency and low-frequency components between the local model parameter spectrum uploaded in round t and round 1 according to formula (6). Where α is a weighting factor used to determine the proportion of low-frequency components and high-frequency components;

[0030]

[0031]

[0032]

[0033] The predefined server-side outlier error threshold is th. At that time, the local model uploaded by the participants It will be judged as a malicious model;

[0034] Conversely, when If so, it will be marked as a normal participant; normal participant information will be stored in the normal participant list.

[0035] The specific method for step 4 is as follows: Based on the list of normal participants in step 3, the server aggregates the local models uploaded by the normal participants into a global model using a federated average aggregation rule, and distributes this global model to each participant. Each participant continues to train its local model based on this global model and its local data. Let t = t + 1, and repeat steps 2-4 to perform the next round of model training until the model converges or reaches the preset number of training rounds.

[0036] A federated learning Byzantine detection system based on the above detection method includes:

[0037] The model initialization module is used for initializing the global model on the server as described in step 1.

[0038] The local model training module is used by the participants in step 2 to train the model using local data based on the global model.

[0039] An anomaly detection module is used by the server in step 3 to perform anomaly detection on the local model parameters uploaded by the participants.

[0040] The global model aggregation module is used to aggregate non-malicious local models after anomaly detection on the server as described in step 4.

[0041] A federated learning Byzantine detection device based on the above detection method includes:

[0042] Memory, used to store computer programs;

[0043] A processor is used to implement the DCT-based federated learning Byzantine participant detection method described in steps 1 to 4 when executing the computer program.

[0044] A computer-readable storage medium for storing a computer program, which, when executed by a processor, is capable of performing Byzantine participant detection based on the DCT-based federated learning Byzantine participant detection method described in steps 1 to 4.

[0045] Compared with the prior art, the present invention has the following advantages:

[0046] 1. This invention proposes a detection scheme for Byzantine parties in federated learning systems. Based on DCT, it transforms model parameters from the time domain to the frequency domain for analysis, accurately detecting spectral energy changes in model parameters caused by poisoning attacks from Byzantine parties in the federated learning system. By detecting and identifying Byzantine parties, their negative impact on the global model can be avoided. Compared to existing technologies, this invention can accurately detect Byzantine parties regardless of their proportion and even under conditions where the parties' local data is non-IID.

[0047] 2. Current mainstream detection schemes typically rely on horizontal comparisons between participants' local models, using methods such as clustering to classify the largest number of categories as normal participants. However, this detection scheme fails when the proportion of Byzantine participants exceeds 50%. Furthermore, if a participant's local data is Non-IID, the heterogeneity of the data leads to significant differences in the locally trained models, increasing the false detection rate. This invention determines abnormal behavior by comparing the participant's current model information with its historical model information, independent of other participants. Therefore, this invention exhibits strong robustness and reliability, unaffected by the proportion of Byzantine participants or Non-IID data.

[0048] In summary, the present invention has the advantages of good applicability and high accuracy. Attached Figure Description

[0049] Figure 1 It is a framework diagram of a federated learning system that includes Byzantine participants.

[0050] Figure 2 This is a detailed diagram of the Byzantine participants' testing protocol.

[0051] Figure 3 This is the global model classification accuracy of this invention on the MNIST dataset.

[0052] Figure 4 This is the global model classification accuracy of this invention on the CIFAR-10 dataset.

[0053] Figure 5 This invention is different from P r The global model classification accuracy under the given conditions.

[0054] Figure 6 This represents the global model classification accuracy under different Scale values ​​according to the present invention. Detailed Implementation

[0055] The present invention will now be described in further detail with reference to the accompanying drawings.

[0056] A Federated Learning Byzantine Participant Detection Method Based on DCT, with the following assumptions:

[0057] 1) Assume there are n participants in the system, and the set of participants is represented as {u1, u2, ..., un}. n The Byzantine participants can launch an attack in any round provided t>1 (where t represents the current training round number);

[0058] 2) Assume that all participants in the system have the same local model structure and type;

[0059] 3) It is assumed that the server in the system is honest and trustworthy and will not collude with other participants in the system.

[0060] This invention compares the current model information uploaded by the participants with the model information of the first round, requiring that the model information of the first round is correct. Therefore, it is assumed that the Byzantine participants do not launch a poisoning attack during the first round of training.

[0061] See Figure 1 , Figure 2 A federated learning Byzantine participant detection method based on DCT includes the following steps: Step 1: The server initializes the global model and distributes the global model to each participant:

[0062] The server specifies the model structure, optimizer, and loss function, initializes the global model, and distributes the global model to the participants {u1, u2, ... u}. n}

[0063] Step 2: Participants train their local models using the latest global model and local data to obtain updated local models, and then update the local model parameters. Uploaded to server:

[0064] After receiving the latest global model distributed in step 1, the normal participant u i Using local data d i Perform model training to obtain updated local model parameters. After the local model training is complete, all participants will share the local model parameters. Uploaded to the server, whereby the Byzantine participants updated the local model parameters. Poisoning involves modifying model information to reduce the model's accuracy.

[0065] Step 3: Anomaly detection. The server receives the local model parameters from each participant. Then, the local model parameters The information is used for DCT calculation to obtain the corresponding local model parameters. The spectrum diagram is then analyzed; the energy distribution of the spectrum diagram is calculated, and local models with energy distribution differences exceeding a set threshold are marked as malicious local models.

[0066] 3.1) The server receives data from participant u i Local model parameters Then, a DCT transform is performed on it to obtain the corresponding spectrogram:

[0067] 3.1.1) Assume local model parameters The matrix is ​​a two-dimensional matrix P×Q. First, we analyze the rows of the matrix, which can be regarded as a discrete signal composed of P sampling points. The Fourier transform of this discrete signal can be expressed as:

[0068]

[0069] X(k) are the coefficients after the Fourier transform. Expanding the exponential function in formula (1), we get:

[0070]

[0071] Local model parameters If the matrix is ​​an even function signal of a real number, and the imaginary part of formula (2) is an odd function, then... Therefore, by removing the sine function from formula (2), we get:

[0072]

[0073] Apply formula (3) again to the local model parameters Analyzing the columns completes the analysis of the local model parameters. The coefficients obtained from the DCT calculation can be regarded as local model parameters. Projection onto the cosine basis functions;

[0074] 3.1.2) Using DCT to extract local model parameters Based on frequency decomposition into the sum of cosine functions with different amplitudes and frequencies; through DCT transformation, the local model parameters are... Converting it into its corresponding spectrogram, thus obtaining the parameters of the local model. Energy distribution at different frequencies;

[0075] The Byzantine participants will update the local model parameters. Poisoning involves modifying model information to reduce the model's accuracy.

[0076] 3.2) At t=1, calculate the participant u i The low-frequency energy value E_Low1[i] and high-frequency energy value E_High1[i] of the local model parameter spectrum are obtained and saved;

[0077] When t>1, calculate the difference in low-frequency energy ratio between the local model parameter spectrum uploaded in round t and round 1 according to formula (4), calculate the difference in high-frequency energy ratio between the local model parameter spectrum uploaded in round t and round 1 according to formula (5), and calculate the total energy difference between high-frequency and low-frequency components between the local model parameter spectrum uploaded in round t and round 1 according to formula (6). Where α is a weighting factor used to determine the proportion of low-frequency components and high-frequency components;

[0078]

[0079]

[0080]

[0081] The predefined server-side outlier error threshold is th. At that time, the local model parameters uploaded by the participants It will be judged as a malicious model;

[0082] Conversely, when If so, it will be marked as a normal participant; normal participant information will be stored in the normal participant list.

[0083] Step 4: Global model aggregation and distribution:

[0084] Based on the information in the list of normal participants in step 3, the server aggregates the local models uploaded by the normal participants into a global model using the federated averaging aggregation rule, and distributes the global model to each participant. Each participant continues to train its local model based on the global model and its local data. Let t = t + 1, and repeat steps 2-4 to perform the next round of model training until the model converges or reaches the preset number of training rounds.

[0085] See Table 1 for explanations of relevant symbols.

[0086] Table 1. Symbol Explanation

[0087]

[0088]

[0089] A federated learning Byzantine detection system based on the above detection method includes:

[0090] The model initialization module is used for initializing the global model on the server as described in step 1.

[0091] The local model training module is used by the participants in step 2 to train the model using local data based on the global model.

[0092] An anomaly detection module is used by the server in step 3 to perform anomaly detection on the local model parameters uploaded by the participants.

[0093] The global model aggregation module is used to aggregate non-malicious local models after anomaly detection on the server as described in step 4.

[0094] A federated learning Byzantine detection device based on the above detection method includes:

[0095] Memory, used to store computer programs;

[0096] A processor is used to implement the DCT-based federated learning Byzantine participant detection method described in steps 1 to 4 when executing the computer program.

[0097] A computer-readable storage medium for storing a computer program, which, when executed by a processor, is capable of performing Byzantine participant detection based on the DCT-based federated learning Byzantine participant detection method described in steps 1 to 4.

[0098] This invention presents a Byzantine participant detection method for federated learning based on Discrete Cosine Transform (DCT). This method can detect Byzantine participants in federated learning systems, and its effectiveness is unaffected by the proportion of Byzantine participants or the heterogeneity of local participant data. Furthermore, extensive experiments have demonstrated the effectiveness of this method.

[0099] The effectiveness of this invention is verified through experiments. The experimental environment was: Intel i5-9400F CPU, NVIDIA GeForce GTX 1660 SUPER GPU, 16GB RAM, and Windows 10 operating system. The programming environment was Python 3.9.13, PyTorch 1.9.0, and Anaconda3.

[0100] The experimental training datasets were MNIST and CIFAR-10. The MNIST dataset contained 60,000 handwritten digit images and 10,000 test images, while the CIFAR-10 dataset contained 60,000 color images across 10 categories, with 6,000 training images and 1,000 test images per category. The training model architecture consisted of a Convolutional Neural Network (CNN) and a Multi-Layer Perception (MLP). The CNN model architecture included two convolutional layers, two pooling layers, and one linear layer, while the MLP model architecture included three linear layers. In the experiment, the number of participants n = 20, the number of training rounds T = 20, and when the Byzantine attack participants launched a Gaussian attack, they sent images following a Gaussian distribution. Model gradient parameters To the server.

[0101] Figure 3This paper demonstrates the global model accuracy on the MNIST dataset when using an MLP-trained model, assuming independent and identically distributed local data for each participant. As per the assumptions of the scheme, Byzantine participants can launch attacks in any round with t>1. In this experiment, the Byzantine participants launch a Gaussian attack in round 6, with a Byzantine participant proportion Pr = 0.2. Here, Normal represents the global model accuracy without Byzantine participants, No_defense represents the global model accuracy with Byzantine participants but without a defense scheme, and Our_defense represents the global model accuracy using the proposed Byzantine participant detection defense scheme. It can be observed that the global model accuracy obtained using the proposed detection scheme is almost identical to that without Byzantine participants, and significantly higher than the global model accuracy without a detection defense scheme. This indicates that the proposed detection scheme can accurately detect Byzantine participants and eliminate the negative impact of poisoning attacks.

[0102] Figure 4 This study demonstrates the impact of employing the proposed detection scheme on the global model accuracy when training with the CIFAR-10 dataset and a CNN model, assuming independent and identically distributed local data among the participants. As per the experimental assumptions, Byzantine participants can launch an attack in any round (t>1). This experiment sets the Byzantine participants to launch a Gaussian attack in round 6, with the proportion of Byzantine participants P. r =0.2. Normal represents the accuracy of the global model without Byzantine parties. No_defense represents the accuracy of the global model with Byzantine parties present but without any defensive measures. Our_defense represents the accuracy of the global model after employing the Byzantine party detection defense scheme proposed in this invention. Observation Figure 4 It can be observed that the global model using the proposed defense method of this invention has significantly better accuracy than the case without defense, and is close to the aggregation accuracy in the case without Byzantine participants. Furthermore, from... Figure 3 and Figure 4 It can be seen that the detection and defense performance of this invention is not affected by the model structure and the dataset.

[0103] Figure 5 This demonstrates the global model accuracy using an MLP model structure on the MNIST dataset. The local data of the participants satisfy the independent and identically distributed condition, while the proportion of Byzantine participants and the starting attack rounds are set as follows: the proportions of Byzantine participants are 0.2, 0.4, and 0.6, respectively, and a Gaussian attack is launched in round 6. According to the scheme assumptions, Byzantine participants can launch an attack in any round after round 1. Figure 5It can be seen that without defense detection, the higher the proportion of Byzantine participants, the lower the accuracy of the global model. However, after using the scheme proposed in this invention, even when Byzantine participants launched a poisoning attack in round 6, the accuracy of the global model did not decrease, and the final accuracy of the global model was almost the same under different proportions of Byzantine participants. This indicates that this invention is not limited by the proportion of Byzantine participants and can effectively detect poisoning attacks under different proportions of Byzantine participants.

[0104] Figure 6 This demonstrates the Byzantine participant ratio P using an MLP model structure on the MNIST dataset. r At Scale = 0.2, the global model classification accuracy under different degrees of local data heterogeneity. When Scale = 0.9, it indicates that the participants possess 9 classes of data from the MNIST dataset (the MNIST dataset includes 10 classes from 0 to 9). Observation Figure 6 It can be seen that as the Scale value decreases, the heterogeneity of the local data of the participants increases, leading to a gradual decrease in the accuracy of the global model. Under the same Scale value, the global model accuracy obtained using the detection and defense scheme proposed in this invention is much higher than the global model accuracy under poisoning attacks without defense capabilities. This indicates that this invention is applicable to real-world application scenarios where the local data of the participants are not independently and identically distributed.

Claims

1. A method for detecting Byzantine participants in federated learning based on DCT, characterized in that, Using DCT to extract local model parameters Based on frequency decomposition into the sum of cosine functions with different amplitudes and frequencies; through DCT transformation, the local model parameters are... Converting it into its corresponding spectrogram, thus obtaining the parameters of the local model. The energy distribution at different frequencies was analyzed; then, the Byzantine participants were detected by analyzing the differences in energy distribution in the spectrum. Specifically, the following steps are included: Step 1: The server initializes the global model and distributes it to all participating parties. Step 2, the participant uses the local data to train the model based on the latest global model, obtains an updated local model, and uploads the local model parameters to the server; Step 3: Anomaly detection. The server receives the local model parameters from each participant. Then, adjust the local model parameters. The information is used for DCT calculation to obtain the corresponding local model parameters. The spectrum diagram is obtained; then the energy distribution of the spectrum diagram is calculated, and local models whose energy distribution difference value exceeds the set threshold are marked as malicious local models, and local models whose energy distribution difference value does not exceed the set threshold are marked as normal participants; the information of normal participants will be stored in the normal participant list; Step 4: Based on the information in the list of normal participants in Step 3, the server aggregates the local models uploaded by the normal participants into a global model using the federated average aggregation rules, and then distributes the global model to each participant.

2. The method for detecting Byzantine participants in federated learning based on DCT according to claim 1, characterized in that, The specific method of step 1 is as follows: the server specifies the model structure, optimizer and loss function, initializes the global model and distributes the global model to the participants. .

3. The method for detecting Byzantine participants in federated learning based on DCT according to claim 1, characterized in that, The specific method for step 2 is as follows: After receiving the latest global model distributed in step 1, the normal participating parties... Use local data The model is trained to obtain an updated local model; after the local model training is complete, all participants share the local model parameters. Uploaded to the server, whereby the Byzantine participants updated the local model parameters. Poisoning involves modifying model information to reduce the model's accuracy.

4. The method for detecting Byzantine participants in federated learning based on DCT according to claim 1, characterized in that, The specific method for step 3 is as follows: 3.1) The server receives data from the participating parties. Local model parameters Then, adjust the local model parameters. Perform DCT transformation to obtain the corresponding spectrogram: 3.1.1) Assume local model parameters The matrix is ​​a two-dimensional matrix. First, we analyze the rows of the matrix and treat them as... P A discrete signal consisting of n sampling points can be expressed as the Fourier transform of the discrete signal as follows: These are the coefficients after the Fourier transform. Expanding the exponential function in formula (1), we get: Local model parameters If the matrix is ​​an even function signal of a real number, and the imaginary part of formula (2) is an odd function, then... Therefore, by removing the sine function from formula (2), we obtain: Apply formula (3) again to the local model parameters Analyzing the columns completes the analysis of the local model parameters. The coefficients obtained from the DCT calculation are considered as local model parameters. Projection onto the cosine basis functions; 3.1.2) Using DCT to extract local model parameters Based on frequency decomposition into the sum of cosine functions with different amplitudes and frequencies; through DCT transformation, the local model parameters are... Converting it into its corresponding spectrogram, thus obtaining the parameters of the local model. Energy distribution at different frequencies; 3.2) In At that time, calculate the participants Low-frequency energy values ​​of the local model parameter spectrum With high frequency energy value And save it; when At that time, the first step is calculated according to formula (4). The difference in the low-frequency energy ratio of the local model parameter spectrum uploaded in round 1 and round 2 is used to calculate the value of the first round 2 according to formula (5). The difference in the high-frequency energy ratio of the local model parameter spectrum uploaded in round 1 and round 2 is used to calculate the high-frequency energy ratio in round 3 according to formula (6). The total energy difference between high-frequency and low-frequency components in the local model parameter spectrum graph uploaded in round 1 and round 2. ,in It is a weighting factor used to determine the proportion of low-frequency components and high-frequency components; The predefined server-set outlier error threshold is ,when At that time, the local model uploaded by the participants It will be judged as a malicious model; Conversely, when In this case, it is marked as a normal participant; Information about normal participants will be stored in the list of normal participants.

5. The method for detecting Byzantine participants in federated learning based on DCT according to claim 1, characterized in that, The specific method of step 4 is as follows: Based on the list of normal participants in step 3, the server aggregates the local models uploaded by the normal participants into a global model using a federated averaging aggregation rule, and distributes this global model to each participant; each participant continues to train its local model based on this global model and its local data, making... Repeat steps 2-4 to perform the next round of model training until the model converges or reaches the preset number of training rounds.

6. A federated learning Byzantine detection system based on the detection method of any one of claims 1 to 5, characterized in that, include: The model initialization module is used for initializing the global model on the server as described in step 1. The local model training module is used by the participants in step 2 to train the model using local data based on the global model. An anomaly detection module is used by the server in step 3 to perform anomaly detection on the local model parameters uploaded by the participants; The global model aggregation module is used to aggregate non-malicious local models after anomaly detection on the server as described in step 4.

7. A federated learning Byzantine detection apparatus based on the detection method of any one of claims 1 to 5, characterized in that, include: Memory, used to store computer programs; A processor is used to implement the DCT-based federated learning Byzantine participant detection method described in steps 1 to 4 when executing the computer program.

8. A computer-readable storage medium for storing a computer program, characterized in that, When the computer program is executed by the processor, it is capable of performing Byzantine participant detection based on the DCT-based federated learning Byzantine participant detection method described in any one of 1 to 5.

Citation Information

Patent Citations

  • Low-rate denial of service attack detection method based on MAF-ADM

    CN111600878A

  • Method and system for detecting Byzantine nodes in horizontal federated learning system

    CN113554182A