Many NLP tasks can be regarded as a selection problem from a set of options, such as classification tasks, multi-choice question answering, etc. Textual entailment (TE) has been shown as the state-of-the-art (SOTA) approach to dealing with those selection problems. TE treats input texts as premises (P), options as hypotheses (H), then handles the selection problem by modeling (P, H) pairwise. Two limitations: first, the pairwise modeling is unaware of other options, which is less intuitive since humans often determine the best options by comparing competing candidates; second, the inference process of pairwise TE is time-consuming, especially when the option space is large. To deal with the two issues, this work first proposes a contextualized TE model (Context-TE) by appending other k options as the context of the current (P, H) modeling. Context-TE is able to learn more reliable decision for the H since it considers various context. Second, we speed up Context-TE by coming up with Parallel-TE, which learns the decisions of multiple options simultaneously. Parallel-TE significantly improves the inference speed while keeping comparable performance with Context-TE. Our methods are evaluated on three tasks (ultra-fine entity typing, intent detection and multi-choice QA) that are typical selection problems with different sizes of options. Experiments show our models set new SOTA performance; particularly, Parallel-TE is faster than the pairwise TE by k times in inference. Our code is publicly available at https://github.com/jiangshdd/LearningToSelect.
翻译:许多自然语言处理任务可视为从一组选项中进行选择的问题,例如分类任务、多项选择问答等。文本蕴含已被证明是处理这类选择问题的最先进方法。文本蕴含将输入文本视为前提,将选项视为假设,然后通过对(前提,假设)进行成对建模来处理选择问题。该方法存在两个局限性:首先,成对建模无法感知其他选项,这不够直观,因为人类通常通过比较竞争候选选项来确定最佳选项;其次,成对文本蕴含的推理过程耗时,尤其在选项空间较大时。为解决这两个问题,本文首先提出了一种情境化文本蕴含模型(Context-TE),通过将其他k个选项作为当前(前提,假设)建模的上下文进行附加。Context-TE能够为假设学习更可靠的决策,因为它考虑了多种上下文。其次,我们通过提出并行文本蕴含(Parallel-TE)来加速Context-TE,该模型可同时学习多个选项的决策。Parallel-TE在保持与Context-TE相当性能的同时,显著提升了推理速度。我们的方法在三个典型的选择问题任务(超细粒度实体分类、意图检测和多项选择问答)上进行了评估,这些任务具有不同大小的选项空间。实验表明,我们的模型取得了新的最先进性能;特别地,Parallel-TE在推理速度上比成对文本蕴含快k倍。我们的代码已公开在https://github.com/jiangshdd/LearningToSelect。