Asynchronous decentralized model training method for edge IoT agent devices

Through the asynchronous decentralized model training method and differential privacy technology, the performance and robustness deficiencies of distributed machine learning based on parameter server architecture are solved, and efficient and secure model training of edge IoT agent devices is achieved, improving It improves training speed and resource utilization while protecting data privacy.

CN114936606BActive Publication Date: 2024-08-23SHANDONG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210651051.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-10
Publication Date
2024-08-23
Estimated Expiration
2042-06-10

AI Technical Summary

Technical Problem

Distributed machine learning based on parameter server architecture has shortcomings in performance and robustness, especially when the parameter server goes down or a communication bottleneck occurs, leading to a waste of training resources and the risk of data privacy leakage.

Method used

Adopting an asynchronous decentralized model training method, each edge IoT agent device independently calculates and adds noise to the model, uses differential privacy technology to protect data privacy, and performs model sharing and aggregation in an asynchronous manner, reducing bandwidth requirements and improving Luxuity. Great sex.

Benefits of technology

It improves the speed and resource utilization of model training, ensures data privacy and security, and enhances the system's robustness and fault resistance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114936606B
    Figure CN114936606B
Patent Text Reader

Abstract

The present invention discloses an asynchronous decentralized model training method suitable for edge IoT proxy devices, including the following steps: each edge IoT proxy device collects data from a user terminal and performs initialization; calculates the loss function value, and then performs back propagation according to the loss function value to obtain the gradient, and then uses the random gradient descent formula to update the model; uses the differential privacy mechanism to protect the data privacy of the updated model; each edge IoT proxy device sends the model to its neighbors, and receives the neighbor model, and updates the local buffer pool when receiving the neighbor model; uses the model in the local buffer pool for aggregation to obtain the next iteration model. The training method disclosed by the present invention reduces the bandwidth demand and improves the robustness of the algorithm through decentralization, accelerates the training and improves the resource utilization rate through asynchronous means; and uses differential privacy technology to protect the privacy of local data, effectively preventing privacy leakage.
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 in particular relates to an asynchronous decentralized model training method suitable for edge IoT agent devices. Background Art

[0002] Distributed machine learning refers to a computing technology that distributes data on different machines for parallel large-scale machine learning training. The parameter server-based architecture is a basic distributed model. Each client performs gradient calculations based on its local data and then sends it to the server. The server aggregates the model and then sends the global model to each client for the next round of gradient calculations. This architecture breaks through the bottleneck of single-machine training and can handle larger-scale data, but has low robustness. First, this architecture is limited by the bandwidth and performance of the parameter server. When the parameter server goes down or is damaged, the entire training process will terminate until the server works normally. Second, each client needs to wait for other clients to complete training and send the model to the parameter server before entering the next round of training. Therefore, the performance of the parameter server-based architecture is limited by the worst performance of the client, which will cause a waste of training resources.

[0003] Decentralized machine learning can effectively solve the above problems. Under the decentralized architecture, all clients form a peer-to-peer network, and each client has its own data and model. In each round of training, each client uses its own data to calculate the gradient, and then shares the model with the connected neighbor clients and calculates a local average model. Each client only needs to communicate with the connected neighbor clients and update its own model. The downtime or error of any client will only affect the training of some machines. Therefore, decentralized machine learning has higher robustness to problems such as communication bottlenecks and edge device failures.

[0004] The architecture of decentralized machine learning is highly coupled with edge computing and can be applied to many areas of edge computing. For example, in the field of smart grids, intelligent prediction of power loads requires the use of electricity from multiple locations. The power consumption data of each area is uploaded to the local edge device for cooperative training to obtain a global prediction model. Another example is that in the intelligent inspection system, a machine learning model is needed to determine whether the circuit or equipment being inspected is faulty. However, the fault information in different scenarios is different, and the data will come from a large number of inspection devices in different regions. Therefore, inspection robots can be used to collect data, and then uploaded to the local edge device to collaboratively train a global model that can cover various fault information. Edge computing essentially provides decentralized services, and decentralized cooperative training has unprecedented advantages in the field of edge computing.

[0005] Although the decentralized cooperative training algorithm has many advantages over the parameter server architecture algorithm, it still has certain disadvantages. As mentioned above, in each round of training, each client needs to communicate with its neighbor's client and share model data. Therefore, any client needs to synchronously wait for all its neighbor nodes to complete training and successfully receive the model before proceeding to the next round of training, which will cause a waste of resources to a certain extent. In addition, data privacy during the communication process also needs to be further guaranteed. Summary of the invention

[0006] To solve the above technical problems, the present invention provides an asynchronous decentralized model training method suitable for edge IoT agent devices, which reduces bandwidth requirements and improves the robustness of the algorithm through decentralization, accelerates training and improves resource utilization in an asynchronous manner, and simultaneously utilizes differential privacy technology to achieve protection of local data privacy.

[0007] To achieve the above object, the technical solution of the present invention is as follows:

[0008] An asynchronous decentralized model training method suitable for an edge IoT agent device comprises the following steps:

[0009] (1) Initialization phase: Each edge IoT agent collects data from the user terminal, preprocesses the data to obtain a sample data set, and initializes the local model and local buffer pool;

[0010] (2) Model update phase: Each edge IoT agent calculates the loss function value of the sample data set, and then back-propagates the loss function value to obtain the gradient; then the stochastic gradient descent formula is used to update the model;

[0011] (3) Privacy protection stage: Each edge IoT agent device uses the differential privacy mechanism to introduce a certain amount of noise into the updated model to protect data privacy, thus obtaining a noisy model.

[0012] (4) Model sharing stage: Each edge IoT proxy device sends the noise-processed model to its neighboring edge IoT proxy devices, and receives models from its neighboring edge IoT proxy devices, and updates the local buffer pool when receiving the neighboring model;

[0013] (5) Model aggregation phase: Each edge IoT agent device aggregates the model in the local buffer pool to obtain the next iteration model and returns to step (2) until the maximum number of iterations is met and the model is output.

[0014] In the above scheme, the parameters initialized in step (1) include: the total number of iterations K, the learning rate γ, the weight matrix W, the variance σ of the noise, the number n of edge IoT proxy devices, the initialization model of edge IoT proxy device i and initialize local buffer pool variables Sample Dataset D i , and the loss function, the loss function adopts the cross entropy loss function F(·).

[0015] In the above scheme, step (2) is specifically as follows:

[0016] (2.1) In the kth iteration, edge IoT agent device i takes its sample data set D i Randomly sample a data sample and stored in memory, represents the sample characteristics, represents the sample label, where d is the dimension of the sample feature, R d represents the d-dimensional real number space;

[0017] (2.2) The edge IoT agent device i uses the AI ​​module to train the local model, and the samples obtained are Sample features in Input to the model of round k The predicted value y is obtained pred ;

[0018] (2.3) Label the samples and the predicted value y pred Input into the cross entropy loss function, that is, the loss function value is obtained according to the following formula:

[0019]

[0020] (2.4) The loss function is obtained by back propagation derivation About the Model Gradient Then use the stochastic gradient descent formula to update the parameters and get the updated model

[0021]

[0022] Among them, γ is the learning rate.

[0023] In the above scheme, step (3) is specifically as follows:

[0024] (3.1) According to the initialized noise variance σ, a d-dimensional vector is sampled from a Gaussian distribution with a d-dimensional variance σ to obtain a noise vector

[0025] (3.2) The sampled noise vector Added to the updated model In the above example, we get the model with noise processing

[0026]

[0027] In the above scheme, step (4) is specifically as follows:

[0028] (4.1) The edge IoT agent device i uses the upstream communication interface and network protocol to process its own noise processing model Send to neighbor edge IoT agent device j;

[0029] (4.2) The model of edge IoT proxy device i using the uplink communication interface and network protocol to receive the noise processing from the neighboring edge IoT proxy device j And the model Save to its own buffer pool, then the updated buffer pool variable

[0030] In the above scheme, step (5) is specifically as follows:

[0031] The initialized weight matrix W is used to aggregate the model data in the buffer pool, that is, the model aggregation is performed on the edge IoT agent device i to obtain the next round of model data:

[0032]

[0033] Among them, W ij Represents the element in the i-th row and j-th column, which represents the model of edge IoT agent device i receiving edge IoT agent device j The weight given when .

[0034] Through the above technical solution, the asynchronous decentralized model training method applicable to the edge IoT agent device provided by the present invention has the following beneficial effects:

[0035] (1) Each edge IoT proxy device of the present invention initializes a buffer pool to receive model data from neighboring edge IoT proxy devices, updates the variables in the buffer pool when successfully receiving data from the neighbor, and finally uses the variables in the buffer pool to aggregate the model; in an asynchronous manner, any edge IoT proxy device can directly use the model data in the buffer pool for aggregation, without waiting for other edge IoT proxy devices to complete training. This will greatly improve the speed of model training and solve the problem of resource waste caused by differences between different devices.

[0036] (2) The present invention introduces a differential privacy mechanism to perform noise processing on the information transmitted in different edge IoT proxy devices, thereby ensuring the privacy security of the data of each edge IoT proxy device. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0038] Figure 1 This is a schematic diagram of the decentralized machine learning architecture disclosed in the present invention;

[0039] Figure 2 This is a functional architecture diagram of the edge IoT proxy device disclosed in the present invention;

[0040] Figure 3 This is a flow chart of an asynchronous decentralized model training method suitable for an edge IoT agent device disclosed in the present invention. DETAILED DESCRIPTION

[0041] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0042] The present invention provides an asynchronous decentralized model training method suitable for edge IoT agent devices, and a decentralized machine learning architecture such as Figure 1 As shown in the figure: the user terminal in each area uploads the data to the local edge IoT proxy device, which processes the data to obtain a data set in a unified format. After that, each edge IoT proxy device performs machine learning model training and shares its trained model with other connected edge IoT proxy devices in each iteration. Finally, each edge IoT proxy device aggregates all collected models for the next iteration.

[0043] like Figure 2 As shown, the edge IoT proxy device is a computing terminal that completes cooperative training. The functional architecture of the edge IoT proxy device used in the embodiment of the present invention mainly includes the following parts:

[0044] (1) Data acquisition module

[0045] Provides a variety of wired and wireless interfaces, compatible with LAN, USB, RS485 / 232 and other wired communication protocols and RFID, Bluetooth, ZigBee, LoRa, NB-IoT and other wireless communication protocols. Different wired communication and short-range wireless communication technologies are used for different collection terminals to connect their data to the edge IoT agent device nearby to achieve unified data collection. For wireless data collection scenarios, wireless communication protocol spectrum isolation technology is used to avoid interference between different protocols and ensure the accuracy and real-time performance of data collection. The northbound open interface supports MQTT, HTTP, COAP, XMPP, TCP / UDP and other interface protocols to achieve unified data interaction with the platform-level IoT platform, cloud platform, and full-service data center.

[0046] (2) Edge computing module

[0047] The edge IoT proxy device provides lightweight data caching capabilities, converts the format of collected data according to a unified business data model, and uses artificial intelligence technology to perform business-level analysis on the data. The device provides microservice capabilities and can quickly deploy customized applications to meet personalized needs in different business scenarios. The calculation results can be directly returned to the terminal and the user to achieve rapid response to business requests.

[0048] (3) AI Functional Module

[0049] The edge IoT proxy device hardware uses a proprietary AI acceleration chip and deploys a general AI SDK, supports mainstream deep learning reasoning frameworks, and provides reasoning computing acceleration capabilities for edge services. Especially for video surveillance services and high-bandwidth, low-latency business scenarios, the local video codec hardware capabilities and AI computing acceleration capabilities can effectively alleviate the CPU computing load and meet the needs of related businesses.

[0050] (4) Security control module

[0051] In terms of data security, the edge IoT proxy device provides a zero-trust security access authentication mechanism. By comprehensively analyzing fingerprint information such as device IP address, MAC address, communication protocol, digital certificate, etc., it performs multi-condition identity authentication on the access terminal to prevent device impersonation and ensure the identity of the access device is credible and safe and reliable. In terms of transmission security, the edge IoT proxy device establishes a virtual secure private network based on encrypted tunnels and SD-WAN technology, thereby establishing a private secure isolation network on an insecure wide area network. At the same time, different secure private networks can be established for different businesses to achieve business isolation. In terms of device security, it supports unified maintenance and management of the device itself and the access terminal, including login management, permission management, task management, data management, status monitoring, abnormal alarms, etc. At the same time, it can realize periodic vulnerability scanning and automatic firmware upgrades for the device itself.

[0052] It should be noted that any existing edge IoT proxy device can complete the model training method of the present invention and is not limited to the above-mentioned edge IoT proxy device.

[0053] The present invention discloses an asynchronous decentralized model training method suitable for edge IoT proxy devices. The method trains the model in an asynchronous manner. At the beginning of each iteration, no node needs to be synchronized with other nodes. When there are some heterogeneous nodes whose training speed is much slower than other nodes, this will greatly improve the training speed. Secondly, the method adds a certain amount of noise to the local model before sharing the model to protect data privacy.

[0054] like Figure 3 As shown, the specific steps include:

[0055] (1) Initialization phase: Each edge IoT agent device collects data from the user terminal, preprocesses the data to obtain a sample data set, and initializes the local model and local buffer pool.

[0056] The details are as follows:

[0057] (1.1) Initialize the total number of iterations K. K is usually found to a suitable value through multiple trainings.

[0058] (1.2) Initialize the learning rate γ, which controls the convergence effect. Usually, a suitable value is found through multiple trainings. A larger learning rate will converge faster in the early stage, but it will easily oscillate near the optimal solution and the convergence effect will be poor. A smaller learning rate will lead to a slower convergence speed and a longer training time.

[0059] (1.3) The variable n represents the number of edge IoT proxy devices, and the n edge IoT proxy devices are numbered [1, 2, ..., n]. For each edge IoT proxy device i, the model is initialized. and buffer pool variables These values ​​can be set to 0.

[0060] (1.4) Initialize the local dataset D i , for each edge IoT agent device and loss function F(·), the data set is usually processed data containing features and labels, and the loss function can use the cross entropy loss function.

[0061] (1.5) Initialize the adjoint matrix W with double random properties. Each edge IoT agent device will use the value of the adjoint matrix to perform model aggregation. ij represents the element in the i-th row and j-th column, which represents the weight given when the edge IoT agent device i receives the model of the edge IoT agent device j.

[0062] (1.6) The variance σ of the initialization noise. The larger the variance, the more noise is added and the higher the privacy protection level is. However, the larger the variance, the more the noisy data will deviate from the original data, and the convergence speed may be reduced.

[0063] (2) Model update phase: Each edge IoT agent uses its AI function module to calculate the loss function value of the sample data set, and then backpropagates the loss function value to obtain the gradient; then the stochastic gradient descent formula is used to update the model.

[0064] The details are as follows:

[0065] (2.1) In the kth iteration, edge IoT agent device i takes its sample data set D i Randomly sample a data sample and stored in memory, represents the sample characteristics, represents the sample label, where d is the dimension of the sample feature, R d represents the d-dimensional real number space;

[0066] (2.2) The edge IoT agent device i uses the AI ​​module to train the local model, and the samples obtained are Sample features in Input to the model of round k The predicted value y is obtained pred ;

[0067] (2.3) Label the samples and the predicted value y pred Input into the cross entropy loss function, that is, the loss function value is obtained according to the following formula:

[0068]

[0069] (2.4) The loss function is obtained by back propagation derivation About the Model Gradient Then use the stochastic gradient descent formula to update the parameters and get the updated model

[0070]

[0071] Among them, γ is the learning rate.

[0072] (3) Privacy protection stage: Each edge IoT agent device uses the differential privacy mechanism to introduce a certain amount of noise into the updated model to protect data privacy, thus obtaining a noisy model.

[0073] The details are as follows:

[0074] (3.1) According to the initialized noise variance σ, a d-dimensional vector is sampled from a Gaussian distribution with a d-dimensional variance σ to obtain a noise vector

[0075] (3.2) The sampled noise vector Added to the updated model In the above example, we get the model with noise processing

[0076]

[0077] (4) Model sharing stage: Each edge IoT agent sends the noise-processed model to its neighboring edge IoT agent and receives the model from its neighboring edge IoT agent, and updates the local buffer pool when receiving the neighboring model.

[0078] The details are as follows:

[0079] (4.1) The edge IoT agent device i uses the upstream communication interface and network protocol to process its own noise processing model Send to neighbor edge IoT agent device j;

[0080] (4.2) The model of edge IoT proxy device i using the uplink communication interface and network protocol to receive the noise processing from the neighboring edge IoT proxy device j And the model Save to its own buffer pool, then the updated buffer pool variable

[0081] (5) Model aggregation phase: Each edge IoT agent device aggregates the model in the local buffer pool to obtain the next iteration model and returns to step (2) until the maximum number of iterations is met and the model is output.

[0082] The details are as follows:

[0083] The initialized weight matrix W is used to aggregate the model data in the buffer pool, that is, the model aggregation is performed on the edge IoT agent device i to obtain the next round of model data:

[0084]

[0085] Among them, W ij Represents the element in the i-th row and j-th column, which represents the model of edge IoT agent device i receiving edge IoT agent device j In order to ensure convergence, W needs to ensure the double randomness, that is, the sum of any row and column elements is 1. If i and j are not neighbors, there must be W ij =W ji =0.

[0086] The present invention also discloses an asynchronous decentralized power equipment fault identification method applicable to an edge IoT agent device, comprising the following steps:

[0087] 1. Data Collection Phase

[0088] 1. Determine the type of equipment and fault type that needs to be detected, which depends on the actual scenario requirements.

[0089] 2. Collect data based on the determined equipment and deploy the inspection robot to the area that needs to be inspected. Since most scenes need to be covered, data needs to be collected for the same power equipment at different times and in different weather conditions, including both pictures containing fault information and normal pictures.

[0090] 3. Obtain some data from the Internet. This step is a supplement to the data acquisition in the previous step. The fault detection model trained with more data sets has higher robustness.

[0091] 4. Crop all data images into a unified format and give the images a unified name.

[0092] 2. Data processing stage:

[0093] 1. First, determine the fault type, that is, the number of sample labels and specific sample labels. For example, set no equipment fault to label 0, transformer fault to label 1, line fault to label 2, and so on. This step depends on the actual scenario requirements.

[0094] 2. Label the collected images. This process can be completed using labeling tools such as labelme or labelimg. Specifically, use the above-mentioned labeling tools to mark the devices to be detected in the images and generate VOC dataset format or coco dataset format.

[0095] 3. Divide the equipment failure data set into training set, validation set and test set.

[0096] 3. Model training stage:

[0097] After collecting enough data, the data is uploaded to the local edge IoT agent. The fault detection model in the edge IoT agent is Figure 3 The process shown in the figure is used for training to obtain the fault detection model after output. For target detection, the Fast-RCNN model or Yolo model is usually used.

[0098] 4. Model deployment phase:

[0099] Deploy the environment required for model operation on the inspection robot that needs to be deployed, such as the required Python environment, detection system, early warning system, etc. Then deploy the final output fault detection model to each inspection robot through docker or http service.

[0100] 5. Fault detection stage:

[0101] The intelligent inspection robot collects data from power equipment and uses the fault detection model to perform fault detection on the collected image data.

[0102] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An asynchronous decentralized model training method suitable for edge IoT agent devices, characterized in that: The following steps are involved: (1) Initialization phase: Each edge IoT agent collects data from the user terminal, preprocesses the data to obtain a sample data set, and initializes the local model and local buffer pool; (2) Model update phase: Each edge IoT agent device calculates the loss function value of the sample data set, and then performs backpropagation based on the loss function value to obtain the gradient; Then use the stochastic gradient descent formula to update the model; (3) Privacy protection stage: Each edge IoT agent device uses the differential privacy mechanism to introduce a certain amount of noise into the updated model to protect data privacy, thus obtaining a noisy model. (4) Model sharing stage: Each edge IoT proxy device sends the noise-processed model to its neighboring edge IoT proxy devices, and receives models from its neighboring edge IoT proxy devices, and updates the local buffer pool when receiving the neighboring model; (5) Model aggregation phase: Each edge IoT agent device aggregates the model in the local buffer pool to obtain the next iteration model and returns to step (2) until the maximum number of iterations is met and the model is output.

2. The asynchronous decentralized model training method for edge IoT agent device according to claim 1, characterized in that: The parameters initialized in step (1) include: the total number of iterations K, the learning rate γ, the weight matrix W, the variance σ of the noise, the number n of edge IoT proxy devices, the initialization model of edge IoT proxy device i and initialize local buffer pool variables Sample Dataset D i , and the loss function, the loss function adopts the cross entropy loss function F(·).

3. The asynchronous decentralized model training method for edge IoT agent device according to claim 1, characterized in that: Step (2) is as follows: (2.1) In the kth iteration, edge IoT agent device i takes its sample data set D i Randomly sample a data sample and stored in memory, represents the sample characteristics, represents the sample label, where d is the dimension of the sample feature, R d represents the d-dimensional real number space; (2.2) The edge IoT agent device i uses the AI ​​module to train the local model, and the samples obtained are Sample features in Input to the model of round k In the above example, we get the predicted value y pred ; (2.3) Label the samples and the predicted value y pred Input into the cross entropy loss function, that is, the loss function value is obtained according to the following formula: (2.4) The loss function is obtained by back propagation derivation About the Model Gradient Then use the stochastic gradient descent formula to update the parameters and get the updated model Among them, γ is the learning rate.

4. The asynchronous decentralized model training method for edge IoT agent device according to claim 1, characterized in that: Step (3) is as follows: (3.1) According to the initialized noise variance σ, a d-dimensional vector is sampled from a Gaussian distribution with a d-dimensional variance σ to obtain a noise vector (3.2) The sampled noise vector Added to the updated model In the above example, we get the model with noise processing 5. The asynchronous decentralized model training method for edge IoT agent device according to claim 1, characterized in that: Step (4) is as follows: (4.1) The edge IoT agent device i uses the upstream communication interface and network protocol to process its own noise processing model Send to neighbor edge IoT agent device j; (4.2) The model of edge IoT proxy device i using the uplink communication interface and network protocol to receive the noise processing from the neighboring edge IoT proxy device j And the model Save to its own buffer pool, then the updated buffer pool variable 6. The asynchronous decentralized model training method for edge IoT agent device according to claim 1, characterized in that: Step (5) is as follows: The initialized weight matrix W is used to aggregate the model data in the buffer pool, that is, the model aggregation is performed on the edge IoT agent device i to obtain the next round of model data: Among them, W ij The element in the i-th row and j-th column represents the model of edge IoT proxy device i receiving edge IoT proxy device j. The weight given when .