SlowGuess/NAACL_2022_OCR huggingface dataset:
Ana Marasović* Iz Beltagy* Doug Downey Matthew E. Peters
Allen Institute for AI, Seattle, WA, USA {anam,beltagy,doug,damthewp}@allenai.org
Self-rationalization models that predict task labels and generate free-text elaborations for their predictions could enable more intuitive interaction with NLP systems. These models are, however, currently trained with a large amount of human-written free-text explanations for each task which hinders their broader usage. We propose to study a more realistic setting of self-rationalization using few training examples. We present FEB—a standardized collection of four existing English-language datasets and associated metrics. We identify the right prompting approach by extensively exploring natural language prompts on FEB. Then, by using this prompt and scaling the model size, we demonstrate that making progress on few-shot self-rationalization is possible. We show there is still ample room for improvement in this task: the average plausibility of generated explanations assessed by human annotators is at most  $51\%$  (with GPT-3), while plausibility of human explanations is  $76\%$ . We hope that FEB and our proposed approach will spur the community to take on the few-shot self-rationalization challenge.
Models constrained to be more understandable to people are easier to troubleshoot and more useful in practice (Rudin et al., 2021). For instance, constraining a model that answers the question "Which linguist invented the lightbulb?" with "none" to also provide the reason—"Thomas Edison is the inventor of the lightbulb and he was not a linguist"—makes the model easier to control and interact with (Kim et al., 2021). Models that jointly predict task labels and generate free-text explanations for their predictions (as in the previous example) are known as self-rationalization models (Wiegreffe et al., 2021). Their explanations are arguably more faithful and stable than post-hoc explanations since
they are intrinsic to the model (Melis and Jaakkola, 2018). The free-text format is essential for explaining tasks requiring reasoning about unstated knowledge such as commonsense (Marasović et al., 2020), and it makes explanations more intuitive to people compared to highlights of individual words (Camburu et al., 2018). Despite these benefits, self-rationalization models are not widely used, in part because their training currently requires an abundance of human-authored explanations for each task (Narang et al., 2020). A possible solution is few-shot learning, which has shown promising results in recent years. To help the research community begin tackling self-rationalization with only a few examples, we present (i) FEB—a standardized collection of four existing English-language datasets and associated metrics, and (ii) the first approach for the task established through an extensive evaluation of natural language prompts. $^{1}$
One approach to few-shot learning is prompt-based finetuning with natural language prompts. Such prompts are produced by formatting finetuning instances using a format similar to that used in pretraining, based on the idea that finetuning examples that look similar to pretraining ones will be more informative in the few-shot setting. A few prompts are then used for finetuning. In this paper, we explore whether prompt-based finetuning can be extended to induce few-shot self-rationalization behavior in addition to few-shot prediction. To measure our progress, we first introduce FEB as a benchmark dataset consisting of human authored free-text explanations across four distinct end tasks including natural language inference and commonsense tasks (§2). Since finding appropriate prompts is often challenging (Gao et al., 2021), we then extensively explore natural language prompts for few-shot self-rationalization. In our experiments, we fine-tune the T5 and UNIFIEDQA pretrained encoder-decoder transformers (Raffel et al., 2020;
$^{1}$ Few Explanations Benchmark (FEB)
Findings of the Association for Computational Linguistics: NAACL 2022, pages 410 - 424 July 10-15, 2022 ©2022 Association for Computational Linguistics
Khashabi et al., 2020), and show that versatile question-answering prompts (defined in §3.1) outperform prompts based on span infilling by 8.7 accuracy points, as well as prompts designed by following the most similar T5's supervised pretraining task by 3.2.
We then study the impact of model size on few-shot self-rationalization to investigate whether the quality of generated explanations scales with the size as good as the accuracy of predicting task labels. To this end, we also evaluate GPT-3's (Brown et al., 2020) self-rationalization behavior. Our experiments show that explanation plausibility scored by human annotators (which range from 0–100) and end-task accuracy improve with increasing model size. Specifically, the difference in plausibility scores between the BASE and 3B model ranges from [6.2, 24.8] (on average 14.8). The average plausibility across datasets is 43.4 (UNIFIEDQA-3B) and 50.6 (GPT-3). While encouraging, our results show that there is still a large gap between model and human performance (25.7 for GPT-3), and we hope this work will help enable the research community to take on the few-shot self-rationalization challenge.
Our code for producing data splits, prompt construction, model training/evaluation, and human evaluation templates are publicly available.2
2 FEB Benchmark
There has been an explosion of interest in generating free-text explanations and in few-shot learning in the last 1-2 years. However, appropriate datasets and metrics for few-shot self-rationalization have not yet been established. We thus introduce the FEB benchmark—a suite of existing English-language datasets with human-authored free-text explanations and associated metrics for few-shot self-rationalization. We expect that FEB will simplify future model comparison and lower barriers to entry for those interested in working on this task.
Datasets in FEB To identify available datasets suitable for few-shot self-rationalization, we start with a recent overview of datasets with free-text explanations (Wiegrefe and Marasovic, 2021) and filter them according to the following criteria: (i) the input is textual, (ii) the explanation consists of one sentence or 2-3 simple sentences, (iii) the task has a fixed set of possible labels, (iv) the explanation is
FEB Tasks	# Shots
E-SNLI	Classify the entailment relation be-tween two sequences	16
ECQA	Select the correct answer to a given question from five answer choices	48
COMVE	Select one of two sequences as more nonsensical	24
SBIC	Classify a post as offensive or not	24
Table 1: Tasks that we have included in FEB. The number of shots is the number of training instances per label. Training sets for all classification tasks are balanced and contain 48 instances. Sources: E-SNLI (Camburu et al., 2018), ECQA (Aggarwal et al., 2021), COMVE (Wang et al., 2019), SBIC (Sap et al., 2020).
human-authored, and (v) the dataset has at least 389 instances. We use the second and third criteria to narrow the scope to easier self-rationalization since we expect that few-shot self-rationalization is very challenging. The last requirement is introduced to have 48 training and 350 evaluation examples.
This gives us 5 datasets, 4 of which are included in FEB and overviewed in Table 1. These datasets span 4 different tasks: natural language inference, multiple-choice commonsense QA, nonsensical sentence selection, and offensiveness classification. We exclude CoS-E (Rajani et al., 2019) as it is too noisy to be useful for modeling and evaluating self-rationalization (Narang et al., 2020), but we do not support using CoS-E in the future, especially since ECQA is introduced. $^3$
ECQA contains not only justifications of the correct answer, but also justifications that refute the incorrect answer choices. We use only the former since they answer "why is [input] assigned [label]?", just as explanations in other datasets that we have included in FEB. The SBIC dataset contains annotations of frames representing the social biases that are implied in language. We format these frames as a self-rationalization task as follows. We allow only two labels: "offensive" and "not offensive". If a post is not offensive, we assign it the explanation: "This post does not imply anything offensive." A post can be offensive because it targets an individual or a demographic group. In the former cases, a post is assigned the explanation: "This post is a personal attack." Otherwise, we define a set of rules to transform SBIC annota
<sup>3</sup>Since CoS-E is still actively used, we report CoS-E results in Tables 8 and 9 in Appendix.
2https://github.com/allenai/feb
tions of which identity-based group is targeted and what stereotypes of this group are referenced or implied into a single, coherent sentence; e.g., group: women, stereotype: can't drive  $\rightarrow$  "This post is offensive because it implies that women can't drive".
This is, to the best of our knowledge, the most comprehensive collection of self-rationalization tasks with textual inputs that could also be used even when working in a high-resource setting.
Automatic Evaluation Evaluating self-rationalization (predicting task labels and generating explanations for the predicted labels) requires end-task evaluation and assessing the explanation plausibility. We use accuracy as our end-task evaluation metric. Explanation plausibility may be described as a subjective satisfaction with how a given explanation justifies a label/answer (Yang et al., 2019). Kayser et al. (2021) present the largest currently available study on the correlation of 10 NLG metrics with human judgments of free-text explanation plausibility and report that BERTscore (Zhang et al., 2020) is most correlated (although the correlation is still weak). Thus, we use BERTscore to evaluate the similarity between gold and generated explanations. Following Kayser et al., we assign zero BERTscore to explanations of incorrectly predicted instances. $^4$
We follow recent recommendations for reliable few-shot evaluation (Bragg et al., 2021). Specifically, we fix hyperparameters (HPs) and use 60 random train-dev splits with 350 examples in each dev set. For classification tasks, the number of shots (examples per label) is chosen such that we construct a balanced training set of size 48. See Table 1 (col. 3) for exact values; for ECQA we sample 48 training examples. For each model, we report the mean and standard error of 60 mean accuracy/BERTscore values calculated on 60 dev sets of 350 examples. Our HPs are reported in Table 7 in Appendix.
Human Evaluation For our final models (§4), we conduct a human evaluation of plausibility of generated explanations following prior work (Kayser et al., 2021; Marasović et al., 2020). For each model evaluation, Kayser et al. (2021) take the first 300 dev examples that are correctly predicted by the model. This means that the dev set subsets used for human evaluation differ across models that are evaluated. However, the overlap between the evaluation sets is maximized by fixing the order of dev instances and taking the first 300.
Prior work used a single train-dev split, while FEB has 60 train-dev splits. Multiple splits provide the opportunity to account for the variance caused by changing the random seed to produce a reliable estimate of plausibility of explanations produced with only a few examples. Therefore, we take the first 6 correctly predicted examples per train-dev split, i.e.,  $6^{*}60 = 360$  total instances. Moreover, for classification tasks, we propose to take the first 6/#labels correctly-predicted examples per label to have a balanced evaluation set.
Following Kayser et al. (2021), we conduct the human evaluation in two steps:
- Step1: Select the correct label/answer.
- Step2: Assess whether two explanations (gold and generated) justify the label/answer above.
The first step makes sure the annotators understood the task correctly and they are not able to submit their annotations if the answers are wrong. Ground-truth explanations are evaluated to implicitly influence annotators with a gold reference point when they evaluate generated explanations, and to measure the quality of explanation datasets. To evaluate explanations, annotators are asked "Does the explanation justify the answer?" and given the options {"yes", "weak yes", "weak no", "no)}. These options are mapped to plausibility scores of  $\{1, \frac{2}{3}, \frac{1}{3}, 0\}$ , respectively. For each of the 360 examples, we calculate the mean plausibility score of 3 annotators and report the mean and the standard error of 360 mean scores. We also report the inter-annotator agreement calculated with Fleiss' kappa. Finally, models are evaluated independently to avoid penalizing worse models in the presence of explanations generated by a better model.
$^{4}$ Kayser et al. (2021): "An explanation is expected to be false when the answer is predicted incorrectly (as it is expected to justify a wrong answer)."
In early studies, we found that 48 gives models that are at least slightly above the random baseline across all four tasks.
To calculate the standard error for accuracy/BERTscore we use  $n = 60$ . The training (and likewise, dev) sets across splits can overlap, so this error reflects the variability expected in average scores when repeating our experiment with 60 new random splits of the same data sets.
<sup>7</sup>We skipped this step for ECQA because we could not teach crowdworkers sufficiently well to select the most likely answer out of multiple likely answer candidates in ECQA.
3 Prompting for Self-Rationalization
We approach few-shot self-rationalization with prompt-based finetuning using natural language (NL) prompts. The key idea behind NL prompts is that a pretrained language model (LM) is already well-positioned to solve the end-task if we format finetuning end-task examples as similar as possible to the format used in the LM's pretraining. Following that principle, in this section, we describe our prompting approach with T5 (Raffel et al., 2020) and comprehensively evaluate three distinct prompt types with FEB. Our results show that a unified question-answering (QA) prompt combined with a T5 variant that includes additional supervised multitask QA training (UNIFIEDQA; Khashabi et al., 2020) performs the best overall across tasks, when compared to three different alternative prompts as described below.
Self-rationalization models (Narang et al., 2020; Wegreffe et al., 2021) are currently based on T5 for at least two reasons. First, T5 has been pretrained with many supervised tasks including classification and generation tasks, and self-rationalization involves both classification and generation. Second, T5 is one of the largest open-sourced and widely studied pretrained models, and higher LM performance is correlated with larger model size (Kaplan et al., 2020). Thus, all of our experiments are based on T5 (and the UNIFIEDQA variant when evaluating prompts based on a QA format). In this section, all results are obtained with the base version of these models and in §4 we scale model size.
When a LM is pretrained with masked language modeling (Devlin et al., 2019) only, an appropriate NL prompt is constructed by adding and infilling masked tokens (Jiang et al., 2020). T5, however, has been pretrained with span infilling and a suite of supervised tasks whose instances were formatted in various ways. One of these supervised tasks includes SQUAD 1.1 (Rajpurkar et al., 2016) which allows us to experiment with prompts based on QA templates. As a result, we were able to design several different types of NL prompts for T5 consistent with different aspects of its pretraining:
1. QA prompts (SQUAD $_{\mathrm{T5}}$ , QASIMPLE).
2. span-filling prompts (INFILLING),
3. prompts designed by following the formatting of the most similar T5's pretraining task  $(\approx \mathrm{T}5$  ; see Table 6 in Appendix),
We illustrate these prompt types for COMVE in Table 11 in Appendix. The following sections de
scribe these formats in detail and compare their performance using FEB.
3.1 QA Prompts
Formating new instances as QA pairs has been shown to be useful for transfer learning from a QA model (Gardner et al., 2019). We first evaluate options for a versatile QA NL prompt for self-rationalization of tasks in FEB before comparing this approach with the other two prompt types (INFILLING and  $\approx$ T5) in §3.3. As alternative QA models, we investigate two models: T5 (which has been pretrained with QA supervision from SQUAD 1.1), and UNIFIEDQA (a T5 variant described in detail below). Since UNIFIEDQA was trained on a multitask mixture of many different QA datasets, these T5 variants allow us to examine the extent to which additional QA supervision can transfer to the few-shot self-rationalization setting.
Prior work (Bragg et al., 2021) introduced UNIFEW, a model based on UNIFIEDQA, that is finetuned on a few task-specific instances posed as QA. Despite its simplicity, UNIFEW achieves competitive few-shot learning performance with strong baselines for classification tasks. However, Bragg et al.'s prompts do not cover all task types in FEB, and the question structure in their prompts is highly task-specific (see Appendix A.1).
Alternatively, we propose to design QA prompts with a simple principle in mind: Given a non-QA task, construct an equivalent QA task in the form of short "Is...?" or "What is...?" questions. Here, "Is...?" questions have yes/no answers (sometimes "maybe"), and task labels verbatim are answers to "What is...?" questions (e.g., "offensive" and "not offensive"). Given such question-answer pairs, we develop prompts following the formats proposed in UNIFIEDQA (see Appendix A) and prompt UNIFIEDQA. We denote these prompts as  $\mathrm{QASIMPLE}$ . For T5, we develop prompts following the SQUAD format for the T5's pretraining ( $\mathrm{SQUAD}_{\mathrm{T5}}$ ; see Appendix A).
There is another factor to consider. We need to decide whether to add tags—a single description of each input element. Examples of tags are "premise:" and "hypothesis:" before the first and second sentence in the E-SNLI input. Without these tags the task seems impossible to understand, but UNIFIEDQA has not been trained with any tags.
The output always takes the form of “[answer[label] because [explanation]”. See Table
11 (Appendix) for examples of our various QA prompts.
Results We present the results of UNIFIEDQA with QASIMPLE in Table 2, and due to space limits, T5's results with SQUAD $_{\mathrm{T5}}$  prompts in Table 10 in Appendix.
We observe that for E-SNLI and COMVE it is crucial to add tags ("premise:"/“hypothesis:”; "choice1:"/“choice2:").8 This result is intuitive—it should be difficult to pick one of the two sentences, or classify a relation between them, if sentences are not marked. On the other hand, adding label choices is not beneficial and in some cases can even decrease the performance. When tags are included, we see that across all the tasks the "What is...?" question performs the best. This also holds for T5 and  $\mathrm{SQUAD}_{\mathrm{T5}}$  prompts (see Table 10). Finally, the prompt with the "What is...?" question and tags in the input outperforms UNIFEW for both tasks UNIFEW can be applied to. This result shows that this prompt is both versatile and effective.
Finally, we compare the best performing prompts we get with UNIFIEDQA with  $\mathrm{QA}_{\mathrm{SIMPLE}}$  and T5 with  $\mathrm{SQUAD}_{\mathrm{T5}}$ . See prompts "SQUAD $_{\mathrm{T5}}$  × WHAT IS...? + TAGS" and "QASIMPLE × WHAT IS...? + TAGS" in Table 11. For ECQA and COMVE, we observe notable improvements from using UNIFIEDQA, and minor improvements for SBIC. For E-SNLI, T5 is better, presumably because UNIFIEDQA has lost some useful information from NLI after extensive continued pretraining for QA. These results suggest that UNIFIEDQA is a better model for prompting self-rationalization with QA prompts.
To recap, the analysis presented in this section suggests that QA prompting for inducing self-rationalization behavior is best done when UNIFIEDQA is combined with the NL prompt below. For true QA tasks, we use the original UNIFIEDQA formats. $^{9}$
explain what is this/more...? \n tag1: [sequence1] tag2: [sequence2] ...
[answer/label] because [explanation]
Prompt	Accuracy	BERTscore
E-SNLI	UNIFew	61.70.6	55.80.5
+ tags	63.60.4	57.30.4
Is...?	47.50.5	42.70.5
+ tags	66.60.5	60.00.5
+ tags & choices	64.40.5	58.20.5
What is...?	40.70.4	36.50.4
+ tags	75.00.3	67.50.3
+ tags & choices	69.30.7	62.50.6
RANDOM BASELINE	33.3	-
ECQA	UNIFIEDQA	41.40.3	36.70.3
RANDOM BASELINE	20.0	-
ComVE	Is...?	52.70.3	47.70.3
+ tags	52.50.3	47.50.3
+ tags & choices	52.20.3	47.30.3
What is...?	50.60.2	45.70.2
+ tags	67.30.7	61.00.6
+ tags & choices	62.60.6	56.70.6
RANDOM BASELINE	50.0	-
SBIC	UNIFew	66.10.4	63.80.4
Is...?	63.50.4	61.20.4
+ tags	62.60.4	60.40.4
+ tags & choices	63.60.4	61.30.4
What is...?	67.30.4	65.00.4
+ tags	67.50.4	65.30.4
+ tags & choices	65.40.6	63.10.6
RANDOM BASELINE	50.0	-
Table 2: Prompting UNIFIEDQA with QASIMPLE with "Is...?" and "What is...?" questions, and UNIFEW. See §3.1 for descriptions of these prompts. For ECQA we use the original UNIFIEDQA format for multiple-choice QA. We also inspect the effects of adding label choices and tags (defined in §3.1) to the input.
3.2 INFILLING Prompts
The simplest way to design an infilling prompt for self-rationalization with T5 is to add the span “<extra_id_0> because <extra_id_1>” to the input. A model should then replace <extra_id_0> with a label/answer and <extra_id_1> with an explanation. Besides being similar to T5's span infilling pretraining task, another benefit of this prompt is that it is very flexible—the span above can be added to any task input. This basic infilling prompt could be easily made more natural by prepending phrases such as: “The answer is” (ECQA), “Less common is” (COMVE), or “This
<sup>8</sup>Performance on COMVE with "Is...?" is close to random regardless of tags which suggests that this question form hinders the performance and tags cannot make a difference. <sup>9</sup>Following Hendrycks et al. (2021), we add  $\langle \mathbf{\sigma} / \mathbf{s} \rangle$  to the end of our QASIMPLE prompts.
E-SNLI	ECQA	COMVE	SBIC
B	75.20.4	22.30.3	50.40.3	61.60.4
N	75.10.4	27.60.4	49.00.3	64.70.5
(a) Accuracy.
E-SNLI	ECQA	COMVE	SBIC
B	67.70.3	19.80.3	45.50.3	59.20.5
N	67.50.4	24.50.3	44.30.3	62.00.5
is" (E-SNLI, SBIC). We hypothesize that these additional phrases could be beneficial because they suggest which subset of the vocabulary is the right word for filling in <extra_id_0>. We test whether it is beneficial to make the infilling prompt more natural-sounding.
Results T5 results are shown in Table 3. The outcome is mixed—while we observe notable benefits for ECQA/SBIC, for E-SNLI/ComVE there is a minor difference in favor of the basic prompt. A way to explain this is that T5 learned about NLI labels from MNLI during pretraining, so it does not need additional phrase to nudge it in the right direction. ComVE results are comparable to the random performance, and the model could not learn the task from the infilling prompt, with or without the additional phrases. Thus, we recommend using the more natural version as it is not detrimental to E-SNLI/ComVE performance while it leads to big improvements for ECQA/SBIC.
3.3 INFILLING vs.  $\approx$  T5 vs. QA
We have established appropriate QA and INFILLING prompts in §3.1 and §3.2. We now turn to a comparison between all three prompt types: (i) INFILLING (natural), (ii) ≈T5, and (iii) QASIMPLE ("What is...?" with tags). The first two are used to prompt T5 and the last type UNIFIEDQA. To construct ≈T5 prompts, for each task in FEB, we identify the most similar T5's pretraining task (see Table 6, Appendix) and use that task's formatting (see, e.g., ≈T5 × COPA in Table 11).
Results A comparison of the three prompt types is presented in Table 4. The QAsIMPLE prompt outperforms other prompt types for all tasks ex