atlas

Research map / Learning theory and algorithms / Kernels and regression theory

Understanding prompt engineering may not require rethinking generalization

ICLR 2024 · Learning theory and algorithms › Kernels and regression theory · approach: Statistical perspectives on generalization · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows that discrete prompt engineering for CLIP admits tight PAC-Bayes generalization bounds when the prior is a language model (LLaMA-7B) over prompt tokens, with the bound often within a few points of test error on ImageNet and CIFAR.

Problem

Prompted vision-language models (zero-shot classifiers built from manually or greedily engineered prompts) show little overfitting even when prompts are tuned on training data, and existing generalization bounds for deep learning are loose or vacuous, so this behavior lacks theoretical explanation.

Approach

Treat discrete text prompts as a small hypothesis class, use a pretrained language model as the PAC-Bayes prior over tokens, and use a point-mass posterior so the KL divergence reduces to the negative log-likelihood of the prompt under the LM, yielding a deterministic bound. Also proposes greedy token search with LM-pruned candidates and an SRM variant penalizing this KL term.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use PAC-Bayes bounds with an LLM prior instead of uniform convergence boundsGreedy prompts · CIFAR-10, CIFAR-100, fMoW, OfficeHomegeneralization bound: CIFAR-10: 0.154 -> 0.086; CIFAR-100: 0.537 -> 0.317; fMoW: 0.807 -> 0.667; OfficeHome: 0.635 -> 0.281Helped
Use CLIP ViT-L/14 instead of CLIP ViT-B/16Greedy · CIFAR-10test error: 0.060 -> 0.028Helped
Use CLIP ViT-L/14 instead of CLIP ViT-B/16Greedy · CIFAR-100test error: 0.255 -> 0.180Helped
Use CLIP ViT-L/14 instead of CLIP ViT-B/16Greedy · fMoWtest error: 0.621 -> 0.547Helped
Use CLIP ViT-L/14 instead of CLIP ViT-B/16Greedy · OfficeHometest error: 0.150 -> 0.115Helped
Replace Greedy prompts with handcrafted promptsCLIP ViT-L/14 · CIFAR-10test error: 0.028 -> 0.040Hurt
Replace Greedy prompts with handcrafted promptsCLIP ViT-L/14 · CIFAR-100test error: 0.180 -> 0.221Hurt
Replace Greedy prompts with handcrafted promptsCLIP ViT-L/14 · fMoWtest error: 0.547 -> 0.402Mixed
Replace Greedy prompts with handcrafted promptsCLIP ViT-L/14 · OfficeHometest error: 0.115 -> 0.928Hurt
Use a linear probe instead of discrete prompt searchCLIP features with 20 samples per class · CIFAR-10test error: 0.138 -> 0.038Helped
Use a linear probe instead of discrete prompt searchCLIP features with 20 samples per class · CIFAR-100test error: 0.367 -> 0.198Helped
Penalize search with the PAC-Bayes complexity term (SRM) (ablation)Greedy prompts · CIFAR-10generalization boundHelped

Surprising findings

Limitations

Experimental setup

Datasets: CIFAR-10 CIFAR-100 ImageNet fMoW OfficeHome

Benchmarks: CIFAR-10 CIFAR-100 ImageNet fMoW OfficeHome

Metrics: test error PAC-Bayes bound uniform convergence bound

Baselines: Uniform convergence bound Linear probe Zhou et al. PAC-Bayes bound (data-independent) Data-dependent PAC-Bayes bounds Handcrafted CLIP prompts

Builds on: PAC-Bayes bounds CLIP Wise-FT McAllester PAC-Bayes bound

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy