arXiv(opens in a new tab)Computer ScienceApr 2021Cited by 12 papers on PaperVantage

Manuscript Offprint

arXiv:2104.08773

Cross-Task Generalization via Natural Language Crowdsourcing Instructions

Swaroop Mishra, Daniel Khashabi, Chitta Baral, Hannaneh Hajishirzi

Abstract

Humans (e.g., crowdworkers) have a remarkable ability in solving different tasks, by simply reading textual instructions that define them and looking at a few examples. Despite the success of the conventional supervised learning on individual datasets, such models often struggle with generalization across tasks (e.g., a question-answering system cannot solve classification tasks). A long-standing challenge in AI is to build a model that learns a new task by understanding the human-readable instructions that define it. To study this, we introduce Natural Instructions, a dataset of 61 distinct tasks, their human-authored instructions, and 193kk task instances (input-output pairs). The instructions are obtained from crowdsourcing instructions used to create existing NLP datasets and mapped to a unified schema. Using this meta-dataset, we measure cross-task generalization by training models on seen tasks and measuring generalization to the remaining unseen ones. We adopt generative pre-trained language models to encode task-specific instructions along with input and generate task output. Our results indicate that models benefit from instructions when evaluated in terms of generalization to unseen tasks (19% better for models utilizing instructions). These models, however, are far behind an estimated performance upperbound, indicating significant room for more progress in this direction.

1 Introduction

We have witnessed great progress in solving many NLP datasets through fine-tuning pre-trained language models (LMs) Peters et al. (2018); Brown et al. (2020). More recent studies show tremendous promise in generalization within the set of observed tasks through multi-task training and unified encoding Khashabi et al. (2020); Aghajanyan et al. (2021). However, cross-task generalization – generalization to unseen tasks – has generally remained under-explored. For example, can we supervise a model with instances of grammar checking or question answering tasks, yet expect it to solve a different task like question typing (Fig.1). Evidently, humans are capable of such generalizations; an average human can follow natural language instructions to solve a variety of problems, as evident by the success of crowdsourcing platforms (also argued in Efrat and Levy (2020)). In this paper, we study if models can generalize to unseen tasks given their crowdsourcing instructions (Fig.1).

Figure 1: We construct the Natural Instructions dataset from crowdsourcing instructions and instances of different NLP datasets. We study if models can learn from seen tasks and generalize to unseen tasks given their natural crowdsourcing instructions.

Task Instance-Level Generalization Task-Level Generalization Training data X^{\color[rgb]{0,0.5508,0}\text{train}},Y^{\color[rgb]{0,0.5508,0}\text{train}} (I_{t},X_{t}^{{\color[rgb]{0,0.5508,0}\text{train}}},Y_{t}^{{\color[rgb]{0,0.5508,0}\text{train}}}) t\in\text{\mathcal{T}_{\textnormal{\color[rgb]{0,0,1} seen}}} Evaluation x→yx\rightarrow y where: (x,y)\in(X^{\color[rgb]{0.5,0,1}\text{test}},Y^{\color[rgb]{0.5,0,1}\text{test}}) (x,It)→y(x,I_{t})\rightarrow y where: (x,y)\in(X_{t}^{{\color[rgb]{0.5,0,1}\text{test}}},Y_{t}^{{\color[rgb]{0.5,0,1}\text{test}}}) t∈t\in \mathcal{T}_{\textnormal{\color[rgb]{1,0,0} unseen}}

(a) A comparison of task vs instance-level generalization ItI_{t}, XtX_{t} and YtY_{t} indicate natural language instructions, input, and output sets respectively for task tt. In the conventional setup, training and evaluation are done on the instances of the same task. However, in task-level generalization, a model is expected to generalize to unseen tasks, where \mathcal{T}_{\textnormal{\color[rgb]{1,0,0} unseen}} ∩\cap \mathcal{T}_{\textnormal{\color[rgb]{0,0,1} seen}}$$=\emptyset.

(b) BART evaluation on unseen tasks (yy-axis is perf. on Tunseen\mathcal{T}_{\textnormal{unseen}}) when supervised with seen tasks (xx-axis is |$$\mathcal{T}_{\textnormal{seen}}$$|). A model using instructions (ItI_{t}) consistently improves with more observed tasks. In contrast, models with no access to the instructions show no sign of improved generalization. Details in §6.3.

Figure 2: The formal definition of generalization to unseen tasks (a) and a summary of its empirical outcome (b).

We build Natural Instructions, a dataset consisting of natural crowdsourcing instructions for various tasks and their instances. Training on seen tasks \mathcal{T}_{\textnormal{\color[rgb]{0,0,1} seen}} in our dataset, we build a model that learns to follow natural instructions that define a task and perform tasks (i.e., mapping input to output). Testing on unseen tasks \mathcal{T}_{\textnormal{\color[rgb]{1,0,0} unseen}}, we evaluate if the model can perform unseen tasks solely from their instructions and without any task-specific labeled data (Table 2(a); right). In contrast to the instance-level generalization (Table 2(a); left), our model uses instruction as additional input, and evaluations are done on tasks that were not observed in the training stage.

We compile Natural Instructions from task instructions written by researchers for crowdsourcing existing NLP datasets. Such crowdsourcing instructions often elaborate a variety of details about how a task should (and should not) be done. To provide a systematic study of various elements of crowdsourcing instructions, we map them to a unified schema to cover the most important elements of task descriptions — such as definition, constraints, positive and negative examples. We collect tasks in Natural Instructions as minimal stand-alone steps provided to crowdworkers to complete a downstream NLP task. For example, tasks collected from QASC Khot et al. (2020) include sub-tasks about generating topic words or combining facts, as well as answering multi-hop questions. Therefore our dataset not only contains typical downstream tasks in NLP, but also the intermediate subtasks that are not well-represented in the common benchmarks. The unified schema and the collection of minimal subtasks enable training LMs that can generalize across different tasks by learning from instructions. In total, our dataset consists of 61 distinct NLP tasks and 193k193k instances.

Our experimental results indicate that LMs learn to leverage natural language instructions as they show improved generalization to new tasks. For example, a BART Lewis et al. (2019) achieves a 19% gain in terms of cross-task generalization compared to a model not using instructions (§6). Importantly, LMs can generalize better to unseen tasks if they observe more tasks in training (Fig.2(b)). This upward trajectory suggests the potential for stronger cross-task generalizable models upon scaling up the diversity of tasks represented in a meta-dataset of task instructions. Despite the benefits of instructions, we observe a sizable gap between models’ generalization and their estimated upperbounds (6.4), encouraging the community to work on this challenging problem.

Contributions: In summary, the contributions of this work are as follows: (a) we introduce Natural Instructions, a dataset of human-authored instructions curated from existing well-known datasets mapped to a unified schema, providing training and evaluation data for learning from instructions; (b) we build models that can encode instructions and show: (b.1) the benefit of cross-task generalization by leveraging instructions; (b.2) the importance of different elements of instructions in the performance; (b.3) noteworthy headroom for improvement on our benchmark, which hopefully will motivate further work in this direction.