Understanding of one/zero-shot learning (one-time learning/zero-shot learning)

Questions raised:

After training a multi-classification model with a neural network, if there is a known category in the test that does not belong to the sample, how to classify it into a new category?

Solution:

Convert the multi-classification problem into multiple two-classification problems, and then set the prediction probability to exceed such as 0.8 when it is judged as a certain category, otherwise it is judged as another class, so that the problem can be solved. The location category does not reach the preset threshold. So Not judged for any category.

        The methods used above are involved. One/zero-shot learning and one/zero-shot learning are both algorithms used for classification, which are two extreme forms of transfer learning.

Reference: What is One/zero-shot learning? - Know almost

1. Zero-shot learning (zero sample learning)

Reference: (Transfer) Getting Started with Zero-Shot Learning_tianguiyuyu's blog-CSDN blog_hubness

1.1. Definition

  Zero-shot learning, as the name implies, does not provide training samples for certain (some) categories at all, that is to say, the migration task without labeled samples is called zero-shot learning. Zero-shot learning is to be able to identify data categories that appear in the test but have not been encountered in the training, which can be said to be migration learning.

  Zero-shot learning means that we have no training samples of this category before, but we can learn a mapping X->Y. If this mapping is good enough, we can deal with classes that we haven't seen. For example, we haven't seen pictures of lions during training, but we can use this mapping to know the characteristics of lions. A good lion feature may be It is closer to cats and tigers, but farther away from cars and airplanes. That is to say, given a picture that we have never seen before, we can tell its characteristics and who it resembles.

1.2. Examples

  For example, to identify a picture of a cat, but the cat picture and the corresponding cat label were not trained during training, then we can find these pictures by comparing the picture of this cat with those pictures in our training process. The label of the picture, and then use these similar labels to find the label of the cat, which is migration.

  In the traditional classification model, in order to solve multi-classification problems (such as three categories: pig, cat, dog), it is necessary to provide a large number of pictures of pigs, cats and dogs for model training, and then given a new picture , can determine which category this belongs to among pigs, cats, and dogs, but for categories that do not appear in the training pictures (such as cattle), this model cannot recognize them, so zero-shot learning came into being to solve this problem. question. That is to say, in zero-shot learning, a certain category does not appear in the training samples, but we know the characteristics of this category, and then through the corpus knowledge base, this category can be identified.

  The text example of the zero-shot learning scenario, the learner has read a large amount of text, and then has to solve the problem of object recognition. If the text describes the object well enough, the class of the object can be identified even without seeing an image of the object. For example, given a cat with four legs and pointy ears, the learner can guess that the image is a cat without ever seeing a cat.

1.3. Theoretical basis

  An important theoretical basis of zero-shot learning is to use high-dimensional semantic features to replace low-dimensional features of samples, so that the trained model is transferable. Semantic vectors are high-dimensional semantic features. For example, the high-dimensional semantic features of an object are "four legs, a tail, barking, a kind of pet", then we can judge that it is a dog, and high-dimensional semantics does not describe it in detail. , but it can be classified very well. Classification is our purpose, so low-dimensional features can be discarded to achieve the purpose of classification, and it does not need to be comprehensive.

Two, one-shot learning (one-time learning)

Reference: One-Shot Learning - Short Book

2.1. Definition

  One-shot learning, as the name implies, is to provide only one or a small number of training samples for certain (some) categories, that is to say, the migration task with only one labeled sample is called one-shot learning. One-shot learning means that we can still make predictions when there are few training samples, or even only one. The main point is to learn a good X->Y mapping relationship, and then apply it to other problems.

2.2. Availability

  One-shot learning is possible because the representations learned in the first stage clearly separate the latent categories. In the transfer learning phase, only one labeled example is needed to infer the labels of many possible test examples around the same point of the cluster in the representation space. This makes the variable factors corresponding to invariance completely separated from other factors in the learned representation space, and we can learn which factors are decisive when distinguishing certain categories of objects.

Guess you like

Origin blog.csdn.net/ytusdc/article/details/128515093