mlsanityData to 14 Oct 2026

Understanding prompt engineering may not require rethinking generalization

arXiv 2310.03957 ↗First posted 6 Oct 2023cs.LG cs.CVcited by 10

On the map: LLM reasoning → Multimodal reasoning

also in 1 more
Abstract (arXiv)

Zero-shot learning in prompted vision-language models, the practice of crafting prompts to build classifiers without an explicit training process, has achieved impressive performance in many settings. This success presents a seemingly surprising observation: these methods suffer relatively little from overfitting, i.e., when a prompt is manually engineered to achieve low error on a given training set (thus rendering the method no longer actually zero-shot), the approach still performs well on held-out test data. In this paper, we show that we can explain such performance well via recourse to classical PAC-Bayes bounds. Specifically, we show that the discrete nature of prompts, combined with a PAC-Bayes prior given by a language model, results in generalization bounds that are remarkably tight by the standards of the literature: for instance, the generalization bound of an ImageNet classifier is often within a few percentage points of the true test error. We demonstrate empirically that this holds for existing handcrafted prompts and prompts generated through simple greedy search. Furthermore, the resulting bound is well-suited for model selection: the models with the best bound typically also have the best test performance. This work thus provides a possible justification for the widespread practice of prompt engineering, even if it seems that such methods could potentially overfit the training data.

Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Placed in Multimodal reasoning, one of 17 directions in LLM reasoning. Builds on 32 of its 42 references that are in the map. First posted on arXiv 6 Oct 2023.

Builds on

32 of 42 references.

References · 32

  1. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  4. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  5. 2020Scaling Laws for Neural Language Modelscited by 6,586
  6. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
  7. 2021Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervisioncited by 3,864
  8. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
  9. 2021Learning to Prompt for Vision-Language Modelscited by 2,281
  10. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,234
  11. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
  12. 2017Deep Hashing Network for Unsupervised Domain Adaptationcited by 1,188
20 more
  1. 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,045
  2. 2021Robust fine-tuning of zero-shot modelscited by 797
  3. 2017Spectrally-normalized margin bounds for neural networkscited by 686
  4. 2017Exploring Generalization in Deep Learningcited by 600
  5. 2017Computing Nonvacuous Generalization Bounds for Deep (Stochastic) Neural Networks with Many More Parameters than Training Datacited by 533
  6. 2019Fantastic Generalization Measures and Where to Find Themcited by 513
  7. 2014In Search of the Real Inductive Bias: On the Role of Implicit Regularization in Deep Learningcited by 342
  8. 2017Functional Map of the Worldcited by 338
  9. 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 336
  10. 2017A PAC-Bayesian Approach to Spectrally-Normalized Margin Bounds for Neural Networkscited by 314
  11. 2015Norm-Based Capacity Control in Neural Networkscited by 299
  12. 2022PromptSource: An Integrated Development Environment and Repository for Natural Language Promptscited by 289
  13. 2019Uniform convergence may be unable to explain generalization in deep learningcited by 224
  14. 2021How Many Data Points is a Prompt Worth?cited by 198
  15. 2021ZeroCap: Zero-Shot Image-to-Text Generation for Visual-Semantic Arithmeticcited by 150
  16. 2018Non-Vacuous Generalization Bounds at the ImageNet Scale: A PAC-Bayesian Compression Approachcited by 126
  17. 2020In Search of Robust Measures of Generalizationcited by 79
  18. 2022PAC-Bayes Compression Bounds So Tight That They Can Explain Generalizationcited by 76
  19. 2020On the role of data in PAC-Bayes boundscited by 64
  20. 2019Generalization in Deep Networks: The Role of Distance from Initializationcited by 51

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 3; 2025: 6; 2026: 1.

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2022Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models
  2. 2023Align Your Prompts: Test-Time Prompting with Distribution Alignment for Zero-Shot Generalization
  3. 2024Revisiting Prompt Pretraining of Vision-Language Models
  4. 2025Decoupling Augmentation Bias in Prompt Learning for Vision-Language Models
  5. 2026Beyond Heuristic Prompting: A Concept-Guided Bayesian Framework for Zero-Shot Image Recognition
  6. 2024Generalizable Prompt Tuning for Vision-Language Models
  7. 2022Prompting through Prototype: A Prototype-based Prompt Learning on Pretrained Vision-Language Models
  8. 2024Improving Zero-shot Generalization of Learned Prompts via Unsupervised Knowledge Distillation