Is Continuous Prompt a Combination of Discrete Prompts? Towards a Novel View for Interpreting Continuous Prompts (2023)

Abstract: The broad adoption of continuous prompts has brought state-of-the-art results on a diverse array of downstream natural language processing (NLP) tasks. Nonetheless, little attention has been paid to the interpretability and transferability of continuous prompts. Faced with the challenges, we investigate the feasibility of interpreting continuous prompts as the weighting of discrete prompts by jointly optimizing prompt fidelity and downstream fidelity. Our experiments show that: (1) one can always find a combination of discrete prompts as the replacement of continuous prompts that performs well on downstream tasks; (2) our interpretable framework faithfully reflects the reasoning process of source prompts; (3) our interpretations provide effective readability and plausibility, which is helpful to understand the decision-making of continuous prompts and discover potential shortcuts. Moreover, through the bridge constructed between continuous prompts and discrete prompts using our interpretations, it is promising to implement the cross-model transfer of continuous prompts without extra training signals. We hope this work will lead to a novel perspective on the interpretations of continuous prompts.

## introduction continuous prompts for pre-trained language models (plms) have shown remarkable performance on almost every nlp field @xcite @xcite . however, trained continuous prompts tend to improve performance at the sacrifice of interpretability and transferability relative to discrete prompts @xcite , which causes mistrust in people and makes crossmodel transfer challenging. recent advancements spiked interest in understanding how prompts work and found the counterintuitive mechanism behind. @xcite pavlick, * *corresponding author. 0.8 seem 0.4 continuous prompts the plot is nothing but boilerplate clichés from start to finish ... plm type: bad input text concat predict interpretions for continuous prompts extremely 0.3 look quality 0.9 0.4 0.1 drama bad 0.7 0.4 0.2 things jokes exactly 2022) conducted numerous experiments on various discrete prompts, finding the improvement in downstream tasks does not originate from the model understanding task instructions in a manner similar to how humans use them. @xcite presented the first investigation of the exploitation of superficial cues by prompt-based models, finding the presence of superficial cues which prompt-based models exploit. continuous prompts, on the other hand, are more complicated and incomprehensible. recent attempts for interpreting continuous prompts came from @xcite , which introduced the prompt waywardness hypothesis to prove the infeasibility of interpreting a learned continuous prompt with a single discrete prompt. to the best of our knowledge, no general post-hoc interpretable framework is proposed to translate continuous prompts into a comprehensible form. towards filling this research gap, we propose the combination hypothesis, which argues the feasibility of utilizing combinations of discrete prompts as faithful interpretations for continuous prompts ( §3.2). in other words, we treat the continuous prompt as an embedding lookup table with the one-hot restriction removed. for instance, a welltrained continuous prompt for sentiment classification should contain task-related tokens such as "drama" or auxiliary tokens such as "seem", "look" to stimulate the plm for desired outputs (fig. 1 ). to find the effective interpretation, a joint optimization framework is proposed to ensure both prompt fidelity and downstream fidelity ( §3.3). comprehensive experiments are conducted to support our hypothesis and framework. we first directly optimize parameters of the combination of discrete prompts to replace continuous prompts. results show that the combination of discrete prompts has competitive performance in most scenarios (especially in few-shot learning), which verifies the feasibility of the combination hypothesis in practice ( §5). as a significant property of interpretations, faithfulness is comprehensively verified to check how accurately it reflects the true reasoning process of the model @xcite . we first verify the prompt fidelity and downstream fidelity of the interpretations using discrete prompts and continuous prompts as the content to be interpreted ( §6.1), then we verify the tokens selected from interpretations can better restore the performance of source prompts on downstream tasks ( §6.2). despite faithfulness, a high-quality interpretation should also contain plausibility, which refers to how convincing the interpretation to humans (jacovi and goldberg, 2020). by conducting a visual comparison with the nearest tokens to continuous prompts ( §7.1), our interpretations are shown to be more convincing and allow us to identify several "shortcuts" contained in the model's decisionmaking ( §7.2). furthermore, inspired by the readability and transferability of discrete prompts, we investigate the feasibility of cross-model transfer for continuous prompts using our interpretations. we argue its breakthrough since no previous work to achieve cross-model transfer for continuous prompts without any training signals on target plms. experiments show that even continuous prompts trained on a simple structured plm with 100-shot settings can be transferred to large plms using our method and achieve competitive performance ( §8). discrete prompts usually search for templates, i.e., natural language tokens in discrete spaces as prompt functions. there is a line of work focused on manually-designed prompts @xcite @xcite . these methods rely excessively on prior knowledge, while even experts have difficulty finding optimal templates @xcite . therefore, recent explorations devoted much attention to automatically searching for templates in discrete spaces @xcite @xcite . continuous prompts, on the other hand, relax the constraint that templates are natural language tokens @xcite @xcite @xcite . these works effectively improve performance at the expense of interpretability. @xcite demonstrated the disconnection between continuous prompts and discrete prompts, in this paper, we investigate the feasibility of using discrete prompts to interpret continuous prompts from a novel view. cross-model transfer. benefiting from the readability of discrete prompts, we can easily transfer manually-designed prompts to any plm @xcite . nonetheless, since the embedding dimensions and semantic spaces of different plms are inconsistent, it is tricky for cross-model transfer of continuous prompts. @xcite devoted the first attempt by prompt projectors, which trained on another task to project continuous prompts into the semantic space of target plms. as a post-hoc interpretable framework, this paper investigates the feasibility of cross-model transfer without the help of additional task data. ## hypothesis verification the combination hypothesis argues the existence of combinations of discrete prompts in fairly small neighborhoods as an alternative to continuous prompts. therefore, it should also be feasible to train combinations of discrete prompts individually for downstream tasks. the amount of loss is quantified as follows: ## cross-model transfer due to the inconsistent embedding dimensions and semantic spaces of different plms, cross-model transfer of continuous prompts is tricky. with our proposed interpretable framework that establishes connections between continuous and discrete prompts, it becomes feasible to transfer continuous prompts from source plms to target plms without extra training signals on target plms. considering a scenario to transfer continuous prompts of the source plm m a to the target plm m b , we can first get the decoupling results r using the method presented in §3.3. then the continuous prompts transferred to m b are r ⊤ e b , where e b is the discrete prompt matrix of m b . following this idea, we investigate the feasibility of cross-model transfer from bert base @xcite to bert large , roberta base and roberta large @xcite respectively in as can be seen, our method outperforms baselines in most scenarios, especially on tasks like agnews where it is tricky to construct discrete if continuous prompts are trained on larger plms and datasets, better performance will be obtained using our interpretations and is expected to be applied to areas such as model compression. ## further analysis effect of gamma. we analyze the effect of hyperparameter γ, i.e., the trade-off between prompt fidelity and downstream fidelity (eq.6). intuitively, as γ increases, the prompt fidelity decreases while the downstream fidelity goes up. when γ is 0, our method degenerates to use only prompt fidelity as the optimization objective. fig. 3 shows the results of the grid search using the interpretations described in §3. as expected, the accuracy on bert base improves as gamma increases since the interpretations are directly optimized on it. nonetheless, when γ is larger than 0.09, the performance of the interpretations for cross-model transfer decreases. as a consequence, we choose γ = 0.09 in this paper. ## conclusion in this paper, we present a novel view that interprets continuous prompts as a combination of discrete prompts. contrary to the previous perspective which attempts to discover a one-to-one mapping between continuous prompts and discrete prompts, we demonstrate the continuous prompt to be an embedding lookup table with the one-hot restriction sst-2 imdb amazon agnews p-tuning on m a 78.36 71.50 78.08 86.46 transferred model removed. detailed experiments are conducted to verify that our interpretations faithfully reflect the reasoning of source prompts with both prompt fidelity and downstream fidelity. furthermore, our interpretations exhibit promising readability and plausibility, which not only provides a tool for understanding model decisions but also offers a chance for discovering potential shortcuts contained in the prompts. finally, with the bridge between continuous prompts and discrete prompts, we analyze the feasibility of cross-model transfer for continuous prompts with the proposed method. results show that even trained on a small plm (bert base ) and 100-shot scenario, continuous prompts maintain good performance after transferring to various large plms. we hope that this work will bring a novel view for interpreting continuous prompts and encourage more research to explore the internal mechanisms of continuous prompts.