Learning process notes (1)

1. Personalized federation-transfer learning

Global model personalization:

Feature space: the features extracted from the picture or the picture itself, that is, the pixel features of the picture or the picture features extracted with a deep network, such as GoogleNet extracted to 1024 dimensions; Semantic space: a sample description that is more conducive to human understanding, such as whether there is water,
whether Is it black, is it white;
label space: is it a zebra.

Feature space: the most intuitive, it can be at the pixel level or a combination of multiple pixels, which is conducive to direct expression by computers; semantic
space: it is a further abstraction of the feature space, which is conducive to human cognition;
label space: the most abstract , closer to human understanding

1. Regularization:

MOON - aims to reduce the distance between the representation Z learned by the local model and the representation Zglob learned by the global model, and increase the distance between the representation Z learned by the local model and the representation Zprev learned by the previous local model.

2. Transfer learning:

1. FedSteg+FedHealth: The convolutional layer and the maximum pooling layer are designed to learn the general characteristics of the image, so the parameters are not updated during the training process. However, fully connected layers focus on learning task- and user-specific features, so we update this parameter.

2. FedMD: Each party trains fk (private model) to converge on the public data set D0, and then converges on its private data set Dk; first train on the public data set until convergence, and then each participant trains on its own small private data set. Train on the dataset until convergence.

3. Two implementation methods of transfer learning:

-Fine-tuning the network: Change the last layer of full connection, and then fine-tune all network parameters for network training

-Think of the previous layers as feature extractors, freeze all layers, and only train the last layer, fast

4. The model used during training can be selected appropriately (can be changed)

5. Transfer learning under domain adaptation

It aims to learn a good classification model for labeled source domain data and unlabeled target domain data, and solve the problem of inter-domain knowledge transfer with different data distributions.

-Adversarial domain adaptation: The real samples and random noise in GAN correspond to the source domain and target domain in transfer learning, while the generator and discriminator correspond to the feature extractor and various distribution metric functions in transfer learning respectively.

-Attention mechanism: The feature distribution is aligned, and units that are beneficial to task completion can be allocated more resources. On the contrary, units that are not beneficial to task completion are allocated fewer resources. This idea is applied to the field of image classification. The purpose of the attention mechanism Assign larger weights to image features that are useful for classification, while reducing the weights of the remaining image features.

6. Annotation-based transfer learning classification: derivation transfer learning , transduction transfer learning , unsupervised transfer learning

① Derivation transfer learning: When the source task is not equal to the target task , derivation transfer learning uses the knowledge in the source domain and source task to improve or optimize the learning effect of the target prediction function in the target domain

②Transductive transfer learning: When the source task = target task and the source domain is not equal to the target domain , transductive transfer learning uses the knowledge in the source domain and source task to improve or optimize the learning effect of the target prediction function in the target domain.

-The feature spaces of the source domain and the target domain are different, and the corresponding domain adapts to domain adaption

-The feature space is the same, but the edge probability is different, corresponding to the covariate shift covariate shift

③Unsupervised transfer learning  When the source task = target task and the label space ys and yt are unobservable , unsupervised transfer learning uses the knowledge in the source domain and source task to improve or optimize the learning effect of the target prediction function in the target domain.

Feature alignment is a key step in transfer learning, which aims to make the feature representations of the source domain and the target domain more consistent in the shared feature space, thereby facilitating the transfer of knowledge learned in the source domain to the target domain. Feature alignment can be achieved through the following methods:

  1. Domain adaptation method : Domain adaptation method is a common feature alignment technique. It adjusts the target domain data to make its feature distribution closer to the feature distribution of the source domain. This can be achieved by domain adaptation training on the target domain, such as in deep learning, using adversarial training or domain classifiers to achieve feature alignment.

  2. Distribution matching method : Distribution matching method aims to match the feature distribution of source and target domain data by finding the best mapping between them. This can be achieved by minimizing the difference between the source and target domains, for example using Maximum Mean Discrepancy (MMD) or kernel matching methods.

  3. Adaptive weight adjustment : In transfer learning, adaptive weight adjustment is an effective feature alignment method. It achieves feature alignment by introducing dynamic weights between source and target domain samples to adjust their contributions. This can be achieved through adaptive learning methods, such as Adaptive Weights Transfer Learning.

  4. Advanced feature alignment model : Some research works have proposed advanced feature alignment models, such as Joint Feature Alignment or Deep Alignment Network. These models try to align features at multiple levels to achieve better transfer results.

How to use optimization algorithms such as gradient descent to maximize MMD

  1. Define the model: Define a neural network or other machine learning model that maps the input features X_s and X_t to a shared feature space.

  2. Optimization process: Maximize MMD through optimization algorithms such as gradient descent. The goal of optimization is to maximize the MMD loss function to make the features of the source domain and the target domain more consistent in the feature space.

During the training process, the gradient of the MMD loss function is calculated, and then the parameters of the model are updated according to the gradient direction, so that the MMD loss function gradually increases. Specifically, you can use stochastic gradient descent (SGD) or other optimization algorithms, such as Adam, RMSProp, etc., to update the parameters of the model.

  1. Train together with the target task: Feature alignment is often a part of transfer learning, and we usually want to train the feature alignment together with the target task. Therefore, in practical applications, MMD can be added as a regularization term to the loss function of the target task to simultaneously optimize feature alignment and the target task.

It should be noted that feature alignment is a technical means in transfer learning, and the ultimate goal is to improve the performance of the target task. Therefore, in practical applications, in addition to feature alignment, other transfer learning methods and technologies need to be combined to further optimize the model and improve performance.


 

References:

1. Transfer learning 1. Basic use_Transfer learning process_Start blogging blog-CSDN blog

Implemented with a little experimentation

2. Federated transfer learning_Wu Tianxu’s blog-CSDN blog

Guess you like

Origin blog.csdn.net/qq_51141671/article/details/131675606