Select and Order: Optimizing Few-Shot Image Classification with In-Context Learning
摘要
Traditional few-shot learning methods rely on extensive training data, where the model is trained with a large dataset and then tested with a few-shot learning task to make predictions. Recently, with the advancement of Large Vision-Language Models (VLMs), it has become feasible to achieve few-shot image classification through in-context learning without the need for additional training. Unfortunately, existing studies have not fully harnessed the potential of VLMs in this task. In this work, we optimize the in-context learning approach by refining the selection and ordering of examples, for improving VLMs’ few-shot image classification ability. Specifically, we select low perplexity images to construct the support set, and then order this support set based on its similarity to the query image. These optimized in-context demonstrations ultimately enhance the in-context learning capabilities of the VLMs. Extensive experiments demonstrate that our approach significantly improves model accuracy (by up to 15%) without requiring any model training, and it also exhibits strong generalization capabilities.