Skip to content

Probe Before You Learn: Allocating Prompts from Initial Gradients under Label Noise

Jiazhe Zhang, Zibin Geng, Qiang Ma, Xuefeng Jiang, Yijun Lin, Jingyi Wang, Yu Yan, Xingzhou Zhang, Min Liu, Yuwei Wang, Sheng Sun

cs.CV

Abstract

Prompt learning provides a parameter-efficient way to adapt pretrained vision--language models through text and visual prompts, but noisy labels prevalent in real-world data inevitably bias prompt updates and thereby undermine adaptation effectiveness. Prior work on robust prompt learning focuses on suppressing unreliable updates under noisy supervision. We uncover a pivotal yet overlooked aspect--prompt allocation: shifting the parameter budget between text and visual prompts can substantially enhance robustness while keeping the training objective and total budget fixed. However, suitable prompt allocations vary across tasks and are unknown a priori, rendering brute-force candidate training computationally prohibitive. We propose GPrompt, a training-free method that derives allocation between text and visual prompts using only loss gradients at initialization before prompt optimization. Using a small sample of images and generated pseudo-labels as shared supervision, GPrompt performs an initialization probe to extract paired text and visual loss gradients, and characterizes the geometry of their trace-normalized Gram matrices through both concentration within each modality and overlap between modalities. GPrompt then derives a closed-form allocation, and projects it onto feasible prompt counts under the exact parameter budget, enabling task-specific selection without training candidate configurations. Experiments across eleven datasets show that GPrompt outperforms the strongest baseline by up to 7.75% while selecting configurations close to the best allocation identified through exhaustive training. The average runtime of gradient probe across datasets is 99.9% lower than that of exhaustive candidate training.

Create a lesson