Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
80 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

A Simple Zero-shot Prompt Weighting Technique to Improve Prompt Ensembling in Text-Image Models (2302.06235v2)

Published 13 Feb 2023 in cs.LG, cs.CV, and stat.ML

Abstract: Contrastively trained text-image models have the remarkable ability to perform zero-shot classification, that is, classifying previously unseen images into categories that the model has never been explicitly trained to identify. However, these zero-shot classifiers need prompt engineering to achieve high accuracy. Prompt engineering typically requires hand-crafting a set of prompts for individual downstream tasks. In this work, we aim to automate this prompt engineering and improve zero-shot accuracy through prompt ensembling. In particular, we ask "Given a large pool of prompts, can we automatically score the prompts and ensemble those that are most suitable for a particular downstream dataset, without needing access to labeled validation data?". We demonstrate that this is possible. In doing so, we identify several pathologies in a naive prompt scoring method where the score can be easily overconfident due to biases in pre-training and test data, and we propose a novel prompt scoring method that corrects for the biases. Using our proposed scoring method to create a weighted average prompt ensemble, our method outperforms equal average ensemble, as well as hand-crafted prompts, on ImageNet, 4 of its variants, and 11 fine-grained classification benchmarks, all while being fully automatic, optimization-free, and not requiring access to labeled validation data.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (8)
  1. James Urquhart Allingham (8 papers)
  2. Jie Ren (329 papers)
  3. Xiuye Gu (17 papers)
  4. Yin Cui (45 papers)
  5. Dustin Tran (54 papers)
  6. Jeremiah Zhe Liu (15 papers)
  7. Balaji Lakshminarayanan (62 papers)
  8. Michael W Dusenberry (1 paper)
Citations (27)