Efficient auditing method and system for federated learning local training

By analyzing the similarity of convolutional layer feature maps and pruning redundant information in federated learning, the problems of limited computing resources and communication resources of edge devices are solved, and efficient model training and updating are achieved.

CN120708019APending Publication Date: 2025-09-26BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510647886.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In existing federated learning, due to the limited computing resources and communication resources of edge devices, the training cycle is extended and the model update is delayed, affecting the timely update and efficiency of the model.

Method used

By building an initial global model on the server side and distributing it to the client, the client uses training samples and audit samples to train the model, analyze the similarity of convolutional layer feature maps, prune redundant information of low-rank feature maps, generate masks and upload the optimized model, and the server side performs model aggregation.

Benefits of technology

While maintaining model accuracy, it reduces the client's computing and communication volume, alleviates the burden on edge devices, and improves training efficiency and the timeliness of model updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120708019A_ABST
    Figure CN120708019A_ABST
Patent Text Reader

Abstract

The invention discloses an efficient auditing method and system for federated learning local training, and belongs to the technical field of distributed machine learning and privacy protection, and the method comprises the steps: S1, a server side constructs an initial global model, and sends the initial global model to a client side as a local model; s2, dividing the client data set into a training sample and an auditing sample, and training a local model by using the training sample; s3, analyzing the similarity of feature maps in each convolutional layer of the local model by using an audit sample; s4, identifying filters corresponding to the low-rank feature maps in the feature map group as redundant information, performing structured pruning according to the auditing compression ratio, and generating masks for recording the memory or state of the filters; s5, reasoning the compressed local model on the auditing sample to obtain the model precision, and if the precision loss compared with the model after the last round of auditing does not exceed a set threshold value, entering S6; otherwise, rolling back to the last round of local model; and S6, the client uploads the model and the mask to a server, and the server performs aggregation based on the mask to obtain a global model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of distributed machine learning and privacy protection technology, and specifically relates to an efficient auditing method and system for local training of federated learning. Background Art

[0002] The widespread adoption of the Internet of Things (IoT) has enabled a vast number of connected smart devices, generating vast amounts of data. Since the data generated by these devices often contains sensitive information, centrally storing this data on centralized servers for training in real-world scenarios presents numerous risks, such as data leakage. In this context, federated learning (FL) has emerged as an effective solution to the challenges of data privacy and centralized training.

[0003] During federated learning, client nodes independently train local models using private datasets, uploading only the updated model parameters to the server for federated aggregation. The server then distributes the integrated global model across the cluster. Upon receiving it, the client updates its locally trained model to the unified global model. This process repeats, allowing the model to continuously interact and flow between the client and server over the network until the desired learning accuracy is achieved. This enables collaborative training of deep learning models without leaving the data domain.

[0004] The conflict between real-world edge device hardware constraints and model parameter size has limited the development of federated learning. Due to the limited computing resources of edge clients, the numerous complex matrix operations required for local training of large-scale parameter models significantly prolong the training cycle. Furthermore, limited communication resources hinder the interaction between servers and clients for high-dimensional parameter updates. As model size increases, transmission delays can occur, limiting timely model updates. Summary of the Invention

[0005] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide an efficient audit method and system for local training of federated learning, which solves the problems in the existing technology.

[0006] The purpose of the present invention can be achieved through the following technical solutions:

[0007] An efficient auditing method for federated learning local training includes the following steps:

[0008] S1, the server first builds an initial global model and distributes the initial global model to all client nodes as local models;

[0009] S2, divides the client dataset into training samples and audit samples, and uses the training samples to train the local model;

[0010] S3, using the audit sample to analyze the similarity of the feature maps in each convolutional layer of the trained local model to obtain a feature map group;

[0011] S4, identifies the filters corresponding to the low-rank feature maps in the feature map group as redundant information, and performs structured pruning on the redundant information according to the audit compression rate to optimize the ontology model, and simultaneously generates a mask for recording the existence or status of the filter;

[0012] S5: Perform inference on the audit sample to obtain the local model after the current round of compression and record the local model accuracy. If the accuracy loss compared with the local model after the previous round of audit compression does not exceed the set threshold, proceed to S6; otherwise, roll back the local model of the current round to the local model of the previous round.

[0013] S6: The client uploads the optimized local model and mask to the server. The server aggregates the local model based on the mask to obtain the global model.

[0014] Furthermore, the local model is a CNN model.

[0015] Furthermore, in S2, the private dataset on each client is divided into two groups, one group is the training samples for local model updates, and the other group is the randomly selected audit samples, which serve as the verification set for local model inference during the audit process. After receiving the global model, the client uses backpropagation to train the local model to update the network parameters of the local model.

[0016] Furthermore, in S3, the peak signal-to-noise ratio (PSNR) is used to measure the similarity between two feature maps in the local model.

[0017] Furthermore, in S4, the specific process of structured pruning of redundant information according to the audit compression ratio is as follows:

[0018] S41, calculate the output O of the convolutional layer i Each feature map in The rank of , and then calculate its statistical mean:

[0019]

[0020] in, represents the average rank of the mth feature map in the i-th convolutional layer, Represents the rank of the mth feature map in the i-th convolutional layer on the k-th sample, where M represents the total number of samples in the audit set; i Represents the average rank set of all feature maps in the i-th convolutional layer, N i Represents the number of filters in the i-th convolutional layer, that is, the number of feature maps in the convolutional layer;

[0021] S42, the feature graph similarity set S i Sort from high to low and compare the average rank set Rank of the feature graph i The filters to be pruned are audited according to the low-rank compression rule; the specific conditions of the low-rank compression rule are set as follows:

[0022] Condition 1: Filter (i,m) and Filter (i,n) None of them belong to the pruned set Delete i ;

[0023] Condition 2: In the i-th convolutional layer, the feature maps m and n satisfy condition 1, and the feature similarity Take S i The maximum value in ;

[0024] Condition 3: The rank of feature map m is greater than n,

[0025] Condition 4: The rank of feature map m is less than or equal to n,

[0026] Perform redundant information audit according to the above low-rank compression rules. If conditions 1 to 3 are met at the same time, the feature map Filter (i,n) Add to collection Delete i If conditions 1, 2 and 4 are met at the same time, Filter (i,m) Add to collection Delete i Repeat the above audit operation until Delete i The number of filters in the compression ratio N is set i2 ; After completing the redundant information audit of all convolutional layers, the local model compression is completed.

[0027] Furthermore, when the server aggregates local models, the server uses the mask as the position and state index to identify the filter position of the local model uploaded by each client, and counts the number of uploads at each position, and aggregates the local models uploaded by all clients one by one in units of filters to obtain a global model.

[0028] An efficient auditing system for local training in federated learning, including:

[0029] Federated learning initialization module: The server first builds an initial global model and distributes it to all client nodes as local models;

[0030] Training module: divides the client dataset into training samples and audit samples, and uses the training samples to train the local model;

[0031] Similarity analysis module: uses audit samples to analyze the similarity of feature maps in each convolutional layer of the trained local model to obtain a feature map group;

[0032] Optimization module: Identifies the filters corresponding to the low-rank feature maps in the feature map group as redundant information, and performs structured pruning of the redundant information according to the audit compression rate to optimize the ontology model, and simultaneously generates a mask for recording the filter's existence or status;

[0033] Accuracy judgment module: The local model that has completed compression in this round is inferred on the audit sample to obtain and record the accuracy of the local model. If the accuracy loss compared with the local model after the previous round of audit compression does not exceed the set threshold, it enters the aggregation module; otherwise, the local model of this round is rolled back to the local model of the previous round;

[0034] And, aggregation module: the client uploads the optimized local model and mask to the server, and the server aggregates the local model based on the mask to obtain the global model;

[0035] A computer storage medium stores a readable program, which, when executed by a processor, can execute the above-mentioned efficient auditing method for local training of federated learning.

[0036] An electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0037] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned efficient auditing method for local training of federated learning.

[0038] A computer program product includes computer instructions, which instruct a computing device to perform operations corresponding to the above-mentioned efficient auditing method for local training of federated learning.

[0039] Beneficial effects of the present invention:

[0040] 1. The present invention reduces the computational complexity of local training while maintaining the expected accuracy. By auditing the similarity of the feature maps output by the convolutional layer and selecting filters corresponding to low-rank feature maps in similar pairs for pruning, the client gradually obtains a compact model during the iterative process, reducing the computational and storage burden of local training on the client.

[0041] 2. This invention reduces the communication volume between clients and servers. The communication overhead in federated learning is primarily influenced by two factors: the amount of data transmitted from the client to the server after local training, and the number of global model parameters sent by the server to the client after aggregation. This patent reduces edge client communication overhead from two perspectives simultaneously by uploading a lightweight local model that has undergone redundant information auditing and sending a personalized global model that matches the local model from the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0043] Figure 1 This is a flow chart of the efficient auditing method for local training of federated learning in the present invention;

[0044] Figure 2 It is a diagram of the redundant information audit process based on filter pruning of the present invention;

[0045] Figure 3 It is a diagram of the pruning process of the filter corresponding to the low-rank feature map in the model of the present invention;

[0046] Figure 4 is the similarity graph of the output feature graph of the first convolutional layer of the present invention;

[0047] Figure 5 This is the FM1 feature of the present invention Figure 2 Dimensional matrix diagram;

[0048] Figure 6 This is the FM13 feature of the present invention Figure 2 Dimensional matrix diagram;

[0049] Figure 7 Schematic diagram of global model aggregation based on filter mask of the present invention. DETAILED DESCRIPTION

[0050] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0051] Example 1

[0052] like Figure 1As shown, an efficient auditing method for local training of federated learning includes the following steps

[0053] S1, the server first builds an initial global model and distributes the initial global model to all client nodes as local models;

[0054] After receiving the initial model, the client performs model training and optimization based on its local data. The server plays the role of coordinator throughout the entire process, ensuring efficient aggregation of model updates while strictly protecting the data privacy of each client. This example uses a convolutional neural network (CNN), which is widely used in computer vision tasks, for verification.

[0055] S2, divides the client dataset into training samples and audit samples, and uses the training samples to train the local model;

[0056] Each client's private dataset is divided into two groups: one is training samples used for local model updates, and the other is a small number of randomly selected audit samples, which serve as a validation set for local model inference during the audit process. After receiving the global model, the client uses backpropagation to perform local training to update the network parameters. The training dataset and audit dataset are split in an 8:2 ratio.

[0057] S3, uses the audit samples to analyze the similarity of feature maps in each convolutional layer of the trained local model to obtain a feature map group with a high information repetition rate;

[0058] The order of auditing and pruning the local model is from convolutional layer L1 to L n , assuming that the i-th convolutional layer is currently being audited, first calculate L according to the audit compression rate i The number of filters that need to be pruned is N i2 , these redundant filters constitute the set Delete i .

[0059] Assume that the local model to be compressed is Model i-1 , through the local private dataset Image k After training, L i The output is The function that quantifies the similarity of feature maps is defined as:

[0060]

[0061] in, and is a collection For any two feature maps in , their quantitative similarity is referred to as

[0062] The present invention innovatively uses the Peak Signal-to-Noise Ratio (PSNR) to measure the similarity between two feature maps in the CNN model. This method has been commonly used in previous applications as an indicator of image quality after compression. However, if one only focuses on the ranking of the similarities between all feature maps output by the convolutional layer, the PSNR and Euclidean distance methods for determining feature map similarity are theoretically equivalent. In order to make the judgment criteria of the feature map quantization function more unified, this embodiment stipulates that the larger the value of the similarity function, the higher the similarity between the two feature maps, and therefore the calculated PSNR similarity takes a negative value.

[0063]

[0064] Among them, X i and Y i represents the spatial dimensions (height and width) of the feature map of layer i, Represents the pixel value of the mth feature map at position (x, y).

[0065] Feature map similarity is determined by only a single image Image k The generated results, but in the local training of federated learning, the entire audit dataset contains M images. To improve the generalization performance of the audit results, this embodiment does not rely entirely on the similarity results of a single image for filter pruning, but averages the results of multiple image inputs, S i is the set of feature graph similarities.

[0066]

[0067] in, Represents calculating the similarity of M images on the audit dataset The average value of S i Represents the similarity set of all feature map pairs in layer i, N i is the number of feature maps in layer i.

[0068] S4, identifies the filters corresponding to the low-rank feature maps in the feature map group as redundant information, and performs structured pruning on the redundant information according to the audit compression rate to optimize the ontology model, and simultaneously generates a mask for recording the existence or status of the filter;

[0069] Among them, the feature map with less information in the similar feature map group is selected as redundant information, and the corresponding filter is pruned to reduce the number of model parameters. The rank of the feature map is used as a standard to measure the amount of information in the feature map;

[0070] like Figure 2 and Figure 3 As shown in the figure, the specific process of structurally pruning redundant information based on the audit compression rate is as follows:

[0071] S41, the rank of the two-dimensional feature map refers to the maximum number of linearly independent vectors in the matrix. First, calculate the output of the convolution layer O i Each feature map in The rank of , and then calculate its statistical mean:

[0072]

[0073] in, represents the average rank of the mth feature map in the i-th convolutional layer, Represents the rank of the mth feature map in the i-th convolutional layer on the k-th sample, and M represents the total number of samples in the audit set. i Represents the average rank set of all feature maps in the i-th convolutional layer, N i Represents the number of filters in the i-th convolutional layer, that is, the number of feature maps in the convolutional layer.

[0074] S42, the feature graph similarity set S i Sort from high to low and compare the average rank set Rank of the feature graph i Audit the filters to be pruned according to the low-rank compression rule.

[0075] The specific conditions of the low-rank compression rule are set as follows:

[0076] Condition 1: Filter (i,m) and Filter (i,n) None of them belong to the pruned set Delete i ;

[0077] Condition 2: In the i-th convolutional layer, the feature maps m and n satisfy condition 1, and the feature similarity Take S i The maximum value in ;

[0078] Condition 3: The rank of feature map m is greater than n,

[0079] Condition 4: The rank of feature map m is less than or equal to n,

[0080] Perform redundant information audit according to the above low-rank compression rules. If conditions 1 to 3 are met at the same time, the feature map Filter (i,n) Add to collection Delete i If conditions 1, 2 and 4 are met at the same time, Filter (i,m) Add to collection Delete i Repeat the above audit operation until Delete i The number of filters in the compression ratio N is seti2 After completing the redundant information audit of all convolutional layers, the local model compression is completed.

[0081] S5: Perform inference on the audit sample to obtain the local model after the current round of compression and record the local model accuracy. If the accuracy loss compared with the local model after the previous round of audit compression does not exceed the set threshold, proceed to S6; otherwise, roll back the local model of the current round to the local model of the previous round.

[0082] To prevent model performance degradation caused by each round of audit compression during federated learning training, while achieving lightweightness and ensuring model accuracy, the local model that has completed this round of compression is inferred on the audit dataset to obtain and record the model accuracy. If the accuracy loss compared to the model after the previous round of audit compression does not exceed the set threshold, the current round of model is sent to the server for global aggregation. If the threshold is exceeded, it means that the redundant information audit of the model is complete. If pruning is continued, the parameters that contribute significantly to the model update will be deleted. Therefore, the redundant information audit is suspended and the rollback mechanism is invoked to roll back the current round of model to the local model of the previous round of federated learning, limiting the model accuracy loss caused by filter reduction to a certain range.

[0083] S6: The client uploads the optimized local model and mask to the server. The server aggregates the local model based on the mask to obtain the global model.

[0084] The server uses the mask as the position and state index to identify the filter position uploaded by each client model, counts the number of uploads at each position, and aggregates all client models one by one in filter units to obtain a global model.

[0085] Although a model mask is attached when uploading model parameters, the parameters in the CNN model are generally stored as FP32 or FP64 floating-point numbers, while the filter mask only requires a small number of 0 or 1 binary bits to represent it, and the amount of data is much smaller than the number of parameters contained in the network model. Since each local model has deleted redundant filter structures, if the filters in the same position are retained, it means that the data distribution on these clients has a certain similarity. Therefore, during aggregation, the arithmetic mean of the filter dimension is used instead of the empirical weighted mean of the dataset size dimension to ensure that clients with similar model structures have the same weight update rights. The global model aggregation process is as follows:

[0086]

[0087] in, Represents the parameters of the jth filter in the i-th layer in the local model uploaded by the s-th client; represents the filter parameters in the global model, and S represents the total number of clients participating in the current round of federated learning.

[0088] Based on similar inventive concepts, an embodiment of the present invention also provides a computer storage medium storing a readable program, which, when run by a processor, can execute the above-mentioned efficient auditing method for local training of federated learning.

[0089] Based on similar inventive concepts, an embodiment of the present invention provides an electronic device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0090] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned efficient auditing method for local training of federated learning.

[0091] Based on similar inventive concepts, an embodiment of the present invention also provides a computer program product, including computer instructions, which instruct a computing device to perform operations corresponding to the above-mentioned efficient auditing method for local training of federated learning.

[0092] Example 2

[0093] In this embodiment, a specific example is used to introduce the similarity of quantified feature maps;

[0094] This example takes the training of the LeNet-5 model on the MNIST handwritten font recognition dataset as an example, focusing on the quantification of the similarity of the feature maps output by its first convolutional layer. The MNIST dataset is a grayscale image of size 28×28, the convolution kernel size of the first convolutional layer of the LeNet model is 5×5, and the number of output channels is 16. After the local training of federated learning is completed, the audit module is based on the peak signal-to-noise ratio (PSNR) algorithm. After the convolution kernel and pooling, the feature map size is 14×14. By comparing the pixel-level differences of the feature maps, the degree of information overlap is quantified, and finally a 16×16 similarity matrix is ​​constructed. In order to reduce the randomness of a single image, the above quantitative similarity calculation is repeated for multiple images in the audit dataset, and the arithmetic average of the PSNR values ​​of each image is taken to form the final similarity measurement matrix, as shown below. Figure 4As shown. Since the similarity between the two feature maps stored in the matrix is ​​symmetrical, the matrix is ​​actually an upper triangular matrix, with only the upper right part having values, while the other positions are 0, and the main diagonal is the similarity of the feature map itself. Since this embodiment takes a negative value for the similarity value, the larger the similarity value is, the more repeated information the two feature maps have. In the redundant information audit compression stage, this embodiment sorts the values ​​from high to low according to the set audit compression rate and marks the feature map pairs with the highest similarity, for example, the similarity between the 1st and 13th feature maps is -0.617. Quantifying the similarity of feature maps enables the instance to accurately audit redundant feature map pairs with overlapping information, divide these redundant feature map pairs into feature map groups, and safely prune them one by one in combination with the low-rank characteristics. Through personalized matching with the global model, the computational complexity and communication overhead of local training are effectively reduced.

[0095] Example 3

[0096] In this embodiment, a specific example is used to introduce that the filter corresponding to the audit low-rank feature map is redundant information;

[0097] Based on Example 2, this embodiment further combines the audit rules of low-rank feature maps to achieve accurate removal of redundant information. Taking the feature map output by the first convolutional layer of the LeNet-5 model as an example, after quantifying the similarity, the similarity of the feature map to FM1 and FM13 is -0.617, which can be determined that the most redundant information exists in the two. The pixel values ​​corresponding to the feature map are as follows: Figure 5 and 6 As shown. Then it is necessary to further analyze its rank value characteristics to audit feature maps with less information. First, calculate the rank of each feature map. Taking feature map FM1 as an example, its size is 14×14. Its effective rank is determined to be 6 through singular value decomposition. Similarly, the rank of feature map FM13 is 8. Then, in the similarity pair, the filter corresponding to the feature map (FM1) with a lower rank value is audited as redundant information and added to the pruning set. For example, if the preset audit compression rate is 10%, it is necessary to prune 1 out of the 16 filters, and the number of input channels of the second convolutional layer is also adjusted to 15 by deleting the corresponding weight slice. The audit module traverses all convolutional layers, and selects high-similarity feature map pairs based on the similarity matrix for the feature maps of each layer. Then, the rank value of each feature map is calculated, and the pruning target is determined in combination with the low-rank rule, and finally a compact CNN model is obtained.

[0098] Example 4

[0099] In this embodiment, a specific example is used to introduce the aggregation of the global model based on the filter mask.

[0100] like Figure 7As shown, this embodiment takes 10 clients randomly selected to participate in federated learning training as an example. After each round of local training, each client needs to upload a binary filter mask matrix in addition to uploading the updated model weights. Each element of the mask matrix corresponds to a filter position. If the filter at that position is retained, it is marked as 1, and if it is audited as redundant information and pruned, it is marked as 0. Taking the first convolutional layer of LeNet as an example, it originally contains 16 filters. If one of the clients prunes filter No. 1, its mask matrix is ​​[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]. The server counts the frequency of each filter position being retained by parsing the mask matrix and aggregates them by arithmetic averaging. In the model delivery stage, the server only transmits the global model parameters that match its local mask to each client, such as sending the weights corresponding to filters No. 2-16 in the global model to the above-mentioned client, rather than the full 16. Since the mask matrix is ​​stored in binary form, each filter position only occupies 1 bit, which significantly reduces the direct uplink and downlink data transmission between the client and the server.

[0101] Example 5

[0102] In this embodiment, the superiority of the audit method of the present invention is verified through comparative experiments;

[0103] This paper proposes an efficient auditing method for local training in federated learning. This method audits and removes redundant information from the model, reducing client computational and communication overhead and improving system efficiency during the local training phase. This method combines redundant information auditing with filter pruning, devising a feature graph similarity quantification method that uses matrix rank as an auxiliary rule to audit filters corresponding to low-rank feature graphs as redundant structures. Taking into account the heterogeneity of the compressed model, a filter-based global aggregation method is designed, aggregating each filter individually according to a mask to obtain a global model.

[0104] To verify the effectiveness of the model redundancy audit algorithm during local client training in federated learning and its impact on model accuracy, this example uses the publicly available MNIST and CIFAR-10 visual datasets as validation benchmarks. The LeNet-5 model was selected for MNIST training, while the VGG-16 model was used for CIFAR-10 training. In a federated learning system consisting of 100 client nodes and one central server, 10 nodes were randomly selected for FL training each round, with a local epoch count of 5. The following results were observed:

[0105] (1) Compared with existing audit compression methods such as HRankFL, the accuracy of the LeNet model is improved by 2.62% and the accuracy of the VGG-16 model is improved by 5.63% at the same audit compression rate.

[0106] (2) Compared with the traditional federated learning aggregation algorithm FedAvg, the floating-point operations of this method decrease significantly with the improvement of the audit compression rate. When the compression rate is 0.3, the floating-point operations FLOPs of the LeNet model are reduced by 68.4%, thereby reducing the computational pressure during the local training process of the edge client.

[0107] (3) When the audit compression rate is set to 0 to 0.3, the accuracy of the LeNet model decreases by 2.9%. This algorithm reduces a large number of model parameters and floating-point operations while controlling the limited range of accuracy loss.

[0108] (4) Experimental verification shows that the accuracy of the filter arithmetic average algorithm proposed in the present invention is better than the global model weighted average algorithm.

[0109] Example 6

[0110] In this embodiment, based on the efficient audit method for federated learning local training proposed in Example 1, an efficient audit system for federated learning local training is introduced, which specifically includes:

[0111] Federated learning initialization module: The server first builds an initial global model and distributes it to all client nodes as local models;

[0112] Training module: divides the client dataset into training samples and audit samples, and uses the training samples to train the local model;

[0113] Similarity analysis module: uses audit samples to analyze the similarity of feature maps in each convolutional layer of the trained local model to obtain a feature map group;

[0114] Optimization module: Identifies the filters corresponding to the low-rank feature maps in the feature map group as redundant information, and performs structured pruning of the redundant information according to the audit compression rate to optimize the ontology model, and simultaneously generates a mask for recording the filter's existence or status;

[0115] Accuracy judgment module: The local model that has completed compression in this round is inferred on the audit sample to obtain and record the accuracy of the local model. If the accuracy loss compared with the local model after the previous round of audit compression does not exceed the set threshold, it enters the aggregation module; otherwise, the local model of this round is rolled back to the local model of the previous round;

[0116] And, aggregation module: the client uploads the optimized local model and mask to the server, and the server aggregates the local model based on the mask to obtain the global model.

[0117] The method of the present invention can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CDROM, RAM, floppy disk, hard disk or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded over a network and will be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a special-purpose processor or programmable or special-purpose hardware (such as an ASIC or FPGA). It will be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the method shown here.

[0118] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention, and such changes and modifications fall within the scope of the invention as claimed.

Claims

1. An efficient auditing method for local training of federated learning, characterized by: The following steps are involved: S1, the server first builds an initial global model and distributes the initial global model to all client nodes as local models; S2, divides the client dataset into training samples and audit samples, and uses the training samples to train the local model; S3, using the audit sample to analyze the similarity of the feature maps in each convolutional layer of the trained local model to obtain a feature map group; S4, identifies the filters corresponding to the low-rank feature maps in the feature map group as redundant information, and performs structured pruning on the redundant information according to the audit compression rate to optimize the ontology model, and simultaneously generates a mask for recording the existence or status of the filter; S5: Perform inference on the audit sample to obtain the local model after the current round of compression and record the local model accuracy. If the accuracy loss compared with the local model after the previous round of audit compression does not exceed the set threshold, proceed to S6; otherwise, roll back the local model of the current round to the local model of the previous round. In S6, the client uploads the optimized local model and mask to the server. The server aggregates the local model based on the mask to obtain the global model.

2. An efficient auditing method for local training of federated learning according to claim 1, characterized in that: The local model is a CNN model.

3. An efficient auditing method for local training of federated learning according to claim 1, characterized in that: In S2, the private dataset on each client is divided into two groups: one group is the training samples used for local model updates, and the other group is the randomly selected audit samples, which serve as the verification set for local model inference during the audit process. After receiving the global model, the client uses backpropagation to train the local model to update the network parameters of the local model.

4. An efficient auditing method for federated learning local training according to claim 1, characterized in that: In S3, the peak signal-to-noise ratio (PSNR) is used to measure the similarity between two feature maps in the local model.

5. The efficient audit method for local training of federated learning according to claim 1 is characterized in that: In S4, the specific process of structural pruning of redundant information based on the audit compression ratio is as follows: S41, calculate the output O of the convolutional layer i Each feature map in The rank of , and then calculate its statistical mean: in, represents the average rank of the mth feature map in the i-th convolutional layer, Represents the rank of the mth feature map in the i-th convolutional layer on the k-th sample, where M represents the total number of samples in the audit set; i Represents the average rank set of all feature maps in the i-th convolutional layer, N i Represents the number of filters in the i-th convolutional layer, that is, the number of feature maps in the convolutional layer; S42, the feature graph similarity set S i Sort from high to low and compare the average rank set Rank of the feature graph i The filters to be pruned are audited according to the low-rank compression rule; the specific conditions of the low-rank compression rule are set as follows: Condition 1: Filter (i,m) and Filter (i,n) None of them belong to the pruned set Delete i ; Condition 2: In the i-th convolutional layer, the feature maps m and n satisfy condition 1, and the feature similarity Take S i The maximum value in ; Condition 3: The rank of feature map m is greater than n, Condition 4: The rank of feature map m is less than or equal to n, Perform redundant information audit according to the above low-rank compression rules. If conditions 1 to 3 are met at the same time, the feature map Filter (i,n) Add to collection Delete i If conditions 1, 2 and 4 are met at the same time, Filter (i,m) Add to collection Delete i Repeat the above audit operation until Delete i The number of filters in the compression ratio N is set i2 ; After completing the redundant information audit of all convolutional layers, the local model compression is completed.

6. An efficient auditing method for local training of federated learning according to claim 1, characterized in that: When the server aggregates the local models, it uses the mask as the position and state index to identify the filter position of each client uploading the local model, and counts the number of uploads at each position. The local models uploaded by all clients are aggregated one by one in units of filters to obtain a global model.

7. An efficient audit system for local training of federated learning, characterized by: include: Federated learning initialization module: The server first builds an initial global model and distributes it to all client nodes as local models; Training module: divides the client dataset into training samples and audit samples, and uses the training samples to train the local model; Similarity analysis module: uses audit samples to analyze the similarity of feature maps in each convolutional layer of the trained local model to obtain a feature map group; Optimization module: Identifies the filters corresponding to the low-rank feature maps in the feature map group as redundant information, and performs structured pruning of the redundant information according to the audit compression rate to optimize the ontology model, and simultaneously generates a mask for recording the filter's existence or status; Accuracy judgment module: The local model after the current round of compression is inferred on the audit sample to obtain and record the accuracy of the local model. If the accuracy loss compared with the local model after the previous round of audit compression does not exceed the set threshold, it enters the aggregation module; Otherwise, the local model of this round is rolled back to the local model of the previous round; And, aggregation module: the client uploads the optimized local model and mask to the server, and the server aggregates the local model based on the mask to obtain the global model.

8. A computer storage medium storing a readable program, characterized in that: When the program is run by the processor, it can execute an efficient auditing method for federated learning local training as described in any one of claims 1-6.

9. An electronic device, characterized in that: include: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to an efficient auditing method for local training of federated learning as described in any one of claims 1-6.

10. A computer program product comprising computer instructions, characterized in that The computer instructions instruct the computing device to perform operations corresponding to an efficient auditing method for local training of federated learning as described in any one of claims 1-6.