Few-Shot Recognition via Stage-Wise Retrieval-Augmented Finetuning
Tian Liu, Huixin Zhang, Shubham Parashar, Shu Kong
TL;DR
This work tackles practical few-shot recognition (FSR) by leveraging Vision-Language Models (VLMs) and retrieval-augmented learning (RAL). It first demonstrates that finetuning the VLM on only few-shot data yields strong gains, then reveals that naive retraining on retrieved data is hampered by domain gaps and data imbalance. The authors propose Stage-Wise Retrieval-Augmented fineTuning (SWAT), a two-stage strategy that end-to-end finetunes on a mix of retrieved and few-shot data and then retrains the classifier on few-shot data, with CutMix augmentation further improving robustness. Across nine benchmarks, SWAT achieves over 6% absolute accuracy gains, outperforming prior methods and highlighting its promise for real-world data-annotation workflows.
Abstract
Few-shot recognition (FSR) aims to train a classification model with only a few labeled examples of each concept concerned by a downstream task, where data annotation cost can be prohibitively high. We develop methods to solve FSR by leveraging a pretrained Vision-Language Model (VLM). We particularly explore retrieval-augmented learning (RAL), which retrieves open data, e.g., the VLM's pretraining dataset, to learn models for better serving downstream tasks. RAL has been studied in zero-shot recognition but remains under-explored in FSR. Although applying RAL to FSR may seem straightforward, we observe interesting and novel challenges and opportunities. First, somewhat surprisingly, finetuning a VLM on a large amount of retrieved data underperforms state-of-the-art zero-shot methods. This is due to the imbalanced distribution of retrieved data and its domain gaps with the few-shot examples in the downstream task. Second, more surprisingly, we find that simply finetuning a VLM solely on few-shot examples significantly outperforms previous FSR methods, and finetuning on the mix of retrieved and few-shot data yields even better results. Third, to mitigate the imbalanced distribution and domain gap issues, we propose Stage-Wise retrieval-Augmented fineTuning (SWAT), which involves end-to-end finetuning on mixed data in the first stage and retraining the classifier on the few-shot data in the second stage. Extensive experiments on nine popular benchmarks demonstrate that SWAT significantly outperforms previous methods by >6% accuracy.
