Dynamic Prompting: A Unified Framework for Prompt Tuning

Publication Date: 3/6/2023

Event: arXiv

Reference: https://arxiv.org/pdf/2303.02909.pdf

Authors: Xianjun Yang, University of California, Santa Barbara, Wei Cheng, NEC Laboratories America, Inc., Xujiang Zhao, NEC Laboratories America, Inc., Linda Petzold, University of California, Santa Barbara, Haifeng Chen, NEC Laboratories America, Inc.

Abstract: It has been demonstrated that prompt tuning is highly effective in efficiently eliciting knowledge from language models (LMs). However, the prompt tuning still lags behind fine tuning, especially when the LMs are small. P tuning v2 (Liu et al., 2021b) makes it comparable with finetuning by adding continuous prompts for every layer of the pre trained model. However, prepending fixed soft prompts for all instances, regardless of their discrepancy, is doubtful. In particular, the inserted prompt position, length, and the representations ofprompts for diversified instances through different tasks could all affect the prompt tuning performance. To fill this gap, we propose dynamic prompting (DP): the position, length, and prompt representation can all be dynamically optimized with respect to different tasks and instances. We conduct comprehensive experiments on the SuperGlue benchmark tovalidate our hypothesis and demonstrate substantial improvements. We also derive a unified framework for supporting our dynamic prompting strategy. In particular, we use a simple learning network and Gumble Softmax for learning instance dependent guidance. Experimental results show that simple instance level position aware soft prompts can improve the classification accuracy of up to 6 points on average on five datasets, reducing its gap with fine tuning. Besides, we also prove its universal usefulness under full data, few shot, andmultitask regimes. Combining them together can even further unleash the power of DP, narrowing the distance between fine tuning.

Publication Link: https://arxiv.org/pdf/2303.02909.pdf