Prompt, Generate, Then Cache: Cascade of Foundation Models Makes Strong Few-Shot Learners

Renrui Zhang, Xiangfei Hu, Bohao Li, Siyuan Huang, Hanqiu Deng +3 more
2/14/2026

No official code found. Best implementation: OpenGVLab/CaFo (379 stars, MIT, last commit 2023-06-01). 1 more below.

Abstract

Visual recognition in low-data regimes requires deep neural networks to learn generalized representations from limited training samples. Recently, CLIP-based methods have shown promising few-shot performance benefited from the contrastive language-image pre-training. We then question, if the more diverse pre-training knowledge can be cascaded to further assist few-shot representation learning. In this paper, we propose CaFo, a Cascade of Foundation models that incorporates diverse prior knowledge of various pretraining paradigms for better few-shot learning. Our CaFo incorporates CLIP's language-contrastive knowledge, DINO's vision-contrastive knowledge, DALL-E's vision-generative knowledge, and GPT-3's language-generative knowledge. Specifically, CaFo works by ‘Prompt, Generate, then Cache’. Firstly, we leverage GPT-3 to produce textual inputs for prompting CLIP with rich downstream linguistic semantics. Then, we generate synthetic images via DALL-E to expand the few-shot training data without any manpower. At last, we introduce a learnable cache model to adaptively blend the predictions from CLIP and DINO. By such collaboration, CaFo can fully unleash the potential of different pre-training methods and unify them to perform state-of-the-art for few-shot classification. Code is available at https://github.com/ZrrSkywalker/CaFo.

View on arXivView PDF

Code Implementations(2)

ZrrSkywalker/CaFoCommunity100%

[CVPR 2023] Prompt, Generate, then Cache: Cascade of Foundation Models makes Strong Few-shot Learners

452Jun 14, 20233 years ago
OpenGVLab/CaFoCommunity65%
MIT

[CVPR 2023] Prompt, Generate, then Cache: Cascade of Foundation Models makes Strong Few-shot Learners

37919PythonMar 2, 20233 years agoMIT

Similar Papers

Cite this paper

@article{zhang2026prompt,
  title  = {Prompt, Generate, Then Cache: Cascade of Foundation Models Makes Strong Few-Shot Learners},
  author = {Renrui Zhang and Xiangfei Hu and Bohao Li and Siyuan Huang and Hanqiu Deng and Hongsheng Li and Y. Qiao and Peng Gao},
  year   = {2026},
  eprint = {2303.02151},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2303.02151},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.02151.svg)](https://codeofpaper.com/paper/2303.02151)

Discussion