DIFFERENTIABLE PROMPT MAKES PRE-TRAINED LANGUAGE MODELS BETTER FEW-SHOT LEARNERS
Year: 2022

Abstract:
Large-scale pre-trained language models have contributed significantly to natural language processing by demonstrating remarkable abilities as few-shot learners. However, their effectiveness depends mainly on scaling the model parameters and prompt design, hindering their implementation in most real-world applications. This study proposes a novel pluggable, extensible, and efficient approach named DifferentiAble pRompT (DART), which can convert small language models into better few-shot learners. The main principle behind this approach involves reformulating potential natural language processing tasks into the task of a pre-trained language model and differentially optimizing the prompt template as well as the target label with backpropagation. Furthermore, the proposed approach can be: (i) Plugged to any pre-trained language models; (ii) Extended to widespread classification tasks. A comprehensive evaluation of standard NLP tasks demonstrates that the proposed approach achieves a better few-shot performance1.

heading: 1 INTRODUCTION
text: The pre-train—fine-tune paradigm has become the de facto standard for natural language processing (NLP), and has achieved excellent results in several benchmarks (Devlin et al., 2019; Liu et al., 2019; Lewis et al., 2020; Dong et al., 2019; Bao et al., 2020a). The success of these pioneers seems to suggest that large-scale pre-trained models are always nothing short of a panacea for boosting machine intelligence. However, supervised fine-tuning is still prone to labeled data in practice and faces unignorable challenges owing to the variations of domains, language, and tasks. These drawbacks lead to the research of an important technique, few-shot learning, which can significantly improve the learning capabilities of machine intelligence and practical adaptive applications by accessing only a small number of labeled examples.
The GPT-3 model, introduced by Brown et al. (2020), exhibits impressive few-shot learning capabilities. Given a natural language prompt and 16 labeled samples as demonstrations in the contextual input, GPT-3 achieves 80% of the SOTA results. However, GPT-3 is a fully dense transformer model with 175B parameters, which makes it challenging to deploy in most real-world applications.
Recently, an emerging fine-tuning methodology has arisen to equip smaller language models (LMs) with few-shot capabilities: adapting the pre-trained LM directly as a predictor through completion of a cloze task (Schick & Schütze (2021; 2020); Gao et al. (2020); Liu et al. (2021c)), which treats the downstream task as a (masked) language modeling problem. These prompts can be used in finetuning to provide the classifier with additional task information, especially in the low-data regime. ∗Equal contribution and shared co-first authorship. †Corresponding author. 1Code is available in https://github.com/zjunlp/DART.
Notably, Scao & Rush (2021) observe that prompting can often compensate for hundreds of data points on average across multiple classification tasks. However, determining the appropriate prompts requires domain expertise, and handcrafting a high-performing prompt often requires impractically large validation sets (Perez et al. (2021)). Recent studies (Lu et al. (2021); Zhao et al. (2021)) have reported that the manual prompt format can be sub-optimal, which would result in the accuracy varying from random guess performance to near the state-of-the-art. Therefore, previous approaches have attempted to search for discrete prompt tokens automatically. However, it is non-trivial for widespread classification tasks to obtain an optimized prompt template and target label token. For example, specific classification tasks such as relation extraction with the label of alternate name and country o f birth cannot specify a single label token in the vocabulary.
In this paper, we propose a novel DifferentiAble pRompT (DART) fine-tuning approach, which is model-agnostic, parameter-efficient. As illustrated in Figure 1, the key idea is to leverage a few parameters (unused tokens) in the language model, which serve as the template and label tokens, and to optimize them in the continuous space using backpropagation. Subsequently, we introduce differentiable prompt learning to obtain optimized prompt templates as well as labels. Since fine-tuning with limited samples can be affected by instability (Dodge et al. (2020); Zhang et al. (2021)), we propose an optimization algorithm to jointly learning templates as well as labels. We further introduce an auxiliary fluency constraint object to ensure the association among the prompt embeddings.
We conduct extensive experiments on 15 NLP datasets. With only a few training samples across all the tasks, our approach (DART) can obtain a better performance. Notably, absolute performance improvement of up to 23.28%, over the conventional fine-tuning, is obtained on average in the setting of K = 8 (and 1.55% for fully supervised settings) on relation extraction datasets with complex label semantics. Our approach can be applied to real-world classification tasks without the high cost of collecting and annotating a large amount of data. The main contributions of this study are as follows:
• We propose a new simple framework for few-shot learning, which is pluggable, extensible, and efficient. To the best of our knowledge, optimizing label tokens in continuous space is also a new branch of research that has not been explored in language model prompting.
• A systematic evaluation of 15 NLP tasks shows that the simple-yet-effective method contributes towards improvements across all these tasks. Remarkably, given only 8 labeled samples per class, our proposed approach can achieve 90% performance of the SOTA results (full dataset).

heading: 2 RELATED WORK
text: Language Model Prompting. The language model prompting has emerged with the introduction of GPT-3 (Brown et al. (2020)), which demonstrates excellent few-shot performance (Liu et al. (2021b)). However, GPT-3 is not designed for fine-tuning; it mainly relies on the handcraft prompt (in-context learning (Liu et al. (2021a); Zhao et al. (2021); Ding et al. (2021); Min et al. (2021))). Thus, recent studies (Qin & Eisner (2021); Hambardzumyan et al. (2021); Chen et al. (2021)) conducted in this field have been focused on automatically searching the prompts. Schick & Schütze (2021; 2020) propose the PET, which reformulates the NLP tasks as cloze-style questions and performs gradient-based fine-tuning. Tam et al. (2021) improve the PET with a denser supervision object during fine-tuning. Shin et al. (2020) propose the AUTOPROMPT to create prompts for a diverse set of tasks based on a gradient-guided search. Han et al. (2021) propose an approach called PTR, which leverages logic rules to construct prompts with sub-prompts for many-class text classification. Wang et al. (2021) reformulate potential NLP task into an entailment one, and then fine-tune the model with few-shot samples. Hu et al. (2021) propose an approach to incorporate external knowledge graph into the verbalizer with calibration. Additionally, Gao et al. (2020) present LM-BFF—better few-shot fine-tuning of language models, which leverages T5 (Raffel et al. (2020)) to generate templates and search label tokens in the vocabulary. However, the utilization of the generative model and the label search with validation is computation-intensive. Moreover, the prompt search over discrete space is sub-optimal due to the continuous nature of neural networks.
To overcome these limitations, Liu et al. (2021c) propose P-tuning, which employs trainable continuous prompt embeddings learned by an LSTM. Zhong et al. (2021) propose an effective continuous method called OPTIPROMPT to optimize prompts for factual probing. Liu et al. (2021c) propose prefix-tuning, which keeps language model parameters frozen but optimizes a small continuous taskspecific vector for natural language generation tasks. Lester et al. (2021) propose a mechanism for learning “soft prompts” to condition frozen language models to perform downstream tasks. However, these approaches still have to optimize the external parameters (e.g., LSTM in P-tuning) and are prone to complex label space.
Conversely, this study aims to develop a novel few-shot learning framework based on pre-trained language models which can reduce the prompt engineering (including templates and labels) and external parameter optimization. Furthermore, the proposed approach only leverages the noninvasive modification of the model, which can be plugged into any pre-trained language model and extended to the widespread classification task.
Few-shot Learning. Few-shot learning can significantly improve the learning capabilities for machine intelligence and practical adaptive applications by accessing only a small number of labeled examples (Zhang et al. (2020)). The proposed approach corresponds to the other few-shot NLP methods, including: (1) Meta-learning (Yu et al. (2018); Bao et al. (2020b); Bansal et al. (2020); Deng et al. (2020b;a); Yu et al. (2020)), in which the quantities of the auxiliary tasks are optimized. (2) Intermediate training (Phang et al. (2018); Yin et al. (2020)), which supplements the pre-trained LMs with further training on the data-rich supervised tasks. (3) Semi-supervised learning (Miyato et al. (2017); Xie et al. (2020)), which leverages unlabeled samples. The proposed approach focuses on a more realistic few-shot setting (the number of labeled instances per class can be any variable).

heading: 3 BACKGROUND
text: Let Xin = {x1,x2, ...,xL} be a sentence, where xi is the ith token in the input sentence and L is the number of tokens. Specifically, Xin is converted to a fixed token sequence X̃in and then mapped to a sequence of hidden vectors {hk ∈ Rd}. Given the input sequence, X̃in = [CLS]Xin[SEP], the conventional fine-tuning approaches leverage a generic head layer over [CLS] embeddings (e.g., an MLP layer) to predict an output class. For the prompt-based method, a task-specific pattern string
(template T ) is designed to coax the model into producing a textual output corresponding to a given class (label token M (Y ))—we refer to these two things together as a prompt. Specifically, Xprompt containing one [MASK] token is directly tasked with the MLM input as:
Xprompt = [CLS]Xin [SEP]T [SEP] (1)
When the prompt is fed into the MLM, the model can obtain the probability distribution p([MASK]|(Xprompt) of the candidate class, y ∈ Y as:
p(y|Xprompt) = ∑ w∈Vy p([MASK]= w|Xprompt) (2)
where w represents the wth label token of class y.

heading: 4 OUR APPROACH

heading: 4.1 MOTIVATION
text: It can be observed from the previous empirical findings (Gao et al. (2020); Scao & Rush (2021)) that an optimal prompt is necessary for the improvement of the pre-trained language models for the few-shot learners. Since templates with discrete tokens may be sub-optimal and are insufficient to represent a specific class2, this study proposes DifferentiAble pRompT, referred to as DART, which can reduce the requirement of prompt engineering in order to improve the applicability of the proposed method in various domains.

heading: 4.2 DIFFERENTIABLE TEMPLATE OPTIMIZATION
text: Since the language tokens are discrete variables, finding the optimal prompts with token searching is non-trivial and may easily fall into the local minima. To overcome these limitations, we utilize pseudo tokens to construct templates and then optimize them with backpropagation. Specifically, given the template, T = {[T0:i],[MASK], [Ti+1: j]}, which varies from the traditional discrete prompts, satisfying [Ti] ∈V and map T into:
{w([T0:i]),w([MASK]),w([Ti+1:m])} (3)
DART considers [Ti] as pseudo tokens and maps the template as follows:
{h0, ...,hi,w([MASK]),hi+1, ...,hm} (4)
where hi(0 ≤ i ≤ j) are trainable parameters. Differentiable template optimization can obtain expressive templates beyond the original vocabulary V . Lastly, the templates, hi, are differentially optimized by:
ĥ0:m = argmin h L (Xprompt,y) (5)
Note that the values of the prompt embeddings, hi, must be co-dependent with each other rather than independent. Unlike P-tuning (Liu et al. (2021c)), which utilizes a bidirectional LSTM, DART leverages an auxiliary fluency constraint objective to associate the prompt embeddings with each other, thus stimulating the model to focus on context representation learning.

heading: 4.3 DIFFERENTIABLE LABEL OPTIMIZATION
text: Prompt-based fine-tuning requires filling in one word, and the masked word prediction is mapped to a verbalizer, which produces a class (i.e., ”Yes”: True. ”No”: False). For each class c ∈ Y , the
2It is non-trivial to evaluate all options of templates and label tokens.
previous approaches such as LM-BFF (Gao et al. (2020)) estimate the conditional likelihood of the initial L on a pruned set V c ⊂V of the top k vocabulary words. However, the brute-forcing label searching: (1) is computationally intensive and tedious because the Ddev is generally very large, requiring multiple rounds of evaluation. (2) has poor scalability with an increase in the class numbers (many classification datasets have more than 100 classes), the number of searches may be kC (C represents the total number of classes), which is exponential and thus intractable. Additionally, the labels of classes contain rich, complex semantic knowledge, and one discrete token may be insufficient to represent this information.
Specifically, with the labels, Y = {Y1,Y2, ..,Ym}, different from the previous approach which converts the class type Yi into a variable number of label tokens {...,v1,..,vk,...}, DART maps the Yj to a continuous vocabulary space as follows:
M (Yj) = {hm+ j}, (6)
where m is the number of trainable embedding in template. To avoid optimizing any external parameters, {h1, ...,hm, ..,hm+n} is replaced with unused tokens (e.g., [unused1] or special tokens in vocabulary) in V to generate V ′, as shown in Figure 1.

heading: 4.4 TRAINING OBJECTIVES
text: Since the pseudo tokens in the prompt template must be co-dependent with each other, we introduce an auxiliary fluency constraint training without optimizing any other parameters inspired by Liu et al. (2021c); Tam et al. (2021). Overall, there are two objectives: the class discrimination objective LC and the fluency constraint objective LF .
Class Discrimination Object The class discrimination objective is the main objective that aims to classify the sentences. As shown in Figure 1, given (Xin,T ), we can generate Xprompt as:
LC = CE(g(y|Xprompt)). (7)
where CE is the cross-entropy loss function, LC represents the class discrimination loss.
Fluency Constraint Object To ensure the association among the template tokens and to maintain the ability of language understanding inherited from the PLMs, we leverage a fluency constraint object with the MLM. As shown in Figure 1, one token in the input sentence is randomly masked, and the masked language prediction is conducted. x and x′ are the original and masked sequences, respectively. Let xm be the target token that has been masked out in x′, and g(xm|x′,y) is maximized as follows3:
h(xm|x′,y) = exp([[ f (x ′,y)]]xm)
∑ v′∈V ′
exp([[ f (x′,y)]]v′) (8)
LF = ∑ m∈M
BCE(h(xm|x′,y)). (9)
By optimizing LF , the language model can obtain a better contextual representation with a rich association among the template tokens. We have the following training object:
L = LC +λLF , (10)
where λ is the hyper-parameter. Lastly, we introduce the overall optimization procedure of DART. To mitigate the instability of the few-shot fine-tuning, we jointly optimize templates and labels. Note that our approach can reuse the same transformer architecture (rather than additional LSTM) so that it enjoys the beauty of simplicity for prompt-tuning.
3We use the golden label y rather than the [MASK] in the input of the fluency constraint object.

heading: 5 EXPERIMENTS
text: In this section, we detail the comprehensive experimental results conducted on classification tasks. The promising results demonstrate that our proposed DART substantially outperforms the conventional fine-tuning method, thus, making pre-trained language models better few-shot learners.

heading: 5.1 DATASET STATISTICS
text: We conduct a comprehensive study across 15 NLP tasks, which covers sentiment analysis, natural language inference, paraphrases, sentence similarity, relation extraction, and event extraction (We only report event argument extraction performance). The evaluation consisted of 10 popular sentence classification datasets (SST-2, MR, CR, Subj, TREC, MNLI, SNLI, QNLI, MRPC, QQP).To further evaluate the effectiveness of the proposed approach with complex label space, we conduct experiments on the relation extraction and event extraction datasets, including SemEval-2010 Task 8 (Hendrickx et al., 2010), TACRED-Revisit (Alt et al. (2020)), Wiki804 (Han et al., 2019), ChemProt (Kringelum et al., 2016), and ACE-20055.

heading: 5.2 SETTINGS
text: The proposed model is implemented using Pytorch (Paszke et al. (2019)). Our experiments are conducted with the same setting following LM-BFF ( Gao et al. (2020)), which measures the average performance with a fixed set of seeds, Sseed, across five different sampled Dtrain for each task. We utilize a grid search over multiple hyperparameters and select the best result as measured on Ddev for each set {D strain,Ddev},s ∈ Sseed. We employ AdamW as the optimizer. We conduct experiments with a RoBERTa-large (Liu et al. (2019)) on classification tasks for a fair comparison with LM-BFF. We leverage an uncased BERT-large (Devlin et al. (2019)) for relation extraction datasets, except that we use SCIBERT (Beltagy et al. (2019)) for the ChemProt dataset. We follow Soares et al. (2019) and use special entity markers uniformly to highlight the entity mentions for relation extraction.
4https://github.com/thunlp/OpenNRE/ 5https://catalog.ldc.upenn.edu/LDC2006T06

heading: 5.3 MAIN RESULTS
text: As shown in Table 1, we observe that our approach obtains better performance than conventional fine-tuning and achieves comparable results with LM-BFF. Note that DART can reduce the prompt engineering without external models (e.g., T5 in LM-BFF) to generate templates that are readily easy to adapt to other datasets. DART can obtain 11.3% improvement with only 16 training samples per class on the MR dataset, comparable with LM-BFF, which leverages T5 to generate appropriate prompts. These results indicate that DART can better stimulate potential ability and makes the pretrained language model a better few-shot learner. We also notice that DART yields better performance than P-tuning, which indicates that label optimization is beneficial.
For the classification tasks with the complex label space, as shown in Table 2 and Figure 2(a), we observe that DART outperforms the conventional fine-tuning approach as well as LM-BFF with a large margin on relation extraction and event extraction datasets in both the few-shot and fully supervised settings. The proposed approach achieves an improvement of 2.8% of the absolute performance on the TACRED-Revisit dataset with full supervision and yields 18.4% gains with only 8 training samples per class. These findings also indicate that more relevant templates and labels can be determined without expert intervention, making it possible to generalize the proposed approach to other domains. We attribute the significant improvements to the fact that, unlike the GLUE datasets containing small categories, in relation extraction and event extraction tasks, the datasets consist of a large number of classes with complex label space, making it more challenging to obtain suitable label tokens. Furthermore, we notice that the improvement decays slowly when K becomes larger (i.e., from 8 to 32). Our approach is a simple yet effective fine-tuning paradigm that can reduce prompt engineering within the complex label space, thus, making it possible to be an appropriate plug-in for some SOTA models.

heading: 5.4 ABLATION STUDY
text: We conduct an ablation study to validate the effectiveness of the components in the proposed approach. We observe that DART exhibits a performance decay in the absence of any one of the modules, i.e.,
fluency constraint object, differentiable template, or differentiable label, demonstrating that all the modules are advantageous. Furthermore, we notice that differentiable label optimization is more sensitive to performance and is highly beneficial for DART, especially for low-resource settings. Since the proposed approach is the first approach that utilizes the differentiable label optimization, these findings illustrate that a suitable label token is important.

heading: 5.5 ANALYSIS AND DISCUSSION

heading: CAN DART BE APPLIED TO OTHER PRE-TRAINED LMS?
text: To evaluate whether the proposed approach can be applied to other LMs, we conduct experiments using GPT-2-medium6 . From Figure 2(b), we observe that DART with GPT-2-medium yields better performance than the conventional fine-tuning approach. Furthermore, we notice that DART with GPT-2-medium can achieve performance on par with BERT-large, as observed by Liu et al. (2021c), indicating that the potential of GPT-style architectures for natural language understanding has been underestimated.

heading: WHY DO DIFFERENTIABLE PROMPTS YIELD BETTER PERFORMANCE?
text: To further analyze why our differentiable prompts method yields better performance compared with prompts with fixed templates and label tokens, we visualize the representation of masked tokens in the CR dataset during different training steps (from left to right) as shown in Figure 3 (fixed) and 4 (differentiable), respectively. While both methods learn separable hidden states, differentiable prompts’ representation is relatively more compact while the representation generated from fixed prompts is more scattered. This observation of differentiable prompts generating more discriminative representations than the fixed prompts method is supported by an indicator RD, the ratio between average intra-class and average inter-class distance. We believe the main reason behind its better performance lies in the more discriminative representation of the differentiable method. More details can be found in Appendix A.6.

heading: WHAT EXACTLY IS OPTIMIZED PROMPT?
text: Since prompt templates and label tokens in the proposed approach are mapped as {h1, ...,hm, ..,hm+n}, we further analyze what exactly optimized label learned. We conduct a nearest-neighbor vocabulary embedding search to project the Top-3 optimized pseudo-label tokens in V to a readable natural
6We do not utilize the fluency constraint object in GPT-2-medium since the model is not pre-trained with MLM objective.
language.We use t-SNE (Van der Maaten & Hinton (2008)) with normalization to visualize labels on Wiki80 dataset. For example, “military branch” refers to as red ? in Figure 5 represents the relation type, which is learned by optimizing the pseudo label in the continuous space, and the “volunteered”, “corporal” and “buddies”, refers to as • are the tokens closest to the label. This finding indicates that the differentiable method generates better semantic representation.
DART V.S. CONVENTIONAL FINE-TUNING
The ability of DART to perform few-shot learning can be attributed to the label and being a true language understanding task, that once the model is capable of performing it correctly, it can easily apply this knowledge to other tasks that are framed as such. Superficially, (i) DART does not optimize any new parameters; however, conventional fine-tuning should learn an explicit classifier head over [CLS] embeddings, which may fail in the low-data regime. (ii) DART has the same task setting as large-scale language model pre-training.

heading: 6 CONCLUSION AND FUTURE WORK
text: This paper presents DART, a simple yet effective finetuning approach that improves the fast-shot learning pretrained language model. The proposed approach can produce satisfactory improvements in the few-shot scenarios when compared to the conventional finetuning approaches. The proposed method is also pluggable for other language models (e.g., BART) and can be extended to other tasks, such as intent detection and sentiment analysis. Intuitively, the results obtained in this study can be used to stimulate future research directions in the few-shot or lifelong learning for NLP.

heading: ACKNOWLEDGMENTS
text: We want to express gratitude to the anonymous reviewers for their hard work and kind comments. This work is funded by National Key R&D Program of China (Funding No.SQ2018YFC000004), NSFCU19B2027/NSFC91846204, Zhejiang Provincial Natural Science Foundation of China (No. LGG22F030011), Ningbo Natural Science Foundation (2021J190), and Yongjiang Talent Introduction Programme.

heading: REPRODUCIBILITY STATEMENT
text: Our code is available in https://github.com/zjunlp/DART for reproducibility. Hyperparameters are provided in the Appendix A.1.

heading: A APPENDIX
text: Our code is available in the supplementary materials for reproducibility. This section contains details about the training procedures and hyperparameters for each of the datasets. We utilize Pytorch (Paszke et al., 2019) to conduct experiments with 1 Nvidia 3090 GPUs. All optimizations are performed with the AdamW optimizer with a linear warmup of learning rate over the first 10% of gradient updates to a maximum value, then linear decay over the remainder of the training. Gradients are clipped if their norm exceeds 1.0, and weight decay on all non-bias parameters is set to 0.01. Early stopping is adopted to reduce over-fitting on the training set.
We follow LM-BFF (Gao et al., 2020) to measure the average performance of models trained on 5 different randomly sampled Dtrain and Ddev splits, and perform grid search for optimal hyper-parameter combinations on each split, including learning-rate, weight decay, and batch size.
For P-tuning (Liu et al., 2021c), due to the limit of search space, we do not set anchor tokens in prompt tokens.
For DART, we adopt joint optimization to acquire optimal prompts and fine-tune over global parameters. Note that we use base prompts as templates of pseudo tokens to accelerate convergence.
To compare fairly, we use RoBERTa-large (Liu et al., 2019) as pre-trained model for both DART and P-tuning framework, following LM-BFF (Gao et al., 2020). We also adopt the best discrete prompts together with label words in LM-BFF as base prompt settings for each framework, as stated below.

heading: A.1 HYPER-PARAMETER SEARCH SPACE OF OUR METHOD IN GRID SEARCH

heading: SST-2, MR, CR, Subj, TREC, QNLI, MRPC, QQP
text: The hyper-parameter search space is (the optimal set of parameters may vary across different tasks and data splits):
• learning rate [1e-5, 5e-5, 1e-4, 2e-4] • weight decay [0.0, 0.01, 0.05, 0.10] • number epochs [20,30] • batch size: [4, 8, 16, 24, 32] • max seq length: 128 • gradient accumulation steps: [1, 2]

heading: MNLI, SNLI
text: The hyper-parameter search space is (the optimal set of parameters may vary across different tasks and data splits):
• learning rate [1e-5, 5e-5, 1e-4, 2e-4] • weight decay [0.0, 0.01, 0.05, 0.10] • number epochs [30,40] • batch size: [4, 8, 16] • max seq length: 256 • gradient accumulation steps: [1, 2]

heading: TACRED-Revisit, WiKi80, SemEval
text: The hyper-parameter search space are:
• learning rate [3e-5,5e-5,1e-5,5e-6] • number epochs [20,30] • batch size: 48 • max seq length: 128 • gradient accumulation steps: 2

heading: ChemProt
text: The hyper-parameter search space are:
• learning rate [3e-5,5e-5,1e-5,5e-6] • number epochs [20,30] • batch size: 48 • max seq length: 256 • gradient accumulation steps: 4

heading: DialogRE
text: The hyper-parameter search space is (the optimal set of parameters may vary across different tasks and data splits):
• learning rate [1e-5, 5e-5, 1e-4, 2e-4]

heading: Model Accuracy

heading: A.3 TEMPLATE LENGTH ANALYSIS

heading: TACRED-Revisit, WiKi80, SemEval,DialogRE

heading: MRPC, QQP

heading: QNLI

heading: MNLI, SNLI

heading: TREC

heading: Subj

heading: SST-2, MR, CR

heading: A.2 BASE PROMPT AND LABEL WORDS
text: We define the length of a template as the number of tokens except for input sentence and <mask> token, and apply DART on templates with different length. The performance of a specific template length l is derived by summarizing the averaging accuracy on each few-shot data splits, using template T = t1, t2, ..., tl . From the Table 4, we observe that for the SST-2 task, the model whose template length is three yield best performance; however, the overall impact of template length is rather insignificant as models with different template length obtain relatively similar performance.

heading: A.4 PERFORMANCE ON FULL TRAINING SET
text: We conduct experiments and report the performance of DART with full-sized training data of GLUE tasks. From Table 5, we notice that DART obtain better or comparable results compared with the standard fine-tuning and LM-BFF, indicating that prompt-based tuning methods benefit less from full-sized data.

heading: Label tokens Accuracy

heading: A.5 PERFORMANCE WITH CONSTRAINED LABEL TOKENS

heading: A.6 MORE EXPERIMENTS
text: We numeralize our observation on representation of masked token with a ratio between the average intra-class distance and average inter-class distance of hidden state vectors as RD = D̄intraD̄inter , where:
D̄intra = 1 C
C
∑ c=1 D̄intra(c) = 1 C
C
∑ c=1 1 Nc
Nc ∑ i=1 Nc ∑ j=1 distance(Hc[i],Hc[ j]) ;
D̄inter = 1
C(C−1)
C
∑ c1=1 ∑ c2 6=c1
D̄inter(c1,c2) = 1
C(C−1)
C
∑ c1=1 ∑ c2 6=c1
Nc1 ∑ i=1 Nc2 ∑ j=1 distance(Hc1 [i],Hc2 [ j]) ;
(11)
where distance is the euclidean metric between two vectors, and Hc[i] means the hidden state representation of masked token of i-th sample from class c. For discriminative representation, its average intra-class distance is low as data points within the same class tend to gather together, and its average inter-class distance is high as data points from different classes are separated, so its RD ratio should be close to 0.
As is shown in Figure 6, the RD ratio of the differentiable method grows lower than that of the fixed label method, which shows the hidden state representation trained in the differentiable method has better linear separability.
Note that in a masked language model, a linear transformation is performed on the hidden state representations, with a linear decoder sharing weights with the model’s word embeddings serving as the final token classifier. Hence it is evident that better linear separability of the representations leads to better performance. In our case, the differentiable method yields better performance due to its better linear separability.

heading: A.7 LIMITATIONS
text: Our work may fail when the distribution of the task corpus varies from that of the pre-training corpus. For example, a general pre-trained language model may be fine-tuned with more training instances in a specific domain (e.g., medical domain). This issue can be addressed by intermediate training (Phang et al., 2018; Yin et al., 2020; Zhao et al., 2021), and will be analyzed in the future work. Besides, our work also shows an instability associated with hyper-parameters which is also observed by Dodge et al. (2020); Zhang et al. (2021); Perez et al. (2021) as volatility of few-shot learning
in NLP. Overall, however, we believe our work will inspire future work to few-shot settings with more practical applications to low-data settings, e.g., that involve low-resource languages or expert annotation.

heading: A.8 BROADER IMPACT
text: The pre-train-fine-tune approach has become the standard for natural language processing (NLP). However, supervised fine-tuning is still practically affected by labeled data. This study proposes a novel pluggable, extensible, and efficient approach named DifferntiAble pRompT (DART), which can convert small language models into better few-shot learners. We believe that our study makes a significant contribution to the literature because determining the appropriate prompts requires domain expertise, and handcrafting a high-performing prompt often requires impractically large validation sets, and these issues have been overcome with the use of the proposed method, which is model-agnostic, parameter-efficient. We experimentally verified our proposed approach on 13 standard NLP tasks, and it was seen to outperform several standard NLP platforms.

Review summaries:
This work reduces the need for prompt engineering for few-shot tasks by optimizing only the word-embeddings of unused tokens in the LLM. Results on multiple datasets showed reasonable results which IMO seems worth sharing to the broader audience. The exploration on what exactly are learned in the prompt was also interesting.

This paper proposes a new soft prompt tuning method called DART. The authors claim that training label representations for prompt tuning is important. With trainable label representations as well as prompt ones, auxiliary training task called fluency constraint object. Without the addition of a task-specific architecture, DART outperforms previous state-of-the-art prompt tuning in few-shot performance on 9/14 NLP tasks.

The paper proposes a new approach called DART (Differentiable Prompt) which can perform few-shot fine-tuning without any prompt engineering (main difference w.r.t. previous works). This is achieved by optimizing the prompt template and the target label with backpropagation. Since the proposed approach doesn’t use any extra parameters, it can be easily used for any pre-trained language models. Further, the empirical evaluations suggest that it does better few-shot learning than previous works.