arXiv:2412.15277cs.CLcs.AI2024-12被引 1

用困惑度正则化提示词,防止视觉语言模型过拟合。

PLPP: Prompt Learning with Perplexity Is Self-Distillation for Vision-Language Models

  • 通过计算提示词的困惑度,引入自蒸馏机制进行正则化。
  • 在四个分类任务上优于现有方法,显著降低过拟合风险。
  • 适合需要提升下游任务泛化能力的视觉语言模型研究者。

预训练的视觉-语言模型(如CLIP)在众多下游任务中表现优异。最近的上下文优化(CoOp)方法通过引入可学习提示向量进一步提升了性能,但仅依赖CLIP损失进行提示微调易导致过拟合。为此,本文提出一种即插即用的提示正则化方法PLPP(Prompt Learning with PerPlexity),利用困惑度损失对提示学习进行正则化。PLPP采用两步计算提示困惑度:(a) 通过嵌入层权重与提示的余弦相似性生成标签;(b) 在文本编码器后引入无需训练的语言模型头,输出词的概率分布。同时揭示了PLPP本质上是一种自蒸馏形式。为减少额外计算并进一步防过拟合,将硬标签转为软标签,并选取前k个最高值计算困惑度损失。为加速收敛,引入互自蒸馏学习,即困惑度与反向困惑度损失。在四个分类任务上的实验表明,PLPP性能显著优于现有方法。

原文摘要 · Abstract (English)

Pre-trained Vision-Language (VL) models such as CLIP have demonstrated their excellent performance across numerous downstream tasks. A recent method, Context Optimization (CoOp), further improves the performance of VL models on downstream tasks by introducing prompt learning. CoOp optimizes a set of learnable vectors, aka prompt, and freezes the whole CLIP model. However, relying solely on CLIP loss to fine-tune prompts can lead to models that are prone to overfitting on downstream task. To address this issue, we propose a plug-in prompt-regularization method called PLPP (Prompt Learning with PerPlexity), which use perplexity loss to regularize prompt learning. PLPP designs a two-step operation to compute the perplexity for prompts: (a) calculating cosine similarity between the weight of the embedding layer and prompts to get labels, (b) introducing a language model (LM) head that requires no training behind text encoder to output word probability distribution. Meanwhile, we unveil that the essence of PLPP is inherently a form of self-distillation. To further prevent overfitting as well as to reduce the additional computation introduced by PLPP, we turn the hard label to soft label and choose top-$k$ values for calculating the perplexity loss. For accelerating model convergence, we introduce mutual self-distillation learning, that is perplexity and inverted perplexity loss. The experiments conducted on four classification tasks indicate that PLPP exhibits superior performance compared to existing methods.

提示学习自蒸馏视觉语言模型过拟合抑制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。