transfer learning

Reprinted from: https://www.zhihu.com/question/41979241/answer/247421889

1 Introduction

 

Transfer Learning (TL), for humans, is to master the ability to learn by inferences. For example, after we learn to ride a bicycle, it is easy to learn to ride a motorcycle; after we learn to play badminton, it is not so difficult to learn to play tennis. For computers, the so-called transfer learning is a technology that allows existing model algorithms to be applied to a new field and function with a little adjustment.

 

Not long ago, Professor Yang Qiang from the Hong Kong University of Science and Technology reviewed the Go battle between AlphaGo and Ke Jie at the Heart of Machines GMIS conference. From the point of view, it still has a weakness, and this weakness is still very serious. This weakness is that AlphaGo is not as capable of transfer learning as humans. It cannot transfer to the ability to play chess after learning Go. This limitation needs to be overcome by transfer learning. Another Daniel Wu Enda also said in the NIPS 2016 tutorial that he is very optimistic about the application prospects of transfer learning. He believes that transfer learning will be the next wave of success in the commercial application of ML after supervised learning. The real world is complex and contains many scenarios. Transfer learning can help us grasp the commonalities of problems through phenomena and skillfully handle new problems.

 

Traditional machine learning usually has two basic assumptions, namely the assumption that the training samples and test samples satisfy the independent and identical distribution and the assumption that there must be enough available training samples. However, these two basic assumptions are sometimes difficult to satisfy in real life. For example, the timeliness of stock data is usually very strong, and the model trained using the data of the previous month is often difficult to smoothly apply to the forecast of the next month; for example, a company opens a new business, but is worried that there is not enough data to establish model for user recommendation. Transfer learning, which has received extensive attention in the field of machine learning in recent years, precisely solves these two problems. Transfer learning uses existing knowledge to solve learning problems with only a small amount of labeled sample data or even no data in the target domain, which fundamentally relaxes the basic assumptions of traditional machine learning. Due to the unique wisdom of human beings, transfer learning can transfer models suitable for big data to small data, find the commonality of problems, and transfer general models to personalized data to achieve personalized transfer.

 

2. Generalized Definition of Transfer Learning

 

  • Condition: Given a source domain Ds and a learning task Ts on the source domain, a target domain Dt and a learning task Tt on the target domain
  • Goal: learn a prediction function f( ) on the target domain with Ds and Ts
  • Constraints: Ds≠Dt, Ts≠Tt

3 Classification of Transfer Learning

 

3.1 Divided by feature space

 

  • Homogeneous transfer learning (Homogeneous TL): The feature space of the source domain and the target domain is the same, XS=XT
  • Heterogeneous transfer learning (Heterogeneous TL): The feature spaces of the source and target domains are different, XS≠XT

3.2 By Migration Scenario

 

  • Inductive transfer learning (Inductive TL): different learning tasks in the source and target domains
  • Transductive transfer learning (Transductive TL): The source domain and target domain are different, and the learning tasks are the same
  • Unsupervised transfer learning (Unsupervised TL): neither source nor target domains have labels

4. The basic method of transfer learning

 

  • Sample migration (Instance based TL)

 

Find data in the source domain that is similar to the target domain, and adjust the weights of this data so that the new data matches the data in the target domain. The example in the figure below is to find the source domain example 3, and then increase the weight of the sample, so that the weight of the target domain is increased. The advantage is that the method is simple and easy to implement. The disadvantage is that the selection of weights and the measurement of similarity depend on experience, and the data distributions of the source and target domains are often different.

 

  • Feature based TL

 

Assuming that the source domain and the target domain contain some common cross features, through feature transformation, the features of the source domain and the target domain are transformed into the same space, so that the source domain data and the target domain data in this space have the same data distribution, and then carry out traditional machine learning. The advantage is that it is applicable to most methods, and the effect is better. The disadvantage is that it is difficult to solve and is prone to overfitting.

 

  • Model migration (Parameter based TL)

 

Assuming that the source domain and the target domain share model parameters, it refers to applying the model previously trained in the source domain with a large amount of data to the target domain for prediction, such as using tens of millions of images to train an image recognition system. , when we encounter a new image domain problem, we don't need to find tens of millions of images for training, we just need to migrate the original trained model to the new domain, in the new domain often only It takes tens of thousands of pictures, and high accuracy can also be obtained. The advantage is that the similarities that exist between the models can be fully exploited. The disadvantage is that the model parameters are not easy to converge.

 

 

 

  • Relation based TL

 

Assuming that the two domains are similar, they will share a certain similarity relationship, and the logical network relationship in the source domain will be applied to the target domain for migration, such as the migration of biological virus transmission to computer virus transmission.

 

 

 

 

5. Application scenarios of transfer learning

 

5.1 The theoretical research value of transfer learning

 

  • Addressing scarcity of labeled data

 

In the era of big data, the scale of data in the hundreds of millions has led to more and more serious problems of statistical heterogeneity and missing annotations. The lack of labeled data can lead to serious overfitting problems in traditional supervised learning. The current methods to solve data scarcity include traditional semi-supervised learning, collaborative training, active learning, etc., but these methods all require a certain degree of labeled data in the target domain, and the cost of obtaining additional manual labeled data when labeled data is scarce is too high Big. At this time, transfer learning is needed to assist in improving the learning effect of the target domain.

 

  • Non-stationary generalization error sharing

 

The classical statistical learning theory gives the upper bound guarantee of the generalization error of the model under the condition of independent and identical distribution. In a non-stationary environment (different data domains do not obey the IID assumption), the traditional machine learning theory is no longer valid, which brings theoretical risks to the analysis and mining of heterogeneous data. In a broad sense, transfer learning can be seen as the generalization of traditional machine learning in non-stationary environments. Therefore, in non-stationary environments, transfer learning is an important theoretical complement to classical machine learning.

 

5.2 Practical applications of transfer learning

 

  • training the robotic arm

 

Training models on real robots is too slow and very expensive. The solution is to perform simulation learning first, and transfer the knowledge learned by simulation learning to real-world robot training, where the feature space between the source and target domains is the same. In recent years, research in this field has aroused the interest of many people. The following picture is the work of Google DeepMind: The left side of the picture is training the movement of the robotic arm in a simulated environment. After the training is completed, the knowledge can be transferred to the robotic arm in the real world. The real robotic arm can also achieve very good results with a little training. The effect is shown on the right as shown below.

Video

 

 

 

 

  • Public opinion analysis

 

Transfer learning can also be applied to user evaluation in public opinion analysis. Taking user reviews of electronic products and video game products as an example, the green label in the picture is a positive label, and the red label is a negative label. Extract features from the electronic product evaluation (source domain) on the left of the figure, establish a model in the field of electronic product evaluation, and then apply it to the video game domain (target domain) on the right to achieve large-scale migration of public opinion, and in the new The fields do not need labels.

 

 

 

 

  • Recommended system

 

Transfer learning can also be used in recommender systems, making a recommendation system in a certain field and then applying it to sparse, new vertical fields. For example, a mature and perfect movie recommendation system can be applied to a cold-start book recommendation system.

 

 

 

 

  • Personalized conversation

 

First train a general dialogue system, and then modify it based on small data in a specific domain, so that the dialogue system is adapted to the task of that specific domain. For example, if a user wants to buy coffee, he does not want to answer all the tedious questions, such as asking for a large or small cup, hot or cold?

 

 

 

 

  • Data Generative Transfer Learning - GAN

 

Generative Adversarial Networks (GAN) is a new machine learning idea. The two game parties in the GAN model are respectively acted by a generative model and a discriminative model. The generative model G captures the distribution of sample data, and generates a sample similar to the real training data with noise z that obeys a certain distribution (uniform distribution, Gaussian distribution, etc.) A classifier that estimates the probability that a sample comes from training data (rather than generated data). If the sample comes from real training data, D outputs a high probability, otherwise, D outputs a small probability. The optimization of GAN is a minimax game problem. The ultimate goal is that it is difficult to judge whether the output of the generator is real or fake when it is sent to the discriminator.

 

If we have a good generative model that has been trained on a certain dataset, and if there is some new data that is significantly different from the previous dataset, then we can use "GAN + boundary conditions" to put The generative model is migrated to the new data distribution. For example, when we write, everyone's signature is different, we don't sign in print, because each of us has our own writing characteristics. Then, if a large number of printed characters are used as training samples for the first part to train a good general model, and someone's handwritten italic characters are used as training samples for the second part, the printed model can be used by Wasserstein GAN. Migrate to personal signatures. In other words, such a signature is more personalized.

 

 

 

6. Transfer learning related competitions

 

7. Representative scholars of transfer learning

 

Conducting research on transfer learning can start by tracking the results of representative researchers on transfer learning. Representatives of transfer learning at home and abroad include:

8. Transfer Learning Toolkit

 

9. References

 

2017 Hong Kong University of Science and Technology Yang Qiang Machine Heart GMIS Summit Speech
2016 Hong Kong University of Science and Technology Yang Qiang KDD China Technology Summit Speech
Sinno Jialin Pan and Qiang Yang, A survey on transfer learning
Karl Weiss, Taghi M. Khoshgoftaar and DingDing Wang, A survey of transfer learning
Long Mingsheng, Research on Transfer Learning Problems and Methods
Note : Some of the above pictures are taken from the above references

Author: Li Zhongjie

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324726521&siteId=291194637