What Makes Good Examples for Visual In-Context Learning?

01/31/2023
by   Yuanhan Zhang, et al.
0

Large-scale models trained on broad data have recently become the mainstream architecture in computer vision due to their strong generalization performance. In this paper, the main focus is on an emergent ability in large vision models, known as in-context learning, which allows inference on unseen tasks by conditioning on in-context examples (a.k.a. prompt) without updating the model parameters. This concept has been well-known in natural language processing but has only been studied very recently for large vision models. We for the first time provide a comprehensive investigation on the impact of in-context examples in computer vision, and find that the performance is highly sensitive to the choice of in-context examples. To overcome the problem, we propose a prompt retrieval framework to automate the selection of in-context examples. Specifically, we present (1) an unsupervised prompt retrieval method based on nearest example search using an off-the-shelf model, and (2) a supervised prompt retrieval method, which trains a neural network to choose examples that directly maximize in-context learning performance. The results demonstrate that our methods can bring non-trivial improvements to visual in-context learning in comparison to the commonly-used random selection.

READ FULL TEXT

page 12

page 13

page 14

page 15

page 16

page 17

page 18

page 19

research
06/02/2023

MetaVL: Transferring In-Context Learning Ability From Language Models to Vision-Language Models

Large-scale language models have shown the ability to adapt to a new tas...
research
11/08/2022

Active Example Selection for In-Context Learning

With a handful of demonstration examples, large-scale language models sh...
research
10/06/2022

Generalization Properties of Retrieval-based Models

Many modern high-performing machine learning models such as GPT-3 primar...
research
04/10/2023

Exploring Effective Factors for Improving Visual In-Context Learning

The In-Context Learning (ICL) is to understand a new task via a few demo...
research
01/17/2021

What Makes Good In-Context Examples for GPT-3?

GPT-3 has attracted lots of attention due to its superior performance ac...
research
02/21/2023

In-context Example Selection with Influences

In-context learning (ICL) is a powerful paradigm emerged from large lang...
research
05/23/2023

RetICL: Sequential Retrieval of In-Context Examples with Reinforcement Learning

Many recent developments in large language models focus on prompting the...

Please sign up or login with your details

Forgot password? Click here to reset