You Are What You Prompt: Prompt Quality, Domain Shift, and Uncertainty in Agrifood Vision-Language Models
用同样的方式让AI识别食物照片和植物病害照片,为什么后者总是出错
像CLIP和SigLIP这类图文匹配AI,通常通过组合多种文字提示词(prompt)来提高识别效果,但这篇论文发现这种方法在食物图片上很管用,在植物病害图片上却收效甚微。研究者分析了一种无需标签就能给提示词打分的现有方法ZPE,并提出了新方法PID,利用多个提示词之间的意见分歧来提前发现AI可能出错的时刻。结果显示,在AI熟悉的食物领域,模型自身的置信度已经足够可靠;但在陌生的豆类叶片病害领域,PID识别出错误的能力明显优于模型自身的置信度。
METAL MEDIA 解读图
用同样的方式让AI识别食物照片和植物病害照片,为什么后者总是出错
- 01研究者在两个食物数据集(Food-101、Food-11)和两个农业数据集(Agricultural crops、豆类叶片病害Beans)上测试了CLIP和SigLIP两大系列共六个模型。
- 02ZPE这种无需标签、依据提示词判别力打分加权的方法,在接近训练数据的食物领域提升有限,但在分布外的Beans豆类病害数据集上显著提高了准确率。
- 03对提示词逐词分析发现,'aerial(航拍)''view(视角)'等具体视觉词汇与高质量提示词相关,而'type''demonstration'等抽象词汇则与低质量提示词相关。
- 04食物领域和农业领域筛选出的优质提示词列表相关系数达到0.765,说明在一个领域验证过的提示词质量判断在一定程度上可以迁移到另一个相关领域。
- 05新提出的PID方法利用提示词之间的分歧作为可信度信号,在Beans数据集上,CLIP-B/16模型的PID表现(AUROC 0.646)远超模型自身置信度(AUROC 0.275),差距达到+0.37,是整个实验中差距最大的一次。
他们做了什么
- 研究者在两个食物数据集(Food-101、Food-11)和两个农业数据集(Agricultural crops、豆类叶片病害Beans)上测试了CLIP和SigLIP两大系列共六个模型。
- ZPE这种无需标签、依据提示词判别力打分加权的方法,在接近训练数据的食物领域提升有限,但在分布外的Beans豆类病害数据集上显著提高了准确率。
- 对提示词逐词分析发现,'aerial(航拍)''view(视角)'等具体视觉词汇与高质量提示词相关,而'type''demonstration'等抽象词汇则与低质量提示词相关。
- 食物领域和农业领域筛选出的优质提示词列表相关系数达到0.765,说明在一个领域验证过的提示词质量判断在一定程度上可以迁移到另一个相关领域。
- 新提出的PID方法利用提示词之间的分歧作为可信度信号,在Beans数据集上,CLIP-B/16模型的PID表现(AUROC 0.646)远超模型自身置信度(AUROC 0.275),差距达到+0.37,是整个实验中差距最大的一次。
| Model | F101 | F11 | Agri. | Beans | Avg |
|---|---|---|---|---|---|
| CLIP-B/32 | 0.830 | 0.809 | 0.616 | 0.287 | 0.636 |
| CLIP-B/16 | 0.881 | 0.810 | 0.709 | 0.307 | 0.677 |
| CLIP-L/14 | 0.932 | 0.848 | 0.780 | 0.398 | 0.740 |
| SigLIP-B | 0.912 | 0.844 | 0.869 | 0.404 | 0.757 |
| SigLIP-L | 0.943 | 0.845 | 0.910 | 0.635 | 0.833 |
| SigLIP-400M | 0.957 | 0.842 | 0.941 | 0.635 | 0.844 |
为什么重要
对于要把通用图文AI用在农业、食品安全等专业领域的人来说,这项工作提供了一种无需标签就能判断何时该信任AI输出、何时该多加核实的实用信号。研究表明,模型自身的置信度在熟悉领域很可靠,但恰恰在最需要谨慎的陌生领域(领域偏移)变得不可靠,而PID能弥补这一缺陷。
本文术语
- 零样本分类 · 不针对具体类别做专门训练,仅靠文字描述就能识别图像的方式
- 提示词集成(prompt ensembling) · 对同一类别用多种不同措辞的提示词分别预测,再综合结果
- ZPE(Zero-shot Prompt Ensembling) · 一种无需真实标签、依据判别力给提示词打分加权的现有方法
- PID(Prompt-based Inconsistency Detection) · 本文提出的新方法,通过衡量多个提示词预测结果的分歧程度来预判模型可能出错的地方
- 分布外数据(OOD) · 与模型训练时见过的数据差异很大的陌生数据
- AUROC · 衡量某个信号区分正确与错误预测能力的指标,数值越接近1越好
无法转载的图表
- Figure 1: Zero-shot performance for SigLIP SO400M and CLIP ViT-L/14 (all prompt pools).
- Figure 2: Word discriminability of top vs. bottom 25% ZPE-ranked prompts per dataset (SigLIP-SO400M, Pool-247).
- Figure 3: Cross-domain ZPE-norm prompt scores: Food vs. Agriculture (SigLIP-SO400M, Pool-247). ρ=0.765 indicates strong cross-domain prompt quality transferability.
- Figure 4: PID-based uncertainty evaluation across all prompt pools.
- Figure 5: PID AUROC as a function of τa across all datasets and prompt pools. Peaked curves (Food) indicate quality-gating is beneficial; monotonically increasing curves (Beans with CLIP) indicate full domain shift.
论文原文摘要(英文)
Vision-language models enable zero-shot classification through natural language prompts, but performance is sensitive to prompt formulation, especially in specialized domains. Zero-shot Prompt Ensembling (ZPE) addresses this by weighting prompts by discriminative signal, yet its behavior under domain shift remains unexplored. We evaluate ZPE in the agrifood domain using CLIP and SigLIP across four datasets and four prompt pools, spanning in-distribution (ID) food and out-of-distribution agricultural benchmarks. ZPE provides limited benefit under ID conditions but substantially improves performance and calibration under domain shift, where domain-specific pools of 51-52 prompts consistently outperform generic pools of 247-426. Lexical analysis shows that ZPE acts as an unsupervised domain-alignment detector without label access. We further introduce PID (Prompt-based Inconsistency Detection), which repurposes prompt disagreement as epistemic uncertainty, improving failure detection under severe domain shift where standard confidence measures collapse.
在 arXiv 阅读最新论文
- SWE-bench Science: Can Coding Agents Resolve Engineering Tasks in Science?让AI编程助手去修复真实科学软件,连最强的那个也有一半以上任务没做对
- FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM Serving把稀疏注意力从论文原型变成能真正上线服务的加速方案
- PolicyGuide: From Guarding One Action to Guiding the Whole Workflow for Policy-Compliant LLM Agents让客服AI坐席不只是拦住一个危险动作,而是把整个流程走对
- EXIMO: VLM Guided Exploration of VLA Policies不用人工遥控演示,让会说话的AI来教机械臂做新家务
- EnvHarness: Awakening Static Worlds for Agent Learning不重新搭建训练环境,而是给现有环境套一层可插拔组件,针对每个智能体的具体弱点重新塑形
- Bounded Sovereignty and the Control Tax: Pricing AI Oversight When the Deployer Does Not Own the Model租用AI而非拥有AI的机构,安全监管能力只剩一半
- Beyond Imitation: Filtering On-Policy Distillation by Reasoning ProgressAI模仿老师模型学习时,会误伤本来推理正确的步骤,新方法专门过滤掉这种误伤
- PersonalBench: Measuring the Authorship Gap in LLM Personalization让AI模仿某人的文风,结果发现它始终摆脱不了自己的腔调