Q u ASE : Question-Answer Driven Sentence Encoding (2020)

Abstract: Question-answering (QA) data often encodes essential information in many facets. This paper studies a natural question: Can we get supervision from QA data for other tasks (typically, non-QA ones)? For example, can we use QAMR (Michael et al., 2017) to improve named entity recognition? We suggest that simply further pre-training BERT is often not the best option, and propose the question-answer driven sentence encoding (QuASE) framework. QuASE learns representations from QA data, using BERT or other state-of-the-art contextual language models. In particular, we observe the need to distinguish between two types of sentence encodings, depending on whether the target task is a single- or multi-sentence input; in both cases, the resulting encoding is shown to be an easy-to-use plugin for many downstream tasks. This work may point out an alternative way to supervise NLP tasks.

## introduction it is labor-intensive to acquire human annotations for nlp tasks which require research expertise. for instance, one needs to know thousands of semantic frames in order to provide semantic role labelings (srl) @xcite . it is thus an important research direction to investigate how to get supervision signals from indirect data and improve one's target task. this paper studies the case of learning from question-answering (qa) data for other tasks (typically not qa). we choose qa because (1) a growing interest of qa has led to many large-scale qa datasets available to the community; (2) a qa task often requires comprehensive understanding of language and may encode rich information that is useful for other tasks; (3) it is much easier to answer questions relative to a sentence than to annotate linguistics phenomena in it, making this a plausible supervision signal @xcite . there has been work showing that qa data for task a can help another qa task t , conceptually by further pre-training the same model on a (an often larger) before training on t (a smaller) @xcite . however, it remains unclear how to use these qa data when the target task does not share the same model as the qa task, which is often the case when the target task is not qa. for instance, qa-srl @xcite , which uses qa pairs to represent those predicateargument structures in srl, should be intuitively helpful for srl parsing, but the significant difference in their surface forms prevents us from using the same model in both tasks. the success of modern language modeling techniques, e.g., elmo @xcite , bert @xcite , and many others, has pointed out an alternative solution to this problem. that is, to further pre-train 2 a neural language model (lm) on these qa data in certain ways, obtain a sentence encoder, and use the sentence encoder for the target task, either by fine-tuning or as additional feature vectors. we call this general framework question-answer driven sentence encoding @xcite . a straightforward implementation of quase is to first further pre-train bert (or other lms) on the qa data in the standard way, as if this qa task is the target, and then fine-tune it on the real target task. this implementation is technically similar to stilts @xcite , except that stilts is mainly further pre-trained on textual entailment (te) data. however, similar to the observations made in stilts and their follow-up works @xcite , we find that additional qa data does not necessarily help the target task using the implementation above. while it is unclear how to predict this behaviour , we do find that this happens a lot for tasks whose input is a single sentence, e.g., srl and named entity recognition (ner), instead of a sentence pair, e.g., te. this might be because qa is itself a paired-sentence task, and the implementation above (i.e., to further pre-train bert on qa data) may learn certain attention patterns that can transfer to another paired-sentence task more easily than to a single-sentence task. therefore, we argue that, for single-sentence target tasks, quase should restrict the interaction between the two sentence inputs when it further pre-trains on qa data. we propose a new neural structure for this and name the resulting implementation s-quase, where "s" stands for "single;" in contrast, we name the straightforward implementation mentioned above p-quase for "paired." results show that s-quase outperforms p-quase significantly on 3 single-sentence tasks-srl, ner, and semantic dependency parsing (sdp)-indicating the importance of this distinction. let quase a be the quase further pre-trained on qa data a. we extensively compare 6 different choices of a: triviaqa @xcite , newsqa @xcite , squad @xcite , relation extraction (re) dataset in qa format (qa-re for short) @xcite , large qa-srl @xcite , and qamr @xcite . interestingly, we find that if we use s-quase for singlesentence tasks and p-quase for paired-sentence tasks, then quase qamr improves all 7 tasks foot_0 in low resource settings, with an average error reduction rate of 7.1% compared to bert. 4 while the set of tasks we experimented with here is nonexhaustive, we think that quase qamr has the potential of improving on a wide range of tasks. this work has three important implications. first, it provides supporting evidence to an important alternative to supervising nlp tasks: using qa to annotate language, which has been discussed in works such as qa-srl, qamr, and qa-re. if it is difficult to teach annotators the formalism of a certain task, perhaps we can instead collect qa data that query the target phenomena and thus get supervision from qa for the original task (and possibly more). second, the distinction between s-quase and p-quase suggests that sentence encoders should consider some properties of the target task (e.g., this work distinguishes between single-and multi-sentence tasks). third, the good performance of quase qam r suggests that predicate-argument identification is an important capability that many tasks rely on; in contrast, many prior works observed that only language modeling would improve target tasks generally. ## qa driven sentence encoding this work aims to find an effective way to use readily available qa data to improve a target task that is typically not qa. a natural choice nowadaysgiven the success of language models-is to further pre-train sentence encoders, e.g. bert, on qa data in certain ways, and then use the new encoder in a target task. this general framework is called quase in this work, and the assumption is that the sentence encoders learned from qa data have useful information for the target task. a straightforward implementation of quase is to further pre-train bert on qa data in the standard way, i.e., fine-tune bert as if this qa dataset is the target task, and then fine-tune bert on the real target task. however, we find that this straightforward implementation is less effective or even negatively impacts target tasks with single-sentence input; similar observations were also made in stilts @xcite and its follow-ups @xcite : they further pretrain sentence encoders, e.g., elmo, bert, and gpt @xcite , on te data and find that it is not effective for the syntax-oriented cola task and the sst sentiment task in glue, which are both single-sentence tasks @xcite . one plausible reason is that the step of further pre-training on qa data does not take into account some properties of the target task, for instance, the number of input sentences. qa is inherently a paired-sentence task; a typical setup is, given a context sentence and a question sentence, predict the answer span. further pre-training bert on qa data will inevitably learn how to attend to the context given the question. this is preferable when the target task is also taking a pair of sentences as input, while it may be irrelevant or harmful for single-sentence tasks. it points out that we may need two types of sentence encodings when further pre-training bert on qa data, depending on the type of the target task. the following subsection discusses this issue in detail. ## applications of quase in this section, we conduct thorough experiments to show that quase is a good framework to get supervision from qa data for other tasks. we first give an overview of the datasets and models used in these experiments before diving into the details of each experiment. specifically, we use propbank @xcite (srl), the dataset from the semeval'15 shared task @xcite with delph-in mrs-derived semantic dependencies target representation (sdp), conll'03 @xcite (ner), the dataset in semeval'10 task 8 @xcite (re), the dataset in the conll'12 shared task (pradhan et al., 2012) (coref), mnli (williams et al., 2018) (te), and squad 1.0 (rajpurkar et al., 2016) (mrc). in for single-sentence tasks, we use both simple baselines (e.g., bilstm and cnn; see appendix b.1) and near-state-of-the-art models published in recent years. as in elmo, we use the deep neural model in @xcite for srl, the model in @xcite for ner, and the end-to-end neural model in @xcite for coref. we also use the biaffine network in @xcite for sdp but we removed part-of-speech tags from its input, and the attention-based bilstm in @xcite is the strong baseline for re. in addition, we replace the original word embeddings in these models (e.g., glove @xcite ) by bert. throughout this paper, we use the pre-trained case-insensitive bert-base implementation. more details on our experimental setting can be found in appendix b, including the details of simple models in b.1, some common experimental settings of quase in b.2, and s-quase combined with other sota embeddings (elmo and flair @xcite )) in b.3. ## discussion in this section we discuss a few issues pertaining to improving quase by using additional qa datasets and the comparison of quase with related symbolic representations. ## conclusion in this paper, we investigate an important problem in nlp: can we make use of low-cost signals, such as qa data, to help related tasks? we retrieve signals from sentence-level qa pairs to help nlp tasks via two types of sentence encoding approaches. for tasks with a single-sentence input, such as srl and ner, we propose s-quase that provides latent sentence-level representations; for tasks with a sentence pair input, such as te and mrc we propose p-quase, that generates latent representations related to attentions. experiments on a wide range of tasks show that the distinction of s-quase and p-quase is highly effective, and quase qam r has the potential to improve on many tasks, especially in the low-resource setting.