自动优化视觉语言模型的提示配置,提升下游任务表现
Differentiable Prompt Learning for Vision Language Models
- 将提示设计转化为可微优化问题,自动确定每层添加的提示长度
- 在11个数据集上平均准确率提升2.60%,仅需少量数据即可收敛
- 兼容现有复杂方法,可无成本部署于大模型
提示学习是挖掘大规模预训练基础模型潜力的有效方式。连续提示将提示中的上下文标记参数化为可微向量,深度连续提示不仅在输入端加入提示,还插入中间隐藏表示中。手动设计的深度连续提示相比零样本预训练模型在下游任务中表现显著提升。如何自动化连续提示设计仍是一个未充分探索的领域,一个根本性问题是:人工设计的深度提示策略是否最优?为此,我们提出可微提示学习(DPL)方法。DPL被建模为优化问题,旨在自动确定每层应添加提示的最优上下文长度,目标是最大化性能。我们在预训练的CLIP上测试该方法。实验证明,仅用少量数据,DPL即可高置信度地找到性能优异的深度连续提示配置。在下游任务上的表现显示了自动设计的优势:相较于基线方法,我们的方法在11个数据集上的平均测试准确率提升了2.60%。此外,本方法仅关注提示配置(即每层的上下文长度),因此可与已有高性能设计的基线方法兼容。DPL方法可无成本地部署于大语言模型或计算机视觉模型。
原文摘要 · Abstract (English)
Prompt learning is an effective way to exploit the potential of large-scale pre-trained foundational models. Continuous prompts parameterize context tokens in prompts by turning them into differentiable vectors. Deep continuous prompts insert prompts not only in the input but also in the intermediate hidden representations. Manually designed deep continuous prompts exhibit a remarkable improvement compared to the zero-shot pre-trained model on downstream tasks. How to automate the continuous prompt design is an underexplored area, and a fundamental question arises, is manually designed deep prompt strategy optimal? To answer this question, we propose a method dubbed differentiable prompt learning (DPL). The DPL method is formulated as an optimization problem to automatically determine the optimal context length of the prompt to be added to each layer, where the objective is to maximize the performance. We test the DPL method on the pre-trained CLIP. We empirically find that by using only limited data, our DPL method can find deep continuous prompt configuration with high confidence. The performance on the downstream tasks exhibits the superiority of the automatic design: our method boosts the average test accuracy by 2.60% on 11 datasets compared to baseline methods. Besides, our method focuses only on the prompt configuration (i.e. context length for each layer), which means that our method is compatible with the baseline methods that have sophisticated designs to boost the performance. The DPL method can be deployed to large language models or computer vision models at no cost.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。