Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Zero-shot learning is a way for an AI system to recognize or classify something it has never seen as a labeled training example. Instead of memorizing every possible category, the model uses descriptions, relationships, and features learned from other data. This matters because real-world AI often meets new objects, words, images, or tasks that were not in its original training set.

It helps make machine learning more flexible and useful in changing situations.

In a zero-shot system, data such as an image or sentence is converted into a numerical representation called an embedding. Labels or category descriptions are also converted into embeddings, so the AI can compare meanings in the same feature space. The model predicts the category whose description is most similar to the input, often using a similarity score.

This connects computer science ideas like representation learning with statistics ideas like distance, probability, and prediction.

Key Facts

  • Zero-shot learning predicts a class that had 0 labeled training examples for that class.
  • An embedding is a vector of numbers that represents meaning or features.
  • Similarity can be measured with cosine similarity: cos(theta) = (A dot B) / (|A||B|).
  • A common prediction rule is y = argmax similarity(x, label), meaning choose the label most similar to the input.
  • Zero-shot learning often uses text descriptions such as "has stripes" or "is a flying animal" to connect known and unknown classes.
  • A zero-shot model can still make errors if the class descriptions are vague, biased, incomplete, or too similar to each other.

Vocabulary

Zero-shot learning
A machine learning method where a model predicts categories or tasks it was not directly trained on with labeled examples.
Embedding
A list of numbers that represents the important meaning or features of an image, word, sentence, or label.
Feature
A measurable property, such as color, shape, texture, or word meaning, that helps a model make a prediction.
Similarity score
A number that shows how close two embeddings are in meaning or feature space.
Training data
The examples and labels used to teach a machine learning model patterns before it makes predictions.

Common Mistakes to Avoid

  • Thinking zero-shot means the AI has learned nothing is wrong because the model has still learned general patterns from other data before making a new prediction.
  • Treating zero-shot predictions as always correct is wrong because the model is guessing from similarities and descriptions, not from direct labeled examples of the new class.
  • Ignoring the wording of labels is wrong because descriptions strongly affect which category embedding is most similar to the input.
  • Confusing zero-shot learning with supervised learning is wrong because supervised learning trains on labeled examples for the target classes, while zero-shot learning predicts classes without those target examples.

Practice Questions

  1. 1 An image embedding has similarity scores of 0.62 for "cat", 0.79 for "fox", and 0.41 for "rabbit". Using y = argmax similarity(x, label), which label should the model predict?
  2. 2 A zero-shot model compares a sentence to four label descriptions with cosine similarity scores 0.15, 0.48, 0.44, and 0.52. What is the highest score, and which label number is chosen if the labels are numbered 1 through 4?
  3. 3 A model has never trained on labeled examples of zebras, but it knows descriptions like "horse-shaped animal with black and white stripes." Explain how zero-shot learning could still classify a zebra image, and name one reason it might fail.