Privacy protection domain adaptation method under end-cloud collaborative learning framework
By adopting technologies such as domain adaptation mechanism, model quantization and sparse coding, self-attention mechanism, adversarial loss function and differential privacy protection in device-cloud collaborative learning, the problems of non-independent and identically distributed data processing, privacy protection and low communication efficiency are solved. , improves model generalization ability and learning efficiency, and ensures data security.
Patent Information
- Application Number
- CN202410892522.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-07-04
AI Technical Summary
Existing device-cloud collaborative learning technology has insufficient model generalization capabilities when processing non-independent and identically distributed data, insufficient data privacy protection, low communication efficiency, and uneven model performance, and cannot fully adapt to the data characteristics and importance of different end devices. .
Use domain adaptation mechanism to dynamically adjust model parameters, combine model quantization and sparse coding technology to reduce communication overhead, introduce self-attention mechanism and adversarial loss function to enhance model generalization ability, use differential privacy protection mechanism and iterative sub-sampling and heavy-weighting strategies to optimize the model performance.
It significantly improves the generalization ability and learning efficiency of the model, reduces communication costs, and ensures the security of data privacy. It is suitable for application scenarios that require end-cloud collaborative processing, privacy protection, and high communication efficiency.
Smart Images

Figure CN118779913A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of end-cloud collaborative learning, and in particular to a privacy protection domain adaptation method under an end-cloud collaborative learning framework. Background Art
[0002] With the rapid development of smart devices and cloud computing technology, end-cloud collaborative learning has become an effective way to solve large-scale data processing problems. In the end-cloud collaborative learning framework, the end device is responsible for data collection and preliminary processing, and then uploads the information to the cloud for in-depth model training and optimization. This architecture aims to combine the distributed computing capabilities of the end device with the powerful computing resources of the cloud to achieve efficient execution of machine learning tasks. However, existing end-cloud collaborative learning technology solutions have several problems to be solved in practical applications, especially in processing non-independent and identically distributed (non-iid) data, protecting data privacy, and improving communication efficiency.
[0003] First, most end-cloud collaborative learning solutions assume that the data of the end device and the cloud data center are independent and identically distributed. However, in actual scenarios, due to the differences in the geographical location and operating environment of the end devices, the data collected by them are mostly non-independent and identically distributed. This inconsistency in data distribution limits the generalization performance of the cloud model, because the model may be difficult to adapt to the specific data characteristics of all end devices. Secondly, the data generated by the end device may contain sensitive information, such as personal health data or location information. Existing technical solutions have obvious shortcomings in data privacy protection, and they may inadvertently leak users' private data during model training and updating. In addition, directly uploading raw data or model updates to the cloud may also increase the risk of data leakage. Furthermore, the communication overhead in end-cloud collaborative learning is also an issue that cannot be ignored. With the increase in the number of end devices and the expansion of the scale of model parameters, each model update requires a large amount of data transmission, which not only increases the network burden, but also may cause data transmission delays, thereby affecting learning efficiency. Finally, previous solutions often use simple averaging or weighting strategies when updating and aggregating models, and fail to fully consider the uniqueness and importance of data from different end devices. This simple aggregation strategy may lead to uneven model performance, especially when facing multiple clients with different data distribution and quality.
[0004] In summary, the existing technologies face the following major challenges and defects in the end-cloud collaborative learning framework: 1) Insufficient processing of non-independent and identically distributed data: It fails to fully adapt to the differences in data distribution on the end devices, resulting in limited model generalization ability; 2) Insufficient data privacy protection: User privacy may be leaked during model training and updating, and there is a lack of effective privacy protection mechanism; 3) Inefficient communication: There is high communication overhead during model parameter update and transmission, especially when the end device resources are limited; 4) Unbalanced model performance: The aggregation strategy fails to fully consider the diversity and differences of client data, affecting the performance of the final model. Summary of the invention
[0005] In order to solve the above technical problems, the present invention proposes a privacy protection domain adaptation method under the end-cloud collaborative learning framework. In the method, the domain adaptation mechanism can dynamically adjust the model parameters according to the data distribution of the end device, and improve the adaptability of the model to different data distributions; the communication compression strategy reduces the transmission volume of the model update through model quantization and sparse coding technology, and improves the communication efficiency; the enhanced Transformer model update framework uses the self-attention mechanism to capture the long-distance dependencies in the data, and enhances the generalization ability of the model through adversarial loss functions and pre-training fine-tuning strategies; the differential privacy protection mechanism introduces a random response mechanism in the local model training process to protect personal data from being leaked; the iterative subsampling and reweighting strategy optimizes the performance of the model on the target task through subsampling and weight adjustment, while reducing the number of samples and improving the generalization ability of the model. The present invention not only improves the generalization ability and learning efficiency of the model, but also reduces the communication cost in the model update process, and ensures the security of the end device data privacy. It is suitable for application scenarios that require end-cloud collaborative processing, privacy protection and high communication efficiency, such as intelligent health monitoring, intelligent security monitoring and other intelligent system application scenarios.
[0006] In order to achieve the above object, the technical solution of the present invention is as follows:
[0007] A privacy protection domain adaptation method under a terminal-cloud collaborative learning framework includes a terminal device and a cloud server, and includes the following steps:
[0008] The terminal device collects training data and performs preprocessing to obtain a training data set;
[0009] The end device uses the domain adaptation mechanism to extract feature data from the training dataset and dynamically adjust the model parameters;
[0010] The terminal device transmits the feature data to the cloud server, and the cloud server performs model training and updating under the enhanced Transformer model update framework to obtain a trained cloud model; during the training process, the cloud server uses a communication compression strategy to optimize model parameter transmission and applies a differential privacy protection mechanism to protect patient privacy;
[0011] The cloud server optimizes the trained cloud model through iterative subsampling and reweighting strategies, and sends the optimized model to the end device as the final model;
[0012] The end device collects the data to be tested and inputs it into the final model to obtain the test results.
[0013] Preferably, the preprocessing includes filtering, denoising and normalization.
[0014] Preferably, the terminal device uses a domain adaptation mechanism to extract feature data from a training data set and dynamically adjust model parameters, including the following steps:
[0015] The adapter consists of L fully connected layers, each with N l neurons, where l = 1, 2, ..., L, each layer contains the ReLU activation function ReLU (x) = max (0, x), which can perform nonlinear transformation on features. Let the feature vector of the input data be x, and the output of the domain adapter be z, then the forward propagation of the adapter can be expressed as:
[0016] z=f adapter (x;θ adapter )=W L ReLU(W L-1 …ReLU(W1x+b1)…+b L-1 )+b L (2)
[0017] Among them, f adapter is a function of the adapter, W l and b l are the weight matrix and bias vector of the lth layer, θ adapter ={W1,b1,…,W L ,b L} is the adapter parameter;
[0018] Domain Adaptation Loss for Adapters as follows:
[0019]
[0020] Among them, domain adaptation loss is the maximum mean difference MMD or KL divergence. When the maximum mean difference MMD is used, z S and zT They are the outputs of the source domain and target domain data after passing through the adapter;
[0021] Let θ t is the model parameter at the current moment, is the gradient of the current loss function with respect to the model parameters, v t is the momentum term at the current moment, μ is the momentum parameter, then the momentum update rule can be expressed as:
[0022]
[0023] Where η is the learning rate; the model parameters are updated according to the momentum term v t+1 To update:
[0024] θ t+1 =θ t -v t+1 (5)
[0025] Momentum term v t It is usually initialized to the zero vector, that is, v0=0.
[0026] Preferably, the cloud server performs model training and updating under the enhanced Transformer model updating framework, including the following steps:
[0027] Build a pre-trained model Transformer based on multi-head attention as a starting point;
[0028] Input feature data into the pre-trained model for training, and further fine-tune the strategy to adapt to the target task and dataset to obtain the trained cloud model:
[0029] Introducing the adversarial loss function, the total loss function of the cloud model is Including anti-loss Domain Adaptation Loss And the target task loss of the model
[0030]
[0031] Among them, λ1 and λ2 are used to balance the weights of the two losses. is a task-specific loss function, where M is the total number of categories and y c is a vector whose cth element indicates whether the true label is category c, p c is the probability that the model predicts that the sample belongs to category c.
[0032] Preferably, during the training process, the cloud server uses a communication compression strategy to optimize the transmission of model parameters, including the following steps:
[0033] Perform model quantization to convert floating-point parameters into low-precision representations. Let the original model parameters be W and the quantized parameters be W'. The quantization process can be expressed as:
[0034] , round(·) is rounded to the nearest integer;
[0035] Sparse coding technology is used to reduce the amount of data that needs to be transmitted by activating only the important parts of the model update. Let the update vector be dW and the sparsely coded vector be dW'. The sparse coding process can be expressed as:
[0036] dW'=sparse(dW,τ) (14)
[0037] where τ is the threshold used to determine which parameters are important, and sparse(·,·) is the sparse coding operation;
[0038] Combining model quantization and sparse coding technology to reduce the communication overhead of model update, the combined communication volume C CommCost It can be expressed as:
[0039] C CommCost =size(W')+size(dW') (15)
[0040] The size(·,·) function represents the byte size of the parameter after quantization or sparse coding.
[0041] Preferably, the following steps are also included: let T be the transmission period, and perform the model update after periodic transmission quantization and sparse coding according to the preset transmission period. The transmission strategy can be expressed as:
[0042]
[0043] Among them, W t is the model parameter at time step t, dW' i is the model update after encoding at time step i.
[0044] Preferably, during the training process, the cloud server applies a differential privacy protection mechanism to protect patient privacy, including the following steps:
[0045] A random response mechanism is introduced in model training. Let b be a binary random variable. When its value is 1, it indicates a true response, and when its value is 0, it indicates a false response. The random response r can be expressed as:
[0046] r=b+∈ r (17)
[0047] Among them, ∈ r is from Random noise drawn from the distribution;
[0048] The amount of information of the quantized parameters is constrained by differential privacy. For each parameter θ j , calculate its Fisher information F(θ j ), and then dynamically adjust the noise σ according to the size of the Fisher information j :
[0049]
[0050] Among them, C g is a constant determined by the global differential privacy budget ∈ and the security margin δ.
[0051] Preferably, the cloud server optimizes the trained cloud model through iterative subsampling and reweighting strategy, including the following steps:
[0052] By iteratively subsampling from the training dataset and adjusting the sample weights according to the performance of the model on the target distribution, the weight adjustment formula is as follows:
[0053]
[0054] Among them, W i,t is the weight of the i-th sample in the t-th iteration, is the model h on sample x i The loss on is the factor by which the learning rate η is scaled by the number of samples n.
[0055] Based on the above technical solution, the beneficial effects of the present invention are:
[0056] 1) Enhanced model generalization performance: The present invention effectively handles the non-independent and identically distributed problem of terminal device data through the domain adaptation mechanism, so that the model can adapt to the characteristics of different data distributions, thereby significantly improving the generalization ability of the model on diversified data sets. On the MNIST-C data, compared with the existing method DAN, the method of the present invention improves AP by about 3%, significantly enhancing the generalization ability of the model on unknown target domains.
[0057] 2) Reduce communication costs: The present invention adopts a communication compression strategy, combined with model quantization and sparse coding technology, which significantly reduces the amount of data transmission during the model update process. Compared with the existing methods based on dynamic networks, the communication cost is reduced by more than 10%;
[0058] 3) Strengthening data privacy protection: The differential privacy protection mechanism of the present invention fuzzifies personal data through a random response mechanism, effectively protecting the privacy of terminal device data while maintaining the predictive ability of the model;
[0059] 4) Improve model update efficiency: The present invention uses iterative subsampling and reweighting strategies to optimize the performance of the model on the target task, reduce the number of samples, speed up the convergence of the model, and improve the efficiency of model update;
[0060] 5) Highly adaptable end-cloud collaboration: The method of the present invention does not rely on specific data distribution and can adapt to a variety of different end device data characteristics, thus enhancing the adaptability and flexibility of end-cloud collaborative learning;
[0061] 6) Reduce computing resource consumption: Through the use of model quantization and sparse coding, the present invention reduces the computing burden of terminal devices during the model update process, allowing resource-constrained devices to participate in end-cloud collaborative learning, thereby expanding the scope of application;
[0062] 7) Enhance system robustness: The present invention enhances the robustness of the model to small perturbations of the input data by introducing an adversarial loss function, so that the model can maintain stable performance in the face of data noise and outliers. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 The figure is a flowchart of a privacy protection domain adaptation method under a terminal-cloud collaborative learning framework in an embodiment. DETAILED DESCRIPTION
[0064] 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.
[0065] like Figure 1 As shown, this embodiment provides a privacy protection domain adaptation method under a terminal-cloud collaborative learning framework, including a terminal device and a cloud server, and the implementation steps are as follows:
[0066] Step 1: The terminal device collects training data and preprocesses it to obtain a training data set.
[0067] In this embodiment, it is applied to the intelligent health monitoring system for real-time monitoring and analysis of the patient's health status. The terminal device collects the patient's physiological data, such as heart rate, blood pressure and body temperature, through sensors. However, it is not limited to this, and can also be used in the fields of autonomous driving, intelligent manufacturing, smart security, etc. It can also be widely used in application scenarios such as medical image analysis that require data privacy protection. The training data is collected according to the specific application field and scenario.
[0068] The collected data is preprocessed, including but not limited to filtering, denoising and normalization.
[0069] In step 2, the end device uses the domain adaptation mechanism to extract feature data from the training dataset and dynamically adjust the model parameters.
[0070] In this embodiment, a domain adaptation mechanism is used to dynamically adjust model parameters according to the distribution characteristics of the data by introducing a learnable domain adapter. This mechanism allows the model to maintain excellent performance on data from different institutions while capturing and utilizing institution-specific features, thereby enhancing the generalization ability of the model.
[0071] Specifically, the design of the domain adapter is based on a neural network architecture, which aims to capture and adapt to the characteristics of different data distributions. The adapter consists of a series of fully connected layers, each of which contains an activation function that can perform nonlinear transformations on the features. Let the feature vector of the input data be x, and the output of the domain adapter be z, then the forward propagation of the adapter can be expressed as:
[0072] z=f adapter (x;θ adapter ) (1)
[0073] Among them, f adapter is a function of the adapter, θ adapter is the parameter of the adapter. The adapter consists of L fully connected layers, each with N l neurons, where l = 1, 2, ..., L. Each layer contains the ReLU activation function ReLU(x) = max(0, x), which can perform nonlinear transformations on features. Let the feature vector of the input data be x, and the output of the domain adapter be z, then the forward propagation of the adapter can be further expressed as:
[0074] z=f adapter (x;θ adapter )=W L ReLU(W L-1 …ReLU(W1x+b1)…+b L-1 )+b L (2)
[0075] Among them, W l and b l are the weight matrix and bias vector of the lth layer, θ adapter ={W1,b1,…,W L ,b L} are the parameters of the adapter.
[0076] In order to train the domain adapter, a loss function is defined that measures the performance difference of the model on different data distributions. The loss function can be the maximum mean difference (MMD) or the Kullback-Leibler (KL) divergence. Taking MMD as an example, the loss function can be expressed as:
[0077]
[0078] Among them, z Sand z T They are the outputs of the source domain and target domain data after passing through the adapter. MMD is a kernel method that measures the similarity of two probability distributions.
[0079] Momentum Update Algorithm: The implementation of the domain adaptation module involves an end-to-end training process, which includes the update of the domain adapter parameters and the update of the model main body parameters. In order to improve the efficiency and quality of model training, the momentum update algorithm is used to update the parameters of the model when it is trained alone. The momentum update algorithm introduces a momentum term by calculating the exponentially weighted average of the gradient, which helps the model move more smoothly in the parameter space. Let θ t is the model parameter at the current moment, is the gradient of the current loss function with respect to the model parameters, v t is the momentum term at the current moment, μ is the momentum parameter, then the momentum update rule can be expressed as:
[0080]
[0081] Where η is the learning rate; the model parameters are updated according to the momentum term v t+1 To update:
[0082] θ t+1 =θ t -v t+1 (5)
[0083] The momentum update algorithm not only accelerates the convergence process of gradient descent, but also increases the robustness of the model to gradient noise. t It is usually initialized to the zero vector, that is, v0=0.
[0084] In step 3, the terminal device transmits the feature data to the cloud server, and the cloud server performs model training and updating under the enhanced Transformer model update framework to obtain a trained cloud model. During the training process, the cloud server uses a communication compression strategy to optimize the transmission of model parameters and applies a differential privacy protection mechanism to protect patient privacy.
[0085] In this embodiment, the cloud server uses an enhanced Transformer model update framework, uses the self-attention mechanism to capture long-distance dependencies in the data, and combines adversarial loss functions and pre-training fine-tuning strategies to improve the generalization ability of the model. The following is the main process of the enhanced Transformer model update framework:
[0086] Self-attention mechanism: The self-attention mechanism is the core of the Transformer model, which allows the model to dynamically focus on different positions in the sequence when processing sequence data. The self-attention function can be expressed as:
[0087]
[0088] Among them, Q, K, and V are query, key, and value matrices respectively. k is the dimension of K, and the softmax(·,·) function is used to normalize the weights.
[0089] Multi-head attention: In order to enhance the capabilities of the model, a multi-head attention mechanism is introduced, which splits the input into multiple heads, and each head calculates the attention weight independently. The output of the multi-head attention is the concatenation of the outputs of all heads:
[0090] MultiHead(Q,K,V)=Concat(head1,…,head h )W O (7)
[0091] Among them, head i is the attention output of the ith head, W O is the output weight matrix.
[0092] Adversarial loss function: In order to improve the generalization ability of the model, an adversarial loss function is introduced, which trains the model by maximizing the robustness of the model to small perturbations of the input data. It can be expressed as:
[0093]
[0094] in, is the data distribution, f is the forward propagation function of the model, is the loss function, r is the perturbation of the input data, and ∈ is the threshold of the perturbation.
[0095] Pre-training fine-tuning strategy: The present invention can use a pre-trained visual model such as Transformer as a starting point, and further fine-tune the strategy on this model to adapt to new tasks and data sets.
[0096] End-to-end model update: The update of the enhanced Transformer model is end-to-end, including the training of the self-attention mechanism, the optimization of the adversarial loss, and the domain adaptation loss. The goal of end-to-end training is to minimize the total loss function, so the loss function includes the adversarial loss. Domain Adaptation Loss And the target task loss of the model sum:
[0097]
[0098] Among them, λ1 and λ2 are used to balance the weights of the two losses. is a task-specific loss function (cross entropy loss), where M is the total number of categories and y c is a vector whose cth element indicates whether the true label is category c (usually 0 or 1), p c is the probability that the model predicts that the sample belongs to category c.
[0099] Step 4: The cloud server optimizes the trained cloud model through iterative subsampling and reweighting strategies, and sends the optimized model as the final model to the end device.
[0100] In this embodiment, the cloud server uses iterative subsampling and reweighting strategies to optimize the trained cloud model. The main process of the iterative subsampling and reweighting strategies is as follows:
[0101] Subsampling mechanism: The subsampling mechanism involves randomly extracting a smaller subset from the original training dataset for training or evaluating the model. is the original data set, is the sub-sampled data set, the sub-sampling process F sub (·,·) can be expressed as:
[0102]
[0103] Here, n is the number of samples drawn.
[0104] Performance evaluation and weight adjustment: Based on subsampling, the performance of the model on the subsampled dataset is evaluated and the sample weights are adjusted accordingly. The purpose of weight adjustment is to increase the weight of samples that are informative for the target task. The performance evaluation function P(h,x i ) is used to measure the model h in sample x i The performance on the target task is usually the accuracy or negative value of the loss of the model on this sample. The weight adjustment is based on the performance evaluation to increase the weight of samples that are informative for the target task. The weight adjustment process can be expressed as:
[0105] W i,t+1 =W i,t ·exp(η·P(h,x i )) (11)
[0106] Among them, W i,t is the weight of the i-th sample in the t-th iteration, and η is the learning rate, which controls the amplitude of weight adjustment.
[0107] Multiplicative weight update algorithm: In order to implement iterative subsampling and reweighting strategies, the multiplicative weight update algorithm (MW) is used. The MW algorithm adjusts the weights iteratively so that the model pays more attention to the part that is informative for the target task. The update rule of the MW algorithm can be expressed as:
[0108]
[0109] Among them, W i,t is the weight of the i-th sample in the t-th iteration, is the model h on sample x i The loss on is the factor by which the learning rate η is scaled by the number of samples n.
[0110] The multiplicative weight update algorithm is different from the momentum update algorithm. The former focuses on dynamically adjusting sample weights based on the performance of the model on the sub-sampled dataset, while the latter aims to assist gradient descent through the total loss function and enhance robustness to noise. is the factor by which the learning rate η is scaled by the number of samples n.
[0111] Privacy-preserving subsampling: In the context of differential privacy, the subsampling process needs to take privacy into account. This means that subsampling cannot rely on any single data point to avoid privacy leakage. Privacy-preserving subsampling can be achieved by adding random noise or using a privacy-preserving algorithm.
[0112] Step 5: The terminal device collects the data to be tested and inputs it into the final model to obtain the test results.
[0113] In this embodiment, the final model in the terminal device is used to analyze the patient's current health condition and provide corresponding medical advice.
[0114] In one embodiment, a process is also provided in which a cloud server uses a communication compression strategy to optimize model parameter transmission and applies a differential privacy protection mechanism to protect patient privacy during training, specifically including the following:
[0115] 1) The main process of optimizing model parameter transmission using communication compression strategy:
[0116] Model quantization technology: Model quantization is a method to reduce the precision of model parameter representation. It can convert floating-point parameters into low-precision representation, thereby reducing the model size. Let the original model parameter be W, and the quantized parameter be W'. The quantization process can be expressed as:
[0117]
[0118] Among them, bits represents the number of quantized bits, quantize(·,·) is the quantization operation, is the quantization interval, and round(·) is rounded to the nearest integer. The number of quantized bits is a key factor in the quantization accuracy of the model. Generally, the higher the number of bits, the better the model accuracy, but the corresponding model size will also increase. The present invention adopts 8-bit symmetric quantization, that is, each weight is quantized to an 8-bit integer.
[0119] Sparse coding technology: Sparse coding technology reduces the amount of data that needs to be transmitted by activating only the important parts of the model update. Let the update vector be dW and the sparsely encoded vector be dW', then the sparse coding process can be expressed as:
[0120] dW'=sparse(dW,τ) (14)
[0121] where τ is the threshold used to determine which parameters are important and sparse(·,·) is the sparse coding operation.
[0122] Combined application of coding technology: Combining model quantization and sparse coding technology can further reduce the communication overhead of model update. The combined communication volume C CommCost It can be expressed as:
[0123] C CommCost =size(W')+size(dW') (15)
[0124] The size(·,·) function represents the byte size of the parameter after quantization or sparse coding.
[0125] Update transmission strategy: In the end-cloud collaborative learning framework, the update transmission strategy needs to consider network bandwidth and communication frequency. An effective strategy is to periodically transmit the model updates after quantization and sparse coding, rather than transmitting them every iteration. Let T be the transmission period, then the transmission strategy can be expressed as:
[0126]
[0127] Among them, W t is the model parameter at time step t, dW' i is the model update after encoding at time step i.
[0128] Optimization of communication efficiency: To further improve communication efficiency, compressed sensing and information theory techniques can be used to further reduce the amount of data transmitted. In addition, by predicting the distribution of model updates, data can be compressed in advance, thereby reducing the computing resources required for decompression in the cloud.
[0129] 2) The main process of applying differential privacy protection mechanism to protect patient privacy:
[0130] Random response mechanism: Random response mechanism is a technique that introduces random noise when publishing data or training models to protect personal privacy. Let b be a binary random variable, whose value is 1 for a true response and 0 for a false response. The random response r can be expressed as:
[0131] r=b+∈ r (17)
[0132] Among them, ∈ r is from Random noise drawn from the distribution.
[0133] Differential privacy constraint: Differential privacy constraint uses Fisher information to quantify the amount of information in the parameter and adjusts the noise level in differential privacy accordingly. For each parameter θ j , calculate its Fisher information F(θ j ), and then dynamically adjust the noise σ according to the size of the Fisher information j :
[0134]
[0135] Among them, C g is a constant determined according to the global differential privacy budget ∈ and the security margin δ. In this way, for parameters with higher Fisher information (i.e., parameters with greater influence on the model output), smaller noise will be applied to reduce the impact on model performance.
[0136] Privacy protection performance evaluation: In order to evaluate the effectiveness of the differential privacy protection mechanism, it is necessary to evaluate the privacy protection performance of the model. This can be achieved by calculating the sensitivity of the model update to any two adjacent data points. The privacy protection performance can be expressed as:
[0137]
[0138] Where x and x' are any two adjacent data points, Pr represents the probability distribution, θ t is the parameter after the tth iteration.
[0139] The model is trained and tested on multiple different datasets (CIFAR-10-C, CIFAR-100-C, and MNIST-M), and the communication overhead and privacy protection performance are evaluated in a simulated end-cloud collaborative learning environment. The experimental results show that the method of the present invention effectively improves the performance and efficiency of the end-cloud collaborative learning system while protecting data privacy. On the above datasets, compared with the existing method DAN, the average accuracy of the method of the present invention is improved by about 3%, 2%, and 3%, respectively.
[0140] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0141] The above is only a preferred implementation of the privacy protection domain adaptation method under the end-cloud collaborative learning framework disclosed in the present invention, and is not intended to limit the protection scope of the embodiments of this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the embodiments of this specification shall be included in the protection scope of the embodiments of this specification.
Claims
1. A privacy protection domain adaptation method under a terminal-cloud collaborative learning framework, comprising a terminal device and a cloud server, characterized in that: The steps include: The terminal device collects training data and performs preprocessing to obtain a training data set; The end device uses the domain adaptation mechanism to extract feature data from the training dataset and dynamically adjust the model parameters; The terminal device transmits the feature data to the cloud server, and the cloud server performs model training and updating under the enhanced Transformer model update framework to obtain a trained cloud model; during the training process, the cloud server uses a communication compression strategy to optimize model parameter transmission and applies a differential privacy protection mechanism to protect patient privacy; The cloud server optimizes the trained cloud model through iterative subsampling and reweighting strategies, and sends the optimized model to the end device as the final model; The end device collects the data to be tested and inputs it into the final model to obtain the test results.
2. According to claim 1, the privacy protection domain adaptation method under the end-cloud collaborative learning framework is characterized in that: The preprocessing includes filtering, denoising and normalization.
3. According to claim 1, the privacy protection domain adaptation method under the end-cloud collaborative learning framework is characterized in that: The end device uses the domain adaptation mechanism to extract feature data from the training data set and dynamically adjust the model parameters, including the following steps: The adapter consists of L fully connected layers, each with N l neurons, where l = 1, 2, ..., L, each layer contains the ReLU activation function ReLU(x) = max(0, x), which can perform nonlinear transformation on features. Let the feature vector of the input data be x, and the output of the domain adapter be z, then the forward propagation of the adapter can be expressed as: z=f adapter (x;θ adapter ) =In L ReLU(W L-1 …ReLU(W1x+b1)…+b L-1 )+b L (2) Among them, f adapter is a function of the adapter, W l and b l are the weight matrix and bias vector of the lth layer, θ adapter = {W1, b1, ..., W L , b L } is the adapter parameter; Domain Adaptation Loss for Adapters as follows: Among them, domain adaptation loss is the maximum mean difference MMD or KL divergence. When the maximum mean difference MMD is used, z S and z T They are the outputs of the source domain and target domain data after passing through the adapter; Let θ t is the model parameter at the current moment, is the gradient of the current loss function with respect to the model parameters, v t is the momentum term at the current moment, μ is the momentum parameter, then the momentum update rule can be expressed as: Where η is the learning rate; the model parameters are updated according to the momentum term v t+1 To update: i t+1 =θ t -v t+1 (5) Momentum term v t It is usually initialized to the zero vector, that is, v0=0.
4. According to claim 1, the privacy protection domain adaptation method under the end-cloud collaborative learning framework is characterized in that: The cloud server performs model training and updating under the enhanced Transformer model update framework, including the following steps: Build a pre-trained model Transformer based on multi-head attention as a starting point; Input feature data into the pre-trained model for training, and further fine-tune the strategy to adapt to the target task and dataset to obtain the trained cloud model: Introducing the adversarial loss function, the total loss function of the cloud model is Including anti-loss Domain Adaptation Loss And the target task loss of the model Among them, λ1 and λ2 are used to balance the weights of the two losses. is a task-specific loss function, where M is the total number of categories and y c is a vector whose cth element indicates whether the true label is category c, p c is the probability that the model predicts that the sample belongs to category c.
5. According to claim 1, the privacy protection domain adaptation method under the end-cloud collaborative learning framework is characterized in that: During the training process, the cloud server uses a communication compression strategy to optimize the transmission of model parameters, including the following steps: Perform model quantization to convert floating-point parameters into low-precision representations. Let the original model parameters be W and the quantized parameters be W′. The quantization process can be expressed as: Among them, bits represents the number of quantized bits, quantize(·,·) is the quantization operation, is the quantization interval, round(·) is rounded to the nearest integer; Sparse coding technology is used to reduce the amount of data that needs to be transmitted by activating only the important parts of the model update. Let the update vector be dW and the sparsely coded vector be dW′. The sparse coding process can be expressed as: dW′=sparse(dW,τ) (14) where τ is the threshold used to determine which parameters are important, and sparse(·,·) is the sparse coding operation; Combining model quantization and sparse coding technology to reduce the communication overhead of model update, the combined communication volume C CommCost It can be expressed as: C CommCost =size(W′)+size(dW′) (15) The size(·,·) function represents the byte size of the parameter after quantization or sparse coding.
6. The privacy protection domain adaptation method under the end-cloud collaborative learning framework according to claim 5 is characterized in that: The following steps are also included: Assume T is the transmission period, and perform regular transmission quantization and sparse coding model update according to the preset transmission period. The transmission strategy can be expressed as: Among them, W t are the model parameters at time step t, and dW'i is the model update after encoding at time step i.
7. The privacy protection domain adaptation method under the end-cloud collaborative learning framework according to claim 1 is characterized in that: During the training process, the cloud server applies a differential privacy protection mechanism to protect patient privacy, including the following steps: A random response mechanism is introduced in model training. Let b be a binary random variable. When its value is 1, it indicates a true response, and when its value is 0, it indicates a false response. The random response r can be expressed as: r=b+∈ r (17) Among them, ∈ r is from Random noise drawn from the distribution; The amount of information about the quantized parameters is constrained by differential privacy. For each parameter θ j , calculate its Fisher information F(θ j ), and then dynamically adjust the noise σ according to the size of the Fisher information j : Among them, C g is a constant determined by the global differential privacy budget ∈ and the security margin δ.
8. The privacy protection domain adaptation method under the end-cloud collaborative learning framework according to claim 1 is characterized in that: The cloud server optimizes the trained cloud model through iterative subsampling and reweighting strategies, including the following steps: By iteratively subsampling from the training dataset and adjusting the sample weights according to the performance of the model on the target distribution, the weight adjustment formula is as follows: Among them, W i,t is the weight of the i-th sample in the t-th iteration, is the model h on sample x i The loss on is the factor by which the learning rate η is scaled by the number of samples n.
Citation Information
Patent Citations
Service providing system and method based on deep learning
CN110084365A
Domain adaptive privacy protection method based on differential privacy for deep neural network
CN111091193A
Edge computing-oriented federated learning indoor positioning privacy protection method
CN111866869A
Cloud side-end collaborative ubiquitous intelligent federated learning privacy protection system and method
CN115017541A
Federal representation learning-based privacy protection cross-domain recommendation system
CN115510316A
Cited By
Privacy protection image feature compression method and system for edge cloud collaborative reasoning
CN119545010A
Webpage face recognition login method implemented based on self-adaptive AI (Artificial Intelligence)
CN121530658A
