Research Article

Few-Shot Image Classification Guided by Large Language Models

Pinzhe Chen1,*, Hao Chen1, Yanxi Liu1, Longhui Han2
1. Ocean College, Jiangsu University of Science and Technology, China
2. School of Energy and Power, Jiangsu University of Science and Technology, Jiangsu, China

* Corresponding author: [email protected]

Abstract

Few-shot image classification remains a challenging task due to the scarcity of labeled data for novel categories. Prompt-based tuning methods, such as CoOp and CoCoOp, have shown promise by adapting pre-trained vision-language models like CLIP to downstream tasks. However, these methods either suffer from limited generalization or lack semantic grounding. In this paper, we propose LLM-PromptTuning, a novel framework that integrates class-level semantic knowledge from large language models (LLMs) into conditional prompt learning. We generate rich, descriptive prompts for each class using an LLM and combine them with image-conditioned prompt vectors produced by a Transformer-based meta-network. These hybrid prompts are fed into the CLIP text encoder, improving the alignment between textual and visual representations. Experiments on Caltech101, Oxford Flowers102, and Food101 demonstrate that our method outperforms CoOp and CoCoOp, particularly in novel class recognition, achieving a new state-of-the-art in prompt-based few-shot learning.

Keywords: Few-shot Learning; Prompt Tuning; Vision-Language Models; Large Language Models; CLIP
Published: May 15, 2025
DOI: 10.54254/2755-2721/2025.22858
Volume: ACE Vol.151
pp. 118-124
Download PDF

References

  1. He K, Zhang X, Ren S, et al. Deep residual learning for image recognition[C]//Proceedings of the IEEE conference on computer vision and pattern recognition. 2016: 770-778.
  2. Simonyan K, Zisserman A. Very deep convolutional networks for large-scale image recognition[J]. arXiv preprint arXiv:1409.1556, 2014.
  3. Wang Y, Yao Q, Kwok J T, et al. Generalizing from a few examples: A survey on few-shot learning[J]. ACM computing surveys (csur), 2020, 53(3): 1-34.
  4. Tsimpoukelli M, Menick J, Cabi S, et al. Multimodal few-shot learning with frozen language models, 2021[J]. URL https://arxiv. org/abs/2106.13884.
  5. Gu Y, Han X, Liu Z, et al. Ppt: Pre-trained prompt tuning for few-shot learning[J]. arXiv preprint arXiv:2109.04332, 2021.
  6. Wang W, Zheng V W, Yu H, et al. A survey of zero-shot learning: Settings, methods, and applications[J]. ACM Transactions on Intelligent Systems and Technology (TIST), 2019, 10(2): 1-37.
  7. Radford A, Kim J W, Hallacy C, et al. Learning transferable visual models from natural language supervision[C]//International conference on machine learning. PmLR, 2021: 8748-8763.
  8. Fürst A, Rumetshofer E, Tran V H, et al. CLOOB: Modern Hopfield Networks with InfoLOOB Outperform CLIP. arXiv: Learning[J]. 2021.
  9. Li Y, Liang F, Zhao L, et al. Supervision exists everywhere: A data efficient contrastive language-image pre-training paradigm[J]. arXiv preprint arXiv:2110.05208, 2021.
  10. Lee J, Kim J, Shon H, et al. Uniclip: Unified framework for contrastive language-image pre-training[J]. Advances in Neural Information Processing Systems, 2022, 35: 1008-1019.
  11. Chen Y, Yang G, Wang D, et al. Eliciting knowledge from language models with automatically generated continuous prompts[J]. Expert Systems with Applications, 2024, 239: 122327.