Effective Cross-Task Transfer Learning for Explainable Natural Language Inference with T5 (2022)

Abstract: We compare sequential fine-tuning with a model for multi-task learning in the context where we are interested in boosting performance on two of the tasks, one of which depends on the other. We test these models on the FigLang2022 shared task which requires participants to predict language inference labels on figurative language along with corresponding textual explanations of the inference predictions. Our results show that while sequential multi-task learning can be tuned to be good at the first of two target tasks, it performs less well on the second and additionally struggles with overfitting. Our findings show that simple sequential fine-tuning of text-to-text models is an extraordinarily powerful method of achieving cross-task knowledge transfer while simultaneously predicting multiple interdependent targets. So much so, that our best model achieved the (tied) highest score on the task.

## introduction and motivation the transfer of information between supervised learning objectives can be achieved in pre-trained language models (plms) using either multi-task learning (mtl) @xcite or sequential finetuning (sft) @xcite . mtl involves simultaneously training a model on multiple learning objectives using a weighted sum of their loss, while sft involves sequentially training on a set of related tasks. recent work has extended the sft approach by converting all nlp problems into text-to-text (i.e., sequence-to-sequence where both input and output sequences are natural text) problems @xcite . the resultant model -t5 -has achieved state-of-the-art results on a vari-ety of tasks such as question answering, sentiment analysis, and, most relevant to this work, natural language inference (nli). in this work, we focus our efforts on the transfer of information from multiple related tasks for improved performance on a different set of tasks. in addition, we compare the effectiveness of sft with that of mtl in a context where one of the target tasks is dependent on the other. given the dependence of one of the target tasks on the other, we implement an end-to-end multi-task learning model to perform each of the tasks sequentially: an architecture referred to as a hierarchical feature pipeline based mtl architecture (hifeatmtl, for short) @xcite . while hifeatmtl has been previously used in different contexts (see section 3), it has, to the best of our knowledge, not been used with, or compared to, text-to-text models. this is of particular importance as such models are known to enable transfer learning @xcite and it is crucial to determine if traditional mtl methods can boost cross-task knowledge transfer in such models. specifically we participate in the figlang2022 shared task foot_1 , which extends nli to include a figurative-language hypothesis and additionally requires participants to output a textual explanation (also see section 2). figlang2022 is ideally suited for the exploration of knowledge transfer, as plms have been shown to struggle with figurative language and so any gains achieved are a result of knowledge transfer. for example, @xcite show that in the zero-and few-shot settings, plms perform significantly worse than humans. this is especially the case with idioms @xcite , on which t5 does particularly poorly (see section 4). additionally, figlang2022's emphasis on explanations of the predicted labels provides us with the oppor-tunity to test cross-task knowledge transfer in a setting where one target task depends on the other (hifeatmtl) -this is especially so given the evaluation methods used (detailed in section 2). we evaluate the effectiveness of boosting performance on the target tasks through the transfer of information from two related tasks: a) esnli, which is a dataset consisting of explanations associated with nli labels, and b) impli, which is an nli dataset (without explanations) that contains figurative language. more concretely, we set out to answer the following research questions: figlang2022 is a variation of the nli task which requires the generation of a textual explanation for the nli prediction. additionally, the hypothesis is a sentence that employs one of four kinds of figurative expressions: sarcasm, simile, idiom, or metaphor. additionally, a hypothesis can be a creative paraphrase, which rewords the premise using more expressive, literal terminology. entailment premise i respectfully disagree. hypothesis i beg to differ. (idiom) explanation to beg to differ is to disagree with someone, and in this sentence the speaker is respectfully disagreeing. contradiction premise she was calm. hypothesis she was like a kitten in a den of coyotes. (simile) explanation a kitten in a den of coyotes would be scared and not calm. figlang2022 takes into consideration the quality of the generated explanation when assessing the model's performance by use of an explanation score, which is the average between bertscore and bleurt and ranges between 0 and 100. the task leaderboard is based on nli label accuracy at an explanation score threshold of 60, although the nli label accuracy is reported at three thresholds of the explanation score (i.e. 0, 50, and 60) so as to provide a glimpse of how the model's nli and explanation abilities are influenced by each other. ## related work nli is considered central to the task of natural language understanding, and there has been significant focus on the development of models that can perform well on the task @xcite . this task of language inference has been independently extended to incorporate explanations @xcite and figurative language @xcite (both detailed below). @xcite introduced flute, the figurative language understanding and textual explanations dataset which brought together these two aspects. previous shared tasks involving figurative language focused on the identification or representation of figurative knowledge: for example, figlang2020 @xcite and task 6 of semeval 2022 @xcite involved sarcasm detection, and task 2 of semeval 2022 @xcite involved the identification and representation of idioms. the generation of textual explanations necessitates the use of generative models such as bart @xcite or t5 @xcite . @xcite introduce wt5, a sequence-tosequence model that outputs natural-text explanations alongside its predictions and @xcite found t5 to consistently outperform bart in explanation generation. of specific relevance to our work are the im-pli @xcite and esnli @xcite datasets. impli links a figurative sentence, specifically idiomatic or metaphoric, to a literal counterpart, with the nli relation being either entailment or non-entailment. @xcite show that idioms are difficult for models to handle, particularly in non-entailment relations. the esnli dataset @xcite is an explanation dataset for general nli. it extends the stanford natural language inference dataset @xcite with human-generated text explanations. hierarchical feature pipeline based mtl architectures (hifeatmtl) use the outputs of one task as a feature in the next and are distinct from hierarchical signal pipeline architectures wherein the outputs are used indirectly (e.g., their probabilities) @xcite . hifeatmtl has previously been used variously @xcite @xcite , including, for example, to provide pos and other syntactic information to relatedness prediction, the output of which is, in addition to the syntactic features, passed to an entailment task @xcite (see also the survey by chen et al. ( 2021) ). to the best of our knowledge, this is the first work to use hifeatmtl with, and to compare against, text-to-text models and their ability to transfer knowledge across tasks. ## methods we set out to answer the research questions in section 1 by evaluating the effectiveness of sft and hifeatmtl on the transfer of task-specific knowledge from separate tasks, namely, explanations from esnli and figurative language from impli. we use t5 for all our experiments as it has been shown to be effective in explanation generation @xcite . we run all our hyperparameter optimisation and model variations using t5-base (evaluated on a development split consisting of 10% of the training data) before then transferring over the best performing settings to t5 large (trained on all of the training data) which is used to make predictions on the test set. while we find this method adequate in finding a good set of hyperparameters, the best setting for a smaller model need not necessarily be a good setting for larger models, especially given that some capabilities emerge only in larger models @xcite . ## results and discussion the results of our experiments using sft and hifeatmtl are presented in while the gain in accuracy when using the additional datasets could be due to the corresponding addition of training data, it should be noted that impli does not have explanations and esnli contains no figurative language. as such, the improved scores indicate the transfer of figurative information from one task (impli) and explanation generation capabilities from another (esnli). as such, in addressing the research questions, our results indicate that: a) distinct task-specific knowledge (i.e. explanations or figurative language) can indeed be transferred from separate tasks so as to improve performance on a target task, and b) sft seems to be a more effective way of transferring knowledge across tasks when we are concerned with the latter of a sequence of tasks (as in this case), while hifeatmtl seems effective in boosting the performance of the first. ## knowledge transfer vs bias recent works on nli have shown that for some datasets, models are able to correctly predict the label using only the hypothesis, without considering the premise @xcite @xcite . this is caused by the model exploiting spurious correlations or patterns in the data, rather than acquiring task-relevant knowledge. as such, we wish to analyse if this is the case with our models: namely, whether our models employ figurative language knowledge from the hypothesis when predicting nli labels. we perform the following experiments using t5 large on our validation set: we train only the hypothesis, only on the premise, and compare these results with a model trained on both (the standard training regime). the results ( ## conclusions and future work in this work we set out to establish the possibility of effectively transferring knowledge across tasks in the context where we are interested in boosting the performance of two dependent tasks. as such, we evaluate the effectiveness of sft and hifeatmtl for transferring distinct task-specific knowledge from different tasks and find that both of these methods are good at achieving this: sft on the last task and hifeatmtl on the first. we find that using sft to transfer information across tasks is, in this instance, so effective that we are ranked first on the figlang 2022 task. in extending this work, we intend to test these methods on a variety of sequentially dependent tasks as well as incorporating the use of more efficient mtl methods including adapterfusion @xcite and adap-terdrop @xcite .