embeddings to serve as adapters assisting hard
prompts. While ROSPRcan be applied to any LM,
in this work, we use T0 (Sanh et al.,2021) as our
initial backbone LM and perform prompt tuning on
the tasks used during the instruction-tuning stage.
While adding only 0.007% additional param-
eters, ROSPRoutperforms T0 on 10 out of 11
evaluation datasets and outperforms efficient fine-
tuning baselines without any target task fine-tuning.
ROSPRis also effective for challenging tasks such
as tasks from BIG-bench (Srivastava et al.,2022),
outperforming T0 by 2.39% mean accuracy. Fur-
thermore, we provide several interesting findings:
(1) Variants of ROSPRthat include interpolation of
multiple prompt embeddings and scoring method
that considers the answer choice distribution during
retrieval further increases the effect of ROSPR(2)
Also, we provide analysis of which factors attribute
to the performance of ROSPRand show that, sim-
ilarly to the role of demonstrations in in-context
learning (Min et al.,2022), heuristic features such
as answer choice format are more important than
the similarity of the source task.
2 Related Work
2.1 Task Generalization with
Instruction-Tuning
Prompts and demonstrations are essential for task
generalization since proper explanations are re-
quired for LMs to understand an unseen task (Ko-
jima et al.,2022;Wei et al.,2022;Lampinen et al.,
2022). Instruction-tuning, which is explicit multi-
task prompted training on various downstream
tasks, is a simple but effective way to achieve
this, resulting in improved zero-shot capabilities.
Zhong et al. (2021) first introduced the method
of instruction-tuning by converting various tasks
into a question-answering format and finetuning
the model on the aggregated dataset. Following
works (Mishra et al.,2022;Min et al.,2021;Sanh
et al.,2021;Wei et al.,2021;Wang et al.,2022b;
Xu et al.,2022;Ouyang et al.,2022;Ye et al.,2022;
Chung et al.,2022) extended this approach on a
larger scale and show that zero-shot task generaliza-
tion could be enhanced with more diverse prompts,
a larger number of training downstream tasks, and
a larger LM.
2.2 Source Task Retrieval
Retrieving a source task that is relevant to the target
task has shown to result in faster and better task
adaptation. For parameter-efficient fine-tuning, Vu
et al. (2022); Su et al. (2022) retrieve source prompt
embedding that is similar to the target prompt em-
bedding and obtain a better initialization point for
prompt tuning. Instead of utilizing a single prompt
embedding, recent works show a mixture of multi-
ple prompt embeddings to be effective (Asai et al.,
2022;Qin and Eisner,2021).
For instruction-tuning, Lin et al. (2022) retrieve
training instances that are similar to the query
through a dense retriever and fine-tune the model
using the retrieved examples. For in-context learn-
ing, Rubin et al. (2021); Liu et al. (2022b); Wang
et al. (2023) retrieve training data that could be
used for demonstrations. Wang et al. (2022c) show
the effect of retrieving prompt embeddings in a
continual learning setting. Although our proposed
method is related to these works, the novelty of
our work lies in applying source task retrieval in
the zero-shot setting and retrieving soft prompts
instead of training instances.
3 Method
In this section, we introduce Retrieval of Prompt
Tuning (ROSPR) for zero-shot task generalization.
A detailed overview is shown in Figure 2. We first
train source prompt embeddings of LM for each
hard prompt given a source task using prompt tun-
ing (Section 3.1). Then, we save training instance
samples along with their prompt embeddings in the
Source Prompt Library and use it to retrieve embed-
dings at inference to perform tasks in a zero-shot
manner (Section 3.2). We additionally introduce in-
terpolation of multiple source prompt embeddings
(Section 3.3) and variance-based ranking (Section
3.4) to increase robustness and accuracy.
3.1 Training Source Prompt Embeddings
Even though ROSPRmay be used to augment any
type of LM, we use T0 (Sanh et al.,2021) as the
backbone LM for this paper. For training of soft
prompts, we utilize the source tasks and prompts
used for the instruction-tuning phase of T0. While
T0 was trained in a multi-task learning manner, we
freeze the initial T0 parameters and train only soft
prompts (source prompt embeddings) for each hard
prompt of the source task.
Prompt Tuning Among various parameter-
efficient fine-tuning methods, we follow prompt
tuning proposed by Lester et al. (2021) because the
number of trainable parameters is extremely small