ProAPO: Progressively Automatic Prompt Optimization for Visual Classification

Abstract

Vision-language models (VLMs) have made significant progress in image classification by training with large-scale paired image-text data. Their performances largely depend on the prompt quality. While recent methods show that visual descriptions generated by large language models (LLMs) enhance the generalization of VLMs, class-specific prompts may be inaccurate or lack discrimination due to the hallucination in LLMs. In this paper, we aim to find visually discriminative prompts for fine-grained categories with minimal supervision and no human-in-the-loop. An evolution-based algorithm is proposed to progressively optimize language prompts from task-specific templates to class-specific descriptions. Unlike optimizing templates, the search space shows an explosion in class-specific candidate prompts. This increases prompt generation costs, iterative times, and the overfitting problem. To this end, we first introduce several simple yet effective edit-based and evolution-based operations to generate diverse candidate prompts by one-time query of LLMs. Then, two sampling strategies are proposed to find a better initial search point and reduce traversed categories, saving iteration costs. Moreover, we apply a novel fitness score with entropy constraints to mitigate overfitting. In a challenging one-shot image classification setting, our method outperforms existing textual prompt-based methods and improves LLM-generated description methods across 13 datasets. Meanwhile, we demonstrate that our optimal prompts improve adapter-based methods and transfer effectively across different backbones.

Cite

Text

Qu et al. "ProAPO: Progressively Automatic Prompt Optimization for Visual Classification." Conference on Computer Vision and Pattern Recognition, 2025. doi:10.1109/CVPR52734.2025.02341

Markdown

[Qu et al. "ProAPO: Progressively Automatic Prompt Optimization for Visual Classification." Conference on Computer Vision and Pattern Recognition, 2025.](https://mlanthology.org/cvpr/2025/qu2025cvpr-proapo/) doi:10.1109/CVPR52734.2025.02341

BibTeX

@inproceedings{qu2025cvpr-proapo,
  title     = {{ProAPO: Progressively Automatic Prompt Optimization for Visual Classification}},
  author    = {Qu, Xiangyan and Gou, Gaopeng and Zhuang, Jiamin and Yu, Jing and Song, Kun and Wang, Qihao and Li, Yili and Xiong, Gang},
  booktitle = {Conference on Computer Vision and Pattern Recognition},
  year      = {2025},
  pages     = {25145-25155},
  doi       = {10.1109/CVPR52734.2025.02341},
  url       = {https://mlanthology.org/cvpr/2025/qu2025cvpr-proapo/}
}