Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Tasks

Yizhong Wang, Swaroop Mishra, Pegah Alipoormolabashi, Yeganeh Kordi, Amirreza Mirzaei, Anjana Arunkumar, Arjun Ashok, Arut Selvan Dhanasekaran, Atharva Naik, David Stap, Eshaan Pathak, Giannis Karamanolakis, Haizhi Gary Lai, Ishan Purohit, Ishani Mondal, Jacob Anderson, Kirby Kuznia, Krima Doshi, Maitreya Patel, Kuntal Kumar Pal, Mehrad Moradshahi, Mihir Parmar, Mirali Purohit, Neeraj Varshney, Phani Rohitha Kaza, Pulkit Verma, Ravsehaj Singh Puri, Rushang Karia, Shailaja Keyur Sampat, Savan Doshi, Siddhartha Mishra, Sujan Reddy, Sumanta Patro, Tanay Dixit, Xudong Shen, Chitta Baral, Yejin Choi, Noah A. Smith, Hannaneh Hajishirzi, Daniel Khashabi

Introduction

The NLP community has witnessed great progress in building models for generalization to unseen tasks via in-context instructions Mishra et al. (2022b); Sanh et al. (2022); Wei et al. (2022) using large pretrained language models Raffel et al. (2020); Brown et al. (2020). As remarkable as models like InstructGPT Ouyang et al. (2022) are, the contribution of various design choices to their success is opaque. In particular, the role of supervised data has remained understudied due to limited data released by the corporate entities behind major models. In addition, it is nearly impossible for the research community to extend and re-train these gigantic models. Addressing these two challenges necessitates the availability of large-scale public benchmarks of a broad range of NLP tasks and their instructions to facilitate developing and evaluating models that can generalize to unseen tasks.

In this paper, we construct a meta-dataset (i.e., dataset of datasets; Triantafillou et al., 2019) that consists of a wide variety of NLP tasks with their instructions, and train a model that can perform a new task given the instruction, outperforming InstructGPT (which uses 16×16\times more parameters).

Our dataset, Super-NaturalInstructions (Sup-NatInst for short), is a large benchmark of 1,616 NLP tasks and their natural language instructions. It brings in a diverse variety of tasks—76 broad task types spanning 55 different languages. Each task is paired up with an instruction that consists of the task definition for mapping an input text to a task output and several examples for demonstrating the desired or undesired output (see Fig.1 as an example task). These tasks and their instructions are contributed by 88 NLP practitioners, in response to our public call. These contributions are consolidated after several rounds of peer-review and crowdsourced feedback to ensure quality. Having this diverse and large-scale data enables us to carefully split the tasks into training and test sets and systematically study how state-of-the-art methods perform on them. Table 1 and Figure 2 highlight properties of Sup-NatInst compared to relevant benchmarks, emphasizing the diversity of tasks and instruction types in our benchmark.

Our model, Tkk-Instruct, is a generative model for transforming task inputs given declarative in-context instructions (task definition or kk-shot examples). It is built by multi-task training of the T5 model Raffel et al. (2020) over all the task instructions in our training set, and is evaluated on unseen tasks in the test set. Interestingly, an 11B-parameter Tkk-Instruct can outperform the 175B-parameter InstructGPT model by 9.9 ROUGE-L points when evaluated on 119 unseen English tasks, and the multilingual variant mTkk-Instruct outperforms InstructGPT by 13.3 points on 35 non-English tasks (§6.1). According to human evaluation, Tkk-Instruct generates responses at least as well as the ground truth for 77% of the testing instances (§6.2), confirming its strong generalization to unseen tasks.

The compelling empirical performance of Tkk-Instruct confirms the importance of super-sized meta datasets such as our Sup-NatInst to facilitate research towards generalizable NLP models. We conduct extensive analysis to understand the important factors for this generalization (§7). Our analysis shows that scaling up the diversity of training tasks and the model size are both important for strong generalization to unseen tasks. Finally, we estimate performance upper bounds, suggesting further room for improvement.

Related Work

Language instructions are a versatile way of defining goals, which is why they have been studied in the context of a variety of applications, such as instructions in grounded environments Shridhar et al. (2020); Stepputtis et al. (2020); Min et al. (2022b); Weir et al. (2022) and database commands Kim et al. (2020). Here, we focus on applications of instructions for general NLP tasks.

Recent literature has been motivated by building models that are generalizable across a variety of NLP tasks, when prompted with either a few examples Ye and Ren (2021); Bragg et al. (2021) or language definitions Efrat and Levy (2020); Weller et al. (2020); Zhong et al. (2021); Mishra et al. (2022b, a); Parmar et al. (2022). Our work is related to the existing benchmarks in this line of work, as delineated in Table 1 along various dimensions. Our benchmark extends NatInst Mishra et al. (2022b) with 26×\times more tasks and greater variety of task types (Fig. 2). While CrossFit Ye et al. (2021) focuses on benchmarking with a few in-context examples, our benchmark also offers task instructions.

Concurrent to our work, PromptSource Bach et al. (2022) is another benchmark of tasks and their language instructions (prompts). An important distinction between this benchmark and ours is the phrasing of the task definitions: while PromptSource task definitions are relatively concise, our task definitions are collected with the intention of providing a complete definition of each task and therefore are longer (24 tokens vs. 56 tokens on average; Table 1). More recently, BigBench Srivastava et al. (2022) introduces a collection of 204 tasks and also provides short task descriptions and input prefixes that can be used for prompting LMs. With little overlap to our collection of tasks, they focus more on finding challenging tasks that can be used to test different behaviors of current LMs. Nevertheless, we believe that all these efforts in collecting different tasks as well as the task instructions are complementary, and the community will benefit from considering different benchmarks. Finally, the well-adopted InstructGPT model Ouyang et al. (2022) is partially enabled by a large dataset of prompts that are collected via various synthetic data augmentation which, unfortunately, is not publicly available.

Beyond cross-task generalization, our benchmark can also be used to study multi-task learning more broadly, which is a longstanding goal for AI Caruana (1997). Traditionally, this literature focuses on setups that involve evaluation on tasks that are observed during training Collobert and Weston (2008); Hashimoto et al. (2017). More recent studies show promise that large-scale multi-task learning can enable strong generalization to similar tasks via unified encoding Khashabi et al. (2020); Xie et al. (2022) or better finetuning results on downstream tasks McCann et al. (2018); Aribandi et al. (2022). Our proposed benchmark provides diverse tasks for studying multi-tasking at a massive scale.

Super-NaturalInstructions

Super-NaturalInstructions is a meta-dataset Triantafillou et al. (2019) consisting of a variety of NLP tasks (see Fig. 2(a)) and instructions that describe them in plain language.

Instruction schema. All task instructions follow the same uniform schema (see Fig. 1) which is composed of the following parts:

Definition defines a given task in natural language. This is a complete definition of how an input text (e.g., a sentence or a document) is expected to be mapped to an output text.

Positive Examples are samples of inputs and their correct outputs, along with a short explanation for each.

Negative Examples are samples of inputs and their incorrect/invalid outputs, along with a short explanation for each.

The above schema is based on that of Mishra et al. (2022b), though it is simplified. See Appendix C for the comparison.

Task instances. Given the instructions for each task, a model is expected to solve instances of that task. We use a unified format to organize the instances of all our tasks. More precisely, each instance consists of a textual input and a list of acceptable textual outputs. We limit the number of instances in each task to 6.56.5K to avoid an imbalance of instances between tasks.

Benchmark collection. The benchmark was collected through a large community effort on GitHub.https://github.com/allenai/natural-instructions Tasks were collected and contributed by NLP practitioners who were either responding to our public invitationhttps://blog.allenai.org/9d3f24d5a9db or students who were encouraged to contribute as part of their class project.CSE 576 “Topics in NLP” course, Arizona State Univ. Contributors were encouraged to be creative and source the tasks from several resources: (a) existing public NLP datasets, (b) available intermediate annotations in crowdsourcing experiments (e.g., paraphrasing questions or rating their quality during crowdsourcing a QA dataset), or (c) synthetic tasks that can be communicated to an average human in a few sentences (e.g., basic algebraic operations like number comparison, finding the longest palindrome substring, etc.). When using existing datasets or crowdsourcing annotations, contributors were encouraged to adopt the instructions used to create this dataset whenever available. This was done to ensure that the instructions were sufficient to define the tasks to average human readers. Tasks along with instructions and other meta information were contributed as JSON files via GitHub pull requests, which were reviewed by automated checks and peers. We had 88 contributors from diverse locations and backgrounds contribute to our repository.

Quality control. Controlling the quality of this community-contributed data was done in several phases: (1) Upon creating a GitHub pull request of the proposed task, it immediately went through an automatic test. This process verified that the introduced file contained the expected fields and adhered to our desired properties (e.g., no duplicate instances, the output labels are not heavily imbalanced, etc.) and (2) The proposed task was then peer-reviewed by 1–2 other expert contributors to ensure the clarity and sufficiency of instruction content. The review process was done iteratively until the reviewers were content with the quality of the proposed instruction. Specifically, reviewers were asked to verify that the instruction is clear and sufficient for an average language speaker to solve the underlying task (evaluation instances) while being grammatical, fluent, and concise. On average, the review of each GitHub pull request took about 4–6 iterations over the span of multiple days before being merged. (3) Lastly, the added tasks were presented to crowdworkers in order to collect feedback on the quality of the provided instructions, such as typos, clarity, or other issues (details in §A). Subsequently, one of the authors used this feedback to improve the task definitions of the instances. This feedback was done only for English tasks, as finding high-quality crowdworkers in other languages is nontrivial Pavlick et al. (2014).

Diversity of tasks. Collecting tasks for Sup-NatInst was carefully supervised to cover a wide variety of natural language understanding tasks, domains, and languages. To better understand this diversity, we comprehensively categorize tasks along three different dimensions:

Task Type defines the nature of the mapping from instance inputs to outputs (e.g., question answering, classification, etc.).

Language indicates the language(s) of the instances.

Domain indicates the domain(s) to which the text of the tasks belong to (e.g., politics, medicine, dialogue, etc.).

These different measures of categorization can be used to study different senses of generalization. In our empirical studies (§5), we study generalization along the axis of task types. We refer the reader to Fig. 10 in the appendix for the distribution of tasks among different task types, languages, and domains.

Statistics. Table 2 shows various statistics for the benchmark. In total, the dataset includes 1616 tasks and 5M instances. On average, each instruction is paired with 2.8 positive and 2.4 negative examples. The average definition length is 56.6 in words.

Tk𝑘k-Instruct: Learning to Follow Instructions at Scale

Defining Generalization to Unseen Tasks. Each task tt is defined via its natural language instruction ItI_{t}, and each task has a set of input/output instances (Xt,Yt)(X_{t},Y_{t}). A model MM is expected to produce the output yy, given the input xx and the task instruction ItI_{t}: M(It,x)=y,  \mboxfor (x,y)(Xt,Yt)M(I_{t},x)=y,\;\mbox{for}\ (x,y)\in(X_{t},Y_{t}). In particular, we would like to evaluate model MM on tasks that are not observed (i.e., their instances were not used for training MM). The only source of signal for learning the task at inference time is in-context instructions ItI_{t} that contain a definition and demonstration examples of the task.

Tkk-Instruct. We introduce Tkk-Instruct, a model that is meta-trained on Sup-NatInst for solving tasks given their in-context instructions. Previous work has shown the effectiveness of such meta-training in improving model’s ability to do in-context learning with either prompts Zhong et al. (2021); Sanh et al. (2022) or demonstration examples Min et al. (2022a). Because of the large variety of tasks in Sup-NatInst, we are able to do this multi-task meta-training at a larger scale than before. We conduct our experiments and analysis based on the T5 model Raffel et al. (2020). Since each instruction ItI_{t} consists of multiple elements as described in our instruction schema (§3), we map these elements to textual format and append them before the input instance. Fig. 8 in the appendix shows how we encode the full instructions. We study different combinations of these instruction elements in §7.2. By default, we will use our most effective instruction elements (i.e., task definition and two positive examples) unless otherwise specified. In the same manner, we train the multilingual variant mTkk-Instruct based on the mT5 model Xue et al. (2021).

Benchmarking Cross-Task Generalization with Sup-NatInst

Here we provide our recommended recipe for benchmarking generalization via Sup-NatInst.

An Evaluation Split of Unseen Tasks. We split the large collection of tasks in Sup-NatInst into two subsets: one for evaluation and the other for supervision. For evaluation tasks, we fix a manually-selected collection of 12 categories that represent 154 tasks. The large variety of tasks in Sup-NatInst enables us to choose a diverse set of tasks for evaluation – such as those at word, sentence, and document levels, covering both classification and generation formats. Appendix G lists our evaluation tasks with examples for representative tasks. For an efficient evaluation, we sample a maximum of 100 instances for each task, which results in 15,310 testing instances in total. The remaining tasks are used for training models.To avoid data leakage, we exclude tasks from the training set if they are sourced from the same dataset as any test task. This results in 757 training tasks for the English track and 1271 training tasks for the cross-lingual track.

Divided Tracks for English and X-lignual Tasks. Sup-NatInst consists of tasks across multiple languages, which enables evaluating the model’s generalization to unseen tasks not only in English but also in other languages. Therefore, we divide our evaluation tasks into two tracks: one for English cross-task generalization (119 tasks) and the other for cross-lingual cross-task generalization (35 tasks). To the best of our knowledge, this is the first study in cross-lingual cross-task generalization (i.e., generalization to unseen tasks in different languages). Fig. 11 and Fig. 12 in the appendix contain the evaluation tasks for each track.

Evaluation Metrics. Due to the diversity of our tasks and the open-ended generation nature of our formulation,Unlike Sanh et al. (2022) and Wei et al. (2022), who evaluate their models on classification tasks via option ranking (i.e., scoring the correct answer(s) higher than other candidate answers), we evaluate our models in an open-ended generation setting with no task-specific assumptions. We believe this is a more realistic measure of generalization to unseen tasks. we adopt ROUGE-L Lin (2004) for reporting aggregated performance results. This is a soft string overlap metric that can be applied to a wide range of text generation tasks. We show that the ranking from this metric correlates well with accuracy for classification tasks in Appendix E. We also conduct a human evaluation in §6.2.

2 Baselines and Existing Models

Here we discuss a variety of baselines and competitive models for our target application. See Appendix D for implementation details.

Heuristic baselines. We first evaluate the following heuristics to evaluate the possible shortcuts in the data. Copying Demo Output copies the output of a random demonstration example. Since we balance the labels for our test tasks, the performance of this baseline will roughly equal a random guess or a majority baseline for classification tasks. Copying Instance Input copies the given instance input. This strategy performs well on tasks where the target output largely overlaps with the input (e.g., question rewriting, grammar error correction).

Off-the-shelf pretrained language models. We evaluate existing LMs that are not fine-tuned with instruction-specific data. Specifically, we evaluate the 11B-parameter T5 Raffel et al. (2020) as a direct counterpart of Tkk-Instruct. Due to the infilling pretraining objective of the original T5 model, it cannot continue text well. Therefore, we evaluate its “LM-adapted” version, which is further trained with a language modeling objective Lester et al. (2021). Additionally, we evaluate GPT-3 Brown et al. (2020), a 175175B-parameter autoregressive LM that has shown remarkable ability in following demonstrations provided in its prompt.

Instruction-tuned models. In addition to our Tkk-Instruct (§4), we evaluate existing models that are fine-tuned to follow language instructions. In particular, we evaluate InstructGPT Ouyang et al. (2022) which uses reinforcement learning to incorporate human preferences into a GPT-3 pretrained model, and T0 Sanh et al. (2022) which finetunes T5 on a collection of task prompts in PromptSource Bach et al. (2022).

Upper bound estimates. We estimate an upper bound on models’ generalization to unseen tasks by fine-tuning an oracle model on the tasks’ labeled instances. Since this model observes the hidden instances of the evaluation tasks, it is, by definition, an estimated upper bound to our generalization-based models. Specifically, we fine-tune a T5-11B model on the 119 English evaluation tasks, and a mT5-13B model on the 35 non-English tasks, with 1K random training instances per task, without overlap with the evaluation instances.

Experimental Results

Table 3 summarizes our overall benchmarking results. We use the same input encoding that contains the most effective instructional elements (task definition and two positive examples without the negative examples and explanations) for all the methods. To better understand models’ generalization to different tasks, we also break down the performance according to the task categories in Fig. 4. We refer the reader to Appendix H for more detailed analysis on each individual task.

Instruction-tuning enables stronger generalization to unseen tasks. Generally instruction-tuned models perform better compared to their untuned LM counterparts (Tkk-Instruct vs. T5-LM, InstructGPT vs. GPT-3) and heuristic baselines. This indicates models do learn to follow instructions by finetuning on instruction data, and this can generalize to new instructions for unseen tasks. T0 is an exception, which is only slightly better than T5-LM. We suspect this is because the style of prompting in T0’s training data is very different from our style of instructions.

Our Tkk-Instruct outperforms InstructGPT. Our Tkk-Instruct and mTkk-Instruct models, which are trained with a variety of tasks, generalize best to unseen tasks for both English and non-English tasks in all evaluation task categories. InstructGPT also shows a great extent of generalization to our evaluation tasks. However, we want to note it is not clear if InstructGPT’s training data overlaps with our evaluation tasks since their data is unavailable.

There is a sizable gap for improvement. Despite the impressive performance of current models, there is a sizable gap between the generalization of instruction-based models and the supervised training approach, leaving more room for improvement.

2 Human Evaluation

For language generation tasks, automatic metrics are only an approximation of human judgments; we conduct a human evaluation to confirm the findings so far. Specifically, we ask crowdworkers to indicate if they prefer the predicted answer by the model or the ground truth outputs for each instance with ties being allowed (see Appendix B for details). The resulting human evaluation metric indicates how often model predictions were rated as at least as good as our ground truth labels. The theoretical upper bound of this metric is 100% when the model is rated at least as good as the ground truth for all the instances. The results of human evaluation (shown in Fig. 3) align quite well with our automatic metrics and confirm the human-perceived quality of our models.

Further Analysis

We conduct further analysis to understand the important factors for models to generalize across tasks. Due to the computational cost, this analysis is done on the English track and using the T5-3B checkpoint, except for the experiments on model sizes.

We study Tkk-Instruct’s generalization performance with respect to three scaling factors: the number of training tasks, the number of instances per task, and the model sizes. Fig. 5 presents the performance change by scaling each of them.

More observed tasks improve the generalization. We fine-tune Tkk-Instruct with different numbers of tasks that are randomly sampled from the whole training set (Fig. 5(a)). The model generalization performance grows log-linearlyA linear function of an exponential increase of parameters, i.e., growth at a constant multiplicative rate. as we increase the set of tasks used for training. Previous work Mishra et al. (2022b); Sanh et al. (2022); Wei et al. (2022) has made similar observations on a much smaller scale, while we show that this trend holds even with 757 diverse training tasks.

A large number of training instances do not help generalization. We then vary the number of instances per task that are used for finetuning (Fig. 5(b)). While the conventional wisdom in supervised learning is that more training instances usually helps Banko and Brill (2001); Sun et al. (2017); Hestness et al. (2017), in our setup, the model’s performance saturates when only 64 instances per task are used for training. A large number of training instances would instead lead to longer training time and risk overfitting to the training tasks.

Tuning larger models with instructions consistently lead to gains. We study the effect of model scaling by initializing Tkk-Instruct from different sizes of pretrained T5 checkpoints, including the small, base, large, xl and xxl sizes (Fig. 5(c)). We found that increasing the model sizes consistently bring significant improvement (log-linearly with parameter size). This finding contradicts the claim in Xu et al. (2022) that “model size has little impact on performance with an extremely large number of tasks.” Combining Fig. 5(a) and Fig. 5(c), one can create a correspondence between model size and task size. For example, a T5-large model trained with 757 tasks can achieve comparable performance (48.0 ROUGE-L) to the T5-3B model trained with 128 tasks (48.4 ROUGE-L), indicating that increasing the diversity of training tasks is an alternative to scaling model sizes.

2 Instructing with Different Elements

We evaluate the performance of Tkk-Instruct under different instructional elements.

Benefit of different instructional elements. As shown in Fig. 1, Sup-NatInst provides multiple elements for instructing a task. We train multiple models with different combinations of these elements. The diagonal cells of Table 4 show the performance of our models when trained and evaluated on a particular instruction encoding. Based on the diagonal numbers, including the task definition consistently helps the model to generalize better. Moreover, combining the task definition with positive demonstration examples yields further improvement. However, adding more demonstration examples is negligible. Negative examples help a little bit; explanations decrease performance, which is consistent with the observations of Mishra et al. (2022b) and Lampinen et al. (2022) when the model is not large enough. Future work can explore whether more powerful models can benefit from these elements.

Generalization to different input encodings. We further investigate whether a model trained on a particular encoding can generalize to other encodings. This can be read from the non-diagonal cells of Table 4. The negative result here is that definition-only models cannot generalize to example-only test encodings; and similarly, example-only models cannot generalize to definition-only test encodings. However, models trained on encodings that contain both definition and examples are surprisingly robust across different encoding variations.

Conclusion

We construct a large-scale benchmark consisting of a diverse set of NLP tasks and their instructions. This benchmark can serve as a rich playground for training or evaluation of models that can generalize to unseen tasks by following instructions. Furthermore, we train Tkk-Instruct using this data, and demonstrate its capability to perform unseen tasks to a surprising extent. We provide extensive analysis to understand the important factors for such generalization. We hope our data and model will facilitate future work towards more general-purpose models.

Limitations

While the presented data offers a notable variety (e.g., diverse task types), its underlying distributions suffer from skews which should be addressed in future work (see Appendix F). On language diversity, the proposed benchmark is biased toward English. On output diversity, the collected tasks are generally still skewed to short responses, which might reflect the distribution of the available tasks in the field. This under-representation of the long-tail of tasks poses a challenge for building general-purpose models in the future. We hope future work addresses such distributional imbalances. Moreover, we see natural extensions of the instruction-following setup here in the context of other modalities such as vision or speech.

Automatic evaluation of models’ performance is another challenge, considering the diverse set of tasks in our benchmark, and many of them being open-ended generation tasks. We use ROUGE-L as an aggregated metric in this paper and find it as a good proxy for the overall performance of the models, aligning well with human evaluation. However, there are specific tasks for which ROUGE-L might not serve as an effective proxy of quality (such as rewriting tasks or error correction tasks where copying the input can result in a high ROUGE-L score). We hope these issues will be addressed with the development of more powerful evaluation metrics for text generation.

In terms of computing power, we have experimented with models that were accessible to us and have made the resulting models publicly available. We also acknowledge that there are larger models that we were not able to train due to the limitations of our computational budget.

Acknowledgments

We thank the anonymous reviewers, our colleagues from AI2 and UWNLP, especially Matthew Peters for his encouraging conversations that motivated this project. We also thank the student contributors of Arizona State University’s CSE 576 “Topics in NLP” course and all other contributors to our data repository. All experiments were run on AI2’s Beaker GPU clusters and Google’s research TPUs. This work was supported in part by ONR MURI N00014-18-1-2670, ONR N00014-18-1-2826, and DARPA MCS N66001-19-2-4031 grants.

References

Appendix A Crowdsourcing Human Feedback

We use Amazon Mechanical Turk (AMT) to crowdsource feedback on the quality of the collected instructions. We limit our crowdworkers to predominantly English-speaking countries (USA, UK, Canada, and Australia), and to those who have finished over 1K HITs with an approval rating of over 99%99\%.

Fig. 6 shows the crowdsourcing template used for collecting crowdworker feedback on our instructions. We show the instructions (the task definition, along with positive and negative examples) followed by forms for their feedback. We allow the crowdworkers to give us a qualitative measure of their perceived quality as well as text boxes for more concrete items (such as typos or phrasings that may benefit from more clear articulation). For each task, we solicit the feedback of 3 crowdworkers and then use this feedback to improve the task definitions or the examples for each task.

Appendix B Crowdsourcing Human Judgements of Generation Quality

We perform a crowdsourcing experiment on Amazon Mechanical Turk (AMT) to assess the quality of the generated responses of models. Specifically, we ask crowdworkers to indicate if they prefer the predicted answer by the model or the ground truth outputs for each instances. The annotation interface is shown in Fig. 7. It is essentially the same template used for the quality assessment of the dataset (§A), except that here the crowdworkers are shown a pair of responses for each instances—the reference text (from our benchmark) and the one generated by the model—turning the task into a comparative evaluation.

For each instance, we obtain annotations from an annotator as to whether they prefer either response over the other or they would rate them equally (“tie”). The model receives a credit of 1.0 if the worker favors the model’s prediction at least as well as the ground truth label (otherwise, the model would receive a credit of 0.0). The overall accuracy score for the model is computed by averaging instance-level scores. To reduce the costs, the human evaluation of our models is done on 60 randomly selected tasks (about half of our evaluation tasks), and on 10 random instances of each task.

Since it is non-trivial to find non-English speaking crowdworkers Pavlick et al. (2014), this evaluation was restricted to English language tasks. Therefore, since our task is focused on English tasks, we required workers to be based in a country with a population predominantly of native English speakers (USA, Canada, UK, and Australia) and have completed at least 5000 HITs with \geq99% assignment approval rate.

The resulting human-evaluation metric indicates how often were model predictions equal or preferred to our ground truth labels. In this evaluation, the theoretical upper bound is 100% where the model is rated at least as well as the ground truth. The results of human evaluation are shown in the bottom row of Fig. 3.

Appendix C Instruction Schema

Our instruction schema is based on that of NatInst Mishra et al. (2022b), but we simplify it to make data collection easier. Our Definition field serves as the union of Mishra et al. (2022b)’s Definition, Things to Avoid, and Emphasis & Caution. Additionally, we drop their Title and Prompt as their content is most often covered by Definition.

Appendix D Model Implementation Details

We use T5 for training our Tkk-Instruct, estimating the performance of the supervised approach and conducting analysis.

Our experiments that finetune the T5-11B model are conducted based on the Google’s T5 libraryhttps://github.com/google-research/text-to-text-transfer-transformer and we use their T5.1.1.xxl checkpointhttps://console.cloud.google.com/storage/browser/t5-data/pretrained˙models/t5.1.1.xxl by default, which is pre-trained only on C4.We also tried to finetune Tkk-Instruct from the T5-LM checkpoint but the final performance is worse. Therefore, we decided to use the T5.1.1.xxl checkpoint. These experiments are run on Google V3-256 TPUs using a batch size of 1,048,576 tokens (1,024 examples), a constant learning rate of 1e-5 and a total of 1000 steps. Each training run takes 4 hours to complete.

Our analyses that use T5 models smaller than 11B parameters are conducted based on Huggingface’s transformers library and model checkpointshttps://huggingface.co/models?sort=downloads&search=google%2Ft5 Wolf et al. (2020) on GPU machines. When fine-tuning models, we train them for two epochs with a batch size of 16 and a constant learning rate of 1e-5. The maximum input length is set to 1024, and the maximum output length is set to 128. These experiments are conducted with 8 A100 GPUs with 48GB GPU memory per each. We use DeepSpeedhttps://github.com/microsoft/DeepSpeed for model parallelization, with bfloat16 precision enabled to save the GPU memory. Each training run takes 6 hours to complete.

GPT-3 and InstructGPT experiments.

We use the OpenAI APIhttps://beta.openai.com/docs/introduction/overview for conducting the GPT-3 experiments. We use their “davinci” engine for the GPT-3 language model experiments and their “text-davinci-001” engine for the InstructGPT experiments. When making the requests, we set the temperature as 0, top_p as 1 and the maximum generation length as 128. Due to the high cost, we randomly sample 20 instances from each of our 119 test tasks to estimate the performance of GPT-3 and InstructGPT. All API requests were made on May 30, 2022.

Encoding instruction with input

For every problem setup, we map a given instruction ItI_{t} and an input instance xx into a textual format, obtaining enc(It,x)enc(I_{t},x). Each instruction ItI_{t} consists of multiple elements as described in our instruction schema (§3). We map each element of the instruction to a textual format and prepend it to the input instance. Fig. 8 shows how we encode the full instruction. We study different combinations of these instruction elements in §7.2. The encoded instance is then fed to an encoder-decoder model to predict yy: M:enc(It,x)yM:enc(I_{t},x)\rightarrow y.

Appendix E Evaluation Metrics

We adopt ROUGE-L as our automatic evaluation metric in this work. However, it remains a question for how much ROUGE-L can reflect model’s performance on different tasks. Although we cannot test ROUGE-L’s correlation with each task-specific metric of the tasks included in our data, we do investigate whether ROUGE-L can be used for classification tasks. Fig. 9 plots the ROUGE-L scores and accuracy of several models on different types of tasks. These task types are usually regarded as classification tasks and have very short ground truth output. We can see that for all these task types, the trend of ROUGE-L correlates well with the trend of accuracy. For some task types, we do see some gap between these two metrics. The reason is because there are some generation tasks categorized into these types. These results indicate that ROUGE-L is a good proxy for accuracy for classification tasks.

Appendix F Distribution of Tasks

As is described in §3, Sup-NatInst provides the annotation for categorizing tasks along three different dimensions: task type, language, and domain. Fig. 10 shows the distribution of tasks among these three dimensions. This meta-information can be used to study model’s generalization ability in different senses. Despite the diversity of the data, we acknowledge the skew toward certain tasks and languages, which we leave to be addressed by future work.

Appendix G Evaluation Tasks

Table 5 lists the 12 task categories used for our evaluation and all the tasks included in each category (introduced in §5.1). To provide a better sense of what those tasks look like, we also select one representative task from each category and list them in Tables 6–17. Due to the large number of tasks in our dataset, we cannot list all 1,616 tasks in this paper. We refer the reader to our dataset.

Appendix H Performance Improvement per Evaluation Task

To provide more detailed analysis of Tkk-Instruct on each individual task, Fig. 11 presents the per-task improvement of our Tkk-Instruct (3B) model over the best of two heuristic baselines on the English evaluation tasks, and Fig. 12 presents the per-task improvement of the mTkk-Instruct model on the cross-lingual evaluation tasks. For most of the evaluation tasks, we see a notable extent of generalization by Tkk-Instruct.