AIMultiple ResearchAIMultiple Research

What is Few-Shot Learning? Methods & Applications in 2024

What is Few-Shot Learning? Methods & Applications in 2024What is Few-Shot Learning? Methods & Applications in 2024

Traditionally, developing machine learning systems involves collecting large amounts of data and training ML algorithms on it to produce results. However,

  • Collecting, labeling, and validating big data is expensive. It can cost up to $85,000 for a machine learning project.
  • There are many cases where businesses don’t have access to large datasets and must rely on few examples to produce results. Rare diseases, for example, would not have a large number of radiological images. Or it would be frustrating if smartphones need to have thousands of pictures of users to recognize them and get unlocked.

Few-shot learning is a hot topic in machine learning where the model makes predictions based on a few training examples. In this article, we’ll explore how few-shot learning works, its applications, and methods.

What is few-shot learning (FSL)?

Few-shot learning (FSL), also referred to as low-shot learning (LSL) in few sources, is a type of machine learning method where the training dataset contains limited information.

The common practice for machine learning applications is to feed as much data as the model can take. This is because in most machine learning applications feeding more data enables the model to predict better. However, few shot learning aims to build accurate machine learning models with less training data.

Few-shot learning algorithms coupled with a data-centric approach to model development can help companies reduce data analysis/machine learning (ML) costs since the amount of input data is an important factor that determines resource costs (e.g., time and computation).

Why is it important?

  • Test base for learning like a human: Humans can spot the difference between handwritten characters after seeing a few examples. However, computers need large amounts of data to classify what they “see” and spot the difference between handwritten characters. Few-shot learning is a test base where computers are expected to learn from few examples like humans.
  • Learning for rare cases: By using few-shot learning, machines can learn rare cases. For example, when classifying images of animals, a machine learning model trained with few-shot learning techniques can classify an image of a rare species correctly after being exposed to small amount of prior information.
  • Reducing data collection effort and computational costs: As few-shot learning requires less data to train a model, high costs related to data collection and labeling are eliminated. Low amount of training data means low dimensionality in the training dataset, which can significantly reduce the computational costs.

What are the applications of few-shot learning?

  1. Computer Vision:Computer vision explores how computers can gain high-level understanding from digital images or videos. Few-shot learning is used mainly in computer vision to deal with problems such as:
    • Character recognition (NIPS)
    • Image classification (ICML)
    • Object recognition (NIPS*, ECCV)
    • Gesture recognition (Oxford)
    • Other object related applications
      • object tracking (NIPS**)
      • part labeling (IEEE)
    • Other image applications:
      • image retrieval (NIPS***)
      • image generation (NIPS****)
      • image captioning (Association for Computing Machinery)
      • scene location recognition (IEEE*)
      • shape view reconstruction for 3D objects (ICLR)
    • Video applications
      • video classification (ECCV*)
      • motion prediction (ECCV**)
      • action localization (IEEE**)
      • person re-identification (IEEE***)
      • event detection (British Machine Vision Conference)
  2. Natural Language Processing (NLP): Few-shot learning enables natural language processing (NLP) applications to complete tasks with few examples of text data. These tasks can be listed as:
    • parsing (Association for Computational Linguistics)
    • translation (ICLR*)
    • sentence completion (Google)
    • sentiment classification from short reviews (NAACL)
    • user intent classification for dialog systems (IBM Research)
    • criminal charge prediction, the code used in the study was shared on Github. (Association for Computer Linguistics)
    • word similarity tasks (e.g. nonce definition) (Association for Computer Linguistics*)
    • text classification (Association for Computer Linguistics**)
  3. Audio Processing: Data that contains information regarding voices/sounds can be analyzed by acoustic signal processing and few-shot learning can enable deployment of tasks such as:
    • voice cloning from a few audio samples of the user (e.g. voices in GPS/navigation apps, Alexa, Siri, etc.)
    • voice conversion from one user to another
    • voice conversion across different languages
  4. Robotics: For robots to behave more like a human, they should be able to generalize information from a few demonstrations. Therefore, few-shot learning plays a critical role in training robots to complete certain tasks such as:
    • learning a movement by imitating a single demonstration (IEEE****)
    • learning manipulation actions from a few demonstrations (IEEE*****)
    • visual navigation (PMLR)
    • continuous control (NIPS*****)
  5. Healthcare:
  6. Other Applications:

How does it work?

Meta learning framework. The algorithm is trained on several training tasks and tested on test tasks.

Source: Borealis.ai

Few-shot learning (FSL) can be considered as a meta-learning problem where the model learns how to learn to solve the given problem.

Let’s take an image classification problem as an example:

  • The model is fed with a few example images of different classes (referred to as N-way-K-shot classification) and solves this task with different images repeatedly.
  • For instance, the image above shows a 3-way-2-shot classification problem where each task involves 2 pictures of 3 different animals in support sets and the model tries to classify the images in the query set.
  • The model improves its accuracy of classifying animals to correct classes with each unrelated task.
  • The performance of the model is then tested on a different set of classification tasks.

What is the difference between few-shot learning and zero-shot learning?

Few-shot learning aims for ML models to predict the correct class of instances when a small number of examples are available in the training dataset. Zero-shot learning aims to predict the correct class without being exposed to any instances belonging to that class in the training dataset. Zero-shot learning and few-shot learning have mutual applications such as:

  • image classification
  • semantic segmentation
  • image generation
  • object detection
  • natural language processing

Finally, there is one-shot learning, which is often mixed with zero-shot learning. One-shot learning is a special type of few-shot learning problem, where the aim is to learn information about object categories from one training sample/image. Face-recognition technology used by smartphones is an example of a one-shot learning problem.

What are the different approaches of few-shot learning?

  • Prior knowledge about similarity: ML models learn patterns in training data that tend to separate different classes even when they are unseen. Traditional ML models can not discriminate classes that are not present in training datasets, whereas few-shot learning techniques enable ML models to separate two classes that are not present in the training data and in some applications they can even separate more than two unseen classes:
  • Prior knowledge about learning: ML models use prior knowledge to constrain the learning algorithm to choose parameters that generalize well from a few examples.
    • Techniques used for hyperparameter tuning in few-shot learning are:
      1. MAML (Python code of the paper can be found on Github)
      2. Reptile (Python code of the paper can be found on Github)
    • Learning update rules can also encourage good performance with small datasets:
      1. LSTMs (Python code of the paper can be found on Github)
      2. Reinforcement learning (Python implementation can be found on Github)
      3. Optimization rules  (Python code for the paper can be found on Github)
    • Sequence methods take the entire dataset and test example and predict the value of the test label:
      1. Memory-augmented NN (Python implementation can be found on Github)
      2. SNAIL (Python implementation can be found on Github)
  • Prior knowledge of data: ML models exploit prior knowledge about the structure and variability of the data, which enables constructing viable models from a few examples.
    • Generative models can be constructed for families of data classes:
      1. Pen-stroke models (Python implementation of this paper can be found on Github)
      2. Neural statistician (Python implementation can be found on Github)
    • New examples for the training set can be synthesized:
      1. Analogies (Facebook AI Research) (Python implementation of the research can be found on Github)
      2. End-to-end (Python implementation of the paper can be found on Github)

How is it implemented in Python?

There are several open-source few-shot learning projects available. To implement few-shot learning projects, users can refer to the following libraries/repositories in Python:

Future of ML

IBM research suggests ML to evolve around the following segments in the future:

  • Classic ML: Deals with problems with one dataset at a time, one task and one heavy training
  • Few-shot ML: Deals with heavy offline training, then easy learning on similar tasks
  • Developing ML: Continuous life-long learning on various tasks

For more detailed information about few-shot learning, please check our Custom AI whitepaper or contact us:

Find the Right Vendors

Sources:

NIPS, ICML, NIPS*, NIPS**NIPS***, IEEE, ECCV, IEEE*, Oxford, NIPS****, ICLR, Association for Computing Machinery, ECCV*, ECCV**, IEEE**, IEEE***, British Machine Vision Conference, Association for Computational Linguistics, ICLR, Google, NAACL, IBM Research, Association for Computer Linguistics, Association for Computer Linguistics*, Association for Computer Linguistics**, IEEE****, IEEE*****, PMLR, NIPS*****, RecordEvolution, Facebook AI Research

This article was originally written by former AIMultiple industry analyst Izgi Arda Ozsubasi and reviewed by Cem Dilmegani

Access Cem's 2 decades of B2B tech experience as a tech consultant, enterprise leader, startup entrepreneur & industry analyst. Leverage insights informing top Fortune 500 every month.
Cem Dilmegani
Principal Analyst
Follow on

Cem Dilmegani
Principal Analyst

Cem has been the principal analyst at AIMultiple since 2017. AIMultiple informs hundreds of thousands of businesses (as per similarWeb) including 60% of Fortune 500 every month.

Cem's work has been cited by leading global publications including Business Insider, Forbes, Washington Post, global firms like Deloitte, HPE, NGOs like World Economic Forum and supranational organizations like European Commission. You can see more reputable companies and media that referenced AIMultiple.

Throughout his career, Cem served as a tech consultant, tech buyer and tech entrepreneur. He advised businesses on their enterprise software, automation, cloud, AI / ML and other technology related decisions at McKinsey & Company and Altman Solon for more than a decade. He also published a McKinsey report on digitalization.

He led technology strategy and procurement of a telco while reporting to the CEO. He has also led commercial growth of deep tech company Hypatos that reached a 7 digit annual recurring revenue and a 9 digit valuation from 0 within 2 years. Cem's work in Hypatos was covered by leading technology publications like TechCrunch and Business Insider.

Cem regularly speaks at international technology conferences. He graduated from Bogazici University as a computer engineer and holds an MBA from Columbia Business School.

To stay up-to-date on B2B tech & accelerate your enterprise:

Follow on

Next to Read

Comments

Your email address will not be published. All fields are required.

0 Comments