Edge federation continuous learning method based on brain-like pulse neural network
By adopting an edge federated continuous learning method based on brain-like pulsed neural networks on edge devices, combining sample selection strategies for herd effect and data-driven weighted aggregation algorithm, the data-limited and catastrophic forgetfulness of deep model learning on edge devices is solved. Problem, achieving high-performance machine learning model training and continuous learning.
Patent Information
- Application Number
- CN202411567332.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-05
AI Technical Summary
The prior art has problems of limited data and catastrophic forgetting when conducting deep model learning on edge devices, making it difficult to train high-performance machine learning models, and old knowledge is covered by new knowledge, resulting in forgetting problems.
Adopting the edge federated continuous learning method based on brain-like pulse neural network, sending global models to edge devices through a central server, and using sample sets for training, using herd effect sample selection strategy and data-driven adaptive weighted aggregation algorithm , integrate the model parameters of each edge device to generate a global model.
It effectively reduces the catastrophic forgetting problem of edge devices, retains knowledge of old tasks, improves the generalization of global models, reduces the communication and computing resource consumption of edge devices, and improves the accuracy of continuous tasks.
Smart Images

Figure CN119443208A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine learning methods, and in particular to an edge federated continuous learning method based on brain-like pulse neural networks. Background Art
[0002] In today's digital age, IoT devices are everywhere, from smart homes and smart cities to industrial automation. With the rapid increase in the number of terminal devices and the significant improvement in computing power, a new computing model - edge computing is gradually becoming a key technology to meet the needs of smart IoT applications.
[0003] With the rapid development of IoT technology and the continuous improvement of terminal device hardware capabilities, model training and inference computing on edge devices has become a trend. However, learning deep models on edge devices faces many challenges: (1) The data obtained by a single device is usually limited. Due to regulatory constraints, user privacy and other issues, devices cannot share raw data, making it difficult to train high-performance machine learning models on a single IoT device. (2) The edge computing environment is usually dynamic and changeable. In actual scenarios, the edge computing environment is constantly changing. When traditional neural networks learn new tasks, they need to update the model parameters in the network, which causes the old knowledge that has been learned to be overwritten by the new knowledge, resulting in catastrophic forgetting problems. Summary of the invention
[0004] The main purpose of this application is to provide an edge federated continuous learning method based on brain-like spiking neural networks, aiming to solve the problem of catastrophic forgetting of old knowledge in existing machine learning methods.
[0005] To achieve the above-mentioned objectives, the present application provides an edge federated continuous learning method based on a brain-like pulse neural network, comprising: a central server sends a global model to be trained to each edge device; each edge device uses a sample set to train the global model to be trained; wherein, when a new task is received, the sample set includes a first sample set and a second sample set, the first sample set includes all samples in the data set corresponding to the new task, and the second sample set is obtained in the following manner: samples of each category in the current sample set are deleted, and a sample selection strategy based on the herd effect is adopted to select samples in the first sample set, and the samples are added to the current sample set to obtain a second sample set; each edge device uploads the parameters of the trained global model to the central server; the central server uses image quality indicators to determine the weight of each edge device participating in aggregation, and adopts a data-driven adaptive weighted aggregation algorithm to integrate the model parameters of each edge device to generate a global model.
[0006] Optionally, samples of each category in the current sample set are deleted, and a sample selection strategy based on the herd effect is used to select samples in the new data set, and the samples are added to the current sample set to obtain an updated sample set, including: deleting samples of each category in the current sample set so that the number of samples of each category in the current sample set reaches a preset number; using the current global model to be trained to extract features of samples of each category in the new data set respectively; determining the average value of the features of each category, and using it as the category center of each category; sorting the samples of each category according to the Euclidean distance between each sample and the category center; selecting the sample with the closest distance from the sorted samples and adding it to the current sample set; combining the added samples, re-determining the average value of the features of each category, and using it as the category center of each category, until the number of samples of each category reaches the preset number, to obtain an updated sample set.
[0007] Optionally, the global model is a spiking neural network.
[0008] Optionally, the spiking neural network employs a stateless Poisson encoder.
[0009] Optionally, the image quality indicator is determined based on image clarity and the total number of pulses.
[0010] Optionally, the calculation formula of the image quality index is:
[0011] in, and is the weight parameter, is a constant, and are the normalized values of clarity and total number of pulses, respectively.
[0012] Optionally, edge devices The calculation formula for the weight of participating in aggregation is:
[0013] in, , Edge devices , The average image quality index, , Edge devices , Edge devices The amount of data.
[0014] Optionally, after generating the global model, the method also includes: determining the accuracy and number of aggregation rounds of the current global model. When it is determined that the accuracy or the number of aggregation rounds does not reach a preset threshold, the central server uses the current global model as the global model to be trained, and the central server re-sends the global model to be trained to each edge device until the accuracy or the number of aggregation rounds reaches the preset threshold, thereby obtaining the global model.
[0015] To achieve the above-mentioned purpose, the present application also provides an edge federated continuous learning device based on a brain-like pulse neural network, characterized in that it includes a central server and multiple edge devices; The central server is used to send the global model to be trained to each edge device and aggregate the model parameters uploaded by the edge devices; The edge device is used to train the global model to be trained using the sample set, and upload the trained model parameters to the central server; Among them, when a new task is received, the sample set includes a first sample set and a second sample set. The first sample set includes all samples in the data set corresponding to the new task. The second sample set is obtained by deleting samples of each category in the current sample set, and using a sample selection strategy based on the herd effect to select samples in the first sample set, and add them to the current sample set to obtain the second sample set.
[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention discloses an edge federation continuous learning method based on a brain-like pulse neural network. The method adopts a sample selection strategy based on the herd effect to select representative old category samples and store them in a sample set, thereby retaining the knowledge of old tasks and alleviating the catastrophic forgetting problem of edge devices. The method adopts a data-driven dynamic weighted aggregation method to integrate model parameters from different devices and realize the generalization of global model performance in various devices. The method introduces the pulse neural network into the edge federation scenario, which can reduce the communication resources and computing resources consumed on the edge devices and improve the accuracy of the edge devices in continuous tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flowchart of an edge federated continuous learning method based on a brain-like spiking neural network is provided for this application; Figure 2 This is a single-layer fully connected spiking neural network structure diagram in an edge federated continuous learning method based on a brain-like spiking neural network for this application; Figure 3 This is a structural diagram of a convolutional spiking neural network in an edge federated continuous learning method based on a brain-like spiking neural network for this application; Figure 4This is a working principle diagram of the LIF neuron model in the edge federated continuous learning method based on brain-like spiking neural network in this application; Figure 5 This is a comparison chart of the accuracy of Example 1 of an edge federated continuous learning method based on a brain-like spiking neural network; Figure 6 This is a comparison chart of the accuracy of Example 2 of an edge federated continuous learning method based on a brain-like spiking neural network; Figure 7 This is a comparison chart of the accuracy of Example 3 of an edge federated continuous learning method based on a brain-like spiking neural network; Figure 8 The framework diagram of an edge federated continuous learning device based on a brain-like spiking neural network is shown in FIG. The realization of the purpose, functional features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] The first embodiment of the present invention provides an edge federated continuous learning method based on a brain-like spiking neural network (SNN-Enhanced Edge-FCL), such as Figure 1 As shown, the specific steps include: Step S1, the server S initializes the global model , the global model is sent to each edge device ; In step S2, the edge device uses the sample set to train the global model. When receiving a new task, the sample set includes a first sample set and a second sample set. The first sample set includes all samples in the data set corresponding to the new task. The second sample set is obtained by deleting samples of each category in the current sample set, and using a sample selection strategy based on the herd effect to select samples in the first sample set, and adding them to the current sample set to obtain the second sample set. The first sample set and the second sample set are used to train the global model together.
[0020] Exemplarily, the sample may be a picture, and the specific steps of obtaining the second sample set are as follows: Step S211, when a new task appears, the edge device Get a new data set, namely the first sample set, whose category data is , , the total number of sample categories indivual; Step S212, determine the capacity of the second sample set M to be , each category of the data set is labeled , determine the amount of data for each category in the second sample set M , , ; Step S213: The current sample set includes categories, delete the number of samples in each category in the current sample set, and keep samples, ( ); Step S214: Use the current global model to extract features from all samples of each category in the first sample set to obtain feature functions ; Step S215: The categories of the first sample set include , calculate the average value of the features of each category in the first sample set in turn, and use it as the category center;
[0021] Step S216, sorting samples of each category in the first sample set according to the Euclidean distance between each sample and the category center; Step S217, add the sample with the closest Euclidean distance to the data set of each category In combination with the sample features of the sample, return to step S215 until the data set of each category The amount of data is ; do:
[0022]
[0023] ← ( ) Step S218, using the data set obtained in step S217 The current sample set obtained in step S213 is updated to obtain a second sample set M; Step S219: Each edge device performs local training using the second sample set M and updates the model parameters Send to server .
[0024]
[0025] In this embodiment, a sample selection strategy based on the herd effect is adopted to select representative old category samples and store them in the sample set, retaining the knowledge of the old tasks and continuing to use them in subsequent tasks. This can optimize the model's memory of old categories while absorbing the knowledge of new categories to achieve effective continuous learning.
[0026] Furthermore, the global model can be a pulse neural network. Introducing the pulse neural network into the edge federation scenario solves the challenge of limited device resources in the edge network environment and provides strong technical support for realizing the intelligence of edge devices. The pulse neural network can include a single-layer fully connected neural network and a convolutional neural network, and trains the single-layer fully connected neural network and the convolutional neural network respectively. Figure 2 As shown in Figure 2, a single-layer fully connected neural network includes a flattening layer, a linear layer, and a spike neuron, such as Figure 3 As shown in the figure, the convolutional neural network includes convolutional layers, batch normalization layers, maximum pooling layers, spike neurons, flattening layers, and linear layers. The training process is as follows: Step S221, a stateless Poisson encoder is used to perform image sparsification, converting the input signal (i.e., image information) into a discrete pulse sequence to simulate the initial response of the biological visual system to the light signal. In this case, "stateless" means that the encoder does not rely on any previous input or state information when generating pulses, and each pulse generation is independent. The conversion formula is:
[0027] For input signal Each element in , the encoder will independently generate a random number uniformly distributed between 0 and 1 For each ,if , then a pulse will be generated at the corresponding output position (output 1); otherwise no pulse will be emitted (output 0).
[0028] Step S222, the linear layer in the single-layer fully connected neural network or the convolutional layer, batch normalization layer, and maximum pooling layer in the convolutional neural network perform preliminary transformation on the discrete pulse sequence to extract effective information; Step S223, the initially transformed pulse sequence is transmitted to the pulse neuron, which simulates the membrane potential change of the neuron by accumulating the input pulse sequence and emitting action potential when the threshold is reached. Figure 4 As shown, represents the position of input pulses transmitted to the dendrites through synapses, and finally processed by the cell body. The processing formula of the cell body is:
[0029]
[0030]
[0031] in, is the time step, is a constant, is the integration time window; and represent membrane potential and output peak, respectively. is the membrane potential, that is Figure 5 The implicit potential of the cell body, and are the resting potential and the reset potential, is the membrane potential threshold, It is The weights of the input synapses, It is the The first input synapse Pulses in The moment when it is excited (i.e. the output peak is 1) within this integration time window.
[0032] The specific process is as follows: (1) When the membrane potential Above threshold When the pulse neuron emits a pulse, the output potential Set to 1, and the membrane potential Return to reset potential When the membrane potential Below threshold When the output potential Keep it at 0; (2) At each time step, the membrane potential The updating process satisfies the above differential equation, and the differential equation is: On the one hand, the membrane potential The value should decrease On the other hand, membrane potential The value should increase by a value that is proportional to the size of the neuron. The weight of each input synapse is , the contribution of this synapse to the rise in membrane potential is , that is, in In a pulse, if The input pulse at the time is in the state of releasing pulses (i.e., state 1), so the calculation is once And accumulate.
[0033] Step S224, generating a pulse output.
[0034] Step S3, each edge device uploads the trained model parameters to the central server; In step S4, the central server determines the image quality index based on the image clarity and the total number of pulses, uses the image quality index to determine the weight of each edge device participating in the aggregation, and uses a data-driven adaptive weighted aggregation algorithm to integrate the model parameters of each edge device to generate a global model.
[0035] Specifically, in step S41, the central server receives the local model of the edge device participating in the federated training in this round ; Step S42: Calculate the weight of each edge device participating in the aggregation :
[0036] in, , Edge devices , The average image quality index, , Edge devices , Edge devices The amount of data, , By analyzing the data quality indicators of each image The data quality index of each picture is obtained by averaging. The calculation formula is,
[0037] in, and is a weight parameter that balances the importance of clarity and total number of pulses. is a small constant to prevent the denominator from being zero. and are the normalized values of image clarity and total number of pulses, respectively. and are the standard deviations of clarity and total number of pulses, respectively;
[0038]
[0039] In the formula, and are the theoretical average values of clarity and total number of pulses, and are the standard deviations of clarity and total number of pulses, respectively.
[0040]
[0041] in, represents the Laplace operator, is the image at position The pixel value of .
[0042] Each pixel is divided into two groups according to its intensity value ( ) The number of pulses emitted ( ) conforms to the Poisson distribution, and its expected value is proportional to the pixel intensity. Define the total number of pulses per image ( )for:
[0043] in , is a proportionality constant that represents the conversion rate from pixel intensity to pulse number.
[0044] Step 43, using the data-driven weighted aggregation method (DDAWA) to perform global aggregation and generate a global model. The aggregation formula is as follows:
[0045] in It is the edge device participating in this aggregation. is the model parameter corresponding to each edge device, It's a different task.
[0046] In this embodiment, a data-driven dynamic weighted aggregation method is used to integrate model parameters from different devices, thereby achieving generalization of global model performance across various devices.
[0047] Step S5, determine the accuracy and number of aggregation rounds of the current global model, and end when it is determined that the accuracy or the number of aggregation rounds reaches the preset threshold; when it is determined that neither the accuracy nor the number of aggregation rounds reaches the preset threshold, the central server uses the current global model as the global model to be trained, and repeats steps S1-S4 until the accuracy or the number of aggregation rounds reaches the preset threshold to obtain the global model.
[0048] Example 1 The method of the present invention was experimentally verified based on the MNIST data set, and the results are as follows.
[0049] like Figure 5As shown, the orange curve depicts the changing trend of the accuracy of traditional federated continuous learning during the continuous edge federated continuous learning process, and the blue curve shows the accuracy change of the SNN-Enhanced Edge-FCL method. In the initial stage, both methods achieved high accuracy on the first task. However, with the increase in the number of tasks, especially after entering the second task, the accuracy of the traditional neural network method showed a gradual downward trend. By the fifth task, the accuracy was significantly reduced to 20%. In contrast, although the accuracy of the SNN-Enhanced Edge-FCL method of the present invention fluctuates during the increase of tasks, after several rounds of global aggregation, its accuracy can quickly recover and stabilize at more than 80%. By the fifth task, the accuracy is maintained at 87%.
[0050] As shown in Table 1, it can be clearly seen that the SNN-Enhanced Edge-FCL method of the present invention has significant advantages over the traditional neural network federated continuous learning method in terms of resource consumption. (1) The model parameters of the pulse neural network only account for 8% of the parameters of the LeNet traditional neural network model, which directly leads to a significant reduction in the communication overhead in the federated learning aggregation process. This significant difference means that in the aggregation process under the federated learning framework, the parameter transmission amount of the SNN model is greatly reduced, which significantly reduces the communication cost. (2) The structural design of the pulse neural network is simple, containing only three layers, and the computational overhead is reduced from millions to tens of thousands, which significantly reduces the computing requirements of edge devices when the model is running. Compared with traditional methods, the SNN-Enhanced Edge-FCL of the present invention not only reduces the amount of data transmitted by the model, but also reduces the computing requirements of running the model on the edge device, thereby maintaining privacy protection while improving the efficiency of continuous learning and the overall performance of the model, providing an economical and efficient solution for federated learning in edge computing environments.
[0051] Table 1 Comparison of resource consumption
[0052] Example 2 This example tests the sample selection strategy based on the herd effect during local training of edge devices. Five edge device clients and one central server complete a total of five tasks, and each task aggregates 20 rounds. Figure 6 As shown in Figure b, the present invention adopts a sample selection strategy based on the herd effect to retain representative old data samples for each historical task. It is found that although the test accuracy drops significantly when initially exposed to a new task, as the global model continues to aggregate on the new task, its test accuracy also continues to increase. After 20 rounds of aggregation on the central server of Task 5, its accuracy can reach 84%. Figure 6 a is a traditional method without adding any strategy. It is found that the first task can achieve a relatively good effect, but with the arrival of the second and third tasks, its test accuracy continues to decline with the aggregation of the current task. In contrast, the strategy adopted by the present invention has a great improvement in alleviating the catastrophic forgetting of old data, and the memory of old tasks is significantly improved.
[0053] Example 3 The central server uses the data-driven weighted aggregation method proposed in this invention to aggregate the local models of each edge device, and the results are as follows: Figure 7 The orange curve in the figure represents the effect of direct aggregation, and the blue curve represents the effect of DDAWA aggregation. It is found that when tested on each task, the accuracy of DDAWA is higher than that of direct aggregation, indicating that DDAWA can retain more meaningful knowledge for models of different edge devices when the model is globally aggregated.
[0054] The second embodiment of the present invention provides an edge federation continuous learning device based on a brain-like pulse neural network, such as Figure 8 As shown, it includes a central server and multiple edge devices; the central server is used to send the global model to be trained to each edge device, and aggregate the model parameters uploaded by the edge devices; the edge devices are used to train the global model to be trained using the sample set, and upload the trained model parameters to the central server; wherein, when a new data set appears, the samples of each category in the current sample set are deleted, and the sample selection strategy based on the herd effect is adopted to select the samples in the new data set, and add them to the current sample set to obtain an updated sample set, and the global model is trained using the updated sample set.
[0055] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An edge federated continuous learning method based on brain-like spiking neural network, characterized in that: include: The central server sends the global model to be trained to each edge device; Each edge device uses the sample set to train the global model to be trained; When a new task is received, the sample set includes a first sample set and a second sample set. The first sample set includes all samples in the data set corresponding to the new task. The second sample set is obtained by deleting samples of each category in the current sample set, and selecting samples in the first sample set using a sample selection strategy based on the herd effect, and adding the samples to the current sample set to obtain the second sample set. Each edge device uploads the parameters of the trained global model to the central server; The central server uses image quality indicators to determine the weight of each edge device participating in aggregation, and adopts a data-driven adaptive weighted aggregation algorithm to integrate the model parameters of each edge device to generate a global model.
2. The edge federated continuous learning method based on brain-like pulse neural network according to claim 1 is characterized in that: The samples of each category in the current sample set are deleted, and the sample selection strategy based on the herd effect is adopted to select the samples in the new data set, and add them to the current sample set to obtain the updated sample set, including: Delete samples of each category in the current sample set so that the number of samples of each category in the current sample set reaches the preset number; Use the global model to be trained to extract features from samples of each category in the new data set; Determine the mean of the features for each class and use it as the class center for each class; Sort the samples of each category according to the Euclidean distance between each sample and the category center; Select the closest sample from the sorted samples and add it to the current sample set; Combined with the added samples, the average value of the features of each category is re-determined and used as the category center of each category until the number of samples in each category reaches the preset number, and the updated sample set is obtained.
3. The edge federated continuous learning method based on brain-like pulse neural network according to claim 1 is characterized in that: The global model is a spiking neural network.
4. The edge federated continuous learning method based on brain-like pulse neural network according to claim 3 is characterized in that: The pulse neural network adopts a stateless Poisson encoder.
5. The edge federated continuous learning method based on brain-like pulse neural network according to claim 3 is characterized in that: The image quality index is determined based on image clarity and the total number of pulses.
6. The edge federated continuous learning method based on brain-like pulse neural network according to claim 1 or 5, characterized in that: The calculation formula of the image quality index is: in, and is the weight parameter, is a constant, and are the normalized values of clarity and total number of pulses, respectively.
7. The edge federated continuous learning method based on brain-like pulse neural network according to claim 1 or 5 is characterized in that: Edge devices The calculation formula for the weight of participating in aggregation is: in, , Edge devices , The average image quality index, , Edge devices , Edge devices The amount of data.
8. The edge federated continuous learning method based on brain-like pulse neural network according to claim 1 is characterized in that: After generating the global model, the method further includes: Determine the accuracy and number of aggregation rounds of the current global model. When it is determined that the accuracy or the number of aggregation rounds does not reach the preset threshold, the central server uses the current global model as the global model to be trained, and the central server re-sends the global model to be trained to each edge device until the accuracy or the number of aggregation rounds reaches the preset threshold to obtain the global model.
9. An edge federated continuous learning device based on brain-like pulse neural network, characterized in that: Includes a central server and multiple edge devices; The central server is used to send the global model to be trained to each edge device and aggregate the model parameters uploaded by the edge device; The edge device is used to train the global model to be trained using the sample set, and upload the trained model parameters to the central server; Among them, when a new task is received, the sample set includes a first sample set and a second sample set. The first sample set includes all samples in the data set corresponding to the new task. The second sample set is obtained by deleting samples of each category in the current sample set, and using a sample selection strategy based on the herd effect to select samples in the first sample set, and add them to the current sample set to obtain the second sample set.
Citation Information
Patent Citations
An active learning and deep learning combined aluminum material surface defect detection method
CN109886925A
Federal continuous learning training method based on memory playback and differential privacy
CN115081532A
Federal learning training method and system based on edge device incremental mode
CN115600694A
Federal continuous learning method and system based on width network architecture
CN117973562A
Federal unsupervised model training and classification method based on prototype consistency and self-marking
CN117975132A