What are the differences between fine tuning and few shot learning?

7k Views Asked by At

I am trying to understand the concept of fine-tuning and few-shot learning.

I understand the need for fine-tuning. It is essentially tuning a pre-trained model to a specific downstream task. However, recently I have seen a plethora of blog posts stating zero-shot learning, one-shot learning and few-shot learning.

  • How are they different from fine-tuning? It appears to me that few-shot learning is a specialization of fine-tuning. What am I missing here?

Can anyone please help me?

3

There are 3 best solutions below

0
On BEST ANSWER

Fine tuning - When you already have a model trained to perform the task you want but on a different dataset, you initialise using the pre-trained weights and train it on target (usually smaller) dataset (usually with a smaller learning rate).

Few shot learning - When you want to train a model on any task using very few samples. e.g., you have a model trained on different but related task and you (optionally) modify it and train for target task using small number of examples.

For example:

Fine tuning - Training a model for intent classification and then fine tuning it on a different dataset.

Few shot learning - Training a language model on large text dataset and modifying it (usually last (few) layer) to classify intents by training on small labelled dataset.

There could be many more ways to do few shot learning. For 1 more example, training a model to classify images where some classes have very small (or 0 for zero shot and 1 for one shot) number of training samples. Here in inference, classifying these rare classes (rare in training) correctly becomes the aim of few shot learning.

0
On

There are couple of points I would like to add here. Both fine tuning and one-shot, few shot learning are techniques to perform transfer learning. Transfer learning is leveraging a model trained on certain task to perform something else.

  1. In case of fine tuning a neural network it may require to update the weights of all the layers but incase of one-shot, few-shot only the top most layers may be updated.
  2. Fine tuning is mostly used in abundance of data whereas the techniques like zero shot, one shot and few shot are hany tools when you don't have enough data for the problem you are trying to classify.

In short, transfer learning is the overarching concept of leveraging knowledge from one task to improve performance on another related task. Fine-tuning, one-shot learning, and few-shot learning are specific techniques used within transfer learning to achieve this goal, each with its own approach to leveraging pre-existing knowledge from a source task or limited labeled data to improve performance on a target task.

0
On
  • Fine-Tuning: Like adapting your existing skills in making one type of dessert by learning additional techniques and recipes to make another type of dessert. It requires some time and practice but doesn't start from zero.
  • Few-Shot: Learning is like using your intuition and knowledge as an experienced chef to make a completely new dessert, even with just a few simple hints. It emphasizes the ability to adapt and learn quickly, even when faced with tasks you've never encountered before.