A system and method for reducing the amount of parameters transferred in federated learning across food sectors
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2026-08-14
AI Technical Summary
然而当前研究工作的减少传输参数的方法存在损害全局模型性能、参数减少程度有限及难以实现等问题
[0032](1)本申请提出的一种跨食品部门联邦学习传输参数量减少系统,将模型参数作为信息传递媒介,使得食品相关的企业或部门在进行跨部门、跨机构的数据分析、数据挖掘等合作时,保障了数据的隐私安全。
Smart Images

Figure CN118586450B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a system and method for reducing the amount of parameters transferred in federated learning across food sectors. Background Technology
[0002] In today's digital age, the amount of data generated in the food industry is constantly increasing, and more and more companies are beginning to pay attention to and utilize food data. However, this data is often scattered across various companies, institutions, and regions, forming so-called "food data silos." The existence of these data silos brings many challenges to the development of the food industry, including difficulties in conducting comprehensive data analysis, the inability to fully explore the potential value of the data, and issues related to protecting data privacy and security.
[0003] To address the issue of data silos in the food industry and promote its digital transformation and intelligent development, federated learning has emerged as a promising solution for researchers. Federated learning has proven to be a powerful, privacy-preserving distributed machine learning framework with numerous real-world applications. In federated learning, individual food departments act as clients, collaboratively participating in training and transmitting their local model parameters to a central server. The server then aggregates multiple local models into a global model, enabling the global model to learn from data from multiple food departments while ensuring the privacy of the clients is not compromised.
[0004] However, as models grow larger and the number of parameters multiplies, traditional federated learning faces challenges such as increased parameter transmission time, excessive bandwidth consumption, and reduced global model performance. For example, ResNet18 has approximately 11 million parameters, while YOLOX-L has 54.2 million. If we have 10 clients, each deploying a YOLOX-L instance, then using the traditional FL method (i.e., Fed-Avg), the total number of parameters transmitted per round of communication would be 54.2 × 10 = 542 million parameters. Assuming that transmitting 542 million parameters per round takes one hour, 200 epochs would take 200 hours.
[0005] In recent years, researchers have focused on reducing network parameters to decrease parameter transmission time and alleviate bandwidth resource constraints in federated learning. Currently, methods for reducing transmitted parameters in federated learning mainly include quantization, sparsification, and a combination of quantization and sparsity. Quantization methods typically convert parameters from floating-point to integer format. Since integer format requires less storage space than floating-point format, researchers use quantization techniques to reduce the number of parameters transmitted in federated learning. However, the low-precision data generated by quantization methods can easily lead to the loss of important information in the model, which inevitably impairs the performance of the global model. During network model training, since a large number of parameters contribute only a limited amount to model performance, reducing unimportant parameters while retaining important parameters through sparsification is also an effective method.
[0006] Existing sparsity methods for federated learning mostly achieve model parameter sparsity through top-k methods. However, while top-k methods can reduce the number of model parameters, the value of k is difficult to determine because different values lead to different performance. Furthermore, sparse data requires additional cost to compute indices for locating sparse data within the network, thus limiting the reduction in model parameters. Methods combining quantization and sparsity often introduce new problems such as technical difficulties in implementation, increased computational costs, and difficulty in reducing communication costs.
[0007] In summary, federated learning can address the data silo problem in the food industry while ensuring privacy. However, current methods for reducing transmitted parameters suffer from drawbacks such as compromising global model performance, limited parameter reduction, and difficulty in implementation. Therefore, there is an urgent need to propose an efficient federated learning system and method based on cross-departmental food data communication. This system should be able to learn food data across departments while reducing the number of parameters transmitted during federated learning communication, thereby lowering communication costs. This is of great significance to the development of the food industry and the application of federated learning within it. Summary of the Invention
[0008] This application relates to a system and method for reducing the number of parameters transmitted in cross-food sector federated learning, which solves the problem of "food data silos" while ensuring efficient communication in federated learning. The technical solution is as follows:
[0009] On the one hand, a system for reducing the amount of parameters transferred in federated learning across food sectors is provided, the system comprising:
[0010] The nonholonomic neural network building module is used to build a nonholonomic neural network model that requires fewer parameters than a full neural network before starting federated learning.
[0011] The kernel generation and training module is used to generate convolution kernels from a non-holonomic neural network model using a kernel generation function and perform federated learning training. After training, the generated convolution kernels are discarded to obtain an updated non-holonomic neural network model.
[0012] The modular upload and combination module is used to divide the updated incomplete neural network model into several modules, each with its own vector. The server randomly assigns numbers to these modules and instructs each client to upload one module from the updated incomplete local model. The server then reassembles the model into a new global model.
[0013] The model evaluation module is used to test the model using a test dataset after the federated learning training is completed, and to evaluate the global model performance based on the test results.
[0014] A further technical solution involves the convolution kernel generation function taking a small number of convolution kernels as input and using two tensors composed of random numbers as constants in the function for calculation. This results in a tensor of equal size to the two random number tensors, which is used as the parameters for the generated convolution kernel. The function is defined as follows:
[0015] w′=KGF(w=sign(w)*(|w| β +α)
[0016] Where w is the original convolution kernel, which is the parameter tensor of the convolutional layer after copying the convolution kernel; sign() is used to extract the sign of the parameters from the base convolution kernel; β is a random number tensor used for exponential calculation; α is a random number tensor bias; and the final output w' is the generated convolution kernel.
[0017] On the other hand, a method for reducing the number of parameters transferred in cross-food sector federated learning is provided. This method is applied to a cross-food sector federated learning parameter reduction system and includes:
[0018] Step S101: The server broadcasts the created random number seed and incomplete neural network model to all clients. The seed is the basic convolutional kernel, and the incomplete neural network model refers to a model whose convolutional layers lack most of the convolutional kernels.
[0019] Step S102: Based on the nonholonomic neural network model, the convolution kernel generation module generates convolution kernels using the convolution kernel generation function and performs federated learning training. After training, the generated convolution kernels are discarded to obtain the updated nonholonomic neural network model.
[0020] Step S103: Divide the updated incomplete neural network model into several modules equal to the client vectors. The server randomly assigns numbers and instructs each client to upload one module of the updated incomplete neural network model. The server then reassembles the new global model.
[0021] Step S104: Repeat steps S101 to S103 until the loss function converges, and the trained global model will be obtained.
[0022] A further technical solution includes the following steps before step S101:
[0023] Construct a federated learning system consisting of one server and multiple clients, where the dataset on each client represents the dataset of each department. The federated learning system is trained after ensuring that all clients and servers are online.
[0024] A further technical solution includes the following steps between step S101 and step S102:
[0025] After receiving a random number seed and a non-holonomic neural network model from the server, the client creates a random number tensor and trains it using a convolution kernel generation training method.
[0026] A further technical solution is that the convolution kernel generation training method uses a convolution kernel generation function, which is used to generate a sufficient number of convolution kernels based on a small number of basic convolution kernels until the model structure is complete for model training. The model only updates the basic convolution kernels and does not update the generated convolution kernels.
[0027] A further technical solution is that the process of generating convolutional kernels in the convolutional kernel generation training method is as follows:
[0028] The base convolutional kernel is replicated proportionally to achieve the required number of convolutional kernels for the current layer of the network.
[0029] The convolution kernel is obtained by performing the convolution kernel generation function operation on each element in the convolution kernel;
[0030] During training, forward propagation calculates feature maps that fit each network input by generating convolutional kernels, while in backpropagation, only the basic convolutional kernels existing in the initial incomplete convolutional network are updated, without updating the generated convolutional kernels.
[0031] The beneficial effects of the technical solution provided in this application include at least the following:
[0032] (1) The present application proposes a cross-food sector federated learning parameter reduction system that uses model parameters as the information transmission medium, so that food-related enterprises or departments can ensure data privacy and security when conducting cross-departmental and cross-institutional data analysis, data mining and other collaborations.
[0033] (2) The convolution kernel generation function used in the cross-food sector federated learning parameter reduction method proposed in this application can train an incomplete neural network with only a few convolution kernels like a complete model, ensuring that the model performance will not decrease due to the reduction of parameters, thus solving the problem of model performance being damaged when reducing the number of parameters required for transmission in current federated learning.
[0034] (3) The modular upload and combination module proposed in this application adopts an upload and combination transmission strategy, which differs from traditional federated learning that deploys n complete models to n clients separately. The modular upload and combination strategy only requires the client to upload one module of its local model. The entire transmission process is equivalent to transmitting only the parameters of a non-complete neural network, which greatly reduces the transmission cost. Moreover, the module combination method also saves certain computational costs compared to calculating the average model parameters, and has good practicality. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This illustration shows a schematic diagram of a system for reducing the number of parameters transferred in a cross-food sector federated learning model according to an exemplary embodiment of this application.
[0037] Figure 2 This invention provides a schematic diagram of the structure of a modular upload combination module according to an exemplary embodiment of the present application.
[0038] Figure 3 A flowchart illustrating a method for reducing the amount of transmitted parameters in cross-food sector federated learning, provided by an exemplary embodiment of this application, is shown.
[0039] Figure 4 A flowchart illustrating a convolution kernel generation training method provided in an exemplary embodiment of this application is shown. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0041] Example 1
[0042] The embodiment provides a system for reducing the amount of parameters transferred in federated learning across food sectors.
[0043] Figure 1This application illustrates an exemplary embodiment of a system for reducing the amount of parameters transferred in federated learning across food sectors. Please refer to [link / reference]. Figure 1 A cross-food sector federated learning parameter reduction system includes a non-holonomic neural network construction module 10, a convolution kernel generation training module 20, a module upload and combination module 30, and a model evaluation module 40.
[0044] The nonholonomic neural network building module 10 is used to build a nonholonomic neural network model that requires fewer parameters than a full neural network before starting federated learning.
[0045] In this embodiment, the implementation process of the nonholonomic neural network construction module is as follows:
[0046] Before starting federated learning, it is necessary to select the neural network to be used for training and ensure that the number of output channels of each layer of the network is equal to the number of input channels of the next layer. At this time, the neural network can successfully receive input data and output data, and the neural network is a complete neural network.
[0047] Set the reduction ratio for the number of convolutional kernels;
[0048] Based on the chosen complete neural network and the reduction ratio, construct a non-complete neural network using code;
[0049] During code implementation, the number of output channels in the convolutional layers of the network is reduced according to the reduction ratio of the number of convolutional kernels. In a complete neural network: the number of output channels of a convolutional layer = the number of input channels of the next layer. In a non-complete neural network: the number of output channels of a convolutional layer × the reduction ratio = the number of input channels of the next layer;
[0050] After reducing the number of output channels of the convolutional layer, the number of output channels of the convolutional layer is less than the number of input channels of the next layer. If data is input into a nonholonomic neural network, the neural network cannot perform forward propagation smoothly because the number of output features of the convolutional layer is not equal to the number of features of the input channels of the next layer. The neural network constructed in this way is called a nonholonomic neural network.
[0051] In summary, the nonholonomic neural network building block reduces the number of parameters in the entire model by reducing the number of convolutional kernels in each convolutional layer of a full neural network, or in other words, reducing the number of output channels in each convolutional layer.
[0052] The convolution kernel generation training module 20 is used to generate convolution kernels using the convolution kernel generation function from the non-holonomic neural network model and perform federated learning training. After training, the generated convolution kernels are discarded to obtain an updated non-holonomic neural network model.
[0053] In this embodiment, the convolution kernel generation training module is implemented as follows:
[0054] When a client trains a non-holonomic neural network, it cannot train directly because the number of convolutional kernels in the convolutional layers is insufficient. A specific method is needed to generate convolutional kernels to fill in the convolutional layers in the network.
[0055] The convolutional kernels of each convolutional layer are replicated according to the reduction ratio of the number of convolutional kernels when constructing a non-complete neural network, until the number of convolutional kernels in the convolutional layer is equal to the number of convolutional kernels in a complete neural network.
[0056] During training, the model employs a convolutional kernel generation training method, such as... Figure 4 As shown, the convolution kernel generation training method uses a convolution kernel generation function to generate a sufficient number of convolution kernels to make the model complete, allowing the input to pass smoothly through each layer of the model during forward propagation. Let w be the parameter tensor of the convolutional layer after copying the convolution kernel. First, two tensors α and β with the same size as the convolutional layer parameter w are generated for each convolutional layer using a random number seed. Second, according to the formula of the convolution kernel generation function, w′=KGF(w)=sign(w)*(|w| β The operation is performed element-wise with β, taking the sign (sign(w)) and absolute value (|w|) of each element in w, both of which are tensors of the same size as w. Each element in |w| is first exponentially operated with each element in β, then added to each element in α, and finally multiplied with each element in sign(w) to obtain w′, which has the same size as w but completely different internal parameters.
[0057] During backpropagation in training, due to the chain rule, the derivatives of the variables w, α, and β involved in the convolution kernel generation function are calculated simultaneously. To ensure that α and β do not change with updates, we freeze the parameters in α and β and only update the convolution kernel parameters before the kernel is copied.
[0058] After training is complete, the generated convolutional kernel w′ is discarded, and only the convolutional kernel parameters before copying are retained. This gives us the updated incomplete neural network.
[0059] The convolution kernel generation function takes a small number of convolution kernels as input and calculates two tensors composed of random numbers as constants in the function. The result is a tensor of the same size as the two random number tensors, which is used as the parameters for the generated convolution kernel. The function is defined as follows:
[0060] w′=KGF(w=sign(w)*(|w| β +α)
[0061] w is the original convolution kernel, which is the parameter tensor of the convolutional layer after copying the kernel. sign() is used to extract the sign of the parameters from the base convolution kernel. β is a random number tensor used for exponential calculation. α is a random number tensor bias. The final output w' is the generated convolution kernel.
[0062] In summary, the convolution kernel generation training module enables non-holonomic neural networks that cannot be directly trained to complete training by performing operations such as copying convolution kernels, calculating parameters using the convolution kernel generation function, updating the convolution kernel parameters before copying, and discarding the generated convolution kernels after training. The convolution kernel generation function also maintains good performance.
[0063] The modular upload and combination module 30 is used to divide the updated incomplete neural network model into several modules equal to the client vectors. The server randomly assigns numbers and instructs each client to upload one module from the updated incomplete local model, and the server reassembles the new global model.
[0064] In this embodiment, the convolution kernel generation training module is implemented as follows:
[0065] The server divides the model into n modules, which is equal to the number of clients n participating in federated learning, and assigns each module a number from 1 to n.
[0066] After all clients have completed training, the server creates an array of n numbers and randomly arranges the n numbers, shuffling their order.
[0067] The server sends the corresponding numbers to all clients in array order. For example, if the second position in the array is 4, then number 4 is sent to the second client. The client finds the module on the neural network that corresponds to the number based on the number and sends the module to the server.
[0068] After the server receives all the modules sent by the clients, it sorts the modules from 1 to n according to their numbers, and then forms the entire neural network as a new round of global model.
[0069] In each round of training, the server must rearrange the modules randomly to prevent the client from transmitting only modules with a specific number.
[0070] It's important to note that for modular upload and module combination, each client only needs to upload one module from the entire model. The module division depends on the number of clients; the server divides the model into several modules equal to the number of clients to ensure that each client can assemble the entire model even with just one uploaded module. The positions of the modules uploaded by each client within the model are distinct, and the order is randomly determined by the server. This ensures that each client can upload modules from all available positions throughout the federated learning training process. After random permutation, each client only needs to upload one module from the model. The server then combines the modules received from all clients to obtain the global model for the current communication round.
[0071] like Figure 2 The modular upload and combination module shown in this embodiment uses four clients as an example. The server divides the model into four modules based on the number of clients and generates a set of random values [2, 4, 1, 3]. According to these random values, clients 1, 2, 3, and 4 will select the 2nd, 4th, 1st, and 3rd modules of their local model for upload, respectively. After all selected modules are uploaded to the server, the server aggregates these modules into a complete model according to the order of the random values, which serves as the new global model for the next round. The local model is the updated incomplete neural network model obtained through the convolutional kernel-generated training module.
[0072] In summary, the modular upload and combination module allows each client to upload only one module of the model. The server combines the modules to obtain a new global model, thereby reducing the number of parameters required for client uploads.
[0073] The model evaluation module 40 is used to test the model using a test dataset after the federated learning training is completed, and to evaluate the performance of the global model based on the test results.
[0074] Example 2
[0075] Example 2 provides a method for reducing the number of parameters transferred in cross-food sector federated learning, which is applied to the cross-food sector federated learning parameter reduction system provided in Example 1.
[0076] Figure 3 A flowchart illustrating a method for reducing the amount of parameters transferred in cross-food sector federated learning, as provided in an exemplary embodiment of this application, is shown. Figure 3 As shown, this application illustrates a method for reducing the number of parameters transferred in cross-food sector federated learning, applied to image classification tests. The method includes the following steps:
[0077] Step S101: The server broadcasts the created random number seed and incomplete neural network model to all clients. The seed is the basic convolutional kernel, and the incomplete neural network model refers to a model whose convolutional layers lack most of the convolutional kernels.
[0078] In this embodiment, the server creates a random number seed and a non-complete neural network model. The non-complete neural network model is a non-complete global model, which means that the convolutional layers of the model lack most of the convolutional kernels. The random number seed is used to generate a random number tensor with the same number of parameters as the convolutional layers in the complete global model. Different devices can generate the same random number tensor using the same random number seed. Then, the server broadcasts the created random number seed and non-complete global model to all clients.
[0079] The following steps are included before step S101:
[0080] Construct a federated learning system consisting of one server and multiple clients, where the dataset on each client represents the dataset of each department. The federated learning system is trained after ensuring that all clients and servers are online.
[0081] Step S102: Based on the incomplete neural network model, the convolution kernel generation module generates convolution kernels using the convolution kernel generation function and performs federated learning training. After training, the generated convolution kernels are discarded to obtain the updated incomplete neural network model.
[0082] In this embodiment, the client uses image data from its local dataset as input to the complete model obtained in step S102 for training. During backpropagation, the model only updates a small number of convolutional kernel parameters in the initial incomplete neural network, while the convolutional kernels generated by the kernel generation function are not updated. After completing local training, the client deletes the generated convolutional kernels, obtaining the updated incomplete local model. The incomplete local model is the updated incomplete neural network model obtained by the kernel generation training module 20.
[0083] The following steps are also included between step S101 and step S102:
[0084] After receiving a random number seed and a non-holonomic neural network model from the server, the client creates a random number tensor and trains it using a convolution kernel generation training method.
[0085] In this embodiment, after receiving the random number seed, the client creates a random number tensor. After receiving the global model, it uses a convolution kernel generation training method for training. The convolution kernel generation training method uses a convolution kernel generation function, which can generate a sufficient number of convolution kernels based on a small number of basic convolution kernels to complete the model structure for model training. The model only updates the basic convolution kernels and does not update the generated convolution kernels.
[0086] Step S103: Divide the updated incomplete neural network model into several modules equal to the client vectors. The server randomly assigns numbers and instructs each client to upload one module from the updated incomplete local model. The server then reassembles the new global model.
[0087] In this embodiment, after local training is completed, each client selects a module from its own model and uploads it to the server. The selection of modules is obtained by the server through random arrangement, ensuring that each client uploads a module from a different location. After receiving all modules, the server reassembles them into a single model, which serves as the new global model.
[0088] Step S104: Repeat steps S101 to S103 until the loss function converges, and the trained global model will be obtained.
[0089] Specifically, this embodiment selects the publicly available dataset CIFAR10, which includes 10 classification categories (image size 3×28×28); these datasets are used to verify the test performance of the method proposed in this patent on the visual task of image classification.
[0090] This application presents a method and system for reducing the number of transmitted parameters in cross-sector federated learning. These methods and systems were applied to image classification tests. The test dataset was the publicly available CIFAR10 dataset, and the model used was ResNet18. The federated learning setup involved 10 clients, with the dataset divided into 10 subsets deployed on each client. To simulate real-world cross-sector federated learning, the dataset was configured with a non-independent and identically distributed (i.i.d.) distribution, meaning that the classes on each client's dataset were largely different. On the CIFAR10 dataset, 80% of the images in each client's subset belonged to the same class, referred to as the dominant class, and each client had a different dominant class, thus achieving a non-independent and identically distributed data scenario.
[0091] To verify the effectiveness and innovation of our method, we prepared six benchmark methods for comparison with the method proposed in this patent: FedAvg (PMLR, 2017), DGC (ICLR, 2018), FedCOM (PMLR, 2021), FedCAMS (ICML, 2022), SmartIdx (AAAI, 2022), and FedPM (ICLR, 2023). The classification accuracy of their final global models is shown in Table 1. Clearly, under the non-independent and identically distributed dataset setting, the model trained by Fed-KGF outperforms the other methods in classification performance, with only Fed-KGF achieving an accuracy exceeding 60%, while the others are below 60%. The communication time and the number of parameters required for transmission in a single training round are shown in Table 2. Experimental results show that Fed-KGF has the lowest transmission cost among all methods (i.e., the communication time and the number of parameters required for transmission are both the lowest among all methods). In addition, we recorded the communication time and the number of parameters required for transmission of Fed-KGF after removing the modular upload module. It can be seen that its transmission cost is significantly higher than that of Fed-KGF, which proves the necessity of this module.
[0092] Table 1 shows the experimental results of each method for image classification on CIFAR10 and CIFAR100.
[0093] method CIFAR10 accuracy Fed-KGF 65.82% FedCAMS 20.48% SmartIdx 54.25% DGC 54.65% FedPM 41.50% FedCOM 57.78% Fed-Avg 51.77%
[0094] Table 2 shows the communication costs of each method using ResNet18 as the model.
[0095] method Time (ms) Number of parameters (MB) Parameter reduction ratio Fed-KGF 0.774 1.15 -99.60% Fed-KGF removes modular upload combinations 1.289 11.54 -96.01% FedCAMS 0.892 13.32 -95.40% SmartIdx 1.032 20.47 -92.92% DGC 0.838 36.16 -87.50% FedPM 1.14 91.55 -68.36% FedCOM 1.189 114.65 -60.37% Fed-Avg 1.189 289.31 0.00%
[0096] In summary:
[0097] This application proposes to use a federated learning system to solve the data silo problem in the food industry. The system uses model parameters as an information transmission medium, which ensures the privacy and security of data when food-related enterprises or departments conduct cross-departmental and cross-institutional data analysis and data mining collaborations.
[0098] This application proposes a convolution kernel generation function that enables non-complete neural networks with only a few convolution kernels to be trained like complete models. This ensures that the model performance does not decrease due to the reduction of parameters, thus solving the problem of performance degradation caused by reducing the number of parameters required for transmission in current federated learning.
[0099] This application proposes a modular upload and combination transmission strategy. Unlike traditional federated learning, which deploys n complete models to n clients separately, the modular upload and combination strategy only requires the client to upload one module of its local model. The entire transmission process is equivalent to transmitting only the parameters of a non-complete neural network, significantly reducing transmission costs. Furthermore, the modular combination method also saves computational costs compared to calculating the average model parameters, demonstrating good practicality.
[0100] The above are merely optional embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A system for reducing the number of transmitted parameters in cross-food sector federated learning, used for federated learning training of image data classification from local datasets of each client via a communication link between a server and multiple food sector clients, and for reducing the number of model parameters transmitted over the communication link, characterized in that, The system includes: The Incomplete Convolutional Neural Network Building Module is used to build an incomplete convolutional neural network model that requires fewer parameters than a complete convolutional neural network before starting federated learning. The kernel generation training module is used to generate convolutional kernels for processing the image data using a kernel generation function through a non-holonomic convolutional neural network model and perform federated learning training. After training, the generated convolutional kernels are discarded to obtain an updated non-holonomic convolutional neural network model. The modular upload and combination module is used to divide the updated incomplete convolutional neural network model into several modules equal to the number of clients. The server randomly assigns numbers to these modules and instructs each client to upload one module from the updated incomplete local model via the communication link. The server then reassembles the model into a new global model to reduce the number of model parameters transmitted over the communication link. The model evaluation module is used to perform classification tests on an image test dataset after federated learning training is completed, and to evaluate the image classification performance of the global model based on the test results.
2. The system according to claim 1, characterized in that, The convolution kernel generation function takes a small number of convolution kernels as input and uses two tensors composed of random numbers generated by a random number seed and a random number generator, which are equal in number to the parameters of the convolutional layers in a complete convolutional neural network, as constants in the function for calculation. The result is a tensor of the same size as the two random number tensors, which is used as the generated convolution kernel parameters for processing the image data. The function is defined as follows: w′=KGF(w)=sign(w)*(|w|β+α), Where w is the original convolution kernel, which is the parameter tensor of the convolutional layer after copying the convolution kernel; sign() is used to extract the sign of the parameters from the base convolution kernel; β is a random number tensor generated by the random number seed for exponential calculation; α is a random number tensor bias generated by the random number seed; and the final output w' is the generated convolution kernel used to process the image data.
3. A method for reducing the number of transmitted parameters in cross-food sector federated learning, used for federated learning training of image data classification in local datasets of each client by a server and multiple food sector clients via a communication link, and reducing the number of model parameters transmitted over the communication link, applied to the system described in claim 1, characterized in that, The method includes: Step S101: The server broadcasts the created random number seed and the incomplete convolutional neural network model to all food sector clients through the communication link. The random number seed is used to generate a random number tensor with the same number of parameters as the convolutional layer in the complete global model. The incomplete convolutional neural network model refers to a model whose convolutional layers lack most of the convolutional kernels. Step S102: Based on the non-holonomic convolutional neural network model, the convolutional kernel generation module generates convolutional kernels for processing the image data using the convolutional kernel generation function and performs federated learning training with the image data as input. After training, the generated convolutional kernels are discarded to obtain the updated non-holonomic convolutional neural network model. Step S103: Divide the updated incomplete convolutional neural network model into several modules equal to the number of clients. The server randomly assigns numbers and instructs each client to upload one module of the updated incomplete local convolutional neural network model through the communication link. The server then reassembles the new global model to reduce the number of model parameters transmitted on the communication link. Step S104: Repeat steps S101 to S103 until the loss function converges, and the trained global model for image data classification will be obtained.
4. The method according to claim 3, characterized in that, The following steps are included before step S101: Construct a federated learning system consisting of a server and multiple food sector clients. Each food sector client has a local image dataset representing the dataset of each food sector. The federated learning system performs federated learning training for image data classification after ensuring that all food sector clients and the server are online.
5. The method according to claim 3, characterized in that, The following steps are also included between step S101 and step S102: After the food department client receives a random number seed and a non-complete convolutional neural network model via server instructions, a random number tensor with the same number of parameters as the convolutional layer in the complete global model is created based on the prime random number seed. The convolutional kernel generation training method is then used to train the image data classification.
6. The method according to claim 5, characterized in that, The convolution kernel generation training method employs a convolution kernel generation function, which is used to generate a sufficient number of convolution kernels for processing the image data based on a small number of basic convolution kernels until the model structure is complete for model training. The model only updates the basic convolution kernels and does not update the generated convolution kernels.
7. The method according to claim 6, characterized in that, The process of generating convolutional kernels using the convolutional kernel generation and training method is as follows: The base convolutional kernels used to process the image data are replicated proportionally to achieve the number of convolutional kernels required by the current layer of the network. The kernel generation function is used to perform convolution kernel generation operation on each element in the convolution kernel to obtain the generated convolution kernel for processing the image data. During training, forward propagation generates convolutional kernels to compute feature maps for image data classification that fit each network input. In contrast, during backpropagation, only the basic convolutional kernels present in the initial incomplete convolutional network are updated, without updating the generated convolutional kernels.
Citation Information
Patent Citations
Neural network model generation method oriented to strong robustness
CN114595804A
Federal learning client scheduling method based on weight divergence and update increment
CN115454608A