SlowGuess commited on
Commit
1ff5918
·
verified ·
1 Parent(s): ea56e55

Add Batch b589ba57-89a4-45e0-bbd2-5fb636c199cb

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. emlmanewpretrainingobjectiveforemotionrelatedtasks/c4818e5f-e6a5-433c-b257-e63272586091_content_list.json +3 -0
  2. emlmanewpretrainingobjectiveforemotionrelatedtasks/c4818e5f-e6a5-433c-b257-e63272586091_model.json +3 -0
  3. emlmanewpretrainingobjectiveforemotionrelatedtasks/c4818e5f-e6a5-433c-b257-e63272586091_origin.pdf +3 -0
  4. emlmanewpretrainingobjectiveforemotionrelatedtasks/full.md +183 -0
  5. emlmanewpretrainingobjectiveforemotionrelatedtasks/images.zip +3 -0
  6. emlmanewpretrainingobjectiveforemotionrelatedtasks/layout.json +3 -0
  7. mtvrmultilingualmomentretrievalinvideos/417b5ca6-6009-429a-ad5a-be7d95871179_content_list.json +3 -0
  8. mtvrmultilingualmomentretrievalinvideos/417b5ca6-6009-429a-ad5a-be7d95871179_model.json +3 -0
  9. mtvrmultilingualmomentretrievalinvideos/417b5ca6-6009-429a-ad5a-be7d95871179_origin.pdf +3 -0
  10. mtvrmultilingualmomentretrievalinvideos/full.md +347 -0
  11. mtvrmultilingualmomentretrievalinvideos/images.zip +3 -0
  12. mtvrmultilingualmomentretrievalinvideos/layout.json +3 -0
  13. nmt5isparalleldatastillrelevantforpretrainingmassivelymultilinguallanguagemodels/19d83ad1-09dc-4497-8632-a93dd689f053_content_list.json +3 -0
  14. nmt5isparalleldatastillrelevantforpretrainingmassivelymultilinguallanguagemodels/19d83ad1-09dc-4497-8632-a93dd689f053_model.json +3 -0
  15. nmt5isparalleldatastillrelevantforpretrainingmassivelymultilinguallanguagemodels/19d83ad1-09dc-4497-8632-a93dd689f053_origin.pdf +3 -0
  16. nmt5isparalleldatastillrelevantforpretrainingmassivelymultilinguallanguagemodels/full.md +178 -0
  17. nmt5isparalleldatastillrelevantforpretrainingmassivelymultilinguallanguagemodels/images.zip +3 -0
  18. nmt5isparalleldatastillrelevantforpretrainingmassivelymultilinguallanguagemodels/layout.json +3 -0
  19. towardsamorerobustevaluationforconversationalquestionanswering/f9a5ee66-6d8b-4a18-b856-04b75950ca1b_content_list.json +3 -0
  20. towardsamorerobustevaluationforconversationalquestionanswering/f9a5ee66-6d8b-4a18-b856-04b75950ca1b_model.json +3 -0
  21. towardsamorerobustevaluationforconversationalquestionanswering/f9a5ee66-6d8b-4a18-b856-04b75950ca1b_origin.pdf +3 -0
  22. towardsamorerobustevaluationforconversationalquestionanswering/full.md +171 -0
  23. towardsamorerobustevaluationforconversationalquestionanswering/images.zip +3 -0
  24. towardsamorerobustevaluationforconversationalquestionanswering/layout.json +3 -0
  25. towardsmoreequitablequestionansweringsystemshowmuchmoredatadoyouneed/fdbd283a-547a-45f4-89d3-ec0b370a66b1_content_list.json +3 -0
  26. towardsmoreequitablequestionansweringsystemshowmuchmoredatadoyouneed/fdbd283a-547a-45f4-89d3-ec0b370a66b1_model.json +3 -0
  27. towardsmoreequitablequestionansweringsystemshowmuchmoredatadoyouneed/fdbd283a-547a-45f4-89d3-ec0b370a66b1_origin.pdf +3 -0
  28. towardsmoreequitablequestionansweringsystemshowmuchmoredatadoyouneed/full.md +163 -0
  29. towardsmoreequitablequestionansweringsystemshowmuchmoredatadoyouneed/images.zip +3 -0
  30. towardsmoreequitablequestionansweringsystemshowmuchmoredatadoyouneed/layout.json +3 -0
  31. trainingadaptivecomputationforopendomainquestionansweringwithcomputationalconstraints/86e588e3-e6f8-4b92-9621-6b38420d10eb_content_list.json +3 -0
  32. trainingadaptivecomputationforopendomainquestionansweringwithcomputationalconstraints/86e588e3-e6f8-4b92-9621-6b38420d10eb_model.json +3 -0
  33. trainingadaptivecomputationforopendomainquestionansweringwithcomputationalconstraints/86e588e3-e6f8-4b92-9621-6b38420d10eb_origin.pdf +3 -0
  34. trainingadaptivecomputationforopendomainquestionansweringwithcomputationalconstraints/full.md +157 -0
  35. trainingadaptivecomputationforopendomainquestionansweringwithcomputationalconstraints/images.zip +3 -0
  36. trainingadaptivecomputationforopendomainquestionansweringwithcomputationalconstraints/layout.json +3 -0
  37. umicanunreferencedmetricforimagecaptioningviacontrastivelearning/db7287e3-5637-49ca-986d-142be1c84005_content_list.json +3 -0
  38. umicanunreferencedmetricforimagecaptioningviacontrastivelearning/db7287e3-5637-49ca-986d-142be1c84005_model.json +3 -0
  39. umicanunreferencedmetricforimagecaptioningviacontrastivelearning/db7287e3-5637-49ca-986d-142be1c84005_origin.pdf +3 -0
  40. umicanunreferencedmetricforimagecaptioningviacontrastivelearning/full.md +231 -0
  41. umicanunreferencedmetricforimagecaptioningviacontrastivelearning/images.zip +3 -0
  42. umicanunreferencedmetricforimagecaptioningviacontrastivelearning/layout.json +3 -0
  43. uncertaintyandsurprisaljointlydeliverthepunchlineexploitingincongruitybasedfeaturesforhumorrecognition/a368dd0e-5751-4527-a465-b9f0821eddb7_content_list.json +3 -0
  44. uncertaintyandsurprisaljointlydeliverthepunchlineexploitingincongruitybasedfeaturesforhumorrecognition/a368dd0e-5751-4527-a465-b9f0821eddb7_model.json +3 -0
  45. uncertaintyandsurprisaljointlydeliverthepunchlineexploitingincongruitybasedfeaturesforhumorrecognition/a368dd0e-5751-4527-a465-b9f0821eddb7_origin.pdf +3 -0
  46. uncertaintyandsurprisaljointlydeliverthepunchlineexploitingincongruitybasedfeaturesforhumorrecognition/full.md +202 -0
  47. uncertaintyandsurprisaljointlydeliverthepunchlineexploitingincongruitybasedfeaturesforhumorrecognition/images.zip +3 -0
  48. uncertaintyandsurprisaljointlydeliverthepunchlineexploitingincongruitybasedfeaturesforhumorrecognition/layout.json +3 -0
  49. unsupervisedcrossdomainprerequisitechainlearningusingvariationalgraphautoencoders/71e6e818-0c73-47ef-a521-c67a075769f5_content_list.json +3 -0
  50. unsupervisedcrossdomainprerequisitechainlearningusingvariationalgraphautoencoders/71e6e818-0c73-47ef-a521-c67a075769f5_model.json +3 -0
emlmanewpretrainingobjectiveforemotionrelatedtasks/c4818e5f-e6a5-433c-b257-e63272586091_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a177dbf169de3c3fdafe80df120f3b88dcc98cf48f1f525121ef08bc058d5075
3
+ size 50409
emlmanewpretrainingobjectiveforemotionrelatedtasks/c4818e5f-e6a5-433c-b257-e63272586091_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6113de9d4c92db0286daa78ad458edc0f73437ed651e83f9e28e3782f22e4feb
3
+ size 62815
emlmanewpretrainingobjectiveforemotionrelatedtasks/c4818e5f-e6a5-433c-b257-e63272586091_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c82f645dc5695cfd646f164c33dc5208b9a8a26c0cbe7fb3012e61c35aa85199
3
+ size 246422
emlmanewpretrainingobjectiveforemotionrelatedtasks/full.md ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # eMLM: A New Pre-training Objective for Emotion Related Tasks
2
+
3
+ Tiberiu Sosea
4
+
5
+ Computer Science
6
+
7
+ University of Illinois at Chicago
8
+
9
+ tsosea2@uic.edu
10
+
11
+ Cornelia Caragea
12
+
13
+ Computer Science
14
+
15
+ University of Illinois at Chicago
16
+
17
+ cornelia@uic.edu
18
+
19
+ # Abstract
20
+
21
+ Bidirectional Encoder Representations from Transformers (BERT) have been shown to be extremely effective on a wide variety of natural language processing tasks, including sentiment analysis and emotion detection. However, the proposed pre-training objectives of BERT do not induce any sentiment or emotion-specific biases into the model. In this paper, we present Emotion Masked Language Modeling, a variation of Masked Language Modeling, aimed at improving the BERT language representation model for emotion detection and sentiment analysis tasks. Using the same pre-training corpora as the original BERT model, Wikipedia and BookCorpus, our BERT variation manages to improve the downstream performance on 4 tasks for emotion detection and sentiment analysis by an average of $1.2\%$ F1. Moreover, our approach shows an increased performance in our task-specific robustness tests. We make our code and pre-trained model available at https://github.com/tsosea2/eMLM.
22
+
23
+ # 1 Introduction
24
+
25
+ Language models have been studied extensively in the NLP community (Dai and Le, 2015; Howard and Ruder, 2018; Peters et al., 2018; Devlin et al., 2019; Liu et al., 2019), with approaches attaining state-of-the-art results on multiple token-level or sentence-level tasks. BERT (Devlin et al., 2019) is a pre-trained language model, which proposed a new pre-training objective inspired by the Clozetask (Taylor, 1953), which enables the training of a deep bi-directional transformer network. This objective, called Masked Language Modeling (MLM) is used on large amounts of unlabeled data from Wikipedia and BookCorpus to produce powerful universal language representations. However, the pre-training does not take into account the downstream task on which the model will be applied.
26
+
27
+ In this paper, we posit that we can leverage the characteristics of a downstream task to design better task-tailored pre-training objectives. Concretely, we induce information from emotion or sentiment lexicons into our BERT pre-training objective to improve the performance on tasks from sentiment analysis and emotion detection.
28
+
29
+ There are numerous studies that focus on emotion detection (Demszky et al., 2020; Desai et al., 2020; del Arco et al., 2020; Sosea and Caragea, 2020; Majumder et al., 2019; Mohammad and Kiritchenko, 2018; Abdul-Mageed and Ungar, 2017; Mohammad and Kiritchenko, 2015; Mohammad, 2012; Strapparava and Mihalcea, 2008) and sentiment analysis (Yin et al., 2020; Tian et al., 2020; Phan and Ogunbona, 2020; Zhai and Zhang, 2016; Chen et al., 2016; Liu, 2012; Glorot et al., 2011; Pang and Lee, 2005). Various lexicons have been used to improve model performance on these tasks. For instance, Katz et al. (2007) used occurrences of emotion words to identify various emotion types in news headlines. Moreover, emotion lexicons have been used to produce important features which can be used inside a machine learning algorithm to improve the performance on emotion detection tasks (Mohammad, 2012; Sykora et al., 2013; Khanpour and Caragea, 2018; Biyani et al., 2014). In this paper, however, instead of leveraging these lexicons to design features, in contrast, we use them to obtain language representations that are more suitable for emotion and sentiment tasks.
30
+
31
+ To this end, we introduce Emotion Masked Language Modeling (eMLM), a new pre-training BERT (Devlin et al., 2019) objective aimed at improving the BERT performance on tasks related to sentiment analysis and emotion detection. Inspired by the well-known Masked Language Modeling objective, eMLM adds only a few simple, yet powerful changes. Instead of uniformly masking the tokens in the input sequence, eMLM leverages
32
+
33
+ <table><tr><td>SENT</td><td>They</td><td>look</td><td>absolutely</td><td>perfect</td><td>together</td><td>I</td><td>hope</td><td>its</td><td>that</td><td>way</td><td>in</td><td>real</td><td>life</td><td>too</td></tr><tr><td>MLM</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td></tr><tr><td>eMLM</td><td>0.09</td><td>0.09</td><td>0.09</td><td>0.50</td><td>0.09</td><td>0.09</td><td>0.50</td><td>0.09</td><td>0.09</td><td>0.09</td><td>0.09</td><td>0.09</td><td>0.09</td><td>0.09</td></tr><tr><td>SENT</td><td>Most</td><td>tiring</td><td>thing</td><td>was</td><td>the</td><td>drive</td><td>one</td><td>hour</td><td>each</td><td>way</td><td></td><td></td><td></td><td></td></tr><tr><td>MLM</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td>0.15</td><td></td><td></td><td></td><td></td></tr><tr><td>eMLM</td><td>0.11</td><td>0.50</td><td>0.11</td><td>0.11</td><td>0.11</td><td>0.11</td><td>0.11</td><td>0.11</td><td>0.11</td><td>0.11</td><td></td><td></td><td></td><td></td></tr></table>
34
+
35
+ Table 1: Comparison of masked probabilities between MLM and eMLM on two example sentences.
36
+
37
+ lexicon information, and assigns higher masking probabilities to words that are more likely to be important in the sentiment or emotion contexts. To enable a fair comparison with the vanilla BERT model, we train the eMLM BERT model in the same fashion as the vanilla BERT, pre-training on Wikipedia and BookCorpus (Zhu et al., 2015). To our knowledge, we are the first to study different masking probabilities for the BERT pre-training procedure guided by sentiment and emotion lexicons. Similar to our work, some studies also focused on incorporating sentiment information into pre-trained language models. For example, Yin et al. (2020) built an attention network on top of BERT to predict sentiment labels of phrase nodes obtained through a constituency parse tree. On the other hand, Tian et al. (2020) designed various pretraining objectives, such as masking and predicting all words from a pre-defined small set of seeds, and predicting an aspect-sentiment pair or the polarity of words. In contrast, we leverage information from available sentiment and emotion lexicons.
38
+
39
+ We show the feasibility of our approach by testing eMLM on two sentiment analysis benchmark datasets and two emotion detection datasets. These datasets span diverse domains, such as movie reviews, online health communities, and Reddit discussions, enabling a comprehensive analysis of eMLM.
40
+
41
+ Our contributions are as follows: 1) We introduce a new pre-training objective for BERT (leveraging available lexicons), aimed at producing better task-guided universal representations for downstream tasks from sentiment analysis and emotion detection. We offer the pre-trained model as an easy way to leverage our approach on downstream applications. 2) We show the efficacy of our approach by testing our method on four benchmark datasets for emotion and sentiment and obtain an average improvement in F1 score of $1.2\%$ . 3) We verify the robustness of our model in the face of input perturbations, which occur frequently in informal contexts (e.g., due to mispellings).
42
+
43
+ # 2 Proposed Approach
44
+
45
+ Background Bidirectional Encoder from Transformers for Language Understanding (BERT) (Devlin et al., 2019) is a pre-trained language model trained on large amounts of unlabeled data using two objectives: 1) Masked Language Modeling (MLM) randomly masks $15\%$ of tokens in a sequence, followed by a supervised prediction of the masked tokens; 2) Next Sentence Prediction (NSP) predicts in a binary fashion if two sentences follow each other. By using these two tasks on large-scale data repositories such as BookCorpus (800M words) (Zhu et al., 2015) and Wikipedia (2,500M words), BERT produces powerful universal language representations, applicable on a wide range of tasks, such as sentiment analysis, question answering, and commonsense reasoning.
46
+
47
+ However, to be used in various downstream tasks, BERT has to undergo a task-specific finetuning step (Devlin et al., 2019), where the contextualized embedding is adapted to the needed task. We posit that we can improve the downstream performance by focusing on the target task in the pre-training phase as well. Specifically, we focus on sentiment analysis and emotion detection, and show that task-guided unsupervised pre-training helps the performance considerably.
48
+
49
+ Masking Emotion Words Now we introduce Emotion Masked Language Modeling (eMLM), a variation of MLM targeted at inducing emotion or sentiment-specific biases in the BERT pre-training phase. Specifically, unlike BERT, which uses a uniform probability (15%) to mask the tokens in an input sentence, we assign higher probabilities to tokens which are emotionally rich words from an available lexicon $\mathcal{L}$ . We denote this probability by $k$ , which is a hyperparameter in our eMLM method. Our masking process can be summarized as follows: Given an input sentence $S$ : 1) We extract the words that belong to the lexicon $\mathcal{L}$ , and we denote them by $E$ ; 2) We set the masking probability of these words as $P(w_{e}) = k \forall w_{e} \in E$ ; 3) To ensure
50
+
51
+ we mask $15\%$ of the words in total, we lower the masking probability of the non-emotionally-rich words using the following formula:
52
+
53
+ $$
54
+ P (w _ {n}) = \frac {\operatorname* {m a x} (| S | \cdot 0 . 1 5 - | E | \cdot k , 0)}{| S | - | E |}, \forall w _ {n} \notin E
55
+ $$
56
+
57
+ where $|\cdot|$ represents the size of a set. We show examples of how our masked probabilities change from MLM to eMLM in Table 1. For instance, in the first example, there are two emotion words, perfect and hope, and we use a masking probability of $k = 0.50$ . While the probabilities of these two words are set to $50\%$ , the non emotionally-rich word probability is lowered from $15\%$ to $9\%$ to keep the sum of probabilities constant. The rest of the training process is the same as the original BERT pre-training. That is, we train our BERT model from scratch using eMLM and NSP on the same datasets: Wikipedia and BookCorpus. We mention that we use whole word masking, both for eMLM and the MLM (i.e., we mask all the subtokens corresponding to a word).
58
+
59
+ # 3 Experiments and Results
60
+
61
+ In this section, we first describe our experimental setup (§3.1), then present our datasets and lexicons (§3.2), and then discuss the results that contrast eMLM with the original BERT MLM (§3.3).
62
+
63
+ # 3.1 Experimental Setup
64
+
65
+ We use various benchmark datasets from sentiment analysis and emotion detection to test our eMLM approach. For every dataset considered, we use the provided training, validation, and test splits. To assert statistical significance, we fine-tune each model 10 times with different random seeds and report the average F1 score. We investigate various masking probabilities $k$ , ranging from 0.2 to 1.0, and find that 0.5 works best in our setting. For low values around 0.2 we notice that the performance is similar to that of the original BERT, while for high values (closer to 1.0), the performance is negatively affected.
66
+
67
+ # 3.2 Datasets and Lexicons
68
+
69
+ We test our models on various benchmark datasets described below.
70
+
71
+ Stanford Sentiment Treebank (SST) (Socher et al., 2013) SST contains 11,855 sentences from
72
+
73
+ <table><tr><td></td><td colspan="2">SST-2</td><td colspan="2">SST-5</td></tr><tr><td></td><td>ACC</td><td>F-1</td><td>ACC</td><td>F-1</td></tr><tr><td>BERT</td><td>0.912</td><td>0.922</td><td>0.532</td><td>0.541</td></tr><tr><td>eMLM (S)</td><td>0.919</td><td>0.928</td><td>0.541</td><td>0.552</td></tr><tr><td>eMLM (E)</td><td>0.920</td><td>0.931†</td><td>0.547</td><td>0.558†</td></tr></table>
74
+
75
+ Table 2: Performance on the sentiment analysis task. We assert significance† if $p < 0.05$ under a t-test with the vanilla BERT model.
76
+
77
+ movie reviews, annotated with five sentiment labels: negative, somewhat negative, neutral, somewhat positive, and positive. First, we consider the binarized dataset, called SST-2, where the examples with the negative and somewhat negative labels are merged into a negative class, and the examples with the somewhat positive and positive labels are merged into a positive class (with neutral class being removed). Second, we consider the SST fine-grained version (SST-5), which uses all five labels.
78
+
79
+ GoEmotions (Demszky et al., 2020) is a sentence-level multilabel dataset of 58,000 comments curated from Reddit and annotated with 27 emotion categories and the neutral class.
80
+
81
+ CancerEmo (Sosea and Caragea, 2020) is a sentence-level multilabel dataset of 8,500 sentences labeled with the eight Plutchik (Plutchik, 1980) basic emotions from an Online Health Community for people suffering from diseases such as cancer.
82
+
83
+ We analyze the behaviour of eMLM in diverse environments: sentiment analysis or emotion detection, various data platforms (e.g., Reddit,OHCs), and variate emotion or sentiment granularity (from 2 classes to as many as 28 classes).
84
+
85
+ **Lexicons** As mentioned above, our eMLM focuses on emotionally rich words from a lexicon. In this paper, we use EmoLex (Mohammad and Turney, 2013), a lexicon of 6,000 words associated with eight Plutchik basic emotions (Plutchik, 1980) (sadness, anger, joy, surprise, anticipation, trust, fear, disgust) and 5,555 words associated with the positive and negative sentiments. We consider the sentiment and emotion words separately to analyze the impact of each on the performance of eMLM. We denote the approach which masks the emotion-revealing words by eMLM (E), and the sentiment-revealing words by eMLM (S).
86
+
87
+ <table><tr><td>EMOTION</td><td>BERT</td><td>eMLM (E)</td><td>eMLM (S)</td></tr><tr><td>ADMIRATION</td><td>0.65</td><td>0.68†</td><td>0.67</td></tr><tr><td>AMUSEMENT</td><td>0.80</td><td>0.83†</td><td>0.82</td></tr><tr><td>ANGER</td><td>0.47</td><td>0.46</td><td>0.46</td></tr><tr><td>ANNOYANCE</td><td>0.34</td><td>0.34</td><td>0.34</td></tr><tr><td>APPROVAL</td><td>0.36</td><td>0.38</td><td>0.37</td></tr><tr><td>CARING</td><td>0.39</td><td>0.43</td><td>0.42</td></tr><tr><td>CONFUSION</td><td>0.37</td><td>0.37</td><td>0.37</td></tr><tr><td>CURIOSITY</td><td>0.54</td><td>0.57†</td><td>0.57</td></tr><tr><td>DESIRE</td><td>0.49</td><td>0.49</td><td>0.49</td></tr><tr><td>DISAPPOINTMENT</td><td>0.28</td><td>0.30</td><td>0.30</td></tr><tr><td>DISAPPROVAL</td><td>0.39</td><td>0.43†</td><td>0.41</td></tr><tr><td>DISGUST</td><td>0.45</td><td>0.48†</td><td>0.48</td></tr><tr><td>EMBARRASSMENT</td><td>0.43</td><td>0.43</td><td>0.44</td></tr><tr><td>EXCITEMENT</td><td>0.34</td><td>0.34</td><td>0.34</td></tr><tr><td>FEAR</td><td>0.60</td><td>0.64†</td><td>0.63</td></tr><tr><td>GRATITUDE</td><td>0.86</td><td>0.88†</td><td>0.87</td></tr><tr><td>GRIEF</td><td>0.00</td><td>0.00</td><td>0.00</td></tr><tr><td>JOY</td><td>0.51</td><td>0.53</td><td>0.52</td></tr><tr><td>LOVE</td><td>0.78</td><td>0.80†</td><td>0.80</td></tr><tr><td>NERVOUSNESS</td><td>0.35</td><td>0.37</td><td>0.36</td></tr><tr><td>NEUTRAL</td><td>0.68</td><td>0.67</td><td>0.68</td></tr><tr><td>OPTIMISM</td><td>0.51</td><td>0.53</td><td>0.52</td></tr><tr><td>PRIDE</td><td>0.36</td><td>0.36</td><td>0.36</td></tr><tr><td>REALIZATION</td><td>0.21</td><td>0.21</td><td>0.21</td></tr><tr><td>RELIEF</td><td>0.15</td><td>0.16</td><td>0.16</td></tr><tr><td>REMORSE</td><td>0.66</td><td>0.65</td><td>0.66</td></tr><tr><td>SADNESS</td><td>0.49</td><td>0.49</td><td>0.48</td></tr><tr><td>SURPRISE</td><td>0.50</td><td>0.53†</td><td>0.52</td></tr><tr><td>AVERAGE</td><td>0.462</td><td>0.476</td><td>0.469</td></tr></table>
88
+
89
+ # 3.3 Results
90
+
91
+ Results on Sentiment Analysis We show the results of our approaches on SST in Table 2. First, we observe that eMLM (E) and eMLM (S) improve upon the vanilla BERT model on both tasks, with eMLM (E) obtaining as much as $1.7\%$ improvement in F1. Interestingly, eMLM (E) outperforms eMLM (S) suggesting that masking finer-granularity emotion words in eMLM produces better representations for the task. At the same time, eMLM (E) achieves better performance on the fine-grained SST-5 task, where the improvements over the vanilla BERT are considerable.
92
+
93
+ Results on Emotion Detection We show the results of eMLM on the GoEmotions dataset in Table 3 and observe that, similar to sentiment analysis, eMLM (E) is the best performing approach, improving upon vanilla BERT by $1.4\%$ in F1. We show the results on CancerEmo in Table 4 and observe the same pattern: eMLM (E) consistently outperforms the other approaches. We see improvements as high as $4\%$ on Joy and $2\%$ on Sad
94
+
95
+ Table 3: F-1 scores on the Goemotion dataset. We assert significance† if $p < 0.05$ under a t-test with the vanilla BERT model.
96
+
97
+ <table><tr><td>EMOTION</td><td>BERT</td><td>eMLM (E)</td><td>eMLM (S)</td></tr><tr><td>SADNESS</td><td>0.71</td><td>0.73†</td><td>0.73†</td></tr><tr><td>JOY</td><td>0.81</td><td>0.85†</td><td>0.84</td></tr><tr><td>FEAR</td><td>0.77</td><td>0.77</td><td>0.77</td></tr><tr><td>ANGER</td><td>0.68</td><td>0.69</td><td>0.69</td></tr><tr><td>SURPRISE</td><td>0.68</td><td>0.68</td><td>0.67</td></tr><tr><td>DISGUST</td><td>0.59</td><td>0.58</td><td>0.57</td></tr><tr><td>TRUST</td><td>0.67</td><td>0.67</td><td>0.67</td></tr><tr><td>ANTICIPATION</td><td>0.70</td><td>0.78†</td><td>0.74</td></tr><tr><td>AVERAGE</td><td>0.701</td><td>0.718</td><td>0.706</td></tr></table>
98
+
99
+ Table 4: Performance on CancerEmo dataset. We assert significance† if $p < 0.05$ under a t-test with the vanilla BERT model.
100
+
101
+ <table><tr><td>K</td><td>SST-2</td><td>SST-5</td><td>CANCEREMO</td><td>GOEMOTIONS</td></tr><tr><td>0.15</td><td>0.922</td><td>0.541</td><td>0.701</td><td>0.462</td></tr><tr><td>0.30</td><td>0.923</td><td>0.540</td><td>0.704</td><td>0.466</td></tr><tr><td>0.50</td><td>0.931</td><td>0.558</td><td>0.718</td><td>0.476</td></tr><tr><td>0.70</td><td>0.921</td><td>0.539</td><td>0.700</td><td>0.455</td></tr><tr><td>0.90</td><td>0.911</td><td>0.540</td><td>0.691</td><td>0.412</td></tr></table>
102
+
103
+ Table 5: Average F-1 on the considered datasets using various values of the emotion masking probability $k$ :
104
+
105
+ ness. Overall, eMLM (E) obtains an $1.7\%$ F1 improvement over the vanilla BERT model.
106
+
107
+ Discussion The presented results reveal the feasibility of our proposed approach. Our BERT model trained using the eMLM objective produces high quality contextualized embeddings for downstream tasks that span the sentiment analysis and emotion detection tasks. Moreover, our methods incur no additional computational cost over the original BERT (Devlin et al., 2019), and undergo the same amount of pre-training. We also tried combining and masking both sentiment and emotion words; however, we did not see any performance improvements. As a step forward, we are interested in gaining more insights into the differences between eMLM (E) and the vanilla BERT model. We study this in the robustness context in the next section, and analyze how our models behave in the face of various input perturbations (i.e., noise).
108
+
109
+ Varying the Emotion Masking Probability $k$ To offer additional insights into our eMLM approach and show the impact of the sentiment or emotion-rich word masking probability on downstream tasks, we show the results obtained using various values of $k$ in Table 5. First, we note that using a slightly lower probability of 0.30 still adds improvements to our model on three of the considered datasets. In contrast, too high of a proba
110
+
111
+ bility hurts the F1 performance. Concretely, using $k = 0.90$ , our eMLM approach decreases the F1 compared to the vanilla BERT by $1\%$ on CancerEmo, $5\%$ on GoEmotions, and $1\%$ on SST-2.
112
+
113
+ # 4 Robustness Test
114
+
115
+ It has been shown that neural models are often sensitive to various input perturbations (Niu et al., 2020; Belinkov and Bisk, 2018). In this section, we aim to investigate the robustness of our proposed approach in the face of input noise. We focus on the following two questions: 1) Does eMLM improve the robustness of the model? 2) What type of input noise is successful in misleading our model? We study these questions on the SST-5 sentiment analysis task using the framework introduced by Hsieh et al. (2019). We explore three ways to generate input perturbations and verify their "success." We say a perturbation is "successful" on a model $M$ for an example $e$ if 1) The model $M$ classifies $e$ correctly and 2) The model $M$ misclassifies the example $e$ when noise is applied to it. Naturally, the lower the perturbation success rate, the more robust a model is. The perturbations that we considered are as follows:
116
+
117
+ 1. Random (Alzantot et al., 2018) replaces one word from the input sentence with a random word from the vocabulary. For a word, we repeat this process 100 times. If at least one of the replacements leads to an incorrect prediction, the perturbation is deemed to be successful.
118
+ 2. LIST (Alzantot et al., 2018) replaces each word (one at a time) in the input text with a synonym. The input perturbation is successful if at least one replacement leads to an incorrect prediction.
119
+ 3. EmoWord If there is an emotion word in the input sentence, then we zero out that word, otherwise, we zero out a random word from the input sequence.
120
+
121
+ Results We show the results of the robustness tests for the vanilla BERT and the eMLM approach in Table 6. First, EmoWord is the most successful perturbation, being twice as effective compared to the other methods. Second, we observe that Random and LIST obtain the same success rates among both the BERT and eMLM approach. However,
122
+
123
+ <table><tr><td>EMOTION</td><td>RANDOM</td><td>LIST</td><td>EMOWORD</td></tr><tr><td>BERT</td><td>1.5%</td><td>2.4%</td><td>9.8%</td></tr><tr><td>eMLM</td><td>1.5%</td><td>2.4%</td><td>5.4%</td></tr></table>
124
+
125
+ Table 6: Robustness of our models in terms of perturbation success rates. Lower success rates indicate more robust models.
126
+
127
+ on EmoWord, our eMLM approach is considerably more robust, outperforming the simple BERT model by $4.4\%$ . We argue that this is the byproduct of the eMLM training procedure, which focuses on predicting emotion words in the pre-training step.
128
+
129
+ # 5 Conclusion
130
+
131
+ In this paper, we introduced a new BERT pretraining objective suited for sentiment analysis and emotion detection tasks. We showed that the approach is feasible; it needs no additional pretraining compared to the vanilla BERT, and improves the performance by $1.2\%$ F1 on average on various tasks. Our analysis also suggests that eMLM is more robust in the face of input perturbations. As future work, we note that our approach is general enough, so we plan to leverage different lexicons outside the sentiment analysis and emotion detection domains to investigate if the model generalizes well on other domains (e.g., financial). We also plan to study if our method is effective for non-English languages. Finally, we note that there exist lexicons that assign to words not only their emotion, but also their emotion intensity (Mohammad, 2018). Therefore, we plan to investigate if associating the masking probability with the emotion intensity (i.e., assign a higher probability to a more intensive word) would further help improve the performance.
132
+
133
+ # Acknowledgments
134
+
135
+ We thank our anonymous reviewers for their constructive comments and feedback. This work is partially supported by the NSF Grants IIS-1912887 and IIS-1903963. Any opinions, findings, and conclusions expressed here are those of the authors and do not necessarily reflect the views of NSF. The computation for this project was performed on Amazon Web Services through a research grant.
136
+
137
+ # References
138
+
139
+ Muhammad Abdul-Mageed and Lyle Ungar. 2017. EmoNet: Fine-grained emotion detection with gated recurrent neural networks. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 718-728, Vancouver, Canada. Association for Computational Linguistics.
140
+ Moustafa Alzantot, Yash Sharma, Ahmed Elgohary, Bo-Jhang Ho, Mani Srivastava, and Kai-Wei Chang. 2018. Generating natural language adversarial examples. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2890–2896, Brussels, Belgium. Association for Computational Linguistics.
141
+ Flor Miriam Plaza del Arco, Carlo Strapparava, Luis Alfonso Ureña López, and María Teresa Martín Valdivia. 2020. Emoevent: A multilingual emotion corpus based on different events. In Proceedings of The 12th Language Resources and Evaluation Conference, LREC 2020, Marseille, France, May 11-16, 2020, pages 1492-1498. European Language Resources Association.
142
+ Yonatan Belinkov and Yonatan Bisk. 2018. Synthetic and natural noise both break neural machine translation. In International Conference on Learning Representations.
143
+ Prakhar Biyani, Cornelia Caragea, Prasenjit Mitra, and John Yen. 2014. Identifying emotional and informational support in online health communities. In Proceedings of COLING 2014, the 25th International Conference on Computational Linguistics: Technical Papers, pages 827-836, Dublin, Ireland. Dublin City University and Association for Computational Linguistics.
144
+ Huimin Chen, Maosong Sun, Cunchao Tu, Yankai Lin, and Zhiyuan Liu. 2016. Neural sentiment classification with user and product attention. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1650-1659, Austin, Texas. Association for Computational Linguistics.
145
+ Andrew M Dai and Quoc V Le. 2015. Semi-supervised sequence learning. In Advances in Neural Information Processing Systems, volume 28, pages 3079-3087. Curran Associates, Inc.
146
+ Dorottya Demszky, Dana Movshovitz-Attias, Jeongwoo Ko, Alan Cowen, Gaurav Nemade, and Sujith Ravi. 2020. GoEmotions: A dataset of fine-grained emotions. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4040–4054, Online. Association for Computational Linguistics.
147
+ Shrey Desai, Cornelia Caragea, and Junyi Jessy Li. 2020. Detecting perceived emotions in hurricane disasters. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics,
148
+
149
+ pages 5290-5305, Online. Association for Computational Linguistics.
150
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
151
+ Xavier Glorot, Antoine Bordes, and Yoshua Bengio. 2011. Domain adaptation for large-scale sentiment classification: A deep learning approach. In *In Proceedings of the Twenty-eight International Conference on Machine Learning*, ICML.
152
+ Jeremy Howard and Sebastian Ruder. 2018. Universal language model fine-tuning for text classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 328-339, Melbourne, Australia. Association for Computational Linguistics.
153
+ Yu-Lun Hsieh, Minhao Cheng, Da-Cheng Juan, Wei Wei, Wen-Lian Hsu, and Cho-Jui Hsieh. 2019. On the robustness of self-attentive models. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1520-1529, Florence, Italy. Association for Computational Linguistics.
154
+ Phil Katz, Matt Singleton, and Richard Vicentowski. 2007. SWAT-MP: the SemEval-2007 systems for task 5 and task 14. In Proceedings of the Fourth International Workshop on Semantic Evaluations (SemEval-2007), pages 308-313, Prague, Czech Republic. Association for Computational Linguistics.
155
+ Hamed Khanpour and Cornelia Caragea. 2018. Fine-grained emotion detection in health-related online posts. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1160-1166, Brussels, Belgium. Association for Computational Linguistics.
156
+ Bing Liu. 2012. Sentiment analysis and opinion mining. Synthesis lectures on human language technologies, 5(1):1-167.
157
+ Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692.
158
+ Navonil Majumder, Soujanya Poria, Devamanyu Hazarika, Rada Mihalcea, Alexander F. Gelbukh, and Erik Cambria. 2019. Dialoguerrn: An attentive RNN for emotion detection in conversations. In The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI
159
+
160
+ 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019, pages 6818-6825. AAAI Press.
161
+ Saif Mohammad. 2012. #emotional tweets. In *SEM 2012: The First Joint Conference on Lexical and Computational Semantics – Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation (SemEval 2012), pages 246–255, Montréal, Canada. Association for Computational Linguistics.
162
+ Saif Mohammad. 2018. Word affect intensities. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018), Miyazaki, Japan. European Language Resources Association (ELRA).
163
+ Saif Mohammad and Svetlana Kiritchenko. 2018. Understanding emotions: A dataset of tweets to study interactions between affect categories. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018), Miyazaki, Japan. European Language Resources Association (ELRA).
164
+ Saif M. Mohammad and Svetlana Kiritchenko. 2015. Using hashtags to capture fine emotion categories from tweets. Computational Intelligence, 31(2):301-326.
165
+ Saif M Mohammad and Peter D Turney. 2013. Crowdsourcing a word-emotion association lexicon. Computational Intelligence, 29(3):436-465.
166
+ Xing Niu, Prashant Mathur, Georgiana Dinu, and Yaser Al-Onaizan. 2020. Evaluating robustness to input perturbations for neural machine translation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8538-8544, Online. Association for Computational Linguistics.
167
+ Bo Pang and Lillian Lee. 2005. Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales. In Proceedings of the 43rd Annual Meeting of the Association for Computational Linguistics (ACL'05), pages 115-124, Ann Arbor, Michigan. Association for Computational Linguistics.
168
+ Matthew Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 2227-2237, New Orleans, Louisiana. Association for Computational Linguistics.
169
+ Minh Hieu Phan and Philip O. Ogunbona. 2020. Modelling context and syntactical features for aspect-based sentiment analysis. In Proceedings of the
170
+
171
+ 58th Annual Meeting of the Association for Computational Linguistics, pages 3211-3220, Online. Association for Computational Linguistics.
172
+ Robert Plutchik. 1980. A general psychoevolutionary theory of emotion. In *Theories of emotion*, pages 3-33. Elsevier.
173
+ Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1631-1642, Seattle, Washington, USA. Association for Computational Linguistics.
174
+ Tiberiu Sosea and Cornelia Caragea. 2020. CancerEmo: A dataset for fine-grained emotion detection. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 8892-8904, Online. Association for Computational Linguistics.
175
+ Carlo Strapparava and Rada Mihalcea. 2008. Learning to identify emotions in text. In Proceedings of the 2008 ACM Symposium on Applied Computing (SAC), Fortaleza, Ceara, Brazil, March 16-20, 2008, pages 1556-1560. ACM.
176
+ Martin D Sykora, Thomas Jackson, Ann O'Brien, and Suzanne Elayan. 2013. Emotive ontology: Extracting fine-grained emotions from terse, informal messages. IADIS Int. J. Comput. Sci. Inf. Syst, 2013:19-26.
177
+ Wilson L Taylor. 1953. "cloze procedure": A new tool for measuring readability. Journalism quarterly, 30(4):415-433.
178
+ Hao Tian, Can Gao, Xinyan Xiao, Hao Liu, Bolei He, Hua Wu, Haifeng Wang, and Feng Wu. 2020. SKEP: Sentiment knowledge enhanced pre-training for sentiment analysis. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4067-4076, Online. Association for Computational Linguistics.
179
+ Da Yin, Tao Meng, and Kai-Wei Chang. 2020. SentiBERT: A transferable transformer-based architecture for compositional sentiment semantics. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 3695-3706, Online. Association for Computational Linguistics.
180
+ Shuangfei Zhai and Zhongfei (Mark) Zhang. 2016. Semisupervised autoencoder for sentiment analysis. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, February 12-17, 2016, Phoenix, Arizona, USA, pages 1394-1400. AAAI Press.
181
+ Yukun Zhu, Ryan Kiros, Richard S. Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Aligning books and movies:
182
+
183
+ Towards story-like visual explanations by watching movies and reading books. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago, Chile, December 7-13, 2015, pages 19-27. IEEE Computer Society.
emlmanewpretrainingobjectiveforemotionrelatedtasks/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d93df7c43f87e64ce9de332337b5ddf983af2e5940d412cc734b3b2f9b2f24d
3
+ size 206238
emlmanewpretrainingobjectiveforemotionrelatedtasks/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a64125431b7ed49370432872a220c5daf2d144846c29d1d0899b452c57f88eb5
3
+ size 223359
mtvrmultilingualmomentretrievalinvideos/417b5ca6-6009-429a-ad5a-be7d95871179_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:53d7d5b6f522f86e7a8735eca1ab0e8ce77e8181873f969a9fdee7d692b99e9f
3
+ size 69016
mtvrmultilingualmomentretrievalinvideos/417b5ca6-6009-429a-ad5a-be7d95871179_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35a97ab94cbd63269ea339d62c25bc1b32454da0dc351d3788d0489f8da70094
3
+ size 91244
mtvrmultilingualmomentretrievalinvideos/417b5ca6-6009-429a-ad5a-be7d95871179_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f677bb99eef4bc3980efed37284e985f3fd2618366841e27271e1c027aa1e20
3
+ size 2642289
mtvrmultilingualmomentretrievalinvideos/full.md ADDED
@@ -0,0 +1,347 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MTVR: Multilingual Moment Retrieval in Videos
2
+
3
+ Jie Lei Tamara L. Berg Mohit Bansal
4
+
5
+ Department of Computer Science
6
+
7
+ University of North Carolina at Chapel Hill
8
+
9
+ {jielei, tlberg, mbansal}@cs.unc.edu
10
+
11
+ # Abstract
12
+
13
+ We introduce MTVR, a large-scale multilingual video moment retrieval dataset, containing 218K English and Chinese queries from 21.8K TV show video clips. The dataset is collected by extending the popular TVR dataset (in English) with paired Chinese queries and subtitles. Compared to existing moment retrieval datasets, MTVR is multilingual, larger, and comes with diverse annotations. We further propose mXML, a multilingual moment retrieval model that learns and operates on data from both languages, via encoder parameter sharing and language neighborhood constraints. We demonstrate the effectiveness of mXML on the newly collected MTVR dataset, where mXML outperforms strong monolingual baselines while using fewer parameters. In addition, we also provide detailed dataset analyses and model ablations. Data and code are publicly available at https://github.com/jayleicn/mTVRetrieval
14
+
15
+ # 1 Introduction
16
+
17
+ The number of videos available online is growing at an unprecedented speed. Recent work (Escorchia et al., 2019; Lei et al., 2020) introduced the Video Corpus Moment Retrieval (VCMR) task: given a natural language query, a system needs to retrieve a short moment from a large video corpus. Figure 1 shows a VCMR example. Compared to the standard text-to-video retrieval task (Xu et al., 2016; Yu et al., 2018), it allows more fine-grained moment-level retrieval, as it requires the system to not only retrieve the most relevant videos, but also localize the most relevant moments inside these videos. Various datasets (Krishna et al., 2017; Hendricks et al., 2017; Gao et al., 2017; Lei et al., 2020) have been proposed or adapted for the task. However, they are all created for a single language (English), though the application could be useful for users speaking other languages as well. Besides, it is also unclear
18
+
19
+ # Video Corpus:
20
+
21
+ ![](images/52a87699954c377a23cdccff5ad85ba34733964ae10137149fcf2c5c219f9c50.jpg)
22
+
23
+ 00:00,327→00:04,320
24
+
25
+ Whitney: This is my fiancé...
26
+ 惠特尼:这是我的未婚夫...
27
+
28
+ 00:32,192→00:34,626
29
+
30
+ House: Nine months later, a miracle...
31
+ 豪斯:9个月之后,一个奇迹…
32
+
33
+ ![](images/252398a70944a98abe009420d4592cc5f90e94c6e2f795adde6cc2c0715dd489.jpg)
34
+
35
+ 00:07,786→00:13,156
36
+
37
+ Monica: Who wasn't invited..
38
+
39
+ 莫妮卡:还没有被邀请到…
40
+
41
+ 00:44,223→00:52,929
42
+
43
+ Rachel: Daddy, I can't marry him...
44
+
45
+ 瑞秋:爸爸,我不能嫁给他…
46
+
47
+ ![](images/3056377ae75f6933931506d5b056e0b783654bcad60d161d45cd47df22121686.jpg)
48
+
49
+ 00:03,897→00:07,731
50
+
51
+ Ross: Somebody seems to be.
52
+
53
+ 罗斯:有人在…
54
+
55
+ 00:36,497→00:38,761
56
+
57
+ Rachel: Call me when you get this.
58
+
59
+ 瑞秋:听到留言请回电。
60
+
61
+ Query:
62
+
63
+ Rachel explains to her dad on the phone why she can't marry her fiancé.
64
+
65
+ 瑞秋在电话里向她父亲解释了她不能和其未婚夫结婚的原因。
66
+
67
+ Query Type: video + subtitle
68
+
69
+ Figure 1: A MTVR example in the Video Corpus Moment Retrieval (VCMR) task. Ground truth moment is shown in green box. Colors in the query text indicate whether the words are more related to video (orchid) or subtitle (salmon) or both (orange). The query and the subtitle text are presented in both English and Chinese. The video corpus typically contains thousands of videos, for brevity, we only show 3 videos here.
70
+
71
+ whether the progress and findings in one language generalizes to another language (Bender, 2009). While there are multiple existing multilingual image datasets (Gao et al., 2015; Elliott et al., 2016; Shimizu et al., 2018; Pappas et al., 2016; Lan et al., 2017; Li et al., 2019), the availability of multilingual video datasets (Wang et al., 2019a; Chen and Dolan, 2011) is still limited.
72
+
73
+ Therefore, we introduce MTVR, a large-scale, multilingual moment retrieval dataset, with 218K human-annotated natural language queries in two
74
+
75
+ languages, English and Chinese. MTVR extends the TVR (Lei et al., 2020) dataset by collecting paired Chinese queries and Chinese subtitle text (see Figure 1). We choose TVR over other moment retrieval datasets (Krishna et al., 2017; Hendricks et al., 2017; Gao et al., 2017) because TVR is the largest moment retrieval dataset, and also has the advantage of having dialogues (in the form of subtitle text) as additional context for retrieval, in contrast to pure video context in the other datasets. We further propose mXML, a compact, multilingual model that learns jointly from both English and Chinese data for moment retrieval. Specifically, on top of the state-of-the-art monolingual moment retrieval model XML (Lei et al., 2020), we enforce encoder parameter sharing (Sachan and Neubig, 2018; Dong et al., 2015) where the queries and subtitles from the two languages are encoded using shared encoders. We also incorporate a language neighborhood constraint (Wang et al., 2018; Kim et al., 2020) to the output query and subtitle embeddings. It encourages sentences of the same meaning in different languages to lie close to each other in the embedding space. Compared to separately trained monolingual models, mXML substantially reduces the total model size while improving retrieval performance (over monolingual models) as we show in Section 4. Detailed dataset analyses and model ablations are provided.
76
+
77
+ # 2 Dataset
78
+
79
+ The TVR (Lei et al., 2020) dataset contains 108,965 high-quality English queries from 21,793 videos from 6 long-running TV shows (provided by TVQA (Lei et al., 2018)). The videos are associated with English dialogues in the form of subtitle text. mTVR extends this dataset with translated dialogues and queries in Chinese to support multilingual multimodal research.
80
+
81
+ # 2.1 Data Collection
82
+
83
+ Dialogue Subtitles. We crawl fan translated Chinese subtitles from subtitle sites.<sup>1</sup> All subtitles are manually checked by the authors to ensure they are of good quality and are aligned with the videos. The original English subtitles come with speaker names from transcripts that we map to the Chinese subtitles, to ensure that the Chinese subtitles have the same amount of information as the English version.
84
+
85
+ <table><tr><td>QType (%)</td><td>Query Examples (in English and Chinese)</td></tr><tr><td>video-only (74.2)</td><td>Howard places his plate onto the coffee table.霍华德将盘子放在咖啡桌子上。</td></tr><tr><td>sub-only (9.1)</td><td>Alexis and Castle talk about the timeline of the murder.亚历克西斯和卡塞尔谈论谋杀的时间顺序。</td></tr><tr><td>video+sub (16.6)</td><td>Joey waivers his hand when he asks for his food.乔伊催餐时摆了摆手。</td></tr></table>
86
+
87
+ Table 1: MTVR English and Chinese query examples in different query types. The percentage of the queries in each query type is shown in brackets.
88
+
89
+ Query. To obtain Chinese queries, we hire human translators from Amazon Mechanical Turk (AMT). Each AMT worker is asked to write a Chinese translation of a given English query. Languages are ambiguous, hence we also present the original videos to the workers at the time of translation to help clarify query meaning via spatiotemporal visual grounding. The Chinese translations are required to have the exact same meaning as the original English queries and the translation should be made based on the aligned video content. To facilitate the translation process, we provide machine translated Chinese queries from Google Cloud Translation $^2$ as references, similar to (Wang et al., 2019b). To find qualified bilingual workers in AMT, we created a qualification test with 5 multiple-choice questions designed to evaluate workers' Chinese language proficiency and their ability to perform our translation task. We only allow workers that correctly answer all 5 questions to participate our annotation task. In total, 99 workers finished the test and 44 passed, earning our qualification. To further ensure data quality, we also manually inspect the submitted results during the annotation process and disqualify workers with poor annotations. We pay workers $0.24 every three sentences, this results in an average hourly pay of $8.70. The whole annotation process took about 3 months and cost approximately $12,000.00.
90
+
91
+ # 2.2 Data Analysis
92
+
93
+ In Table 2, we compare the average sentence lengths and the number of unique words under different part-of-speech (POS) tags, between the two languages, English and Chinese, and between query and subtitle text. For both languages, dialogue subtitles are linguistically more diverse than queries, i.e., they have more unique words in all
94
+
95
+ <table><tr><td rowspan="2">Data</td><td rowspan="2">Avg
96
+ Len</td><td colspan="5">#unique words by POS tags</td></tr><tr><td>all</td><td>verb</td><td>noun</td><td>adj.</td><td>adv.</td></tr><tr><td>English</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Q</td><td>13.45</td><td>15,201</td><td>3,015</td><td>7,143</td><td>2,290</td><td>763</td></tr><tr><td>Sub</td><td>10.78</td><td>49,325</td><td>6,441</td><td>19,223</td><td>7,504</td><td>1,740</td></tr><tr><td>Q+Sub</td><td>11.27</td><td>52,545</td><td>7,151</td><td>20,689</td><td>8,021</td><td>1,976</td></tr><tr><td>Chinese</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Q</td><td>12.55</td><td>34,752</td><td>12,773</td><td>18,706</td><td>1,415</td><td>1,669</td></tr><tr><td>Sub</td><td>9.04</td><td>101,018</td><td>36,810</td><td>53736</td><td>4,958</td><td>5,568</td></tr><tr><td>Q+Sub</td><td>9.67</td><td>117,448</td><td>42,284</td><td>62,611</td><td>5,505</td><td>6,185</td></tr></table>
97
+
98
+ Table 2: Comparison of English and Chinese data in MTVR. We show average sentence length, and number of unique tokens by POS tags, for Query $(Q)$ and or Subtitle (Sub).
99
+
100
+ categories. This is potentially because the language used in subtitles are unconstrained human dialogues while the queries are collected as declarative sentences referring to specific moments in videos (Lei et al., 2020). Comparing the two languages, the Chinese data is typically more diverse than the English data.<sup>3</sup> In Table 1, we show English and their translated Chinese query examples in Table 1, by query type. In the appendix, we compare MTVR with existing video and language datasets.
101
+
102
+ # 3 Method
103
+
104
+ Our multilingual moment retrieval model mXML is built on top of the Cross-model Moment Localization (XML) (Lei et al., 2020) model, which performs efficient video-level retrieval at its shallow layers and accurate moment-level retrieval at its deep layers. To adapt the monolingual XML model into the multilingual setting in MTVR and improve its efficiency and effectiveness, we apply encoder parameter sharing and neighborhood constraints (Wang et al., 2018; Kim et al., 2020) which encourages the model to better utilize multilingual data to improve monolingual task performance while maintaining smaller model size.
105
+
106
+ Query and Context Representations. We represent videos using ResNet-152 (He et al., 2016) and I3D (Carreira and Zisserman, 2017) features extracted every 1.5 seconds. We extract language features using pre-trained, then finetuned (on our queries and subtitles) RoBERTa-base (Liu et al., 2019), for English (Liu et al., 2019) and Chinese (Cui et al., 2020), respectively. For queries, we use token-level features. For subtitles, we max
107
+
108
+ ![](images/903fb0520232239d4bdaf437a99161a1284b7d7a8bc4199bb8ff4b35a3b0b859.jpg)
109
+ Figure 2: Illustration of mXML's encoding process. Compared to monolingual models, mXML learns from the two languages simultaneously, and allows them to benefit each other via encoder parameter sharing and neighborhood constraints. We show the detailed encoding process of the model in the appendix (Figure 3).
110
+
111
+ pool the token-level features every 1.5 seconds to align with the video features. We then project the extracted features into a low-dimensional space via a linear layer, and add learned positional encoding (Devlin et al., 2018) after the projection. We denote the resulting video features as $E^{v} \in \mathbb{R}^{l \times d}$ , subtitle features as $E_{en}^{s} \in \mathbb{R}^{l \times d}$ , $E_{zh}^{s} \in \mathbb{R}^{l \times d}$ , and query features as $E_{en}^{q} \in \mathbb{R}^{l_{q} \times d}$ , $E_{zh}^{q} \in \mathbb{R}^{l_{q} \times d}$ . $l$ is video length, $l_{q}$ is query length, and $d$ is hidden size. The subscripts $en$ and $zh$ denote English and Chinese text features, respectively.
112
+
113
+ Encoders and Parameter Sharing. We follow Lei et al. (2020) to use Self-Encoder as our main component for query and context encoding. A Self-Encoder consists of a self-attention (Vaswani et al., 2017) layer, a linear layer, and a residual (He et al., 2016) connection followed by layer normalization (Ba et al., 2016). We use a Self-Encoder followed by a modular attention (Lei et al., 2020) to encode each query into two modularized query vectors $\pmb{q}_{lang}^{v}, \pmb{q}_{lang}^{s} \in \mathbb{R}^{d}$ ( $lang \in \{en, zh\}$ ) for video and subtitle retrieval, respectively. For videos, we apply two Self-Encoders instead of a Self-Encoder and a Cross-Encoder as in XML, because we found this modification simplifies the implementation while maintains the performance. We use the outputs from the first and the second Self-Encoder $H_{vr,lang}^{v}, H_{mr,lang}^{v} \in \mathbb{R}^{l \times d}$ for video retrieval and moment retrieval. Similarly, we have $H_{vr,lang}^{s}, H_{mr,lang}^{s} \in \mathbb{R}^{l \times d}$ for subtitles. All the Self-Encoders are shared across languages, e.g., we use the same Self-Encoder to encode both English and Chinese queries, as illustrated in Figure 2. This parameter sharing strategy greatly reduces the
114
+
115
+ model size while maintaining or even improving model performance, as we show in Section 4.
116
+
117
+ Language Neighborhood Constraint. To facilitate stronger multilingual learning, we add neighborhood constraints (Wang et al., 2018; Kim et al., 2020; Burns et al., 2020) to the model. This encourages sentences that express the same or similar meanings to lie close to each other in the embedding space, via a triplet loss. Given paired sentence embeddings $e_{en}^{i} \in \mathbb{R}^{d}$ and $e_{zh}^{i} \in \mathbb{R}^{d}$ , we sample negative sentence embeddings $e_{en}^{j} \in \mathbb{R}^{d}$ and $e_{zh}^{k} \in \mathbb{R}^{d}$ from the same mini-batch, where $i \neq j, i \neq k$ . We use cosine similarity function $S$ to measure the similarity between embeddings. Our language neighborhood constraint can be formulated as:
118
+
119
+ $$
120
+ \begin{array}{l} \mathcal {L} _ {n c} = \frac {1}{n} \sum_ {i} [ \max (0, \mathcal {S} (\boldsymbol {e} _ {e n} ^ {i}, \boldsymbol {e} _ {z h} ^ {k}) - \mathcal {S} (\boldsymbol {e} _ {e n} ^ {i}, \boldsymbol {e} _ {z h} ^ {i}) + \Delta) \\ \left. + \max (0, \mathcal {S} (\pmb {e} _ {e n} ^ {j}, \pmb {e} _ {z h} ^ {i}) - \mathcal {S} (\pmb {e} _ {e n} ^ {i}, \pmb {e} _ {z h} ^ {i}) + \Delta) ], (1) \right. \\ \end{array}
121
+ $$
122
+
123
+ where $\Delta = 0.2$ is the margin. We apply this constraint on both query and subtitle embeddings, across the two languages, as illustrated in Figure 2. For queries, we directly apply it on the query vectors $q_{lang}^{v}, q_{lang}^{s}$ . For the subtitle embeddings, we apply it on the embeddings $H_{vr,lang}^{s}, H_{mr,lang}^{s}$ , after max-pooling them in the temporal dimension.
124
+
125
+ Training and Inference. During training, we optimize video retrieval scores with a triplet loss, and moment scores with a cross-entropy loss. At inference, these two scores are aggregated together as the final score for video corpus moment retrieval. See appendix for details.
126
+
127
+ # 4 Experiments and Results
128
+
129
+ We evaluate our proposed mXML model on the newly collected MTVR dataset, and compare it with several existing monolingual baselines. We also provide ablation studies evaluating our model design and the importance of each input modality (videos and subtitles).
130
+
131
+ Data Splits and Evaluation Metrics. We follow TVR (Lei et al., 2020) to split the data into $80\%$ train, $10\%$ val, $5\%$ test-public and $5\%$ test-private. We report average recall $(R@1)$ on the Video Corpus Moment Retrieval (VCMR) task. A predicted moment is correct if it has high Intersection-over-Union (IoU) with the ground-truth.
132
+
133
+ Baseline Comparison. In Table 3, we compare mXML with multiple baseline approaches. Given
134
+
135
+ <table><tr><td rowspan="2">Method</td><td rowspan="2">#param</td><td colspan="2">English R@1</td><td colspan="2">Chinese R@1</td></tr><tr><td>IoU=0.5</td><td>IoU=0.7</td><td>IoU=0.5</td><td>IoU=0.7</td></tr><tr><td>Chance</td><td>-</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td></tr><tr><td colspan="6">Proposal based</td></tr><tr><td>MCN</td><td>6.4M</td><td>0.02</td><td>0.00</td><td>0.13</td><td>0.02</td></tr><tr><td>CAL</td><td>6.4M</td><td>0.09</td><td>0.04</td><td>0.11</td><td>0.04</td></tr><tr><td colspan="6">Retrieval + Re-ranking</td></tr><tr><td>MEE+MCN</td><td>10.4M</td><td>0.92</td><td>0.42</td><td>1.43</td><td>0.64</td></tr><tr><td>MEE+CAL</td><td>10.4M</td><td>0.97</td><td>0.39</td><td>1.51</td><td>0.62</td></tr><tr><td>MEE+ExCL</td><td>10.0M</td><td>0.92</td><td>0.33</td><td>1.43</td><td>0.72</td></tr><tr><td>XML</td><td>6.4M</td><td>7.25</td><td>3.25</td><td>5.91</td><td>2.57</td></tr><tr><td>mXML</td><td>4.5M</td><td>8.30</td><td>3.82</td><td>6.76</td><td>3.20</td></tr></table>
136
+
137
+ Table 3: Baseline comparison on MTVR test-public split. mXML achieves better retrieval performance on both languages while using fewer parameters.
138
+
139
+ a natural language query, the goal of video corpus moment retrieval is to retrieve relevant moments from a large video corpus. The methods for this task can be grouped into two categories, $(i)$ proposal based approaches (MCN (Hendricks et al., 2017) and CAL (Escorcia et al., 2019)), where they perform video retrieval on the pre-segmented moments from the videos; $(ii)$ retrieval+re-ranking methods (MEE (Miech et al., 2018)+MCN, MEE+CAL, MEE+ExCL (Ghosh et al., 2019) and XML (Lei et al., 2020)), where one approach is first used to retrieve a set of videos, then another approach is used to re-rank the moments inside these retrieved videos to get the final moments. Our method mXML also belongs to the retrieval+re-ranking category. Across all metrics and both languages, we notice retrieval+re-ranking approaches achieve better performance than proposal based approaches, indicating that retrieval+re-ranking is potentially better suited for the VCMR task. Meanwhile, our mXML outperforms the strong baseline XML significantly<sup>4</sup> while using few parameters. XML is a monolingual model, where a separate model is trained for each language. In contrast, mXML is multilingual, trained on both languages simultaneously, with parameter sharing and language neighborhood constraints to encourage multilingual learning. mXML prediction examples are provided in the appendix.
140
+
141
+ Ablations on Model Design. In Table 4, we present our ablation study on mLX. We use 'Baseline' to denote the mLX model without parameter sharing and neighborhood constraint. Shar
142
+
143
+ <table><tr><td rowspan="2">Method</td><td rowspan="2">#param</td><td colspan="2">English R@1</td><td colspan="2">Chinese R@1</td></tr><tr><td>IoU=0.5</td><td>IoU=0.7</td><td>IoU=0.5</td><td>IoU=0.7</td></tr><tr><td>Baseline</td><td>6.4M</td><td>5.77</td><td>2.63</td><td>4.7</td><td>2.38</td></tr><tr><td>+ Share Enc.</td><td>4.5M</td><td>6.09</td><td>2.85</td><td>4.72</td><td>2.25</td></tr><tr><td>+ NC (mXML)</td><td>4.5M</td><td>6.22</td><td>2.96</td><td>5.17</td><td>2.41</td></tr></table>
144
+
145
+ Table 4: mXML ablation study on MTVR val split. Share Enc. = encoder parameter sharing, NC = Neighborhood Constraint. Each row adds an extra component to the row above it.
146
+
147
+ <table><tr><td rowspan="2">Model Type</td><td colspan="2">English R@1</td><td colspan="2">Chinese R@1</td></tr><tr><td>IoU=0.5</td><td>IoU=0.7</td><td>IoU=0.5</td><td>IoU=0.7</td></tr><tr><td colspan="5">Query type: video</td></tr><tr><td>Baseline</td><td>5.46</td><td>2.53</td><td>4.78</td><td>2.47</td></tr><tr><td>mXML</td><td>5.77</td><td>2.67</td><td>5.14</td><td>2.32</td></tr><tr><td colspan="5">Query type: subtitle</td></tr><tr><td>Baseline</td><td>4.15</td><td>1.97</td><td>3.11</td><td>1.14</td></tr><tr><td>mXML</td><td>6.12</td><td>3.32</td><td>4.05</td><td>1.87</td></tr><tr><td colspan="5">Query type: video+subtitle</td></tr><tr><td>baseline</td><td>8.02</td><td>3.38</td><td>5.18</td><td>2.62</td></tr><tr><td>mXML</td><td>8.29</td><td>4.09</td><td>5.89</td><td>3.11</td></tr></table>
148
+
149
+ ing encoder parameter across languages greatly reduces #parameters while maintaining (Chinese) or even improving (English) model performance. Adding neighborhood constraint does not introduce any new parameters but brings a notable $(p < 0.06)$ performance gain to both languages. We hypothesize that this is because the learned information in the embeddings of the two languages are complementary (though the sentences in the two languages express the same meaning, their language encoders (Liu et al., 2019; Cui et al., 2020)) are pre-trained differently, which may lead to different meanings at the embedding level. In Table 5, we show a detailed comparison between mXML and its baseline version, by query types. Overall, we notice the mXML perform similarly with Baseline in 'video' queries, but shows a significant performance gain in 'subtitle' queries, suggesting the parameter sharing and neighborhood constraint are more useful for queries that need more language understanding.
150
+
151
+ Ablations on Input Modalities. In Table 6, we compare mXML variants with different context inputs, i.e., video or subtitle or both. We report their performance under the three annotated query types,
152
+
153
+ Table 5: Comparison of mXML and the baseline on MTVR val set, with breakdown on query types. Both models are trained with video and subtitle as inputs.
154
+
155
+ <table><tr><td rowspan="2">QType (percentage)</td><td colspan="2">English R@1</td><td colspan="2">Chinese R@1</td></tr><tr><td>IoU=0.5</td><td>IoU=0.7</td><td>IoU=0.5</td><td>IoU=0.7</td></tr><tr><td colspan="5">Model input: video</td></tr><tr><td>video (74.32%)</td><td>4.12</td><td>1.89</td><td>3.73</td><td>1.86</td></tr><tr><td>sub (8.85%)</td><td>1.97</td><td>1.24</td><td>1.35</td><td>1.04</td></tr><tr><td>video+sub (16.83%)</td><td>2.67</td><td>1.2</td><td>2.45</td><td>1.15</td></tr><tr><td colspan="5">Model input: subtitle</td></tr><tr><td>video</td><td>1.35</td><td>0.62</td><td>1.11</td><td>0.51</td></tr><tr><td>sub</td><td>6.33</td><td>2.9</td><td>4.15</td><td>1.97</td></tr><tr><td>video+sub</td><td>6.22</td><td>2.62</td><td>4.2</td><td>2.13</td></tr><tr><td colspan="5">Model input: video+subtitle</td></tr><tr><td>video</td><td>5.77</td><td>2.67</td><td>5.14</td><td>2.32</td></tr><tr><td>sub</td><td>6.12</td><td>3.32</td><td>4.05</td><td>1.87</td></tr><tr><td>video+sub</td><td>8.29</td><td>4.09</td><td>5.89</td><td>3.11</td></tr></table>
156
+
157
+ Table 6: mXML performance breakdown on MTVR val set by query types, with different inputs.
158
+
159
+ video, sub and video+sub. Overall, the model with both video and subtitle as inputs perform the best. The video model performs much better on the video queries than on the sub queries, while the subtitle model achieves higher scores on the sub queries than the video queries.
160
+
161
+ In the appendix, we also present results on 'generalization to unseen TV shows' setup.
162
+
163
+ # 5 Conclusion
164
+
165
+ In this work, we collect MTVR, a new large-scale, multilingual moment retrieval dataset. It contains 218K queries in English and in Chinese from 21.8K video clips from 6 TV shows. We also propose a multilingual moment retrieval model mXML as a strong baseline for the MTVR dataset. We show in experiments that mXML outperforms monolingual models while using fewer parameters.
166
+
167
+ # Acknowledgements
168
+
169
+ We thank the reviewers for their helpful feedback. This research is supported by NSF Award #1562098, DARPA KAIROS Grant #FA8750-19-2-1004, and ARO-YIP Award #W911NF-18-1-0336. The views contained in this article are those of the authors and not of the funding agency.
170
+
171
+ # References
172
+
173
+ Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. 2016. Layer normalization. arXiv preprint arXiv:1607.06450.
174
+ Emily M Bender. 2009. Linguistically naïve! = language independent: Why nlp needs linguistic typology. In Proceedings of the EACL 2009 Workshop
175
+
176
+ on the Interaction between Linguistics and Computational Linguistics: Virtuous, Vicious or Vacuous?
177
+ Andrea Burns, Donghyun Kim, Derry Wijaya, Kate Saenko, and Bryan A Plummer. 2020. Learning to scale multilingual representations for vision-language tasks. In ECCV.
178
+ Joao Carreira and Andrew Zisserman. 2017. Quo vadis, action recognition? a new model and the kinetics dataset. In CVPR.
179
+ David Chen and William B Dolan. 2011. Collecting highly parallel data for paraphrase evaluation. In ACL.
180
+ Yiming Cui, Wanxiang Che, Ting Liu, Bing Qin, Shijin Wang, and Guoping Hu. 2020. Revisiting pretrained models for chinese natural language processing. In EMNLP.
181
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805.
182
+ Daxiang Dong, Hua Wu, Wei He, Dianhai Yu, and Haifeng Wang. 2015. Multi-task learning for multiple language translation. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers).
183
+ Bradley Efron and Robert J Tibshirani. 1994. An introduction to the bootstrap. CRC press.
184
+ Desmond Elliott, Stella Frank, Khalil Sima'an, and Lucia Specia. 2016. Multi30K: Multilingual English-German image descriptions. In Proceedings of the 5th Workshop on Vision and Language, pages 70-74, Berlin, Germany. Association for Computational Linguistics.
185
+ Victor Escorcia, Mattia Soldan, Josef Sivic, Bernard Ghanem, and Bryan Russell. 2019. Temporal localization of moments in video collections with natural language. arXiv preprint arXiv:1907.12763.
186
+ Haoyuan Gao, Junhua Mao, Jie Zhou, Zhiheng Huang, Lei Wang, and Wei Xu. 2015. Are you talking to a machine? dataset and methods for multilingual image question. In NIPS.
187
+ Jiyang Gao, Chen Sun, Zhenheng Yang, and Ram Nevatia. 2017. Tall: Temporal activity localization via language query. In ICCV.
188
+ Soham Ghosh, Anuva Agarwal, Zarana Parekh, and Alexander Hauptmann. 2019. Excl: Extractive clip localization using natural language descriptions. In *NAACL*.
189
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep residual learning for image recognition. In CVPR.
190
+
191
+ Lisa Anne Hendricks, Oliver Wang, Eli Shechtman, Josef Sivic, Trevor Darrell, and Bryan Russell. 2017. Localizing moments in video with natural language. In ICCV.
192
+ Donghyun Kim, Kuniaki Saito, Kate Saenko, Stan Sclaroff, and Bryan A Plummer. 2020. Mule: Multimodal universal language embedding. In AAAI.
193
+ Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.
194
+ Ranjay Krishna, Kenji Hata, Frederic Ren, Li Fei-Fei, and Juan Carlos Niebles. 2017. Dense-captioning events in videos. In ICCV.
195
+ Weiyu Lan, Xirong Li, and Jianfeng Dong. 2017. Fluency-guided cross-lingual image captioning. In ACM MM.
196
+ Jie Lei, Licheng Yu, Mohit Bansal, and Tamara L. Berg. 2018. Tvqa: Localized, compositional video question answering. In EMNLP.
197
+ Jie Lei, Licheng Yu, Tamara L Berg, and Mohit Bansal. 2020. Tvr: A large-scale dataset for video-subtitle moment retrieval. In ECCV.
198
+ Linjie Li, Yen-Chun Chen, Yu Cheng, Zhe Gan, Licheng Yu, and Jingjing Liu. 2020. Hero: Hierarchical encoder for video+ language omni-representation pre-training. In EMNLP.
199
+ Xirong Li, Chaoxi Xu, Xiaoxu Wang, Weiyu Lan, Zhengxiong Jia, Gang Yang, and Jieping Xu. 2019. Coco-cn for cross-lingual image tagging, captioning, and retrieval. TMM.
200
+ Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692.
201
+ Antoine Miech, Ivan Laptev, and Josef Sivic. 2018. Learning a text-video embedding from incomplete and heterogeneous data. arXiv preprint arXiv:1804.02516.
202
+ Eric W Noreen. 1989. Computer-intensive methods for testing hypotheses. Wiley New York.
203
+ Nikolaos Pappas, Miriam Redi, Mercan Topkara, Brendan Jou, Hongyi Liu, Tao Chen, and Shih-Fu Chang. 2016. Multilingual visual sentiment concept matching. In ICMR.
204
+ Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. 2017. Automatic differentiation in PyTorch. In NeurIPS Autodiff Workshop.
205
+ Michaela Regneri, Marcus Rohrbach, Dominikus Wetzel, Stefan Thater, Bernt Schiele, and Manfred Pinkal. 2013. Grounding action descriptions in videos. TACL.
206
+
207
+ Devendra Sachan and Graham Neubig. 2018. Parameter sharing methods for multilingual self-attentional translation models. In Proceedings of the Third Conference on Machine Translation: Research Papers.
208
+
209
+ Nobuyuki Shimizu, Na Rong, and Takashi Miyazaki. 2018. Visual question answering dataset for bilingual image understanding: A study of cross-lingual transfer using attention maps. In COLING.
210
+
211
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In NeurIPS.
212
+
213
+ Liwei Wang, Yin Li, Jing Huang, and Svetlana Lazebnik. 2018. Learning two-branch neural networks for image-text matching tasks. TPAMI.
214
+
215
+ Xin Wang, Jiawei Wu, Junkun Chen, Lei Li, Yuan-Fang Wang, and William Yang Wang. 2019a. Vatex: A large-scale, high-quality multilingual dataset for video-and-language research. In ICCV.
216
+
217
+ Xin Wang, Jiawei Wu, Junkun Chen, Lei Li, Yuan-Fang Wang, and William Yang Wang. 2019b. Vatex: A large-scale, high-quality multilingual dataset for video-and-language research. In ICCV.
218
+
219
+ Jun Xu, Tao Mei, Ting Yao, and Yong Rui. 2016. Msr-vtt: A large video description dataset for bridging video and language. In CVPR.
220
+
221
+ Youngjae Yu, Jongseok Kim, and Gunhee Kim. 2018. A joint sequence fusion model for video question answering and retrieval. In ECCV.
222
+
223
+ # A Appendix
224
+
225
+ Data Analysis. In Table 8 we show a comparison of MTVR with existing moment retrieval datasets and related video and language datasets. Compared to other moment retrieval datasets, MTVR is significantly larger in scale, and comes with query type annotations that allows in-depth analyses for the models trained on it. Besides, it is also the only moment retrieval dataset with multilingual annotations, which is vital in studying the moment retrieval problem under the multilingual context. Compared to the existing multilingual video and language datasets, MTVR is unique as it has a more diverse set of context and annotations, i.e., dialogue, query type, and timestamps.
226
+
227
+ Training and Inference Details. In Figure 3 we show an overview of the mXML model. We compute video retrieval score as:
228
+
229
+ $$
230
+ s ^ {v r} = \frac {1}{2} \sum_ {m \in \{v, s \}} \max \left(\frac {H _ {v r} ^ {m}}{\| H _ {v r} ^ {m} \|} \frac {\boldsymbol {q} ^ {m}}{\| \boldsymbol {q} ^ {m} \|}\right). \tag {2}
231
+ $$
232
+
233
+ <table><tr><td rowspan="2">Setting</td><td colspan="2">English R@1</td><td colspan="2">Chinese R@1</td></tr><tr><td>IoU=0.5</td><td>IoU=0.7</td><td>IoU=0.5</td><td>IoU=0.7</td></tr><tr><td>unseen</td><td>1.68</td><td>0.79</td><td>1</td><td>0.54</td></tr><tr><td>seen</td><td>4.82</td><td>2.79</td><td>4.18</td><td>2.32</td></tr></table>
234
+
235
+ Table 7: mXML performance on the MTVR val split Friends examples, in both unseen and seen settings.
236
+
237
+ The subscript $lang \in \{en, zh\}$ is omitted for simplicity. It is optimized using a triplet loss similar to main text Equation (1). For moment retrieval, we first compute the query-clip similarity scores $S^{q,c} \in \mathbb{R}^l$ as:
238
+
239
+ $$
240
+ S ^ {q, c} = \frac {1}{2} \left(H _ {m r} ^ {s} \boldsymbol {q} ^ {s} + H _ {m r} ^ {v} \boldsymbol {q} ^ {v}\right). \tag {3}
241
+ $$
242
+
243
+ Next, we apply Convolutional Start-End Detector (ConvSE module) (Lei et al., 2020) to obtain start, end probabilities $P_{st}, P_{ed} \in \mathbb{R}^l$ . These scores are optimized using a cross-entropy loss. The single video moment retrieval score for moment $[t_{st}, t_{ed}]$ is computed as:
244
+
245
+ $$
246
+ s ^ {m r} \left(t _ {s t}, t _ {e d}\right) = P _ {s t} \left(t _ {s t}\right) P _ {e d} \left(t _ {e d}\right), t _ {s t} \leq t _ {e d}. \tag {4}
247
+ $$
248
+
249
+ Given a query $q_{i}$ , the retrieval score for moment $[t_{st}:t_{ed}]$ in video $v_{j}$ is computed following the aggregation function as in (Lei et al., 2020):
250
+
251
+ $$
252
+ \begin{array}{l} s ^ {v c m r} \left(v _ {j}, t _ {s t}, t _ {e d} | q _ {i}\right) = \\ s ^ {m r} \left(t _ {s t}, t _ {e d}\right) \exp \left(\alpha s ^ {v r} \left(v _ {j} \mid q _ {i}\right)\right), \tag {5} \\ \end{array}
253
+ $$
254
+
255
+ where $\alpha = 20$ is used to assign higher weight to the video retrieval scores. The overall loss is a simple summation of video and moment retrieval loss across the two languages, and the language neighborhood constraint loss.
256
+
257
+ Implementation Details. mL is implemented in PyTorch (Paszke et al., 2017). We use Adam (Kingma and Ba, 2014) with initial learning rate 1e-4, $\beta_{1} = 0.9$ , $\beta_{2} = 0.999$ , L2 weight decay 0.01, learning rate warm-up over the first 5 epochs. We train mL for at most 100 epochs at batch size 128, with early stop based on the sum of R@1 (IoU=0.7) scores for English and Chinese. The experiments are conducted on a NVIDIA RTX 2080Ti GPU. Each run takes around 7 hours.
258
+
259
+ Generalization to Unseen TV shows. To investigate whether the learned model can be transferred to other TV shows, we conduct an experiment by using the TV show 'Friends' as an 'unseen' TV
260
+
261
+ ![](images/0bf5b9293e49d58f5a9d1ef18e5de445a84e35f85d0766e99092de3b7be7431e.jpg)
262
+ Figure 3: mXML overview. For brevity, we only show the modeling process for a single language (Chinese). The cross-language modifications, i.e., parameter sharing and neighborhood constraint are illustrated in Figure 2. This figure is edited from the Figure 4 in (Lei et al., 2020).
263
+
264
+ <table><tr><td>Dataset</td><td>Domain</td><td>#Q/#videos</td><td>Multilingual</td><td>Dialogue</td><td>QType</td><td>Timestamp</td></tr><tr><td colspan="7">QA datasets with temporal annotation</td></tr><tr><td>TVQA (Lei et al., 2018)</td><td>TV show</td><td>152.5K/21.8K</td><td>-</td><td>✓</td><td>-</td><td>✓</td></tr><tr><td>How2QA (Li et al., 2020)</td><td>Instructional</td><td>44K/22K</td><td>-</td><td>✓</td><td>-</td><td>✓</td></tr><tr><td colspan="7">Multilingual video description datasets</td></tr><tr><td>MSVD (Chen and Dolan, 2011)</td><td>Open</td><td>70K/2K</td><td>✓</td><td>-</td><td>-</td><td>-</td></tr><tr><td>VATEX (Wang et al., 2019b)</td><td>Activity</td><td>826K/41.3K</td><td>✓</td><td>-</td><td>-</td><td>-</td></tr><tr><td colspan="7">Moment retrieval datasets</td></tr><tr><td>TACoS (Regneri et al., 2013)</td><td>Cooking</td><td>16.2K/0.1K</td><td>-</td><td>-</td><td>-</td><td>✓</td></tr><tr><td>DiDeMo (Hendricks et al., 2017)</td><td>Flickr</td><td>41.2K/10.6K</td><td>-</td><td>-</td><td>-</td><td>✓</td></tr><tr><td>ActivityNet Captions (Krishna et al., 2017)</td><td>Activity</td><td>72K/15K</td><td>-</td><td>-</td><td>-</td><td>✓</td></tr><tr><td>CharadesSTA (Gao et al., 2017)</td><td>Activity</td><td>16.1K/6.7K</td><td>-</td><td>-</td><td>-</td><td>✓</td></tr><tr><td>How2R (Li et al., 2020)</td><td>Instructional</td><td>51K/24K</td><td>-</td><td>✓</td><td>-</td><td>✓</td></tr><tr><td>TVR (Lei et al., 2020)</td><td>TV show</td><td>109K/21.8K</td><td>-</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>MTVR</td><td>TV show</td><td>218K/21.8K</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr></table>
265
+
266
+ Table 8: Comparison of MTVR with related video and language datasets.
267
+
268
+ show for testing, and train the model on all the other 5 TV shows. For comparison, we also include a model trained on 'seen' setting, where we use all the 6 TV shows including Friends for training. To ensure the models on these two settings are trained on the same number of examples, we downsample the examples in the seen setting to match the unseen setting. The results are shown in Table 7. We notice our mXML achieves a reasonable performance even though it does see a single example from the TV show Friends. Meanwhile, the gap between unseen and seen settings are still large, we encourage future work to further explore this direction.
269
+
270
+ Prediction Examples We show mXML prediction examples in Figure 4. We show both Chinese (top) and English (bottom) prediction examples, and correct (left) and incorrect (right) examples.
271
+
272
+ ![](images/be118c57b1a575b0a3d2e26685bd219adfc6d209c3ac08a1bde730bdcb27ea7b.jpg)
273
+ 00:48.033 $\rightarrow$ 00:52.265
274
+ 00:54.309→00:58.143
275
+
276
+ ![](images/a9409595fe2251b7cf5a5a98bb67227a24d14b03cfc93f61d9181834086d15c3.jpg)
277
+ 钱德勒:帮帮我啦...
278
+ 瑞秋:钱德勒!好,够了..
279
+ 00:48.033 $\rightarrow$ 00:52.265
280
+ 00:54.309→00:58.143
281
+
282
+ ![](images/85d447cbc6a2a4a4e94bc91ad700b59a53595f80498c663fbc3a9ffe6fb82ef7.jpg)
283
+ 钱德勒:帮帮我啦..
284
+ 瑞秋:钱德勒!好,够了..
285
+ 00:08,737→00:10,790
286
+ 瑞秋:你是什么意思...
287
+ 00:11,103→00:13,844
288
+ 你不想和任何人谈...
289
+
290
+ ![](images/b19bc279aa2b297c82c93093275a6dba1caf8e1415d10d7812ff304bfc59f99a.jpg)
291
+ 00:54,309→00:58,143
292
+ 01:24,806 $\rightarrow$ 00:86,899
293
+
294
+ ![](images/5e98d45c46dcf1b8f7ae629bc3c38f42f39faaa9009379aeb5438d8d2c31740b.jpg)
295
+ 卡迪:如果你不想坐牢...
296
+ 卡梅隆:那得看菌株
297
+ 00:02.098→00:05.518
298
+ 00:14.944→00:16.529
299
+
300
+ ![](images/8f8dde0fe83d58958f6b4678dfc36973d83776650e8cccf7e21a4b3a5d3cb0a5.jpg)
301
+ 豪斯:看,这就是面对面...
302
+ 卡迪:让他出去。
303
+ 00:21,079→00:22,063
304
+ 卡迪:你剪坏了我那...
305
+ 00:22,681 $\rightarrow$ 00:25,081
306
+ 豪斯:那张罕见的银版照片
307
+
308
+ ![](images/88d5bb0e5bde57c437c19d3a021add21bf84c779f3f559e11aa189ee684c2c5f.jpg)
309
+ 瑞秋从门上取下一把钥匙,以帮助钱德勒摆脱手铐。
310
+ 00:40.058→00:42.986
311
+ 00:53,680→00:55,801
312
+
313
+ ![](images/eb456f67f71a0a7560834cc3f218b56ff188a013eafc8afe7420c449b5987856.jpg)
314
+ Marshall: If you guys...
315
+ Jerry: You were probably too young.
316
+ 00:40,058→00:42,986
317
+ 00:53,680→00:55,801
318
+
319
+ ![](images/05f434ace6112c04ffd7360794a0ee2dfc1c08728bf07c8465c31a8396688032.jpg)
320
+ Marshall: If you guys...
321
+ Jerry: You were probably too young.
322
+ 00:00,382→00:01,800
323
+ Barney: See those pinstripes?
324
+ 00:01,925→00:02,925
325
+ Barney: Diamonds.
326
+ Jerry shows Barney a picture at the dining room table.
327
+ Rachael runs to Ross, jumps on his back and takes the phone away from him.
328
+ Figure 4: Qualitative examples of mXML. Top: examples in Chinese. Bottom: examples in English. Left: correct predictions. Right: incorrect predictions. We show top-3 retrieved moments for each query. salmon bar shows the predictions, green box indicates the ground truth.
329
+
330
+ ![](images/2c5739a1dc1852ff3fc3bacea490e8a105bef77cc6d8aa9d25cdd5944c0b79c2.jpg)
331
+ 卡迪从豪斯前面的桌子上拿起一些文件。
332
+ 00:36,230→00:41,133
333
+ 00:56,184→00:58,448
334
+
335
+ ![](images/e57f9c5526f8e85a5776b3dd0f564ad42cf75531d475b6608b9c02d8c068bc76.jpg)
336
+ Okay, well, I can maybe gra
337
+ Ross: No, Rach!
338
+ 00:15,317→00:17,046
339
+ 00:20,055→00:21,989
340
+
341
+ ![](images/4651d50487aa52b1a26b0e24dbd54709a4d3b4747cb43a1398b046d2d22357ce.jpg)
342
+ Ross: I got a message from you...
343
+ Rachel: Give me the phone!
344
+ 00:15.317→00:17.046
345
+ Ross: I got a message from you...
346
+ 00:20.055→00:21.989
347
+ Rachel: Give me the phone!
mtvrmultilingualmomentretrievalinvideos/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4122c8b52eebf5cf284fc741bbe69da6498b442dff19810641e086193b5930e
3
+ size 651703
mtvrmultilingualmomentretrievalinvideos/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b480ce024552190f7c4d8b5bd93fd6adfb51ae55db87aa898963b8437f4475f
3
+ size 378770
nmt5isparalleldatastillrelevantforpretrainingmassivelymultilinguallanguagemodels/19d83ad1-09dc-4497-8632-a93dd689f053_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7cb468e820b7bafe494514a1f66490e96b8faf0e4ca8c198d6d32eaa3e8a19c
3
+ size 50480
nmt5isparalleldatastillrelevantforpretrainingmassivelymultilinguallanguagemodels/19d83ad1-09dc-4497-8632-a93dd689f053_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51f0338f02e8c56107260714160482bb335c118ce9ad16e3201f6fae0cb206b8
3
+ size 60939
nmt5isparalleldatastillrelevantforpretrainingmassivelymultilinguallanguagemodels/19d83ad1-09dc-4497-8632-a93dd689f053_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e64342e3ec9a1b7a3edaaafabb8a7006d84df9bcc938a7afcf67be04b4990f90
3
+ size 279426
nmt5isparalleldatastillrelevantforpretrainingmassivelymultilinguallanguagemodels/full.md ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # nmT5 - Is parallel data still relevant for pre-training massively multilingual language models?
2
+
3
+ Mihir Kale* Aditya Siddhant* Rami Al-Rfou
4
+ Linting Xue Noah Constant Melvin Johnson
5
+ Google Research
6
+
7
+ # Abstract
8
+
9
+ Recently, mT5 - a massively multilingual version of T5 - leveraged a unified text-to-text format to attain state-of-the-art results on a wide variety of multilingual NLP tasks. In this paper, we investigate the impact of incorporating parallel data into mT5 pre-training. We find that multi-tasking language modeling with objectives such as machine translation during pretraining is a straightforward way to improve performance on downstream multilingual and cross-lingual tasks. However, the gains start to diminish as the model capacity increases, suggesting that parallel data might not be as essential for larger models. At the same time, even at larger model sizes, we find that pre-training with parallel data still provides benefits in the limited labelled data regime.
10
+
11
+ # 1 Introduction
12
+
13
+ Recent works have shown that cross-lingual transfer learning in pre-trained multilingual models such as mBERT (Devlin et al., 2019) and XLM-R (Conneau et al., 2020) could be improved further by using parallel data (Conneau and Lample, 2019; Hu et al., 2020a; Ouyang et al., 2020; Luo et al., 2020). In this paper, we continue this line of work by improving the recent mT5 model (Xue et al., 2020) by leveraging parallel corpora. We experiment with several text-to-text objectives that incorporate parallel data (spanning 198 language pairs) into mT5 pre-training. Our key findings are summarized below:
14
+
15
+ - In the regime of very small fine-tuning datasets, objectives with parallel data improve results significantly.
16
+ - The gain from using parallel data decreases as we scale up the size of the pre-trained model.
17
+
18
+ - Simple objectives based on neural machine translation (NMT) perform better than the traditionally employed "translation language modeling" (TLM) objective.
19
+
20
+ # 2 Method
21
+
22
+ We focus on the mT5-Large model, which is a 24 layer encoder-decoder transformer model and has shown strong performance on a variety of crosslingual benchmarks (Xue et al., 2020). Instead of training a new model from scratch, we start from the publicly available mT5-Large checkpoint - which has been trained for over 1 trillion tokens - and do a second stage pre-training with a mix of monolingual and parallel data.
23
+
24
+ # 2.1 Objectives
25
+
26
+ The mT5 - multilingual version of T5 (Raffel et al., 2020) - series of models were pre-trained on a multilingual version of the C4 corpus with a masked language modeling "span-corruption" objective (Raffel et al., 2020), where the encoder is fed a chunk of text with random spans replaced with a mask token, and the decoder must reconstruct the masked-out tokens. One of their primary distinctions is the use of a unified "text-to-text" format for all text-based NLP problems.
27
+
28
+ In keeping with the text-to-text format, we experiment with the following objectives to incorporate parallel data into pre-training:
29
+
30
+ - TLM - A text-to-text version of translation language modeling, proposed by Conneau and Lample (2019) and subsequently used in several prior works for encoder only pre-training. We trivially extend it to the encoder-decoder setting.
31
+ - NMT - Standard machine translation. The input is the source text and the target is its
32
+
33
+ ![](images/819bcdc5914aeae171fd31432c44ab6b48c9d421a4e0a9f276b628078bb427b2.jpg)
34
+ Figure 1: Example source and targets for different text-to-text style pre-training objectives incorporating parallel data. All objectives except TLM specify target language in the source sentence.
35
+
36
+ translation. A language code is prefixed to the input to inform the model of the target language (Johnson et al., 2017).
37
+
38
+ - Denoised-NMT - Similar to NMT, but we additionally mask spans in the source sentence. The model must now learn to implicitly perform language modeling of the source language while translating into the target language.
39
+ - Denoised-NMT+LM - Similar to Denoised-NMT, but instead of implicit language modeling, the model must explicitly predict the source text in addition to the translation. The target is a concatenation of the translation and source sentence, while the input is the masked source sentence.
40
+
41
+ We refer to the model trained with the standard NMT objective as nmT5.
42
+
43
+ # 3 Experiment Setup
44
+
45
+ Pre-training datasets For pre-training we use monolingual data from mC4 (Xue et al., 2020) and parallel data from OPUS-100 (Zhang et al., 2020). OPUS-100 is a dataset of 55M translations covering 100 languages (198 language pairs, either into or from English). The mC4 corpus consists of unlabeled web text covering 101 languages, of which 81 overlap with the OPUS-100 languages.
46
+
47
+ Fine-tuning datasets For downstream evaluation, we use the following four tasks:
48
+
49
+ - TyDi QA (Clark et al., 2020) - The GoldP subtask, which corresponds to extractive question answering. The input is a passage and a question, with the answer being a span from the passage.
50
+ - MTOP (Li et al., 2020) - Multilingual Task-Oriented Parsing. The task is one of structured
51
+
52
+ <table><tr><td>Dataset</td><td>Langs</td><td>Train size</td><td>Setting</td></tr><tr><td>TyDi QA</td><td>9</td><td>3.7K</td><td>zero-shot</td></tr><tr><td>MTOP</td><td>6</td><td>22K</td><td>zero-shot</td></tr><tr><td>WikiAnn NER</td><td>40</td><td>20K</td><td>zero-shot</td></tr><tr><td>WikiLingua</td><td>18</td><td>660K</td><td>multilingual</td></tr></table>
53
+
54
+ Table 1: Statistics of datasets used in the paper.
55
+
56
+ prediction, where user queries must be parsed into a tree, capturing the domain, intent and slots.
57
+
58
+ - WikiAnn NER (Pan et al., 2019) - Named entity recognition task covering 40 languages featured in the XTREME benchmark (Hu et al., 2020b). There are 4 categories of entities - location, person, organization and miscellaneous.
59
+ - WikiLingua (Ladhak et al., 2020) - A recently introduced cross-lingual summarization dataset, where a document from an arbitrary language must be summarized in English. Since the dataset does not come with training and evaluation splits, we randomly create validation and test sets of 1000 examples each, and the rest of the data is used for training.
60
+
61
+ Table 1 lists further details of each dataset. Following Xue et al. (2020), all tasks are cast into the text-to-text format. The evaluation for TyDi QA, MTOP and NER is done in the zero-shot setting, where the model is trained on the English data and evaluated on all languages. Since zero-shot cross-lingual language generation is much harder, for WikiLingua we train the model in a multilingual setting, using available training data for all languages.
62
+
63
+ Hyperparameters Pre-training is done with a batch size of 1M tokens and fine-tuning with 131,072 tokens, with a constant learning rate of
64
+
65
+ <table><tr><td>Model (Metric)</td><td>TyDi QA (F1/EM)</td><td>MTOP (EM)</td><td>NER (F1)</td><td>WikiLingua (ROUGE-L)</td><td>Avg.</td></tr><tr><td>mT5</td><td>66.3 / 49.8</td><td>43.7</td><td>58.4</td><td>25.2</td><td>46.3</td></tr><tr><td>+MLM (additional 100K steps)</td><td>71.3 / 55.6</td><td>48.6</td><td>59.9</td><td>26.1</td><td>49.5</td></tr><tr><td>+MLM+TLM</td><td>71.1 / 54.6</td><td>48.6</td><td>61.4</td><td>26.1</td><td>49.7</td></tr><tr><td>+MLM+NMT</td><td>75.1 / 60.1</td><td>57.7</td><td>61.4</td><td>27.4</td><td>53.5</td></tr><tr><td>+MLM+denoised NMT</td><td>75.3 / 60.2</td><td>56.5</td><td>61.5</td><td>27.4</td><td>53.3</td></tr><tr><td>+MLM+denoised NMT-LM</td><td>75.0 / 59.4</td><td>56.0</td><td>62.4</td><td>26.9</td><td>53.1</td></tr></table>
66
+
67
+ 0.001. Starting from publicly available mT5-Large checkpoints, we further pre-train for 100K steps with a mix of monolingual and parallel objectives. The parallel data is mixed into monolingual data at a $10\%$ ratio, which amounts to roughly 4 passes over the OPUS-100 corpus. Examples from each language pair are sampled using the same language sampling distribution as Xue et al. (2020), with alpha=0.3. For downstream tasks, we fine-tune for 10K steps for TyDiQA, MTOP, NER and 25K for WikiLingua, since it is a much larger dataset. Checkpoint selection is done based on the validation set.
68
+
69
+ Baselines Our first baseline is the publicly available mT5-Large model (1.3 billion parameters). For a fair comparison, we also experiment with an mT5 model further pre-trained for 100k steps with only monolingual data from mC4 (see row 2: mT5+MLM in Table 2). This lets us assess whether improvements stem from using parallel data or just pre-training for longer.
70
+
71
+ # 4 Results
72
+
73
+ We report results in table 2. Overall, adding parallel data through neural machine translation objectives improves scores for all 4 tasks, with the NMT objective performing the best.
74
+
75
+ Simply pre-training mT5 for longer with just monolingual data (MLM) leads to improved scores for all tasks. The TLM objective is not be able to effectively leverage the parallel data and performs on par with MLM. On the other hand, our three NMT-based objectives show gains over MLM across all tasks. Among these, NMT and Denoised-NMT are the best and perform similarly, while Denoised-NMT+LM fares slightly worse. Averaged across all tasks, NMT and Denoised-NMT outperform
76
+
77
+ MLM by 4 points.
78
+
79
+ # 4.1 Model size
80
+
81
+ Xue et al. (2020) find that cross-lingual performance of language models increases monotonically with model size. To study the impact of model capacity, we also experiment with larger model sizes. Even at the XL size (3.7B params, $3 \times$ larger than mT5-Large), we observe gains for all tasks with nmT5 (Table 3). However, the magnitude of the gains is largely diminished, hinting that the need for parallel data reduces as model capacity increases. This finding is particularly promising for low-resource languages, where it is difficult to obtain high-quality parallel data.
82
+
83
+ At the same time, nmT5-Large substantially reduces the performance gap between mT5-Large and mT5-XL, covering $70\%$ of the headroom. Since bigger models are expensive to train and even more expensive to deploy, this opens up avenues for effectively using parallel data to improve performance of smaller language models. Turc et al. (2019) found that pre-training student models before model distillation is helpful, and using parallel data to improve student pre-training is another interesting avenue of future work.
84
+
85
+ Table 2: Results are averaged across all the languages in each dataset. We report F1/EM for QA, exact match accuracy (EM) for structured prediction, ROUGE-L (Lin, 2004) for summarization and F1 for NER. Each score is the median over five runs. The final columns lists the average of all the scores. Refer to Appendix A for scores on individual languages.
86
+
87
+ <table><tr><td>Model</td><td>TyDi QA</td><td>MTOP</td><td>NER</td><td>WikiLingua</td><td>Avg.</td></tr><tr><td>mT5-Large</td><td>66.3 / 49.8</td><td>43.7</td><td>58.4</td><td>25.2</td><td>46.3</td></tr><tr><td>nmT5-Large</td><td>75.1 / 60.1</td><td>57.7</td><td>61.4</td><td>27.4</td><td>53.5</td></tr><tr><td>Δ</td><td>8.8 / 10.3</td><td>14.0</td><td>3.0</td><td>2.2</td><td>7.2</td></tr><tr><td>mT5-XL</td><td>77.8 / 61.8</td><td>63.4</td><td>65.5</td><td>27.9</td><td>56.7</td></tr><tr><td>nmT5-XL</td><td>78.4 / 63.3</td><td>64.9</td><td>66.2</td><td>28.4</td><td>57.6</td></tr><tr><td>Δ</td><td>0.6 / 1.5</td><td>1.5</td><td>0.7</td><td>0.5</td><td>0.9</td></tr></table>
88
+
89
+ Table 3: Impact of model size on nmT5's performance.
90
+
91
+ <table><tr><td>Model</td><td>Few-Shot (100)</td><td>Low (3.7K)</td><td>High (80K)</td></tr><tr><td>mT5-Large</td><td>33.1 / 23.6</td><td>66.3 / 49.8</td><td>78.1 / 64.8</td></tr><tr><td>nmT5-Large</td><td>48.8 / 37.1</td><td>75.1 / 60.1</td><td>78.2 / 65.5</td></tr><tr><td>Δ</td><td>15.7 / 13.5</td><td>8.8 / 10.3</td><td>0.1 / 0.7</td></tr><tr><td>mT5-XL</td><td>45.0 / 31.7</td><td>77.8 / 61.8</td><td>78.7 / 65.8</td></tr><tr><td>nmT5-XL</td><td>57.2 / 44.4</td><td>78.4 / 63.3</td><td>79.7 / 67.0</td></tr><tr><td>Δ</td><td>12.2 / 12.7</td><td>0.6 / 1.5</td><td>1.0 / 1.2</td></tr></table>
92
+
93
+ Table 4: Performance on the TyDi QA eval set when fine-tuned in the few-shot (100 examples from TyDi QA English), low (full TyDi QA English with 3.7K examples) and high data regime (SQuAD English with 80K examples).
94
+
95
+ # 4.2 Limited labeled data
96
+
97
+ The TyDi QA dataset has only 3.7K English training examples. To study the impact of the size of fine-tuning data, we run experiments in two additional settings: a few-shot regime and a high data regime. Few-shot uses just 100 randomly sampled training examples, while for the latter we use the much larger SQuAD corpus (Rajpurkar et al., 2016), which consists of 80k examples.
98
+
99
+ When fine-tuned with SQuAD, nmT5 performs slightly better than mT5 for both Large and XL model sizes. However, in the few-shot setting, nmT5-Large improves over mT5-Large by 15 points. Even at the XL size, nmT5 is over 10 points higher than mT5. nmT5-Large even outperforms the much larger mT5-XL. Our experiments suggest that pre-training with parallel data is particularly useful in the limited labelled data setting.
100
+
101
+ # 4.3 Mixing ratio
102
+
103
+ So far, we have mixed parallel data into monolingual data at a $10\%$ ratio. To assess how the mixing ratio impacts performance, we compare results with a $50\%$ mix. With the $50\%$ mix, average performance is slightly lower, validating our initial choice.
104
+
105
+ <table><tr><td>Mix</td><td>TyDi QA</td><td>MTOP</td><td>NER</td><td>WikiLingua</td><td>Avg.</td></tr><tr><td>10%</td><td>75.1 / 60.1</td><td>57.7</td><td>61.4</td><td>27.4</td><td>53.5</td></tr><tr><td>50%</td><td>76.5 / 60.1</td><td>53.9</td><td>62.0</td><td>26.5</td><td>52.7</td></tr></table>
106
+
107
+ Table 5: Impact of mixing ratio on nmT5.
108
+
109
+ # 4.4 Performance on unseen languages
110
+
111
+ We also test downstream performance on languages previously unseen by the models. We randomly pick 30 languages from the WikiAnn NER dataset
112
+
113
+ that are not covered in either $\mathrm{mC4}^1$ or OPUS, and hence none of our models have seen them during pre-training. Table 6 shows nmT5 outperforms mT5 on this subset of languages as well, indicating that the representations of the nmT5 model are better suited for cross-lingual transfer.
114
+
115
+ <table><tr><td>Model</td><td>ckb</td><td>hsb</td><td>xmf</td><td>“Avg.”</td></tr><tr><td>mT5-Large</td><td>66.5</td><td>64.8</td><td>58.4</td><td>54.9</td></tr><tr><td>nmT5-Large</td><td>72.2</td><td>69.8</td><td>62.2</td><td>57.4</td></tr><tr><td>Δ</td><td>5.7</td><td>5.0</td><td>3.8</td><td>2.5</td></tr></table>
116
+
117
+ Table 6: Performance on three randomly picked unseen languages. "Avg." is calculated by averaging performance across 30 unseen languages.
118
+
119
+ # 5 Related Work
120
+
121
+ Pre-trained multilingual models such as mBERT and XLM-R have shown to be effective at cross-lingual transfer learning (Devlin et al., 2019; Conneau et al., 2020). Subsequently, many attempts have leveraged parallel data to improve cross-lingual capability of these models. Conneau and Lample (2019) proposed translation language modeling (TLM), to encourage the model to align representations across languages. Alternating language modeling (Yang et al., 2020) and back-translation masked language modeling (Ouyang et al., 2020) used code-switched sentences and back-translation respectively to utilize parallel data. Other works using parallel data in this line of work include FILTER (Fang et al., 2020), AMBER (Hu et al., 2020a) and, MMTE (Siddhant et al., 2020). A key factor that differentiates this paper from these works is that our pre-trained models use a text-to-text architecture, having both an encoder and a decoder, while the aforementioned models only have the encoder. Other pretrained multilingual encoder-decoder models such as mT5 (Xue et al., 2020), mBART (Liu et al., 2020) and MASS (Song et al., 2019) do not make use of parallel data during pretraining.
122
+
123
+ # 6 Conclusion
124
+
125
+ In this work we attempted to improve mT5 pretraining by incorporating parallel data. We experimented with various text-to-text objectives and found that multi-tasking with the standard neural machine translation objective during pre-training
126
+
127
+ leads to improved cross-lingual transfer. The improvements from parallel data are most pronounced in the limited labeled data scenario. Our experiments also indicate that smaller models, with the help of parallel data, can approach the performance of larger ones, while also suggesting that the need for parallel data is lesser as the model capacity increases.
128
+
129
+ # References
130
+
131
+ Jonathan H Clark, Eunsol Choi, Michael Collins, Dan Garrette, Tom Kwiatkowski, Vitaly Nikolaev, and Jennimaria Palomaki. 2020. Tydi qa: A benchmark for information-seeking question answering in ty po- logically di verse languages. Transactions of the Association for Computational Linguistics, 8:454-470.
132
+ Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Édouard Grave, Myle Ott, Luke Zettle-moyer, and Veselin Stoyanov. 2020. Unsupervised cross-lingual representation learning at scale. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8440-8451.
133
+ Alexis Conneau and Guillaume Lample. 2019. Crosslingual language model pretraining. In Advances in Neural Information Processing Systems.
134
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
135
+ Yuwei Fang, Shuohang Wang, Zhe Gan, Siqi Sun, and Jingjing Liu. 2020. Filter: An enhanced fusion method for cross-lingual language understanding. arXiv preprint arXiv:2009.05166.
136
+ Junjie Hu, Melvin Johnson, Orhan First, Aditya Siddhant, and Graham Neubig. 2020a. Explicit alignment objectives for multilingual bidirectional encoders. arXiv preprint arXiv:2010.07972.
137
+ Junjie Hu, Sebastian Ruder, Aditya Siddhant, Graham Neubig, Orhan First, and Melvin Johnson. 2020b. Xtreme: A massively multilingual multi-task benchmark for evaluating cross-lingual generalisation. In International Conference on Machine Learning.
138
+ M. Johnson, Mike Schuster, Quoc V. Le, M. Krikun, Y. Wu, Z. Chen, Nikhil Thorat, F. Viégas, M. Wattenberg, G. S. Corrado, Macduff Hughes, and J. Dean.
139
+
140
+ 2017. Google's multilingual neural machine translation system: Enabling zero-shot translation. Transactions of the Association for Computational Linguistics, 5:339-351.
141
+ Faisal Ladhak, Esin Durmus, Claire Cardie, and K. McKeown. 2020. Wikilingua: A new benchmark dataset for cross-lingual abstractive summarization. ArXiv, abs/2010.03093.
142
+ Haoran Li, A. Arora, Shuohui Chen, Anchit Gupta, Sonal Gupta, and Yashar Mehdad. 2020. Mtop: A comprehensive multilingual task-oriented semantic parsing benchmark. *ArXiv*, abs/2008.09335.
143
+ Chin-Yew Lin. 2004. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pages 74-81.
144
+ Yinhan Liu, Jiatao Gu, Naman Goyal, Xian Li, Sergey Edunov, Marjan Ghazvininejad, Mike Lewis, and Luke Zettlemoyer. 2020. Multilingual denoising pre-training for neural machine translation. Transactions of the Association for Computational Linguistics, 8:726-742.
145
+ Fuli Luo, Wei Wang, Jiahao Liu, Yijia Liu, Bin Bi, Songfang Huang, Fei Huang, and Luo Si. 2020. Veco: Variable encoder-decoder pre-training for cross-lingual understanding and generation. arXiv preprint arXiv:2010.16046.
146
+ Xuan Ouyang, Shuohuan Wang, Chao Pang, Yu Sun, Hao Tian, Hua Wu, and Haifeng Wang. 2020. Ernie-m: Enhanced multilingual representation by aligning cross-lingual semantics with monolingual corpora. arXiv preprint arXiv:2012.15674.
147
+ Xiaoman Pan, Thamme Gowda, Heng Ji, Jonathan May, and Scott Miller. 2019. Cross-lingual joint entity and word embedding to improve entity linking and parallel sentence mining. In Proceedings of the 2nd Workshop on Deep Learning Approaches for Low-Resource NLP (DeepLo 2019), pages 56–66, Hong Kong, China. Association for Computational Linguistics.
148
+ Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1-67.
149
+ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: 100, $000+$ questions for machine comprehension of text. In EMNLP.
150
+ Aditya Siddhant, Melvin Johnson, Henry Tsai, Naveen Ari, Jason Riesa, Ankur Bapna, Orhan Firat, and Karthik Raman. 2020. Evaluating the cross-lingual effectiveness of massively multilingual neural machine translation. In Proceedings of the AAAI Conference on Artificial Intelligence.
151
+
152
+ Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, and TieYan Liu. 2019. Mass: Masked sequence to sequence pre-training for language generation. In International Conference on Machine Learning.
153
+ Iulia Turc, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Well-read students learn better: On the importance of pre-training compact models. arXiv: Computation and Language.
154
+ Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, and Colin Raffel. 2020. mt5: A massively multilingual pre-trained text-to-text transformer. arXiv preprint arXiv:2010.11934.
155
+ Jian Yang, Shuming Ma, Dongdong Zhang, ShuangZhi Wu, Zhoujun Li, and Ming Zhou. 2020. Alternating language modeling for cross-lingual pre-training. In Proceedings of the AAAI Conference on Artificial Intelligence.
156
+ Biao Zhang, Philip Williams, Ivan Titov, and Rico Senrich. 2020. Improving massively multilingual neural machine translation and zero-shot translation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.
157
+
158
+ # A Per-Language Results on All Tasks
159
+
160
+ <table><tr><td></td><td>en</td><td>ar</td><td>bn</td><td>fi</td><td>id</td></tr><tr><td>mt5</td><td>75.0 / 63.0</td><td>68.9 / 51.4</td><td>54.5 / 37.2</td><td>70.4 / 54.6</td><td>74.3 / 57.0</td></tr><tr><td>+MLM</td><td>78.5 / 68.2</td><td>76.1 / 59.9</td><td>59.0 / 40.7</td><td>73.5 / 61.0</td><td>76.7 / 60.0</td></tr><tr><td>+MLM+TLM</td><td>77.3 / 67.0</td><td>75.7 / 57.2</td><td>61.7 / 39.8</td><td>73.3 / 59.0</td><td>77.0 / 60.0</td></tr><tr><td>+MLM+NMT</td><td>78.4 / 69.3</td><td>78.9 / 63.1</td><td>74.0 / 54.9</td><td>77.0 / 64.8</td><td>79.9 / 64.8</td></tr><tr><td>+MLM+denoised NMT</td><td>78.7 / 68.6</td><td>79.8 / 64.7</td><td>72.6 / 53.1</td><td>77.2 / 64.2</td><td>79.8 / 67.6</td></tr><tr><td>+MLM+denoised NMT-LM</td><td>78.2 / 68.2</td><td>78.8 / 62.3</td><td>69.1 / 49.6</td><td>78.2 / 65.7</td><td>79.6 / 64.8</td></tr><tr><td></td><td>ko</td><td>ru</td><td>sw</td><td>te</td><td>avg</td></tr><tr><td>mt5</td><td>57.4 / 47.5</td><td>61.5 / 37.1</td><td>69.7 / 52.5</td><td>65.5 / 48.0</td><td>66.3 / 49.8</td></tr><tr><td>+MLM</td><td>64.4 / 55.4</td><td>68.6 / 48.9</td><td>74.2 / 57.7</td><td>71.1 / 48.6</td><td>71.3 / 55.6</td></tr><tr><td>+MLM+TLM</td><td>66.5 / 55.8</td><td>67.8 / 48.0</td><td>73.9 / 57.1</td><td>66.5 / 47.5</td><td>71.1 / 54.6</td></tr><tr><td>+MLM+NMT</td><td>64.9 / 56.2</td><td>72.1 / 51.8</td><td>77.2 / 63.1</td><td>73.3 / 53.1</td><td>75.1 / 60.1</td></tr><tr><td>+MLM+denoised NMT</td><td>67.9 / 58.7</td><td>71.9 / 51.5</td><td>75.7 / 59.7</td><td>74.3 / 53.5</td><td>75.3 / 60.2</td></tr><tr><td>+MLM+denoised NMT-LM</td><td>67.8 / 59.4</td><td>72.7 / 51.1</td><td>76.0 / 59.9</td><td>74.4 / 54.0</td><td>75.0 / 59.4</td></tr></table>
161
+
162
+ Table 7: TyDi QA GoldP results (F1/EM) for each language.
163
+
164
+ <table><tr><td></td><td>en</td><td>de</td><td>es</td><td>fr</td><td>hi</td><td>th</td><td>avg</td></tr><tr><td>mt5</td><td>83.5</td><td>41.2</td><td>45.4</td><td>43.3</td><td>21.3</td><td>27.5</td><td>43.7</td></tr><tr><td>+MLM</td><td>83.3</td><td>44.5</td><td>46.3</td><td>51.8</td><td>31.9</td><td>34.0</td><td>48.6</td></tr><tr><td>+MLM+TLM</td><td>85.0</td><td>42.4</td><td>47.5</td><td>49.6</td><td>31.8</td><td>35.2</td><td>48.6</td></tr><tr><td>+MLM+NMT</td><td>86.1</td><td>55.1</td><td>59.0</td><td>61.7</td><td>42.2</td><td>42.1</td><td>57.7</td></tr><tr><td>+MLM+denoised NMT</td><td>85.8</td><td>51.6</td><td>55.2</td><td>59.5</td><td>42.7</td><td>43.9</td><td>56.5</td></tr><tr><td>+MLM+denoised NMT-LM</td><td>85.9</td><td>51.9</td><td>55.0</td><td>57.0</td><td>44.1</td><td>41.9</td><td>56.0</td></tr></table>
165
+
166
+ Table 8: MTOP results (EM) for each language.
167
+
168
+ <table><tr><td></td><td>en</td><td>af</td><td>ar</td><td>bg</td><td>bn</td><td>de</td><td>el</td><td>es</td><td>et</td><td>eu</td><td>fa</td><td>fi</td><td>fr</td><td>he</td></tr><tr><td>mt5</td><td>80.5</td><td>64.5</td><td>47.7</td><td>57.2</td><td>66.5</td><td>67.0</td><td>63.9</td><td>62.0</td><td>59.0</td><td>45.5</td><td>41.4</td><td>56.9</td><td>76.7</td><td>45.1</td></tr><tr><td>+MLM</td><td>81.4</td><td>65.1</td><td>50.2</td><td>55.2</td><td>69.3</td><td>68.6</td><td>66.9</td><td>70.5</td><td>62.8</td><td>46.6</td><td>44.9</td><td>58.9</td><td>76.6</td><td>46.4</td></tr><tr><td>+MLM+TLM</td><td>82.4</td><td>65.6</td><td>48.8</td><td>67.2</td><td>72.2</td><td>70.1</td><td>70.8</td><td>72.6</td><td>61.2</td><td>47.5</td><td>47.1</td><td>61.4</td><td>78.7</td><td>48.0</td></tr><tr><td>+MLM+NMT</td><td>82.2</td><td>64.2</td><td>56.7</td><td>61.0</td><td>69.1</td><td>70.5</td><td>64.6</td><td>66.3</td><td>66.2</td><td>49.3</td><td>48.9</td><td>60.6</td><td>78.4</td><td>46.2</td></tr><tr><td>+MLM+denoised NMT</td><td>82.5</td><td>65.7</td><td>50.3</td><td>63.6</td><td>69.6</td><td>70.7</td><td>68.6</td><td>73.7</td><td>64.9</td><td>48.6</td><td>44.3</td><td>63.3</td><td>77.7</td><td>45.5</td></tr><tr><td>+MLM+denoised NMT-LM</td><td>82.9</td><td>66.1</td><td>49.5</td><td>67.7</td><td>74.5</td><td>71.1</td><td>71.3</td><td>74.2</td><td>67.1</td><td>49.9</td><td>44.8</td><td>63.2</td><td>80.2</td><td>49.6</td></tr><tr><td></td><td>hi</td><td>hu</td><td>id</td><td>it</td><td>ja</td><td>jv</td><td>ka</td><td>kk</td><td>ko</td><td>ml</td><td>mr</td><td>ms</td><td>my</td><td>nl</td></tr><tr><td>mt5</td><td>66.8</td><td>57.7</td><td>44.9</td><td>75.4</td><td>36.0</td><td>46.0</td><td>53.0</td><td>22.5</td><td>29.5</td><td>44.8</td><td>38.6</td><td>65.5</td><td>27.0</td><td>77.3</td></tr><tr><td>+MLM</td><td>66.5</td><td>61.4</td><td>46.2</td><td>76.4</td><td>35.8</td><td>49.0</td><td>53.6</td><td>23.7</td><td>31.4</td><td>46.0</td><td>39.3</td><td>67.4</td><td>33.0</td><td>78.5</td></tr><tr><td>+MLM+TLM</td><td>69.6</td><td>61.9</td><td>47.2</td><td>76.7</td><td>37.3</td><td>51.0</td><td>59.4</td><td>29.3</td><td>30.7</td><td>48.2</td><td>42.1</td><td>70.2</td><td>29.0</td><td>80.4</td></tr><tr><td>+MLM+NMT</td><td>69.8</td><td>61.7</td><td>46.1</td><td>77.3</td><td>34.5</td><td>53.0</td><td>55.2</td><td>27.0</td><td>31.4</td><td>43.0</td><td>46.7</td><td>69.0</td><td>27.0</td><td>78.9</td></tr><tr><td>+MLM+denoised NMT</td><td>65.8</td><td>63.0</td><td>46.6</td><td>77.6</td><td>37.0</td><td>54.0</td><td>58.3</td><td>26.4</td><td>29.8</td><td>44.8</td><td>42.1</td><td>64.3</td><td>30.0</td><td>80.2</td></tr><tr><td>+MLM+denoised NMT-LM</td><td>67.7</td><td>64.4</td><td>48.1</td><td>77.9</td><td>39.2</td><td>49.0</td><td>59.4</td><td>30.0</td><td>31.4</td><td>47.4</td><td>36.4</td><td>71.0</td><td>34.0</td><td>80.2</td></tr><tr><td></td><td>pt</td><td>ru</td><td>sw</td><td>ta</td><td>te</td><td>th</td><td>tl</td><td>tr</td><td>ur</td><td>vi</td><td>yo</td><td>zh</td><td>avg</td><td></td></tr><tr><td>mt5</td><td>73.1</td><td>48.4</td><td>66.8</td><td>39.9</td><td>37.9</td><td>8.5</td><td>77.8</td><td>57.6</td><td>45.1</td><td>76.4</td><td>58.0</td><td>41.8</td><td>58.4</td><td></td></tr><tr><td>+MLM</td><td>75.5</td><td>47.3</td><td>64.5</td><td>40.5</td><td>38.0</td><td>9.2</td><td>76.9</td><td>56.5</td><td>51.7</td><td>76.9</td><td>59.0</td><td>41.8</td><td>59.9</td><td></td></tr><tr><td>+MLM+TLM</td><td>76.3</td><td>58.8</td><td>66.3</td><td>40.2</td><td>41.2</td><td>8.8</td><td>76.9</td><td>62.0</td><td>43.0</td><td>79.6</td><td>56.0</td><td>43.5</td><td>61.4</td><td></td></tr><tr><td>+MLM+NMT</td><td>75.5</td><td>56.0</td><td>65.8</td><td>40.3</td><td>41.6</td><td>8.0</td><td>78.7</td><td>60.3</td><td>57.0</td><td>79.8</td><td>63.0</td><td>41.0</td><td>61.4</td><td></td></tr><tr><td>+MLM+denoised NMT</td><td>75.5</td><td>58.9</td><td>66.2</td><td>40.4</td><td>40.4</td><td>7.9</td><td>78.7</td><td>60.5</td><td>50.0</td><td>80.3</td><td>64.0</td><td>41.4</td><td>61.5</td><td></td></tr><tr><td>+MLM+denoised NMT-LM</td><td>78.6</td><td>60.9</td><td>65.6</td><td>40.6</td><td>40.9</td><td>9.1</td><td>77.0</td><td>63.1</td><td>53.5</td><td>79.8</td><td>60.0</td><td>45.5</td><td>62.4</td><td></td></tr></table>
169
+
170
+ Table 9: WikiAnn NER results (F1) for each language.
171
+
172
+ <table><tr><td></td><td>en</td><td>ar</td><td>cs</td><td>de</td><td>es</td><td>fr</td><td>hi</td><td>id</td><td>it</td><td>ja</td></tr><tr><td>mt5</td><td>29.2</td><td>23.2</td><td>22.4</td><td>25.0</td><td>25.3</td><td>24.6</td><td>25.2</td><td>25.3</td><td>24.1</td><td>26.2</td></tr><tr><td>+MLM</td><td>30.0</td><td>24.0</td><td>22.9</td><td>26.0</td><td>26.6</td><td>25.5</td><td>26.1</td><td>25.8</td><td>24.9</td><td>27.8</td></tr><tr><td>+MLM+TLM</td><td>30.0</td><td>24.4</td><td>23.1</td><td>25.6</td><td>26.3</td><td>25.6</td><td>26.4</td><td>25.8</td><td>25.1</td><td>27.6</td></tr><tr><td>+MLM+NMT</td><td>31.5</td><td>25.7</td><td>24.0</td><td>27.0</td><td>27.5</td><td>26.4</td><td>27.7</td><td>27.0</td><td>25.8</td><td>29.5</td></tr><tr><td>+MLM+denoised NMT</td><td>31.3</td><td>25.7</td><td>24.7</td><td>27.3</td><td>27.5</td><td>26.8</td><td>27.8</td><td>27.2</td><td>25.8</td><td>29.2</td></tr><tr><td>+MLM+denoised NMT-LM</td><td>30.8</td><td>25.0</td><td>23.7</td><td>26.5</td><td>27.1</td><td>26.3</td><td>27.3</td><td>26.7</td><td>25.6</td><td>28.7</td></tr><tr><td></td><td>ko</td><td>nl</td><td>pt</td><td>ru</td><td>th</td><td>tr</td><td>vi</td><td>zh</td><td>avg</td><td></td></tr><tr><td>mt5</td><td>23.8</td><td>25.7</td><td>24.6</td><td>23.9</td><td>25.3</td><td>30.9</td><td>22.9</td><td>25.8</td><td>25.2</td><td></td></tr><tr><td>+MLM</td><td>25.2</td><td>26.5</td><td>25.3</td><td>24.6</td><td>27.1</td><td>31.1</td><td>23.2</td><td>27.1</td><td>26.1</td><td></td></tr><tr><td>+MLM+TLM</td><td>24.7</td><td>26.6</td><td>25.2</td><td>24.4</td><td>26.5</td><td>31.3</td><td>23.3</td><td>27.0</td><td>26.1</td><td></td></tr><tr><td>+MLM+NMT</td><td>26.7</td><td>27.7</td><td>26.3</td><td>25.9</td><td>28.6</td><td>34.1</td><td>23.9</td><td>28.1</td><td>27.4</td><td></td></tr><tr><td>+MLM+denoised NMT</td><td>26.6</td><td>28.0</td><td>25.9</td><td>25.8</td><td>28.3</td><td>33.4</td><td>24.3</td><td>28.4</td><td>27.4</td><td></td></tr><tr><td>+MLM+denoised NMT-LM</td><td>25.9</td><td>27.4</td><td>25.6</td><td>24.9</td><td>27.3</td><td>33.1</td><td>23.8</td><td>27.8</td><td>26.9</td><td></td></tr></table>
173
+
174
+ Table 10: Wikilingua results (Rouge-L) for each language.
175
+
176
+ <table><tr><td></td><td>ace</td><td>arz</td><td>ast</td><td>ba</td><td>ce</td><td>ckb</td><td>csb</td><td>eml</td><td>fur</td><td>gan</td><td>gn</td></tr><tr><td>mt5-Large</td><td>44.8</td><td>50.8</td><td>83.3</td><td>38.1</td><td>21.7</td><td>66.5</td><td>56.7</td><td>39.8</td><td>64.2</td><td>42.1</td><td>48.2</td></tr><tr><td>nmt5-Large</td><td>46.7</td><td>53.6</td><td>84.8</td><td>43.7</td><td>28.3</td><td>72.2</td><td>58.1</td><td>41.9</td><td>65.6</td><td>41.2</td><td>51.0</td></tr><tr><td></td><td>hsb</td><td>ia</td><td>jbo</td><td>lij</td><td>lmo</td><td>min</td><td>nap</td><td>nov</td><td>pdc</td><td>pms</td><td>pnb</td></tr><tr><td>mt5-Large</td><td>64.8</td><td>63.2</td><td>42.1</td><td>46.3</td><td>69.8</td><td>39.1</td><td>62.2</td><td>62.1</td><td>48.1</td><td>81.5</td><td>61.1</td></tr><tr><td>nmt5-Large</td><td>69.8</td><td>62.4</td><td>43.6</td><td>43.0</td><td>72.0</td><td>45.5</td><td>61.7</td><td>66.7</td><td>51.2</td><td>83.5</td><td>55.4</td></tr><tr><td></td><td>rm</td><td>sa</td><td>tl</td><td>qu</td><td>vec</td><td>vep</td><td>vls</td><td>xmf</td><td>avg</td><td></td><td></td></tr><tr><td>mt5-Large</td><td>64.1</td><td>17.4</td><td>78.6</td><td>27.5</td><td>66.9</td><td>63.6</td><td>74.4</td><td>58.4</td><td>54.9</td><td></td><td></td></tr><tr><td>nmt5-Large</td><td>67.6</td><td>23.0</td><td>79.4</td><td>35.6</td><td>66.7</td><td>68.0</td><td>77.5</td><td>62.2</td><td>57.4</td><td></td><td></td></tr></table>
177
+
178
+ Table 11: WikiAnn NER results on unseen languages. Refer to section 4.4
nmt5isparalleldatastillrelevantforpretrainingmassivelymultilinguallanguagemodels/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:497a0f621bcce28ddaa480fc2d65329502eded0c5d5abc19f80d8e03dcc7e446
3
+ size 665582
nmt5isparalleldatastillrelevantforpretrainingmassivelymultilinguallanguagemodels/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:631b089a2eeb02f4995e8e161cdd9b77bb6919b604fe4d8f06880708c66e81c5
3
+ size 193547
towardsamorerobustevaluationforconversationalquestionanswering/f9a5ee66-6d8b-4a18-b856-04b75950ca1b_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b6abeceacfd51f1ce88dfe4aa17e6065f0a6114dffdd36509005520e8f59a2a
3
+ size 42740
towardsamorerobustevaluationforconversationalquestionanswering/f9a5ee66-6d8b-4a18-b856-04b75950ca1b_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0cc3341644d33a50bcce558614fef19427d8ce9c02de6888f27000795f191879
3
+ size 52085
towardsamorerobustevaluationforconversationalquestionanswering/f9a5ee66-6d8b-4a18-b856-04b75950ca1b_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c68eccc111e129d586e988222975e3bd2b8d0720777257f3e2228d7b61eb40b3
3
+ size 186536
towardsamorerobustevaluationforconversationalquestionanswering/full.md ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Towards a more Robust Evaluation for Conversational Question Answering
2
+
3
+ Wissam Siblini, Baris Sayil, Yacine Kessaci
4
+
5
+ Worldline, France
6
+
7
+ {wissam.siblini,yacine.kessaci}@worldline.com
8
+
9
+ baris.sayil@insa-lyon.fr
10
+
11
+ # Abstract
12
+
13
+ With the explosion of chatbot applications, Conversational Question Answering (CQA) has generated a lot of interest in recent years. Among proposals, reading comprehension models which take advantage of the conversation history (previous QA) seem to answer better than those which only consider the current question. Nevertheless, we note that the CQA evaluation protocol has a major limitation. In particular, models are allowed, at each turn of the conversation, to access the ground truth answers of the previous turns. Not only does this severely prevent their applications in fully autonomous chatbots, it also leads to unsuspected biases in their behavior. In this paper, we highlight this effect and propose new tools for evaluation and training in order to guard against the noted issues. The new results that we bring come to reinforce methods of the current state of the art.
14
+
15
+ # 1 Introduction
16
+
17
+ The ability to automatically answer questions from a set of raw text paragraphs has long been coveted by computer scientists (Woods, 1977). For applications in search engines, one could consider an isolated task where a user formulates a single question (Croft et al., 2010; Siblini et al., 2020). But recently, with usage in conversational agents (e.g. chatbots), a more contextualized variant referred to as Conversational Question Answering (CQA) has attracted a great deal of attention (Reddy et al., 2019; Choi et al., 2018). CQA differs from traditional (extractive) Question Answering (Rajpurkar et al., 2016) because Question-Answer (QA) pairs are not single but come in sequences within conversations. Therefore, models can use previous turns as context to extract the answer of the current question (Zhu et al., 2018; Huang et al., 2018; Qu et al., 2019a). In some cases, the history is even crucial to disambiguate pronouns in the question.
18
+
19
+ Similarly to other NLP tasks, the state-of-the-art approaches for CQA are variants of the Transformer Encoder (Vaswani et al., 2017), a deep neural network with several self-attention layers that produce contextualized representations of the "tokens" (words, subwords) that compose a text. For instance, models like BERT (Devlin et al., 2019; Lan et al., 2019; Sanh et al., 2019) obtain a more than decent performance on CQA datasets like QuAC (Choi et al., 2018) or CoQA (Reddy et al., 2019). However, they miss the context to fully understand the questions. Proposals have been made to integrate the history in several manners: using a recursive strategy (Huang et al., 2018), appending previous QAs to the current question as input (Zhu et al., 2018), and contextualizing the question–paragraph pair with respect to the history. We can mention in particular BERT-HAE and BERT-PHAE (Qu et al., 2019a,b) which improve BERT in a simple yet efficient way by encoding, in addition to segment and position, the fact that parts of the paragraph's words belonged to previous answers.
20
+
21
+ # 2 Motivation and main contributions
22
+
23
+ Our objective here is not to propose yet another model to try to obtain the best predictive score on CQA leaderboards. Instead, we focus our thinking around the current evaluation/training protocols with regards to the possible application cases. The starting point of our reflection is that currently, when evaluated on CQA datasets, models like BERT-HAE use the ground-truth answers of previous turns as context to answer the current question. This limits the scope of applicability to only a "semi-automatic" bot that would require a human providing supervision at each turn. We also show how it biases the selection of models towards those with an undesired filter behavior.
24
+
25
+ To make approaches from the literature usable
26
+
27
+ in more difficult/realistic scenarios like standalone chatbots (in which they can only access the previous questions and their predictions of the answers), we make the following contributions: (1) We implement new evaluation tools to first highlight the current unnoticed and undesirable behavior: in ground-truth free conditions, CQA approaches can become even less accurate than baselines like BERT which do not exploit the history at all. (2) We develop the analog training protocol to make approaches robust to the observed issues. In particular, this gives back state-of-the-art models the strength to outperform the baseline but this time in a scenario that connects better to real-world conversational agents. Our work comes with an implementation of conversational QA tools, based on the most widely used transformers library (Wolf et al., 2019).
28
+
29
+ # 3 Conversational Question Answering
30
+
31
+ Conversational Question Answering (CQA) is a Natural Language Processing task related to Machine Comprehension (MC) (Zhang et al., 2019; Gupta et al., 2020). MC has grown significantly over the last decade, particularly thanks to (1) large scale datasets such as SQuAD (Rajpurkar et al., 2016) or Natural Questions (Kwiatkowski et al., 2019), (2) the improvement of representation learning models (Joulin et al., 2017), (3) powerful mechanisms such as attention (Yang et al., 2016; Vaswani et al., 2017), and (4) the emergence of several related topics like multi-lingual modeling (Pires et al., 2019; Siblini et al., 2019) or Conversational Question Answering (Choi et al., 2018; Reddy et al., 2019).
32
+
33
+ In CQA, questions are grouped in conversations and often require the context, i.e. previous QA turns, to be fully understandable. QuAC (Choi et al., 2018) and CoQA (Reddy et al., 2019) are two examples of CQA datasets. They were both generated by humans (a "student" and a "teacher") through conversations where the student asks a series of questions, complementary or not, on a given paragraph and the teacher answers them. In this paper, we focus on QuAC (Question Answering in Context) which is more recent and described as more challenging than CoQA (Choi et al., 2018). It contains 14k conversations and around 100k question-paragraph pairs, split into a training set (11,567 conversations / 83,568 questions), a validation set (1,000 conversations / 7,354 questions) and a test set. It evaluates models with several metrics,
34
+
35
+ the main one being the F1-score (Flach, 2003).
36
+
37
+ Models proposed for QuAC are similar to those developed for SQuAD (e.g. BiDAF (Seo et al., 2016) or BERT (Devlin et al., 2019)) but they additionally integrate the history. A popular example is BERT-HAE (Qu et al., 2019a). It uses BERT's architecture but modifies the input embedding layer to add a novel component: the History Answer Embedding (HAE). As usual, the input question-paragraph pair is tokenized and marked with positions and segments. Then, an additional History Answer marker is added to indicate whether the tokens belonged to answers of previous questions or not, and the resulting embedding is simply added to the other embedding vectors (token, position, segment) before the self-attention blocks. BERT-HAE was enhanced, in a later publication (Qu et al., 2019b) by BERT-PHAE (Positional HAE) which additionally encodes the turn position of the answers in the history. Although very promising, we note that BERT-HAE and BERT-PHAE, as well as other state of the art models for QuAC, access the ground-truth answers of previous turns during evaluation. Therefore, reported results only reflect the performance within a reduced scope of applicability. In the following, we detail this limitation and propose to complement the current protocol in order to improve both evaluation and training.
38
+
39
+ # 4 A more Robust Protocol
40
+
41
+ Consider a standalone chatbot that successively answers questions from documents. At each turn, it cannot know for sure the ground truth (GT) answers of the previous turns except if the user or another human provides supervision. This could happen in scenarios where the role of the algorithm is only to provide answer suggestions (semi-automatic) to a human agent (e.g. in customer support). However, applications often seek bots where the question-answer loop is automated (standalone). Here we investigate this second setting. We start by reproducing the literature results on the semi-automatic scenario, then we exhibit the limits and propose solutions for our target scenario.
42
+
43
+ # 4.1 Reproducing the Regular Evaluation in the Semi-automatic Scenario
44
+
45
+ To evaluate the baseline performance (semi-automatic), we train BERT-HAE and BERT-PHAE on QuAC using the protocol described by the authors (Qu et al., 2019a) and the same hyperparame
46
+
47
+ ters: history markers from up to 6 turns, and specific optimization parameters (12 as batch size, 3e-5 as learning rate with a linear decrease to 0 over 24k training steps). We implement our own training script on the basis of codes pieces from the transformers library (Wolf et al., 2019) and BERT-HAE's authors<sup>1</sup>. Experiments are run with a Nvidia Tesla V100 GPU.
48
+
49
+ <table><tr><td>Model</td><td>F1</td><td>Uses history</td></tr><tr><td>BiDAF++ (Choi et al., 2018)</td><td>51.8</td><td>No</td></tr><tr><td>BERT (Qu et al., 2019a)</td><td>54.4 (54.8)</td><td>No</td></tr><tr><td>BERT-HAE (Qu et al., 2019a)</td><td>63.1 (63.4)</td><td>Yes</td></tr><tr><td>BERT-PHAE (Qu et al., 2019b)</td><td>64.7 (64.4)</td><td>Yes</td></tr></table>
50
+
51
+ Table 1: F1-score of BERT, BERT-HAE, BERT-PHAE and a previous baseline on QuAC using the regular evaluation protocol. We display the original results published by the authors and the ones we reproduced (in parentheses).
52
+
53
+ Our results are roughly equal to those previously reported (Table 1). BERT's F1 score is 54.8, which compares favorably to previous baselines such as BiDAF. By adjusting the representation of the tokens based on the history of answers, BERT-HAE allows a significant improvement to 63.4 (+15.7%). The position of the turns in the history also has its importance allowing BERT-PHAE to further improve the F1-score to 64.4. This is probably because questions are often related to the answers that directly precede them. To improve the results even further, one can also select a specific subset of turns in the history (Qu et al., 2019b).
54
+
55
+ # 4.2 Critical Analysis: The Filtering Behavior
56
+
57
+ Although promising, the aforementioned results need to be considered with caution. A hasty conclusion is that adding the history allows the model to benefit from a context and hence to better process the current question. However the improvement could also be explained by a bias in the dataset at hand. Indeed, this question answering task is extractive, i.e. answers are selected from a paragraph. In the course of a conversation in QuAC, an average of 7 questions are successively asked on the same rather small paragraph. Thus simply filtering the paragraph tokens with the answer history provides the advantage of reducing considerably the list of possible remaining answers. Note however that such a filtering could also have a negative effect, in the presence of overlap between answers.
58
+
59
+ To get better insights of the impact of a filtering behavior in practice, we run three experiments.
60
+
61
+ <table><tr><td>Model</td><td>F1</td><td>F1 w/ post filtering</td></tr><tr><td>BEST</td><td>95.6</td><td>92.7</td></tr><tr><td>BERT</td><td>54.8</td><td>56.9</td></tr><tr><td>BERT-HAE</td><td>63.4</td><td>62.5</td></tr></table>
62
+
63
+ Table 2: Evaluation of the impact of post-filtering on BEST, BERT and BERT-HAE.
64
+
65
+ Experiment 1: The negative impact of filtering due to overlap We first compute the best reachable F1-score (that we refer to as BEST) as if we had a model that always predicts the expected answer. Then we compute "BEST w/ post filtering" with the same predictions except that we post-filter all tokens that belong the 6 previous turns' answers, except for the "Cannot Answer" tokens (reserved for unanswerable questions). BEST F1 score is $95.6^2$ while "BEST F1 w/ post filtering" is lower but very close: 92.7 (Table 2). This tells us that the maximal negative impact of a filtering strategy on QuAC is weak. We find an explanation by doing proportion measurements in QuAC's eval set: in particular, the percentage of overlapping tokens (resp. non overlapping tokens) between answers is low (resp. high): $5.7\%$ (resp. $74.1\%$ ), the other $20.2\%$ being the "Cannot Answer" tokens.
66
+
67
+ Experiment 2: Global impact of a post filtering on the models After 6 turns, sometimes almost half of the paragraph tokens belong to the history of answers. Even if experiment 1 suggests a negative impact of filtering due to overlap, the positive impact on our baselines (due to the significant reduction of the number of candidate answers) could counterbalance. We therefore re-evaluate the models trained in section 4.1, but this time we apply a post processing of their predictions: the start/end logits of tokens that belong to the answers of previous turns are set to $-\infty$ , except for the "Cannot Answer" tokens. This forces previous answers to be excluded from the final predicted span text. This simple strategy to integrate the history in BERT allows an improvement to an F1-score of 56.9 (Table 2). On the contrary, it globally reduces the score
68
+
69
+ of BERT-HAE to 62.5 (a reduction factor slightly lower than with BEST). These results suggest that access to ground-truth answers of previous turns allows in QuAC, in which the overlap is weak, a filtering mechanism to be a positive way of integrating history. Results also suggest that BERT-HAE might already implicitly integrate a filtering behavior. Unquestionably, it does it in a more expressive manner than our hard post-processing, since the history markers are passed as inputs to the model.
70
+
71
+ Experiment 3: Does BERT-HAE exhibit a filter behavior? Although suggested by the previous experiment, we want to answer this question more clearly. We consider an experiment aligned with the philosophy of adversarial attacks (Akhtar and Mian, 2018; Morris et al., 2020). During evaluation, we systematically modify the history answer markers so that the tokens of the current expected answer are marked as if they belonged to the history. The results obtained from this evaluation protocol are displayed under the column "F1 w/ Adv" in Table 3. F1 w/ Adv allows to measure, with the F1 metric, the ability of the models to answer a question when its answer has already appeared in the conversation before. In this condition, we observe a dramatic drop in BERT-HAE's performance (from 63.4 to 41.7), and an even worse for BERT-PHAE. This confirms that these models tend to output lower probabilities for tokens that are in the history, which suggests a filtering behavior and makes their usage potentially counter productive.
72
+
73
+ # 4.3 Proposed Evaluation for the Standalone Scenario
74
+
75
+ The current evaluation protocol on QuAC's validation set can bias model selection towards those able to implement a filtering behavior, which seems to be the case for BERT-(P)HAE. Thus, it does not guarantee a robust behavior in a fully autonomous bot. Here we propose an extension.
76
+
77
+ Inspired by the literature of recurrent models, we refer to the regular evaluation protocol, which access to ground truth answers of previous turns, as the "Teacher Forcing" (w/ TF) protocol. Analogically, we consider a mode "without Teacher Forcing" (w/o TF) where models process a conversation in the natural order and only use their predictions as history. The latter is outlined in Algorithm 1, where "build_mark" refers to a function that computes the new HAE markers given the previous ones and the new answer.
78
+
79
+ Note that the algorithm for evaluation w/ TF simply replaces "build_mark(HAE,answerpred)" with "build_mark(HAE,answerGT)".
80
+
81
+ Algorithm 1 Evaluation w/o TF
82
+ 1: s ← 0
83
+ 2: for conversation ∈ valid set do
84
+ 3: HAE ← None
85
+ 4: for turn ∈ conversation do
86
+ 5: question ← turn['question']
87
+ 6: answerGT ← turn['answer']
88
+ 7: answerpred ← model(question, HAE)
89
+ 8: HAE ← build_mark(HAE, answerpred)
90
+ 9: s ← s + F1(answerpred, answerGT)
91
+ 10: end for
92
+ 11: end for
93
+ 12: return s / card(valid set)
94
+
95
+ When we take the models trained in section 4.1 (w/ TF) and evaluate them with the new standalone protocol (w/o TF), Table 3 shows that the performance drops from 63.4 to 53.5 with BERT-HAE and from 64.4 to 54.2 with BERT-PHAE. Concretely, although unsuspected with the original protocol, the approaches do not necessarily seem advantageous compared to BERT here. This in no way detracts the interest of these proposals, which implement clever architectures to integrate the history. It only prevents their application, as is, in the standalone scenario. Nevertheless, now that this issue is identified, we can try to design an appropriate strategy to avoid it from the start, by taking measures at the training phase.
96
+
97
+ # 4.4 Training for the Standalone Scenario
98
+
99
+ To complement the proposed evaluation protocol with a training one, we propose to apply a recipe inspired by the most popular defense mechanism against adversarial attacks called adversarial training (Ren et al., 2020), i.e. we introduce the disruptive element (here the mode without Teacher Forcing) at training time. We consider three heuristics: (1) we disable TF during all the training steps (Robust), (2) we disable TF randomly based on a Coin Flip (Robust-CF), (3) we progressively disable TF from $0\%$ of the steps to $100\%$ of the steps over the training iterations (Robust-P). The new training process is detailed in Algorithm 2, where "update" refers to the optimization algorithm that updates the model based on the loss and "heuristic_condition" is a condition that depends on the
100
+
101
+ heuristic (e.g. always true for heuristic (1)). Note that both heuristics (2) and (3) are inspired from scheduled sampling methods (Bengio et al., 2015) adapted to the context of CQA.
102
+
103
+ # Algorithm 2 Robust Training
104
+
105
+ 1: for conversation $\in$ train set do
106
+ 2: HAE $\leftarrow$ None
107
+ 3: for turn $\in$ conversation do
108
+ 4: question $\leftarrow$ turn['question']
109
+ 5: answerGT $\leftarrow$ turn['answer']
110
+ 6: answerpred $\leftarrow$ model(question, HAE)
111
+ 7: $l \leftarrow$ loss( answerpred, answerGT)
112
+ 8: update(model,l)
113
+ 9: if heuristic_condition then
114
+ 10: answeradd $\leftarrow$ answerpred
115
+ 11: else
116
+ 12: answeradd $\leftarrow$ answerGT
117
+ 13: end if
118
+ 14: HAE $\leftarrow$ build_mark(HAE, answeradd)
119
+ 15: end for
120
+ 16: end for
121
+ 17: return model
122
+
123
+ We obtain encouraging results (Table 3). In particular, BERT-PHAE Robust-P reaches a F1-score of 58.1 in the standalone scenario which is better than BERT's F1. Besides, "F1 /w Adv" for BERT(P)HAE Robust seems to indicate that, the less we apply TF, the less the entailed model exhibits a filtering behavior. In fact, all the robust variants exhibit a weaker filtering behaviour than the original methods.
124
+
125
+ <table><tr><td>Model</td><td>F1 w/ TF</td><td>F1 w/o TF</td><td>F1 w/ Adv</td></tr><tr><td>BERT</td><td>-</td><td>54.4</td><td>-</td></tr><tr><td>BERT-HAE</td><td>63.4</td><td>53.5</td><td>41.7</td></tr><tr><td>BERT-HAE Robust</td><td>59.5</td><td>56.6</td><td>51.7</td></tr><tr><td>BERT-HAE Robust-CF</td><td>61.6</td><td>55.9</td><td>47.4</td></tr><tr><td>BERT-HAE Robust-P</td><td>60.7</td><td>56.7</td><td>50.7</td></tr><tr><td>BERT-PHAE</td><td>64.4</td><td>54.2</td><td>40.7</td></tr><tr><td>BERT-PHAE Robust</td><td>60.5</td><td>57.4</td><td>53.3</td></tr><tr><td>BERT-PHAE Robust-CF</td><td>62.2</td><td>56.4</td><td>47.7</td></tr><tr><td>BERT-PHAE Robust-P</td><td>62.4</td><td>58.1</td><td>51.6</td></tr><tr><td>BERT-AH</td><td>-</td><td>58.3</td><td>-</td></tr></table>
126
+
127
+ Table 3: Evaluation of BERT, BERT-HAE, BERT-PHAE, BERT-AH and the robust variants with different validation protocols.
128
+
129
+ Our experiment and results leave room for improvement with additional considerations on protocols/parameters/models. For instance, contrary to answers, standalone models can have access to
130
+
131
+ the exact history of questions. What if we integrated the latter instead of the answer history in the model's input? We tested this by implementing a simple model that we refer to as BERT-AH (Appended History) in which previous questions are added to the regular BERT's inputs, and marked with a special embedding. BERT-AH obtains an F1-score of 58.3 (whatever the evaluation protocol, since answer history is not used). Thus, our guess is that the best direction for standalone CQA lies towards both the integration of previous questions and the robust integration of previous answers.
132
+
133
+ # 5 Conclusion
134
+
135
+ The work presented in this paper comes to complement the current training and evaluation protocols for CQA. It allows (1) highlighting unnoticed and undesirable behavior in existing approaches from the literature and (2) more robustness for their application in autonomous chatbots. We hope that this will encourage additional proposals in the same direction. Several improvements could be made in the future. First, because without Teacher Forcing the history is now predicted and not fixed, we could explore the impact of updating the model by backpropagating an answer's error through all previous turns and not only the current one. This would be analog to backpropagation through time. Second, we could augment the current CQA datasets or propose new ones to prevent the biases we observed: for example, QuAC could have conversations including wrong answers, since this occurs in real-life, so that models could be properly trained for. The associated turns would of course only be used as a part of histories. Finally, we should perform user tests to evaluate the robustness of models in real-life, because when a model's answer is wrong, we expect it to impact the next user's question(s). And this cannot be taken into account with the current protocol since the datasets are static.
136
+
137
+ # References
138
+
139
+ Naveed Akhtar and Ajmal Mian. 2018. Threat of adversarial attacks on deep learning in computer vision: A survey. IEEE Access, 6:14410-14430.
140
+ Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. 2015. Scheduled sampling for sequence prediction with recurrent neural networks.
141
+ Eunsol Choi, He He, Mohit Iyyer, Mark Yatskar, Wentau Yih, Yejin Choi, Percy Liang, and Luke Zettle-moyer. 2018. QuAC: Question answering in con
142
+
143
+ text. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2174-2184, Brussels, Belgium. Association for Computational Linguistics.
144
+ W Bruce Croft, Donald Metzler, and Trevor Strohman. 2010. Search engines: Information retrieval in practice, volume 520. Addison-Wesley Reading.
145
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171-4186, Minneapolis, Minnesota. Association for Computational Linguistics.
146
+ Peter A Flach. 2003. The geometry of roc space: understanding machine learning metrics through roc isometrics. In Proceedings of the 20th international conference on machine learning (ICML-03), pages 194-201.
147
+ Somil Gupta, Bhanu Pratap Singh Rawat, and Hong Yu. 2020. Conversational machine comprehension: a literature review. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2739-2753, Barcelona, Spain (Online). International Committee on Computational Linguistics.
148
+ Hsin-Yuan Huang, Eunsol Choi, and Wen-tau Yih. 2018. Flowqa: Grasping flow in history for conversational machine comprehension. In International Conference on Learning Representations.
149
+ Armand Joulin, Edouard Grave, Piotr Bojanowski, and Tomas Mikolov. 2017. Bag of tricks for efficient text classification. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pages 427-431, Valencia, Spain. Association for Computational Linguistics.
150
+ Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452-466.
151
+ Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2019. Albert: A lite bert for self-supervised learning of language representations. In International Conference on Learning Representations.
152
+ John Morris, Eli Lifland, Jin Yong Yoo, Jake Grigsby, Di Jin, and Yanjun Qi. 2020. TextAttack: A framework for adversarial attacks, data augmentation, and adversarial training in NLP. In Proceedings of the
153
+
154
+ 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 119-126, Online. Association for Computational Linguistics.
155
+ Telmo Pires, Eva Schlinger, and Dan Garrette. 2019. How multilingual is multilingual BERT? In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4996-5001, Florence, Italy. Association for Computational Linguistics.
156
+ Chen Qu, Liu Yang, Minghui Qiu, W Bruce Croft, Yongfeng Zhang, and Mohit Iyyer. 2019a. Bert with history answer embedding for conversational question answering. In Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 1133-1136.
157
+ Chen Qu, Liu Yang, Minghui Qiu, Yongfeng Zhang, Cen Chen, W Bruce Croft, and Mohit Iyyer. 2019b. Attentive history selection for conversational question answering. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, pages 1391-1400.
158
+ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. SQuAD: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2383-2392, Austin, Texas. Association for Computational Linguistics.
159
+ Siva Reddy, Danqi Chen, and Christopher D. Manning. 2019. CoQA: A conversational question answering challenge. Transactions of the Association for Computational Linguistics, 7:249-266.
160
+ Kui Ren, Tianhang Zheng, Zhan Qin, and Xue Liu. 2020. Adversarial attacks and defenses in deep learning. Engineering, 6(3):346-360.
161
+ Victor Sanh, Lysandre Debut, Julien Chaumont, and Thomas Wolf. 2019. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108.
162
+ Minjoon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. 2016. Bidirectional attention flow for machine comprehension. arXiv preprint arXiv:1611.01603.
163
+ Wissam Siblini, Mohamed Challal, and Charlotte Pasqual. 2020. Delaying interaction layers in transformer-based encoders for efficient open domain question answering. arXiv preprint arXiv:2010.08422.
164
+ Wissam Siblini, Charlotte Pasqual, Axel Lavielle, Mohamed Challal, and Cyril Cauchois. 2019. Multilingual question answering from formatted text applied to conversational agents. arXiv preprint arXiv:1910.04659.
165
+
166
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008.
167
+ Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, et al. 2019. Huggingface's transformers: State-of-the-art natural language processing. ArXiv, pages arXiv-1910.
168
+ William A. Woods. 1977. Lunar rocks in natural english: Explorations in natural language question answering. Linguistic Structures Processing, pages 521-569.
169
+ Zichao Yang, Diyi Yang, Chris Dyer, Xiaodong He, Alex Smola, and Eduard Hovy. 2016. Hierarchical attention networks for document classification. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1480-1489, San Diego, California. Association for Computational Linguistics.
170
+ Xin Zhang, An Yang, Sujian Li, and Yizhong Wang. 2019. Machine reading comprehension: a literature review. arXiv preprint arXiv:1907.01686.
171
+ Chenguang Zhu, Michael Zeng, and Xuedong Huang. 2018. Sdnet: Contextualized attention-based deep network for conversational question answering. arXiv preprint arXiv:1812.03593.
towardsamorerobustevaluationforconversationalquestionanswering/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:898670c7e1d71dcc07e3fe0d752c4511490ff525d8a477637b6cce0b04343aea
3
+ size 62569
towardsamorerobustevaluationforconversationalquestionanswering/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c728ddb4d61a0c7747729524299d5da0ddc44e0c8dc5574a0267b1f0153cf5c
3
+ size 168246
towardsmoreequitablequestionansweringsystemshowmuchmoredatadoyouneed/fdbd283a-547a-45f4-89d3-ec0b370a66b1_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7f35f17462d2d249c7975e9c40ae9ab822e8f972a0f6343464a10d5b50b5212
3
+ size 57245
towardsmoreequitablequestionansweringsystemshowmuchmoredatadoyouneed/fdbd283a-547a-45f4-89d3-ec0b370a66b1_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db103f1b3ae7eda01b72faefa6655bc54ff7b0f6a8ceec5c065b82e96e43665a
3
+ size 67138
towardsmoreequitablequestionansweringsystemshowmuchmoredatadoyouneed/fdbd283a-547a-45f4-89d3-ec0b370a66b1_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e21bd10b7a10d2a6cfca49cc01a15b5ddd5585f9a024ab5cefdd95c57a22694
3
+ size 248438
towardsmoreequitablequestionansweringsystemshowmuchmoredatadoyouneed/full.md ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Towards More Equitable Question Answering Systems: How Much More Data Do You Need?
2
+
3
+ Arnab Debnath*, Navid Rajabi*, Fardina Fathmiul Alam*, Antonios Anastasopoulos
4
+
5
+ Department of Computer Science, George Mason University
6
+
7
+ {adebnath,nrajabi,falam5,antonis}@gmu.edu
8
+
9
+ # Abstract
10
+
11
+ Question answering (QA) in English has been widely explored, but multilingual datasets are relatively new, with several methods attempting to bridge the gap between high- and low-resourced languages using data augmentation through translation and cross-lingual transfer. In this project, we take a step back and study which approaches allow us to take the most advantage of existing resources in order to produce QA systems in many languages. Specifically, we perform extensive analysis to measure the efficacy of few-shot approaches augmented with automatic translations and permutations of context-question-answer pairs. In addition, we make suggestions for future dataset development efforts that make better use of a fixed annotation budget, with a goal of increasing the language coverage of QA datasets and systems.
12
+
13
+ # 1 Introduction
14
+
15
+ Automatic question answering (QA) systems are showing increasing promise that they can fulfil the information needs of everyday users, via information seeking interactions with virtual assistants. The research community, having realized the obvious needs and potential positive impact, has produced several datasets on information seeking QA. The effort initially focused solely on English, with datasets like WikiQA (Yang et al., 2015), MS MARCO (Nguyen et al., 2016), SQuAD (Rajpurkar et al., 2016), QuAC (Choi et al., 2018), CoQA (Reddy et al., 2019), and Natural Questions (NQ) (Kwiatkowski et al., 2019), among others. More recently, heading calls for linguistic and typological diversity in natural language processing
16
+
17
+ research (Joshi et al., 2020), larger efforts have produced datasets in multiple languages, such as TyDi QA (Clark et al., 2020), XQuAD (Artetxe et al., 2020), or MLQA (Lewis et al., 2020).
18
+
19
+ Despite these efforts, the linguistic and typological coverage of question answering datasets is far behind the world's diversity. For example, while TyDi QA includes 11 languages –less than $0.2\%$ of the world's approximately 6,500 languages (Hammarström, 2015) – from 9 language families, its typological diversity is 0.41, evaluated in a [0,1] range with the measure defined by Ponti et al. (2020); MLQA provides data in 7 languages from 4 families, for a typological diversity of 0.32. The total population coverage of TyDi QA, based on population estimates from Glottolog (Nordhoff and Hammarström, 2012), is less than $20\%$ of the world's population (the TyDiQA languages total around 1.45 billion speakers).
20
+
21
+ Obviously, the ideal solution to this issue would be to collect enough data in every language. Unfortunately, this ideal seems unattainable at the moment. In this work, we perform extensive analysis to investigate the next-best solution: using the existing resources, large multilingual pre-trained models, data augmentation, and cross-lingual learning to improve performance with just a few or no training examples. Specifically:
22
+
23
+ - we study how much worse a multilingual few-shot training setting would perform compared to training on large training datasets,
24
+ - we show how data augmentation through translation can reduce the performance gap for few-shot setting, and
25
+ - we study the effect of different fixed-budget allocation for training data creation across languages, making suggestions for future dataset creators.
26
+
27
+ # 2 Problem Description and Settings
28
+
29
+ We focus on the task of simplified minimal answer span selection over a gold passage: The inputs to the model include the full text of an article (the passage or context) and the text of a question (query). The goal is to return the start and end byte indices of the minimal span that completely answers the question.
30
+
31
+ Our models follow the current state-of-the-art in extractive question answering, relying on large multilingually pre-trained language models (in our case, multilingual BERT (Devlin et al., 2019)) and the task-tuning strategy of Alberti et al. (2019), which outperforms approaches like DocumentQA (Clark and Gardner, 2018) or decomposable attention (Parikh et al., 2016). In all cases, we treat the official TyDi QA development set as our test set, since the official test set is not public. We provide concrete details (model cards, hyperparameters, etc) on our model and training/finetuning regime in Appendix A.
32
+
33
+ To simulate the scenario of data-scarce adaptation of such a model to unseen languages, we will treat the TyDi QA languages as our test, unseen ones. We will assume that we have access to (a) other QA datasets in more resource-rich languages (in particular, the SQuAD dataset which provides training data in English), and (b) translation models between the languages of existing datasets (again, English) and our target "unseen" languages.
34
+
35
+ In the experiments sections, we first focus on few- and zero-shot experiments (§3) and then study the effects of language selection and budget-restricted decisions on training data creation (§4).
36
+
37
+ Evaluation We report F1 score on the test set of each language, as well as a macro-average excluding English $(\mathbf{avg}_{\mathcal{L}})$ . In addition, to measure the expected impact on actual systems' users, we follow Faisal et al. (2021) in computing a population-weighted macro-average $(\mathbf{avg}_{\mathbf{pop}})$ based on language community populations provided by Ethnologue (Eberhard et al., 2019).
38
+
39
+ # 3 Is Few-Shot a Viable Solution?
40
+
41
+ We first set out to explore the effect of the amount of available data on downstream performance. Starting with baselines relying solely on English-only SQuAD, we implement a few-shot setting for
42
+
43
+ fine-tuning on the target languages of TyDi QA.3 To our knowledge, this is the first study of its type on the TyDi QA benchmark.
44
+
45
+ The straightforward baseline simply provides zero-shot results on TyDi QA after training only on English. Table 1 provides our (improved) reproduction of the baseline experiments of Clark et al. (2020). The skyline results (bottom of Table 1) reflect the presumably best possible results under our current modeling approach, which trains jointly on all languages using all available TyDi QA training data. We note that for most languages the gap between the baseline and the skyline is more than 20 percentage points, with the exception of English where -unsurprisingly- there is a difference of only 3.3 percentage points. The performance gap is smallest for Russian (rus) at 10.9 percentage points, and largest for Telugu (tel) at 34 points.
46
+
47
+ We first study a monolingual few-shot setting. That is, we fine-tune the model trained on the English SQuAD dataset, with only a small amount of data (10, 20, or 50 training instances) in the test language. Due to space limitations, we only present results with 50 examples per language in Table 1, but the full experiments are available in Appendix C. We observe that even just 50 additional training instances are enough for significant improvements, which are consistent across all languages. For example, the improvement in Finnish (fin) exceeds 15 percentage points and covers about more than $60\%$ of the performance gap between the baseline and the skyline.
48
+
49
+ We now turn to a multilingual few-shot setting. Exactly as before, we assume a scenario where we only have access to a small amount of data in each language, but now we fine-tune using that small amount of data in all languages. For example, 10 training instances in each language result in training with 90 training examples over the 9 test languages. A sample of our experimental results are presented in Table 1 under "multilingual few-shot," with complete results in Appendix C.
50
+
51
+ Simply adding 50 instances from each language we obtain an F1 score of 67.9 over the zero-shot baseline, an improvement of almost 7 percentage points which reduces the zero-full gap by $43.4\%$ .
52
+
53
+ <table><tr><td rowspan="2">Model</td><td colspan="8">Results (F1-score)</td><td>avgL</td><td>avgpop</td></tr><tr><td>eng</td><td>ara</td><td>ben</td><td>fin</td><td>ind</td><td>swa</td><td>rus</td><td>tel</td><td colspan="2">(without eng)</td></tr><tr><td>Baseline: SQuAD zero-shot (reproduction)</td><td>74.2</td><td>59.0</td><td>57.3</td><td>55.7</td><td>63.2</td><td>60.3</td><td>65.6</td><td>44.6</td><td>58.0±6.3</td><td>59.3</td></tr><tr><td>Monolingual Few-Shot (+50)</td><td>73.9</td><td>64.9</td><td>66.4</td><td>70.9</td><td>73.3</td><td>70.1</td><td>66.3</td><td>62.5</td><td>67.8±3.5</td><td>67.1</td></tr><tr><td>Multilingual Few-Shot (+10/lang, 90 total)</td><td>73.7</td><td>64.6</td><td>62.9</td><td>66.5</td><td>67.0</td><td>63.1</td><td>65.9</td><td>59.6</td><td>64.2±2.4</td><td>64.4</td></tr><tr><td>(+50/lang, 450 total)</td><td>73.4</td><td>69.2</td><td>65.8</td><td>69.0</td><td>73.4</td><td>68.8</td><td>67.2</td><td>66.2</td><td>68.5±2.4</td><td>68.6</td></tr><tr><td>(+100/lang, 900 total)</td><td>74.2</td><td>72.5</td><td>70.9</td><td>71.9</td><td>75.5</td><td>72.3</td><td>69.3</td><td>69.3</td><td>71.7±2.0</td><td>71.9</td></tr><tr><td>(+500/lang, 4500 total)</td><td>76.1</td><td>76.3</td><td>74.5</td><td>78.2</td><td>81.4</td><td>79.2</td><td>73.3</td><td>73.7</td><td>76.7±2.8</td><td>76.2</td></tr><tr><td colspan="11">Data Augmentation + Multilingual Few-Shot</td></tr><tr><td>+tSQuAD</td><td>74.9</td><td>65.4</td><td>58.4</td><td>66.7</td><td>65.2</td><td>69.4</td><td>60.2</td><td>44.7</td><td>61.4±7.7</td><td>61.2</td></tr><tr><td>+mSQuAD</td><td>75.1</td><td>65.6</td><td>68.6</td><td>71.7</td><td>70.3</td><td>66.2</td><td>75.5</td><td>49.4</td><td>66.7±7.7</td><td>67.6</td></tr><tr><td>+mSQuAD +500/lang</td><td>77.6</td><td>78.7</td><td>75.0</td><td>78.5</td><td>83.5</td><td>82.5</td><td>73.2</td><td>75.3</td><td>78.1±3.6</td><td>77.6</td></tr><tr><td>+tSQuAD +500/lang</td><td>77.9</td><td>78.8</td><td>80.0</td><td>79.5</td><td>82.8</td><td>83.6</td><td>72.5</td><td>73.5</td><td>78.7±3.9</td><td>78.6</td></tr><tr><td>Skyline: Full training on TyDi QA train (reproduction)</td><td>77.5</td><td>82.4</td><td>78.9</td><td>80.1</td><td>85.4</td><td>83.8</td><td>76.5</td><td>78.3</td><td>80.8±3.0</td><td>80.9</td></tr></table>
54
+
55
+ Table 1: Data augmentation combined with multilingual few-shot learning can reach about $98\%$ of the skyline accuracy using only 10 times less training data on the test languages beyond English.
56
+
57
+ We note that the total 450 training instances represent less than $1\%$ of the full TyDi QA training set! Doubling that amount of data to 100 examples per language further increases downstream performance to an average overall F1 score of 71.7. Going further to the point of adding 500 training instances per language (for a total of 4500 examples) leads to even larger improvements for an average F1 score of 76.7. That is, using less than $10\%$ of the available training data we can reduce the average F1 score performance gap by more than $82\%$ . For a few languages the gap reduction is even more notable, e.g., more than $92\%$ for Finnish.
58
+
59
+ Data Augmentation through Translation Generating translations of English dataset to train systems in other languages has a long history and has been successful in the QA context as well (Yarowsky et al., 2001; Xue et al., 2020, inter alia). We follow the same approach, translating all SQuAD paragraphs, questions, and answers to all TyDi QA languages using Google Translate. For each language, we keep between $20 - 50\%$ of the question-answer pairs where the translated answer has an exact match in the translated paragraph,
60
+
61
+ which becomes the target span. $^{5}$ Details of the resulting dataset (which we refer to as tSQuAD) are in Table 3 in Appendix B. A second approach translates the question of a training instance into one language, but keeps the answer and context into the original language. The result is a modified training set (which we name mSQuAD) that requires better cross-lingual modeling, as the question and contexts are in different languages.
62
+
63
+ Both approaches improve over the zero-shot baseline with F1 score of 61.4 (+3) and 66.7 (+8). Notably, though, they are not as effective as few-shot training even with just 50 instances per languages. This further strengthens the discussion of Clark et al. (2020) on the qualitative differences between the SQuAD and TyDi QA dataset. Nevertheless, combining tSQuAD (or mSQuAD) with a few examples from the TyDi QA dataset leads to our best-performing methods. In particular, augmentation through translation leads to an 1-2 percentage point improvements over the multilingual few-shot approach (cf. 76.7 to 78.1/78.7 F1 score in Table 1; full results in Appendix C). Now, using only 500 new training examples per language we are almost (98%) at similar performance levels as the skyline.
64
+
65
+ <table><tr><td colspan="8">Results (F1-score)</td><td rowspan="2">Overall (w/o eng)</td><td rowspan="2">Δl(max-min)</td><td rowspan="2">avg seen unseen</td></tr><tr><td>eng</td><td>ara</td><td>ben</td><td>fin</td><td>ind</td><td>swa</td><td>rus</td><td>tel</td></tr><tr><td colspan="11">Baseline: no budget for additional data (zero-shot except for eng)</td></tr><tr><td>74.2</td><td>59.0</td><td>57.3</td><td>55.7</td><td>63.2</td><td>60.3</td><td>65.6</td><td>44.6</td><td>58.0±6.3</td><td>29.6</td><td>74.2 58.0</td></tr><tr><td colspan="11">Monolingual budget allocation (max 4500 per language; 7 experiments)</td></tr><tr><td>76.0±1.8</td><td>74.0±3.9</td><td>69.1±5.0</td><td>75.8±2.7</td><td>78.4±4.1</td><td>71.7±4.1</td><td>75.7±6.3</td><td>61.3±12.3</td><td>72.3±5.3</td><td>17.1</td><td>77.1 71.3</td></tr><tr><td colspan="11">Tri-lingual budget allocation (1500 per language; 7 random language selection experiments)</td></tr><tr><td>76.7±1.2</td><td>77.2±2.8</td><td>68.6±4.8</td><td>77.9±1.6</td><td>80.9±3.3</td><td>81.5±3.3</td><td>72.7±2.3</td><td>62.9±13.3</td><td>74.5±6.3</td><td>18.6</td><td>78.9 68.5</td></tr><tr><td colspan="11">Uniform budget allocation (500 per language)</td></tr><tr><td>77.9</td><td>78.8</td><td>80.0</td><td>79.5</td><td>82.8</td><td>83.6</td><td>72.5</td><td>73.5</td><td>78.7±3.9</td><td>11.1</td><td>78.6 -</td></tr><tr><td colspan="11">Ideal Few-Shot (4500 in each language; in-language results)</td></tr><tr><td>78.4</td><td>81.8</td><td>77.7</td><td>79.7</td><td>83.9</td><td>84.0</td><td>75.7</td><td>78.2</td><td>79.9±3.0</td><td>8.3</td><td>79.9 -</td></tr></table>
66
+
67
+ Table 2: A more egalitarian budget allocation leads to better and more equitable performance across languages (avg±std: higher average, lower std. deviation) reducing the gap $(\Delta_l)$ between best and worst performing languages.
68
+
69
+ # 4 How to Spend the Annotation Budget?
70
+
71
+ In the previous section we show that the combination of data augmentation techniques with a few new annotations can reach almost $98\%$ of the performance one would obtain by training on 10x more data. In this section we explore how one should allocate a fixed annotation budget, in order to achieve not only higher average but also more equitable performance across languages.
72
+
73
+ Keeping our budget fixed to 4500 instances, we study 3 scenarios. The first is monolingual allocation, where the whole budget is consumed by collecting training examples on a single language. We repeat the study over all 8 languages of our test set, randomly sampling training instances from the TyDi QA training set. Second, we study a tri-lingual budget allocation scheme, where we equally split the budget across 3 languages for 1500 training instances per language. We repeat this experiment 7 times, each time randomly selecting 3 languages. Last, the third and more egalitarian scenario splits the budget equally across all 8 languages, matching our previously analyzed few-shot scenario where we only have 500 additional training examples per language. In all experiments, we use our best-performing approach from the previous section, also utilizing tSQuAD for pre-training.
74
+
75
+ Our findings are summarized in Table 2. For the repeated monolingual and tri-lingual scenarios we report average performance across our experiment repetitions (full results in Appendix E). We can conclusively claim that a uniform budget allocation leads to not only better average performance, but also to more equitable performance. We report two straightforward measures for the equitability of the average accuracy across languages. First,
76
+
77
+ we report the standard deviation of the accuracy across languages; the lower the standard deviation, the more equitable the performance. We also report the difference between the best and the worst performing language for each experiment, as well as the averages for the languages that are seen and unseen during fine-tuning.
78
+
79
+ Having no budget for additional annotation (essentially, attempting the task in zero-shot fashion) leads to the most inequitable performance. The monolingual scenario typically leads to the highest accuracy when evaluating on the same language as the new training examples (the ideal section of Table 2) but the zero-shot performance on all other languages is generally significantly worse, leading to inequity. The tri-lingual scenarios follow similar patterns, with performance close to state-of-the-art for the four languages (three plus English) that have been included in the fine-tuning process, but with the rest of the languages lagging behind: the difference between seen and unseen languages is on average 10.4 points. In our experiments we randomly sampled (without replacement) three of the seven languages, but one could potentially use heuristics or a meta-model like that of Xia et al. (2020) to find or suggest the best subset of candidate languages for transfer learning; we leave such an investigation for future work.
80
+
81
+ Encouragingly, the uniform budget allocation scenario leads to higher average performance, while also reducing the gap between worst and best performing languages from around 30 percentage points to less than 12 points (60% reduction). Note that a 8x larger budget (ideal scenario) with 4500 instances per language would further improve downstream accuracy and equitability. Note that in this case where some resources are available,
82
+
83
+ simple multilingual fine-tuning might not be the best approach for some languages, e.g. compared to monolingual fine-tuning or meta-learning approaches (Wang et al., 2020; Muller et al., 2021, inter alia). We leave an investigation of such settings for future work.
84
+
85
+ # 5 Discussion
86
+
87
+ We show that data augmentation through translation along with few-shot fine-tuning on new languages with a uniform budget allocation leads to a performance close to $98\%$ of an approach using 10x more data, while producing more equitable models than other budget-constrained alternatives.
88
+
89
+ The implications of our findings become clear with a counter-factual exploration. The Gold Passage portion of the TyDi QA dataset includes around 87,000 annotated examples (50k for training across 9 languages and about 37k development and test samples). Consider the scenario where, given this annotation budget, we maintain the same evaluation standards collecting 4k development and test examples per language, but we only collect 500 training examples per language. In that case, we could have created a much more diverse resource that would include at least 19 languages! Now consider the expectation of the downstream accuracy in our counterfactual scenario: uniform budget allocation on 19 languages would lead to an average accuracy (F1 score) of around $78\%$ (similar to our experiments). Instead, under the (currently factual) scenario where we only have training data for 9 languages, the average accuracy for these 9 languages is around $80\%$ , but the zero-shot expected average on the other 10 languages is 10 points worse – in that case, the overall average accuracy would be around $74\%$ , 4 points lower than that of the egalitarian allocation scenario. Hence, as long as the ideal scenario of collecting a lot of data for a lot of languages remains infeasible, we suggest that the community puts an additional focus on the linguistic diversity of our evaluation sets and use other techniques to address the lack of training data.
90
+
91
+ # Acknowledgements
92
+
93
+ This work is supported by NSF Award 2040926. The authors also want to thank Fahim Faisal for helpful discussions on setting up the experiments. Most experiments were run on ARGO, $^{6}$ a research
94
+
95
+ computing cluster provided by the Office of Research Computing at George Mason University, VA, and a few experiments were run on Amazon Web Services instances donated through the AWS Educate program.
96
+
97
+ # References
98
+
99
+ Chris Alberti, Kenton Lee, and Michael Collins. 2019. A BERT baseline for the natural questions. arXiv:1901.08634.
100
+ Mikel Artetxe, Sebastian Ruder, and Dani Yogatama. 2020. On the Cross-lingual Transferability of Monolingual Representations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4623–4637, Online. Association for Computational Linguistics.
101
+ Eunsol Choi, He He, Mohit Iyyer, Mark Yatskar, Wentau Yih, Yejin Choi, Percy Liang, and Luke Zettle-moyer. 2018. QuAC: Question Answering in Context. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2174-2184. Association for Computational Linguistics.
102
+ Christopher Clark and Matt Gardner. 2018. Simple and Effective Multi-Paragraph Reading Comprehension. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 845–855. Association for Computational Linguistics.
103
+ Jonathan H. Clark, Eunsol Choi, Michael Collins, Dan Garrette, Tom Kwiatkowski, Vitaly Nikolaev, and Jennimaria Palomaki. 2020. TyDi QA: A Benchmark for Information-Seeking Question Answering in Typologically Diverse Languages. Transactions of the Association for Computational Linguistics, 8:454-470.
104
+ Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettle-moyer, and Veselin Stoyanov. 2020. Unsupervised Cross-lingual Representation Learning at Scale. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8440-8451. Association for Computational Linguistics.
105
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Vol 1, pages 4171-4186. Association for Computational Linguistics.
106
+ David M Eberhard, Gary F Simons, and Charles D. (eds.) Fennig. 2019. Ethnologue: Languages of the world. 2019. online. Dallas, Texas: SIL International.
107
+
108
+ Fahim Faisal, Sharlina Keshava, Md Mahfuz ibn Alam, and Antonios Anastasopoulos. 2021. SD-QA: Spoken Dialectal Question Answering for the Real World. Preprint.
109
+ Harald Hammarström. 2015. "ethnologue" 16/17/18th editions: A comprehensive review. Language, pages 723-737.
110
+ Hugging Face - mBERT. 2020. Hugging Face - bert-base-multilingual-cased. [Online; accessed 01-Novemberr-2020].
111
+ Pratik Joshi, Sebastin Santy, Amar Budhiraja, Kalika Bali, and Monojit Choudhury. 2020. The State and Fate of Linguistic Diversity and Inclusion in the NLP World. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6282-6293. Association for Computational Linguistics.
112
+ Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, et al. 2019. Natural Questions: A Benchmark for Question Answering Research. Transactions of the Association for Computational Linguistics, 7.
113
+ Patrick Lewis, Barlas Oguz, Rudy Rinott, Sebastian Riedel, and Holger Schwenk. 2020. MLQA: Evaluating Cross-lingual Extractive Question Answering. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7315-7330, Online. Association for Computational Linguistics.
114
+ Benjamin Muller, Antonios Anastasopoulos, Benoit Sagot, and Djame Seddah. 2021. When being unseen from mBERT is just the beginning: Handling new languages with multilingual language models. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 448-462, Online. Association for Computational Linguistics.
115
+ Tri Nguyen, Mir Rosenberg, Xia Song, Jianfeng Gao, Saurabh Tiwary, Rangan Majumder, and Li Deng. 2016. MS MARCO: A human generated machine reading comprehension dataset. In CoCo@ NIPS.
116
+ Sebastian Nordhoff and Harald Hammarström. 2012. Glottolog/Langdoc: Increasing the visibility of grey literature for low-density languages. In Proceedings of the Eighth International Conference on Language Resources and Evaluation (LREC'12), pages 3289-3294. European Language Resources Association (ELRA).
117
+ Ankur Parikh, Oscar Tackström, Dipanjan Das, and Jakob Uszkoreit. 2016. A Decomposable Attention Model for Natural Language Inference. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2249-2255. Association for Computational Linguistics.
118
+
119
+ Edoardo Maria Ponti, Goran Glavaš, Olga Majewska, Qianchu Liu, Ivan Vulić, and Anna Korhonen. 2020. XCOPA: A Multilingual Dataset for Causal Commonsense Reasoning. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2362-2376. Association for Computational Linguistics.
120
+ Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. SQuAD: 100,000+ Questions for Machine Comprehension of Text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2383-2392. Association for Computational Linguistics.
121
+ Siva Reddy, Danqi Chen, and Christopher D Manning. 2019. CoQA: A Conversational Question Answering Challenge. Transactions of the Association for Computational Linguistics, 7:249-266.
122
+ Zirui Wang, Zachary C. Lipton, and Yulia Tsvetkov. 2020. On negative interference in multilingual models: Findings and a meta-learning treatment. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4438-4450, Online. Association for Computational Linguistics.
123
+ Thomas Wolf, Julien Chaumont, Lysandre Debut, Victor Sanh, Clement Delangue, Anthony Moi, Pierric Cistac, Morgan Funtowicz, Joe Davison, Sam Shleifer, et al. 2020. Transformers: State-of-the-Art Natural Language Processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38-45. Association for Computational Linguistics.
124
+ Mengzhou Xia, Antonios Anastasopoulos, Ruochen Xu, Yiming Yang, and Graham Neubig. 2020. Predicting performance for natural language processing tasks. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8625-8646, Online. Association for Computational Linguistics.
125
+ Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya Barua, and Colin Raffel. 2020. mT5: A massively multilingual pre-trained text-to-text transformer. arXiv:2010.11934.
126
+ Yi Yang, Wen-tau Yih, and Christopher Meek. 2015. WikiQA: A Challenge Dataset for Open-Domain Question Answering. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 2013-2018. Association for Computational Linguistics.
127
+ David Yarowsky, Grace Ngai, and Richard Wicentowski. 2001. Inducing multilingual text analysis tools via robust projection across aligned corpora. In Proceedings of the First International Conference on Human Language Technology Research.
128
+
129
+ # A Experimental Settings
130
+
131
+ For the experiments, we've used "bert-multi-lingual-base-uncased" (mBERT) (Hugging Face - mBERT, 2020) as mentioned as the main baseline on TyDi QA paper (Clark et al., 2020). It is a pre-trained model on the top 102 languages with the largest Wikipedia using a masked language modeling (MLM) objective (Devlin et al., 2019). From preliminary experiments, we realized that the optimum trade-off between the highest F1 score and the least computational cost is achieved by training for 3 epochs, using batch size of 24, and learning rate of 3e-5. Therefore, we applied these hyperparameter settings for our experiments. The main script we used was a module under the Huggingface library (Wolf et al., 2020) (called run_squad), which is being used widely for fine-tuning transformers for multi-lingual question answering datasets.
132
+
133
+ # B SQuAD Translation Details
134
+
135
+ We augmented the English SQuAD with translated SQuAD (tSQuAD) instances for each language. Here, the contexts, questions and answers from SQuAD instances are translated to the target languages using Google Translate (with the google-trans-new API) and only the instances where an exact match of translated answer is found in the translated context, are kept for augmentation. The total number of instances per language, we ended up with after translation is listed in Table 3.
136
+
137
+ # C Complete Few-Shot Experiments
138
+
139
+ Provided in Table 4.
140
+
141
+ # D Mix-and-Match Experiments
142
+
143
+ Provided in Table 5.
144
+
145
+ # E Budget Allocation Experiments
146
+
147
+ The complete results for our experiments are presented in Table 6.
148
+
149
+ <table><tr><td></td><td>SQuAD</td><td>tAr</td><td>tBn</td><td>tFin</td><td>tInd</td><td>tKo</td><td>tRus</td><td>tSwa</td><td>tTel</td></tr><tr><td>no of paragraphs</td><td>18.9</td><td>16.6</td><td>13.5</td><td>12.4</td><td>16.2</td><td>11.2</td><td>11.6</td><td>15.3</td><td>16.6</td></tr><tr><td>no of QAs</td><td>87.6</td><td>39.1</td><td>24.1</td><td>21.4</td><td>36.1</td><td>18.1</td><td>19.2</td><td>31.2</td><td>39.7</td></tr></table>
150
+
151
+ Table 3: Number (in 1000s) of paragraphs and QA pairs present in the original SQuAD and translated SQuAD
152
+
153
+ <table><tr><td rowspan="2">Model</td><td colspan="8">Results (F1-score)</td><td rowspan="2">Overall (without eng)</td></tr><tr><td>eng</td><td>ara</td><td>ben</td><td>fin</td><td>ind</td><td>swa</td><td>rus</td><td>tel</td></tr><tr><td rowspan="2">Baseline: SQuAD zero-shot (Clark et al., 2020) (ours)</td><td>73.4</td><td>60.3</td><td>57.3</td><td>56.2</td><td>60.8</td><td>52.9</td><td>64.4</td><td>49.3</td><td>57.3±4.7</td></tr><tr><td>74.2</td><td>59.0</td><td>57.3</td><td>55.7</td><td>63.2</td><td>60.3</td><td>65.6</td><td>44.6</td><td>58.0±6.3</td></tr><tr><td>Monolingual Few-Shot (+10)</td><td>73.7</td><td>64.7</td><td>62.8</td><td>68.2</td><td>69.3</td><td>59.9</td><td>65.6</td><td>50.7</td><td>63.0±5.8</td></tr><tr><td>Monolingual Few-Shot (+20)</td><td>74.7</td><td>63.5</td><td>60.5</td><td>66.6</td><td>72.1</td><td>63.9</td><td>66.8</td><td>63.0</td><td>65.2±3.4</td></tr><tr><td>Monolingual Few-Shot (+50)</td><td>73.9</td><td>64.9</td><td>66.4</td><td>70.9</td><td>73.3</td><td>70.1</td><td>66.3</td><td>62.5</td><td>67.8±3.5</td></tr><tr><td>Multilingual Few-Shot (+10/lang, 90 total)</td><td>73.7</td><td>64.6</td><td>62.9</td><td>66.5</td><td>67.0</td><td>63.1</td><td>65.9</td><td>59.6</td><td>64.2±2.4</td></tr><tr><td>(+20/lang, 180 total)</td><td>73.9</td><td>65.9</td><td>66.8</td><td>69.0</td><td>72.5</td><td>64.2</td><td>66.9</td><td>63.7</td><td>67.0±2.8</td></tr><tr><td>(+50/lang, 450 total)</td><td>73.4</td><td>69.2</td><td>65.8</td><td>69.0</td><td>73.4</td><td>68.8</td><td>67.2</td><td>66.2</td><td>68.5±2.4</td></tr><tr><td>(+100/lang, 900 total)</td><td>74.2</td><td>72.5</td><td>70.9</td><td>71.9</td><td>75.5</td><td>72.3</td><td>69.3</td><td>69.3</td><td>71.7±2.0</td></tr><tr><td>(+200/lang, 1800 total)</td><td>73.9</td><td>74.8</td><td>70.5</td><td>74.1</td><td>77.7</td><td>76.4</td><td>69.8</td><td>70.0</td><td>73.3±3.0</td></tr><tr><td>(+500/lang, 4500 total)</td><td>76.1</td><td>76.3</td><td>74.5</td><td>78.2</td><td>81.4</td><td>79.2</td><td>73.3</td><td>73.7</td><td>76.7±2.8</td></tr><tr><td colspan="10">Data Augmentation + Multilingual Few-Shot</td></tr><tr><td>+tSQuAD(50/lang)</td><td>73.8</td><td>64.0</td><td>62.4</td><td>68.4</td><td>69.7</td><td>59.7</td><td>66.8</td><td>48.1</td><td>62.7±6.8</td></tr><tr><td>+tSQuAD(100/lang)</td><td>72.4</td><td>62.2</td><td>66.6</td><td>68.4</td><td>68.6</td><td>64.9</td><td>67.1</td><td>47.5</td><td>63.6±6.9</td></tr><tr><td>+tSQuAD(200/lang)</td><td>74.4</td><td>62.7</td><td>64.2</td><td>68.8</td><td>70.7</td><td>66.1</td><td>66.2</td><td>48.3</td><td>63.9±6.8</td></tr><tr><td>+tSQuAD(500/lang)</td><td>73.7</td><td>63.2</td><td>69.5</td><td>67.9</td><td>70.9</td><td>69.8</td><td>66.7</td><td>49.1</td><td>65.3±7.0</td></tr><tr><td>+tSQuAD(all)</td><td>74.9</td><td>65.4</td><td>58.4</td><td>66.7</td><td>65.2</td><td>69.4</td><td>60.2</td><td>44.7</td><td>61.4±7.7</td></tr><tr><td>+mSQuAD +500/lang</td><td>77.6</td><td>78.7</td><td>75.0</td><td>78.5</td><td>83.5</td><td>82.5</td><td>73.2</td><td>75.3</td><td>78.1±3.6</td></tr><tr><td>+tSQuAD +500/lang (mBERT)</td><td>77.9</td><td>78.8</td><td>80.0</td><td>79.5</td><td>82.8</td><td>83.6</td><td>72.5</td><td>73.5</td><td>78.7±3.9</td></tr><tr><td>+tSQuAD +500/lang (XLM-R)*</td><td>73.2</td><td>72.8</td><td>78.3</td><td>78.5</td><td>84.7</td><td>80.3</td><td>75.0</td><td>78.1</td><td>78.2±3.5</td></tr><tr><td rowspan="2">Skyline: Full training on TyDi QA train (Clark et al., 2020) (ours)</td><td>76.8</td><td>81.7</td><td>75.4</td><td>79.4</td><td>84.8</td><td>81.9</td><td>76.2</td><td>83.3</td><td>80.4±3.3</td></tr><tr><td>77.5</td><td>82.4</td><td>78.9</td><td>80.1</td><td>85.4</td><td>83.8</td><td>76.5</td><td>78.3</td><td>80.8±3.0</td></tr></table>
154
+
155
+ Table 4: Complete few-shot and data augmentation results. *: Results with XLM-Roberta-Large (Conneau et al., 2020) are generally worse than using mBERT so all other experiments use mBERT.
156
+
157
+ <table><tr><td rowspan="2"></td><td colspan="3">Change language of Question only</td><td colspan="3">Change all; Context &amp; answers the same</td></tr><tr><td>Modified Squad</td><td>Squad + Modified Squad</td><td>Squad + Modified Squad + 500 instances</td><td>Modified Squad</td><td>Squad + Modified Squad</td><td>Squad + Modified Squad + 500 instances</td></tr><tr><td>English</td><td>66.59</td><td>75.06</td><td>77.56</td><td>65.40</td><td>73.49</td><td>78.21</td></tr><tr><td>Arabic</td><td>62.17</td><td>65.62</td><td>78.70</td><td>60.51</td><td>65.98</td><td>77.96</td></tr><tr><td>Bengali</td><td>67.33</td><td>68.55</td><td>75.00</td><td>58.60</td><td>62.44</td><td>76.16</td></tr><tr><td>Finnish</td><td>67.42</td><td>71.67</td><td>78.55</td><td>62.98</td><td>67.58</td><td>79.51</td></tr><tr><td>Indonesian</td><td>66.45</td><td>70.33</td><td>83.46</td><td>61.89</td><td>66.44</td><td>84.10</td></tr><tr><td>Kiswahili</td><td>70.32</td><td>75.48</td><td>82.51</td><td>62.66</td><td>68.55</td><td>80.01</td></tr><tr><td>Russian</td><td>64.71</td><td>66.16</td><td>73.16</td><td>61.01</td><td>65.64</td><td>73.28</td></tr><tr><td>Telugu</td><td>48.32</td><td>49.36</td><td>75.28</td><td>43.62</td><td>51.81</td><td>74.95</td></tr><tr><td>Avg</td><td>63.82</td><td>66.74</td><td>78.09</td><td>58.76</td><td>64.07</td><td>78.00</td></tr><tr><td>SD</td><td>6.74</td><td>7.75</td><td>3.60</td><td>6.33</td><td>5.31</td><td>3.35</td></tr></table>
158
+
159
+ Table 5: Mix-and-Match scheme detailed results.
160
+
161
+ <table><tr><td rowspan="2"></td><td colspan="8">Results (F1-score)</td><td rowspan="2">Overall (w/o eng)</td><td rowspan="2">Avg seen unseen</td></tr><tr><td>eng</td><td>ara</td><td>ben</td><td>fin</td><td>ind</td><td>swa</td><td>rus</td><td>tel</td></tr><tr><td colspan="11">Baseline: no budget for additional data (zero-shot excelt in eng)</td></tr><tr><td></td><td>74.2</td><td>59.0</td><td>57.3</td><td>55.7</td><td>63.2</td><td>60.3</td><td>65.6</td><td>44.6</td><td>60.0±8.5</td><td>74.2 58.0</td></tr><tr><td colspan="11">Monolingual budget allocation (max 4500 per language; 7 experiments)</td></tr><tr><td>Arabic</td><td>78.4</td><td>81.8</td><td>62.0</td><td>77.6</td><td>79.2</td><td>72.8</td><td>68.0</td><td>50.5</td><td>70.2±10.3</td><td>80.1 68.4</td></tr><tr><td>Bengali</td><td>74.4</td><td>66.3</td><td>77.7</td><td>71.6</td><td>72.8</td><td>78.1</td><td>66.5</td><td>52.0</td><td>69.3±8.3</td><td>76.1 67.9</td></tr><tr><td>Finnish</td><td>77.9</td><td>75.5</td><td>72.6</td><td>79.7</td><td>81.0</td><td>70.6</td><td>78.5</td><td>52.2</td><td>72.9±9.1</td><td>78.8 71.7</td></tr><tr><td>Indonesian</td><td>76.8</td><td>76.7</td><td>67.4</td><td>77.0</td><td>83.9</td><td>70.2</td><td>77.3</td><td>52.2</td><td>72.1±9.5</td><td>80.4 70.1</td></tr><tr><td>Kiswahili</td><td>76.4</td><td>72.5</td><td>67.1</td><td>75.0</td><td>77.4</td><td>66.4</td><td>84.0</td><td>75.0</td><td>73.9±5.6</td><td>71.4 75.2</td></tr><tr><td>Russian</td><td>75.2</td><td>74.5</td><td>66.7</td><td>76.3</td><td>81.0</td><td>75.7</td><td>78.8</td><td>69.4</td><td>74.6±4.7</td><td>77.0 73.9</td></tr><tr><td>Telugu</td><td>73.4</td><td>70.6</td><td>70.2</td><td>73.6</td><td>73.7</td><td>68.1</td><td>77.1</td><td>78.2</td><td>73.1±3.4</td><td>75.8 72.2</td></tr><tr><td></td><td>76.0±1.8</td><td>74.0±3.9</td><td>69.1±5.0</td><td>75.8±2.7</td><td>78.4±4.1</td><td>71.7±4.1</td><td>75.7±6.3</td><td>61.3±12.3</td><td>72.3±5.3</td><td>77.1 71.3</td></tr><tr><td colspan="11">Tri-lingual budget allocation (1500 per language; 7 random language selection experiments)</td></tr><tr><td>ben-rus-tel</td><td>75.8</td><td>72.2</td><td>79.0</td><td>75.6</td><td>74.8</td><td>77.1</td><td>74.5</td><td>76.8</td><td>75.7±2.0</td><td>76.5 74.9</td></tr><tr><td>tel-ind-swa</td><td>76.1</td><td>75.7</td><td>65.5</td><td>76.7</td><td>83.2</td><td>84.7</td><td>71.2</td><td>77.2</td><td>76.3±6.1</td><td>80.3 72.3</td></tr><tr><td>fin-rus-swa</td><td>78.5</td><td>76.4</td><td>66.3</td><td>79.6</td><td>80.3</td><td>84.8</td><td>74.9</td><td>53.4</td><td>73.7±9.8</td><td>79.5 69.1</td></tr><tr><td>ara-rus-tel</td><td>75.7</td><td>79.3</td><td>66.8</td><td>78.0</td><td>79.2</td><td>79.9</td><td>74.3</td><td>77.0</td><td>76.4±4.3</td><td>76.6 60.8</td></tr><tr><td>ara-rus-fin</td><td>76.5</td><td>80.5</td><td>68.9</td><td>79.2</td><td>80.6</td><td>77.5</td><td>74.3</td><td>53.6</td><td>73.5±9.0</td><td>77.6 70.2</td></tr><tr><td>swa-ind-fin</td><td>76.1</td><td>77.2</td><td>68.5</td><td>79.7</td><td>84.2</td><td>83.0</td><td>71.2</td><td>51.5</td><td>73.6±10.5</td><td>80.8 67.1</td></tr><tr><td>ara-ind-swa</td><td>78.3</td><td>79.5</td><td>65.4</td><td>76.8</td><td>83.9</td><td>83.5</td><td>68.9</td><td>50.6</td><td>72.7±11.1</td><td>81.3 65.4</td></tr><tr><td></td><td>76.7±1.2</td><td>77.2±2.8</td><td>68.6±4.8</td><td>77.9±1.6</td><td>80.9±3.3</td><td>81.5±3.3</td><td>72.7±2.3</td><td>62.9±13.3</td><td>74.5±6.3</td><td>78.9 68.5</td></tr><tr><td colspan="11">Uniform budget allocation (500 per language)</td></tr><tr><td></td><td>77.9</td><td>78.8</td><td>80.0</td><td>79.5</td><td>82.8</td><td>83.6</td><td>72.5</td><td>73.5</td><td>78.7±3.9</td><td>78.6 -</td></tr></table>
162
+
163
+ Table 6: Complete budget allocation experiments.
towardsmoreequitablequestionansweringsystemshowmuchmoredatadoyouneed/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:217cf3944bb865840d187bbc775c3b095dff3b010d5d331a6fdf81e776df838b
3
+ size 686646
towardsmoreequitablequestionansweringsystemshowmuchmoredatadoyouneed/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b2b41d43397bd739a81b6d810787962e75eecdf9609ecb580ac8fef10659f18
3
+ size 202197
trainingadaptivecomputationforopendomainquestionansweringwithcomputationalconstraints/86e588e3-e6f8-4b92-9621-6b38420d10eb_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69b5d3f8ff380b577fb8345c7bd6fca1c008b878897d388d8c61f07f17cdc663
3
+ size 38844
trainingadaptivecomputationforopendomainquestionansweringwithcomputationalconstraints/86e588e3-e6f8-4b92-9621-6b38420d10eb_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e746e6defac6e5534f537c59ffaff0cdb5fc59d776143e8562faefe9e2d459e
3
+ size 47504
trainingadaptivecomputationforopendomainquestionansweringwithcomputationalconstraints/86e588e3-e6f8-4b92-9621-6b38420d10eb_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:783d0df096330f65f79cd0602987cd28cbaecd4bc2a38a8dbfef00a7dbdc546c
3
+ size 282999
trainingadaptivecomputationforopendomainquestionansweringwithcomputationalconstraints/full.md ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Training Adaptive Computation for Open-Domain Question Answering with Computational Constraints
2
+
3
+ Yuxiang Wu Pasquale Minervini Pontus Stenetorp Sebastian Riedel University College London
4
+
5
+ {yuxiang.wu,p.minervini,p.stenetorp,s.riedel}@cs.ucl.ac.uk
6
+
7
+ # Abstract
8
+
9
+ Adaptive Computation (AC) has been shown to be effective in improving the efficiency of Open-Domain Question Answering (ODQA) systems. However, current AC approaches require tuning of all model parameters, and training state-of-the-art ODQA models requires significant computational resources that may not be available for most researchers. We propose Adaptive Passage Encoder, an AC method that can be applied to an existing ODQA model and can be trained efficiently on a single GPU. It keeps the parameters of the base ODQA model fixed, but it overrides the default layer-by-layer computation of the encoder with an AC policy that is trained to optimise the computational efficiency of the model. Our experimental results show that our method improves upon a state-of-the-art model on two datasets, and is also more accurate than previous AC methods due to the stronger base ODQA model. All source code and datasets are available at https://github.com/uclnlp/APE.
10
+
11
+ # 1 Introduction
12
+
13
+ Open-Domain Question Answering (ODQA) requires finding relevant information for a given question and aggregating the information to produce an answer. The retriever-reader architecture, popularised by Chen et al. (2017), has shown great success in this task. The retriever acquires a set of documents from external sources (e.g., Wikipedia) and the reader extracts the answer spans from these documents (Clark and Gardner, 2018; Yang et al., 2019; Wang et al., 2019; Min et al., 2019; Asai et al., 2020). Recently, Min et al. (2020); Lewis et al. (2020b); Izacard and Grave (2020b) showed that generative reader models that exploit an encoder-decoder architecture can significantly outperform previous extractive models, thanks to
14
+
15
+ ![](images/9b8462ea4c1e9c237cdb2ee33db094d040a55398476f4a3e39df2eafe05cd27c.jpg)
16
+ Figure 1: Overview of our approach. The adaptive passage encoder overrides the layer-by-layer computation of the encoder with an adaptive computation policy (indicated in blue dash arrows).
17
+
18
+ their better capability in aggregating and combining evidence from multiple passages. However, these generative models are much more computationally expensive than extractive models, and often need to be trained with a large number of passages, making it hard to train these models for most researchers (Schwartz et al., 2020a).
19
+
20
+ Wu et al. (2020) show that Adaptive Computation (AC) can significantly improve the efficiency of extractive ODQA models at inference time. However, it requires fine-tuning all model parameters with a multitask learning objective, making it computationally challenging to apply this method to current state-of-the-art models.
21
+
22
+ In this work, we explore an efficient approach to apply adaptive computation to large generative ODQA models. We introduce the Adaptive Passage Encoder (APE), a module that can be added to the encoder of an existing ODQA model, which has the following features: $I$ it efficiently reuses the encoder's hidden representations for calculating
23
+
24
+ the AC priorities; 2) it does not require tuning of the base model and hence allows efficient training under limited resource; 3) it does not require confidence calibration. Our experimental results on NaturalQuestions and TriviaQA show that our method improves the performance of the state-of-the-art model FiD (Izacard and Grave, 2020b), while also producing more accurate results (12.4% EM) than the AC method proposed by Wu et al. (2020).
25
+
26
+ # 2 Related Work
27
+
28
+ Open Domain Question Answering ODQA is a task that aims to answer a factoid question given a document corpus. Most works in this domain follow a retriever-reader design first proposed by Chen et al. (2017). The retriever collects a set of relevant passages, then the reader comprehends and aggregates the information from multiple passages to produce the answer. Depending on the design of the reader model, these systems could be further categorised into extractive models and generative models. Extractive models (Min et al., 2019; Yang et al., 2019; Wang et al., 2019; Asai et al., 2020; Karpukhin et al., 2020) exploit an answer extraction model to predict the probabilities of answer spans, and use global normalisation (Clark and Gardner, 2018) to aggregate the answer probabilities across multiple passages.
29
+
30
+ However, thanks to recent advances in sequence-to-sequence pretrained language models (Raffel et al., 2020; Lewis et al., 2020a), generative ODQA models (Min et al., 2020; Lewis et al., 2020b; Izacard and Grave, 2020b) achieve significant improvement upon extractive models, demonstrating stronger capability in combining evidence from multiple passages. We focus on generative models in this work.
31
+
32
+ Passage Retrieval and Re-Ranking Passage retrievers in ODQA systems are initially based on sparse vector representations. Chen et al. (2017) use TF-IDF, whereas Yang et al. (2019); Karpukhin et al. (2020); Wang et al. (2019) rely on BM25 for ranking passages (Robertson, 2004). Recently, Karpukhin et al. (2020); Lewis et al. (2020b); Izacard and Grave (2020a) achieved substantial increase in retrieval performance using dense representations. Our work is based on the retrieval results from a dense retriever (Izacard and Grave, 2020b), but we show that the proposed method can still improve the quality of the support passages despite the strong retrieval performance.
33
+
34
+ Nogueira and Cho (2019); Qiao et al. (2019); Mao et al. (2021) show that adding a separate cross-encoder re-ranker can improve the performance, but that comes with a significant increase of the computation at train or inference time. Despite that our proposed adaptive passage encoder can be viewed as an encoder with an integrated re-ranker, the focus of our work is to improve the computational efficiency, namely, enhancing the performance without a substantial increase in computation.
35
+
36
+ Adaptive Computation Adaptive computation allows the model to condition the computation cost on the input. For example, Schwartz et al. (2020b); Liu et al. (2020); Xin et al. (2020) propose models that can dynamically decide to early exit at intermediate layers when the confidence at the layer exceeds a threshold. They show that adaptively early exiting can significantly reduce the computational cost for various sequence classification tasks. Closest to our work, Wu et al. (2020) introduced adaptive computation for extractive ODQA models. We extend adaptive computation to generative ODQA models, and our approach can be incorporated in existing generative ODQA models without finetuning the base model.
37
+
38
+ # 3 Method
39
+
40
+ In this section, we will introduce the base model and how our proposed adaptive passage encoder works with it.
41
+
42
+ # 3.1 Base Model
43
+
44
+ Large generative ODQA models (Lewis et al., 2020b; Izacard and Grave, 2020b) share a similar encoder-decoder architecture. They first concatenate the question with all retrieved passages. Then the encoder encodes all passages and produces their hidden representations $h_1^L, \dots, h_N^L$ , where $L$ is the number of encoder layers and $N$ is the number of retrieved passages. We denote the hidden representation of the $i$ -th passage at its $j$ -th encoder layer as $h_i^j$ . The decoder will attend to these hidden representations and generate the answer tokens sequentially.
45
+
46
+ # 3.2 Adaptive Passage Encoder
47
+
48
+ As shown in Fig. 1, the adaptive passage encoder overrides the layer-by-layer computation of the encoder of the base model with an adaptive computation policy. It adds two components on top of the
49
+
50
+ base encoder to define the policy: an answerability prediction model HasAnswer and a scheduler.
51
+
52
+ The HasAnswer model predicts the probability that a passage contains an answer to the question, given its hidden representation $h_i^j$ . It first pools hidden representation $h_i^j$ into a vector, then feeds the pooled representation to a multi-layer perceptron to produce the probability $p_i^j$ .
53
+
54
+ The scheduler is then responsible for the selection and prioritisation of passages that are likely to contain the answer (Wu et al., 2020). As shown by the blue arrows in Fig. 1, the scheduler learns a scheduling policy to allocate encoder layer computation to passages. The scheduler will exit in early layers for those spurious passages while allocating more layers to the ones that it finds promising.
55
+
56
+ To achieve this goal, the scheduler produces a priority score $q_{n}$ for each passage:
57
+
58
+ $$
59
+ q _ {n} = \sigma \left(g \left(p _ {n} ^ {l _ {n}}, n, l _ {n}\right)\right) p _ {n} ^ {l _ {n}} + f \left(p _ {n} ^ {l _ {n}}, n, l _ {n}\right) \tag {1}
60
+ $$
61
+
62
+ where $n$ is the passage rank by the retriever, $l_{n}$ is the index of its current encoder layer, $g$ and $f$ are two multi-layer perceptrons that learn the weight and bias respectively. Starting at the initial layer for all passages, the scheduler will select a passage with the maximum priority, forward one encoder layer for it $l_{n}^{\prime} = l_{n} + 1$ , and updates its priorities $q_{n}$ with its new hidden representation $h_{n}^{l_{n}^{\prime}}$ and has-answer probability $p_{n}^{l_{n}^{\prime}}$ . This process will iterate for $B$ (budget) steps, and only $k$ passages with the most layers computed are retained in the end.
63
+
64
+ # 3.3 Training the Adaptive Passage Encoder
65
+
66
+ Differently from Wu et al. (2020), our method does not require tuning the underlying base model. Since the number of parameters introduced by the HasAnswer model and the scheduler is less than $4\%$ of the base model, APE can be trained very efficiently. The HasAnswer model is first trained with cross-entropy loss, supervised by the has-answer labels of the passages. Then we fix HasAnswer and train the scheduler with REINFORCE algorithm (Williams, 1992) to maximise the expected return, which is defined to encourage selection and prioritisation of passages that contain the answer. The selection action gains a positive reward $(1 - c)$ if it selects a relevant passage, otherwise a negative reward $-c$ . Since the weight $g$ and bias $f$ in Eq. (1) are automatically learned during the training of the scheduler, our method does not require confidence
67
+
68
+ <table><tr><td></td><td>Train</td><td>Validation</td><td>Test</td></tr><tr><td>NaturalQuestions</td><td>79,168</td><td>8,757</td><td>3,610</td></tr><tr><td>TriviaQA</td><td>78,785</td><td>8,837</td><td>11,313</td></tr></table>
69
+
70
+ Table 1: Number of samples of the evaluated datasets.
71
+
72
+ calibration of the HasAnswer model, unlike the method proposed by Wu et al. (2020).
73
+
74
+ # 4 Experiments
75
+
76
+ # 4.1 Experimental Setup
77
+
78
+ Datasets Following (Lee et al., 2019; Izacard and Grave, 2020b), we evaluate our method on NaturalQuestions (Kwiatkowski et al., 2019) and TriviaQA (Joshi et al., 2017) whose statistics are shown in Table 1.
79
+
80
+ Evaluation Metrics Following Wu et al. (2020), we conduct the evaluation under different computational costs at inference time. Since the number of passages $k$ is almost linearly correlated with memory consumption and number of operations, we evaluate the performances with various number of passages $k \in \{5, 10, 20\}$ . To evaluate the end performance of ODQA models, we use the standard Exact Match (EM) score, which is the proportion of questions whose predicted answer matches exactly with the ground truth. We also include the unrestricted setting to compare the best performances of different models.
81
+
82
+ Technical Details We use FiD (Izacard and Grave, 2020b) as our base model. FiD-base and FiD-large contain $L = 12$ and 24 layers respectively, and we set the budget $B = Lk$ . For the pooling operation in the HasAnswer model, we found max-pooling works better than mean-pooling and the [CLS] token, so max-pooling is used in all our experiments. We use discount factor $\gamma = 0.8$ and step penalty $c = 0.1$ during the REINFORCE training of the scheduler. More hyperparameters are presented in Appendix A.1.
83
+
84
+ Computational Feasibility Tuning a FiD-base model with $k = 20$ or a FiD-large model with $k = 10$ (batch size=1) would yield out-of-memory errors on a V100 (16GB) GPU. Hence, it is infeasible to train FiD with the previous AC method (Wu et al., 2020) in our setting. However, training with our proposed approach can be done in the same setting with a batch size 4 or larger within 8-15
85
+
86
+ <table><tr><td></td><td colspan="4">NaturalQuestions</td><td colspan="4">TriviaQA</td></tr><tr><td></td><td>Top-5</td><td>Top-10</td><td>Top-20</td><td>Unrestricted</td><td>Top-5</td><td>Top-10</td><td>Top-20</td><td>Unrestricted</td></tr><tr><td>SkylineBuilder (Wu et al., 2020)</td><td>34.4</td><td>34.2</td><td>-</td><td>34.2</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>DPR (Karpukhin et al., 2020)</td><td>-</td><td>40.8</td><td>-</td><td>41.5</td><td>-</td><td>-</td><td>-</td><td>57.9</td></tr><tr><td>DPR (our implementation)</td><td>38.4</td><td>40.2</td><td>40.2</td><td>40.2</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>RAG (Lewis et al., 2020b)</td><td>43.5</td><td>44.1</td><td>44.1</td><td>44.5</td><td>-</td><td>-</td><td>-</td><td>56.1</td></tr><tr><td>FiD-base (Izacard and Grave, 2020b)</td><td>39.5</td><td>42.9</td><td>45.3</td><td>48.2</td><td>53.9</td><td>57.9</td><td>60.7</td><td>65.0</td></tr><tr><td>Ours (APE+FiD-base)</td><td>40.3</td><td>43.7</td><td>46.0</td><td>48.2</td><td>55.4*</td><td>59.0*</td><td>62.0*</td><td>65.0</td></tr><tr><td>FiD-large (Izacard and Grave, 2020b)</td><td>42.5</td><td>45.8</td><td>48.3</td><td>51.4</td><td>57.2</td><td>60.6</td><td>63.7</td><td>67.6</td></tr><tr><td>Ours (APE+FiD-large)</td><td>43.4</td><td>46.6</td><td>49.1</td><td>51.4</td><td>57.9</td><td>61.4*</td><td>64.1*</td><td>67.6</td></tr></table>
87
+
88
+ Table 2: Exact match scores on NaturalQuestions and TriviaQA test sets. * indicates statistical significance.
89
+
90
+ <table><tr><td></td><td colspan="4">NaturalQuestions</td><td colspan="4">TriviaQA</td></tr><tr><td></td><td>Top-5</td><td>Top-10</td><td>Top-20</td><td>Top-100</td><td>Top-5</td><td>Top-10</td><td>Top-20</td><td>Top-100</td></tr><tr><td>BM25 (Lee et al., 2019)</td><td>-</td><td>-</td><td>59.1</td><td>73.7</td><td>-</td><td>-</td><td>66.9</td><td>76.7</td></tr><tr><td>DPR (Karpukhin et al., 2020)</td><td>67.1</td><td>-</td><td>78.4</td><td>85.4</td><td>-</td><td>-</td><td>79.4</td><td>85.0</td></tr><tr><td>FiD (Izacard and Grave, 2020b)</td><td>66.2</td><td>73.9</td><td>79.2</td><td>86.1</td><td>69.8</td><td>74.9</td><td>78.9</td><td>84.8</td></tr><tr><td>Ours (APE+FiD-base)</td><td>67.4*</td><td>75.1*</td><td>80.4*</td><td>86.1</td><td>70.8*</td><td>75.8*</td><td>79.5</td><td>84.8</td></tr><tr><td>Ours (APE+FiD-large)</td><td>67.2</td><td>75.4*</td><td>80.2*</td><td>86.1</td><td>70.4</td><td>75.6*</td><td>79.2</td><td>84.8</td></tr></table>
91
+
92
+ Table 3: Top-k retrieval accuracy scores on NaturalQuestions and TriviaQA test sets. * indicates statistical significance.
93
+
94
+ hours.
95
+
96
+ # 4.2 Experimental Results
97
+
98
+ As shown in Table 2 under restricted top- $k$ , our proposed method improves upon the FiD model on both datasets, and by a statistically significant margin on TriviaQA. It also outperforms the previous AC method (Wu et al., 2020) by $12.4\%$ when $k = 10$ due to the stronger base model. The addition of APE allows FiD to significantly outperform RAG (Lewis et al., 2020b) on NaturalQuestions when $k \in \{10, 20\}$ .
99
+
100
+ Previous adaptive computation methods (Wu et al., 2020; Schwartz et al., 2020b) was reported to have plateaued or degraded performances in the unrestricted setting. However, Table 2 shows that our approach does not have this issue.
101
+
102
+ # 4.3 Analysis of Passage Quality
103
+
104
+ To understand how APE outperforms the baselines, we analyse the quality of the final top- $k$ passages retained by APE. Table 3 reports the top- $k$ retrieval accuracy of the top- $k$ passages. The results show that the top- $k$ accuracy of the selected collection of documents by APE is significantly better than BM25, DPR, and FiD, which are strong retrieval
105
+
106
+ belines for ODQA. Combined with Table 2, it indicates that the better passage quality yielded by APE helps to improve the end ODQA performance of the model.
107
+
108
+ # 5 Conclusions
109
+
110
+ In this work, we explore an adaptive computation method that can be efficiently applied to an existing generative ODQA model. We find that, by replacing the encoder of generative ODQA models with our proposed adaptive passage encoder, we can train an effective adaptive computation policy without tuning the base model. This allows applying adaptive computation to large state-of-the-art generative models, which was previously challenging computation-wise. Our experimental results show that our method produces more accurate results than a state-of-the-art generative model on both NaturalQuestions and TriviaQA, and it outperforms the previous AC method by a large margin. The analysis also shows that our approach achieves better passage quality that leads to improvements in ODQA performance.
111
+
112
+ # Acknowledgments
113
+
114
+ The first author would like to thank his wife Jane for her love and support throughout the years. We would also like to thank Gautier Izacard and Edouard Grave for their help with using FiD. This research was supported by the European Union's Horizon 2020 research and innovation programme under grant agreement no. 875160.
115
+
116
+ # References
117
+
118
+ Akari Asai, Kazuma Hashimoto, Hannaneh Hajishirzi, Richard Socher, and Caiming Xiong. 2020. Learning to retrieve reasoning paths over wikipedia graph for question answering. In ICLR. OpenReview.net.
119
+ Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. 2017. Reading wikipedia to answer open-domain questions. In ACL (1), pages 1870-1879. Association for Computational Linguistics.
120
+ Christopher Clark and Matt Gardner. 2018. Simple and effective multi-paragraph reading comprehension. In ACL (1), pages 845-855. Association for Computational Linguistics.
121
+ Gautier Izacard and Edouard Grave. 2020a. Distilling knowledge from reader to retriever for question answering. CoRR, abs/2012.04584.
122
+ Gautier Izacard and Edouard Grave. 2020b. Leveraging passage retrieval with generative models for open domain question answering. CoRR, abs/2007.01282.
123
+ Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. 2017. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In ACL (1), pages 1601-1611. Association for Computational Linguistics.
124
+ Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick S. H. Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. 2020. Dense passage retrieval for open-domain question answering. In EMNLP (1), pages 6769-6781. Association for Computational Linguistics.
125
+ Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur P. Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: a benchmark for question answering research. Trans. Assoc. Comput. Linguistics, 7:452-466.
126
+ Kenton Lee, Ming-Wei Chang, and Kristina Toutanova. 2019. Latent retrieval for weakly supervised open domain question answering. In ACL (1), pages 6086-6096. Association for Computational Linguistics.
127
+
128
+ Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020a. BART: denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension. In ACL, pages 7871-7880. Association for Computational Linguistics.
129
+ Patrick S. H. Lewis, Ethan Perez, Aleksandra Pik-tus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen-tau Yih, Tim Roektaschel, Sebastian Riedel, and Douwe Kiela. 2020b. Retrieval-augmented generation for knowledge-intensive NLP tasks. In NeurIPS.
130
+ Weijie Liu, Peng Zhou, Zhiruo Wang, Zhe Zhao, Haotang Deng, and Qi Ju. 2020. Fastbert: a self-distilling BERT with adaptive inference time. In ACL, pages 6035-6044. Association for Computational Linguistics.
131
+ Yuning Mao, Pengcheng He, Xiaodong Liu, Ye-long Shen, Jianfeng Gao, Jiawei Han, and Weizhu Chen. 2021. Reader-guided passage reranking for open-domain question answering. CoRR, abs/2101.00294.
132
+ Sewon Min, Danqi Chen, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2019. A discrete hard EM approach for weakly supervised question answering. In EMNLP/IJCNLP (1), pages 2851-2864. Association for Computational Linguistics.
133
+ Sewon Min, Julian Michael, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2020. Ambigqa: Answering ambiguous open-domain questions. In EMNLP (1), pages 5783-5797. Association for Computational Linguistics.
134
+ Rodrigo Nogueira and Kyunghyun Cho. 2019. Passage re-ranking with BERT. CoRR, abs/1901.04085.
135
+ Yifan Qiao, Chenyan Xiong, Zhenghao Liu, and Zhiyuan Liu. 2019. Understanding the behaviors of BERT in ranking. CoRR, abs/1904.07531.
136
+ Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21:140:1-140:67.
137
+ Stephen Robertson. 2004. Understanding inverse document frequency: on theoretical arguments for IDF. Journal of Documentation, 60(5):503-520.
138
+ Roy Schwartz, Jesse Dodge, Noah A. Smith, and Oren Etzioni. 2020a. Green AI. Commun. ACM, 63(12):54-63.
139
+ Roy Schwartz, Gabriel Stanovsky, Swabha Swayamdipta, Jesse Dodge, and Noah A. Smith. 2020b. The right tool for the job: Matching model and instance complexities. In ACL, pages 6640-6651. Association for Computational Linguistics.
140
+
141
+ Zhiguo Wang, Patrick Ng, Xiaofei Ma, Ramesh Nallapati, and Bing Xiang. 2019. Multi-passage BERT: A globally normalized BERT model for open-domain question answering. In EMNLP/IJCNLP (1), pages 5877-5881. Association for Computational Linguistics.
142
+ R. J. Williams. 1992. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8:229-256.
143
+ Yuxiang Wu, Sebastian Riedel, Pasquale Minervini, and Pontus Stenetorp. 2020. Don't read too much into it: Adaptive computation for open-domain question answering. In EMNLP (1), pages 3029-3039. Association for Computational Linguistics.
144
+ Ji Xin, Raphael Tang, Jaejun Lee, Yaoliang Yu, and Jimmy Lin. 2020. Deebert: Dynamic early exiting for accelerating BERT inference. In ACL, pages 2246-2251. Association for Computational Linguistics.
145
+ Wei Yang, Yuqing Xie, Aileen Lin, Xingyu Li, Luchen Tan, Kun Xiong, Ming Li, and Jimmy Lin. 2019. End-to-end open-domain question answering with bertserini. In NAACL-HLT (Demonstrations), pages 72-77. Association for Computational Linguistics.
146
+
147
+ # A Experimental Details
148
+
149
+ # A.1 Hyper-parameters
150
+
151
+ <table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>learning rate</td><td>1e-4</td></tr><tr><td>batch size</td><td>24</td></tr><tr><td>epoch</td><td>2</td></tr><tr><td>optimiser</td><td>Adam</td></tr><tr><td>Adam ε</td><td>1e-6</td></tr><tr><td>Adam (β1, β2)</td><td>(0.9, 0.999)</td></tr><tr><td>max sequence length</td><td>256</td></tr><tr><td>pooling</td><td>max-pooling</td></tr><tr><td>number of passages</td><td>5/10/20</td></tr><tr><td>device</td><td>Nvidia V100</td></tr></table>
152
+
153
+ Table 4: Hyper-parameters for the HasAnswer model training.
154
+
155
+ <table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>learning rate</td><td>0.01</td></tr><tr><td>batch size</td><td>24</td></tr><tr><td>epoch</td><td>1</td></tr><tr><td>optimiser</td><td>Adam</td></tr><tr><td>max number of steps</td><td>240</td></tr><tr><td>step cost c</td><td>0.1</td></tr><tr><td>discount factor γ</td><td>0.8</td></tr><tr><td>hidden size of MLPs</td><td>64</td></tr><tr><td>number of passages</td><td>20/30/50</td></tr></table>
156
+
157
+ Table 5: Hyper-parameters for scheduler model REINFORCE training.
trainingadaptivecomputationforopendomainquestionansweringwithcomputationalconstraints/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bdc13aea0b52e36fefe2b37076a81e5bd370b7ff94a8d7566bd9759c031ac184
3
+ size 209097
trainingadaptivecomputationforopendomainquestionansweringwithcomputationalconstraints/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca35f468e5d96c9d8614f548faaad0aa53151a773dcc8e5637e44597f521d1bb
3
+ size 186513
umicanunreferencedmetricforimagecaptioningviacontrastivelearning/db7287e3-5637-49ca-986d-142be1c84005_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b1d3b41c8cfa9b08c4604981c13c46aec66f932c19dc30bb26ca2fd5ab06723
3
+ size 49460
umicanunreferencedmetricforimagecaptioningviacontrastivelearning/db7287e3-5637-49ca-986d-142be1c84005_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f68ee1a71214f945778530c1162c04956f37061347abd2997998148da5e910c1
3
+ size 60311
umicanunreferencedmetricforimagecaptioningviacontrastivelearning/db7287e3-5637-49ca-986d-142be1c84005_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f36f396f72fae4376b6772129d99e317d6f9deb5a1875e56ab510503c59ae503
3
+ size 1419630
umicanunreferencedmetricforimagecaptioningviacontrastivelearning/full.md ADDED
@@ -0,0 +1,231 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # UMIC: An Unreferenced Metric for Image Captioning via Contrastive Learning
2
+
3
+ Hwanhee Lee $^{1}$ , Seunghyun Yoon $^{2}$ , Franck Dernoncourt $^{2}$
4
+ Trung Bui $^{2}$ and Kyomin Jung $^{1}$
5
+
6
+ $^{1}$ Dept. of Electrical and Computer Engineering, Seoul National University, Seoul, Korea
7
+ $^{2}$ Adobe Research, San Jose, CA, USA, {wanted1007, kjung}@snu.ac.kr {syoon, franck.dernoncourt, bui}@adobe.com
8
+
9
+ # Abstract
10
+
11
+ Despite the success of various text generation metrics such as BERTScore, it is still difficult to evaluate the image captions without enough reference captions due to the diversity of the descriptions. In this paper, we introduce a new metric UMIC, an Unreferenced Metric for Image Captioning which does not require reference captions to evaluate image captions. Based on Vision-and-Language BERT, we train UMIC to discriminate negative captions via contrastive learning. Also, we observe critical problems of the previous benchmark dataset (i.e., human annotations) on image captioning metric, and introduce a new collection of human annotations on the generated captions. We validate UMIC on four datasets, including our new dataset, and show that UMIC has a higher correlation than all previous metrics that require multiple references. We release the benchmark dataset and pre-trained models to compute the UMIC<sup>1</sup>.
12
+
13
+ # 1 Introduction
14
+
15
+ Image captioning is a task that aims to generate a description that explains the given image in a natural language. While there have been many advances for caption generation algorithms (Vinyals et al., 2015; Anderson et al., 2018) and target datasets (Fang et al., 2015; Sharma et al., 2018), few studies (Vedantam et al., 2015; Anderson et al., 2016; Cui et al., 2018; Lee et al., 2020) have focused on assessing the quality of the generated captions. Especially, most of the evaluation metrics only use reference captions to evaluate the caption although the main context is an image. However, as shown in Figure 1, since there are many possible reference captions for a single image, a candidate caption can receive completely different scores depending on the type of reference (Yi
16
+
17
+ ![](images/da0891911459732ba3fb84b11d1a005684f4352e1a0b7334991786f0ca1b8918.jpg)
18
+
19
+ Ref 1: A dog standing in the snow with a stick in its mouth.
20
+ Ref 2: A little dog holding sticks in its mouth. Candidate: A dog standing on the snow with a dog
21
+ CIDEr with Ref 1: 3.166
22
+ CIDEr with Ref 2: 0.281
23
+
24
+ Human Judgments : 1.875 out of 5
25
+
26
+ Figure 1: An example where the metric score for a given candidate caption varies significantly depending on the reference type.
27
+
28
+ et al., 2020). Because of this diverse nature of image captions, reference-based metrics usually use multiple references which are difficult to obtain. To overcome this limitation, we propose UMIC, an Unreference Metric for Image Captioning, which is not dependent on the reference captions and use an image-caption pair to evaluate a caption. We develop UMIC upon UNITER (Chen et al., 2020) which is a state-of-the-arts pre-trained representation for vision-and-language tasks. Since UNITER is pre-trained to predict the alignment for large amounts of image-text pairs, we consider that UNITER can be a strong baseline for developing an unreferenced metric. We fine-tune UNITER via contrastive learning, where the model is trained to compare and discriminate the ground-truth captions and diverse synthetic negative samples. We carefully prepare the negative samples that can represent most of the undesirable cases in captioning, such as grammatically incorrect, irrelevant to the image, or relevant but have wrong keyword.
29
+
30
+ When evaluating the metric's performance, it is required to compare the correlations between human judgments and the metric's evaluation score for given datasets. We choose three standard benchmark datasets (i.e., Composite (Aditya et al., 2015), Flickr8k (Hodosh et al., 2013), PASCAL-50s (Vedantam et al., 2015)) and further analyze the quality of the dataset. Interestingly, we found that there exist critical issues in the benchmark datasets,
31
+
32
+ such as poor-label or polarized-label. To perform a rigorous evaluation as well as stimulate the research in this area, we collect new 1,000 human judgments for the model-generated caption. Finally, we evaluate our proposed metric on four benchmark datasets, including our new dataset. Experimental results show that our proposed unreferenced metric is highly correlated with human judgments than all of the previous metrics that use reference captions.
33
+
34
+ # 2 Related Work
35
+
36
+ Image Captioning Metrics Following other text generation tasks such as dialogue systems and machine translation, n-gram similarity metrics such as BLEU (Papineni et al., 2002), ROUGE (Lin, 2004) and METEOR (Banerjee and Lavie, 2005) are widely used to evaluate an image caption. Especially, CIDEr (Vedantam et al., 2015), which weights each n-gram using TF-IDF, is widely used. SPICE (Anderson et al., 2016) is a captioning metric based on scene graph. BERTScore (Zhang et al., 2019), which computes the similarity of the contextualized embeddings, are also used. BERT-TBR (Yi et al., 2020) focuses on the variance in multiple hypothesis and ViLBERTScore (VBTScore) (Lee et al., 2020) utilizes ViLBERT (Lu et al., 2019) to improve BERTScore.
37
+
38
+ Different from these metrics, VIFIDEL (Madhyastha et al., 2019) computes the word mover distance (Kusner et al., 2015) between the object labels in the image and the candidate captions, and it does not require reference captions. Similar to VIFIDEL, our proposed UMIC does not utilize the reference captions. However, UMIC directly uses image features and evaluates a caption in various perspectives compared to VIFIDEL.
39
+
40
+ Quality Estimation Quality Estimation (QE) is a task that estimates the quality of the generated text without using the human references and this task is same as developing an unreferenced metric. QE is widely established in machine translation (MT) tasks (Specia et al., 2013; Martins et al., 2017; Specia et al., 2018). Recently, (Levinboim et al., 2021) introduces a large scale human ratings on image-caption pairs for training QE models in image captioning tasks. Our work also trains caption QE model, (i.e. unreferenced captioning metric) but we do not use human ratings to train the metric. Instead, we create diverse synthetic negative samples and train the metric with these samples via ranking loss.
41
+
42
+ ![](images/61cc7d33b2deb9d4dc28e0e6afd263b3fe5f0bf8b28dabf5164ffc76d906c134.jpg)
43
+ A person on bike going through green light with red bus nearby in a sunny day. UNITER $S_{x}$ Ranking Loss $\rightarrow$ UNITER $S_{\hat{x}}$ A person on bike going through green light with red truck nearby in a sunny day.
44
+ Figure 2: Overall training procedure of UMIC. Given an image $I$ , a positive caption $x$ and a negative caption $\hat{x}$ , we compute the score of each image-caption pair $S_{x}$ and $S_{\hat{x}}$ using UNITER respectively. Then, we fine-tune UNITER using raking loss that $S_{x}$ is higher than $S_{\hat{x}}$ .
45
+
46
+ # 3 UMIC
47
+
48
+ We propose UMIC, an unreferenced metric for image captioning using UNITER. We construct negative captions using the reference captions through the pre-defined rules. Then, we fine-tune UNITER to distinguish the reference captions and these synthetic negative captions to develop UMIC.
49
+
50
+ # 3.1 Modeling
51
+
52
+ Since UNITER is pre-trained to predict the alignment of large amounts of image-text pairs, we use the output of the layer that predicts this alignment as the baseline of UMIC to be fine-tuned. Specifically, we compute the score of a caption $\mathbf{S}(I,X)$ for given image $I = (i_{1},\dots,i_{N})$ and $X = (x_{1},\dots,x_{T})$ as follows.
53
+
54
+ We first compute the contextual embedding for $I$ and $X$ using UNITER to get the joint representation of image and text as follows.
55
+
56
+ $$
57
+ i _ {[ C L S ]}, i _ {1}, \dots , i _ {N}, x _ {1}, \dots , x _ {T} = \text {U N I T E R} (I, X), \tag {1}
58
+ $$
59
+
60
+ where $i_{[CLS]}$ is a joint representation of the input image and input caption. Then we feed it into a single fully-connected layer to get a score as follows.
61
+
62
+ $$
63
+ \mathrm {S} (I, X) = \operatorname {s i g m o i d} \left(W i _ {[ C L S ]} + b\right), \tag {2}
64
+ $$
65
+
66
+ where $W$ and $b$ are trainable parameters.
67
+
68
+ # 3.2 Negative Samples
69
+
70
+ To model negative captions, we observe the captions' common error types in the model-generated captions. Specifically, we pick 100 bad captions in the order of whose human judgments are low in Composite and Flickr8k, respectively. Then, we categorize the main errors into three types:relevant but have wrong keywords, totally irrelevant to the image, grammatically incorrect. To model most
71
+
72
+ ![](images/a93cff1bb9da915f3314a1f8d9161118fe6ca1795a73631bd248b838fa236a95.jpg)
73
+ Original: a woman hugging a girl who is holding a suitcase
74
+ Substitution: a boy hugging a girl who is holding a suitcase
75
+ Random(Hard Negative): a very small cute child by a suitcase
76
+ Repetition & Removal: a woman hugging a girl is holding a suitcase suitcase
77
+ Figure 3: An example of the generated negative captions for the left image to train UMIC. Hard negative caption is one of the reference captions for the right image which is similar to the left image.
78
+
79
+ imperfect captions including these frequent type errors, we prepare negative captions as follows.
80
+
81
+ Substituting Keywords To mimic the captions that are relevant but have wrong keywords, as in the example of Figure 2, we randomly substitute $30\%$ of the words in the reference captions and use them as negative samples like Figure 3. The motivation we choose $30\%$ is that the average length of the generated caption is about 10 words and the number of keywords is usually around three. We only substitute verb, adjective, and noun, which are likely to be keywords since they are usually visual words. Also, we substitute them with the words with the same POS-Tags using the pre-defined dictionaries for the captions in the training set to conserve the sentence structure.
82
+
83
+ Random Captions We randomly sample captions from other images and use them as negative samples to generate totally irrelevant captions for the given image. Also, similar to the imagedtext retrieval task, we use hard-negative captions, which are difficult to be discerned, with a probability of $50\%$ . Specifically, we utilize the captions of the images similar to the given images using the pre-trained image retrieval model. We get negative captions that are the captions of the similar image sets computed by image-text retrieval model VSE++ (Faghri et al., 2018) as in (Wang et al., 2020). Then, we sample the captions in the reference captions of the Top-3 similar image sets like the example in Figure 3.
84
+
85
+ Repetition & Removal We find that some of the captions have repeated words or have incomplete sentences. Hence, we randomly repeat or remove
86
+
87
+ some words in the reference captions with a probability of $30\%$ in the captions to generate these kinds of captions. Specifically, we choose to repeat or remove with a probability of $50\%$ for the sampled word.
88
+
89
+ Word Order Permutation We further generate negative samples by randomly changing the word order of the reference captions, so that the model sees the overall structure of the sentence, not just the specific visual words.
90
+
91
+ # 3.3 Contrastive Learning
92
+
93
+ Using the negative captions generated by the above rules, we fine-tune UNITER via contrastive loss for positive caption $X$ and negative caption $\hat{X}$ as follows.
94
+
95
+ $$
96
+ L o s s = \max (0, M - (\mathrm {S} (I, X) - \mathrm {S} (I, \hat {X}))), \tag {3}
97
+ $$
98
+
99
+ where $M$ is the margin for the ranking loss, which is a hyperparameter. We make each batch composed of one positive caption and four negative captions that are made by each negative sample generation technique.
100
+
101
+ # 4 Dataset
102
+
103
+ We briefly explain the previous benchmark datasets for captioning metrics and analyze the problems for two of these datasets, Flickr8k and Composite. Also, we introduce a new benchmark dataset to alleviate the addressed problems.
104
+
105
+ # 4.1 Commonly Used Datasets
106
+
107
+ Composite consists of 11,985 human judgments for each candidate caption generated from three models and image pair. This dataset's human judgments range from 1 to 5, depending on the relevance between candidate caption and image.
108
+
109
+ Flickr8k provides three expert annotations for each image and candidate caption on 5,822 images. The score ranges from 1 to 4, depending on how well the caption and image match. All of the captions in this dataset are reference captions or captions from other images.
110
+
111
+ PASCAL50s contains 1,000 images from UIUC PASCAL Sentence Dataset with 50 reference captions for each image. Different from other datasets, this dataset provides 4,000 caption triplet $< A$ , $B$ , $C>$ composed of 50 reference captions $(A)$ and two candidate captions $(B, C)$ for the given image. There
112
+
113
+ ![](images/d0991823ffbcc96ee6eccc58305719661748021796a54c1d32cba20662ef0f1a.jpg)
114
+ Figure 4: Score distributions of human judgments in Composite, Flickr8k and our proposed CapEval1k dataset. All scores were normalized from 0 to 1.
115
+
116
+ are human annotated answers to which is more similar to “A”, “B” or “C”.
117
+
118
+ # 4.2 Problems in Flickr8k and Composite
119
+
120
+ We investigate the human judgments in Flickr8k and Composite, and visualize the distributions of judgment scores for two datasets, Flickr8k and Composite in Figure 4, and find several problems.
121
+
122
+ For the Flickr8k, most of the scores are less than 0.2 since the candidate captions were sampled by an image retrieval system from a reference caption pool, not model-generated captions. Therefore, most captions are not related to images and differ significantly from the model-generated captions. We argue that this naive configuration is not enough to distinguish the performance of the metric precisely.
123
+
124
+ For the Composite, most of the scores are placed near 0 or 1. We explain this because only a single annotator annotates each sample's score resulting in biased output. We also manually investigated the captions and found that the captions are coarsely generated. Note that the captions for this dataset were generated by the old model (Karpathy and Fei-Fei, 2015; Aditya et al., 2015). For these reasons, we conclude that additional benchmark dataset is necessary to evaluate the captioning metrics.
125
+
126
+ # 4.3 CapEval1k Dataset
127
+
128
+ To alleviate the addressed issues in Flickr8k and Composite, we introduce a new dataset CapEval1k, which is composed of human judgments for the model-generated captions from four recently proposed models: Att2in (Rennie et al., 2017), Transformer (Vaswani et al., 2017), BUTD (Anderson et al., 2018) and AoANet (Huang et al., 2019). Different from Flickr8k and Composite, we ask each
129
+
130
+ <table><tr><td>Metric</td><td>Flickr8k</td><td>Composite</td><td>CapEval1k</td><td>PASCAL50s</td></tr><tr><td>BLEU-1</td><td>0.274</td><td>0.406</td><td>0.233</td><td>74.3</td></tr><tr><td>BLEU-4</td><td>0.286</td><td>0.439</td><td>0.238</td><td>73.4</td></tr><tr><td>ROUGE-L</td><td>0.300</td><td>0.417</td><td>0.220</td><td>74.9</td></tr><tr><td>METEOR</td><td>0.403</td><td>0.466</td><td>0.288</td><td>78.5</td></tr><tr><td>CIDEr</td><td>0.419</td><td>0.473</td><td>0.307</td><td>76.1</td></tr><tr><td>SPICE</td><td>0.457</td><td>0.486</td><td>0.279</td><td>73.6</td></tr><tr><td>BERTScore</td><td>0.396</td><td>0.456</td><td>0.273</td><td>79.5</td></tr><tr><td>BERT-TBR</td><td>0.467</td><td>0.439</td><td>0.257</td><td>80.1</td></tr><tr><td>VBTScore</td><td>0.525</td><td>0.514</td><td>0.352</td><td>79.6</td></tr><tr><td>VIFIDEL</td><td>0.336</td><td>0.191</td><td>0.143</td><td>70.0</td></tr><tr><td>UMIC</td><td>0.468</td><td>0.561</td><td>0.328</td><td>85.1</td></tr><tr><td>UMICc</td><td>0.431</td><td>0.554</td><td>0.299</td><td>84.7</td></tr></table>
131
+
132
+ Table 1: Columns 1 to 3 represent Kendall Correlation between human judgments and various metrics on Flickr8k, Composite and CapEval1k. All p-values in the results are $< 0.01$ . The last column shows the accuracy of matches between human judgments in PASCAL50s.
133
+
134
+ annotator to evaluate the captions by considering three dimensions: fluency, relevance, descriptiveness. We hire 5 workers who are fluent in English for each assignment from Amazon Mechanical Turk and use the average score. We also provide the full instructions and details in Appendix.
135
+
136
+ Since our CapEval1k dataset is composed of annotations via recently proposed models, the overall scores are relatively higher than other datasets as shown in Figure 4. Compared to other datasets, CapEval1k contains the annotators' comprehensive judgment across multiple dimensions in evaluating the quality of the generated captions, so we can see that the score distribution score is not concentrated in a particular area.
137
+
138
+ # 5 Experiments
139
+
140
+ # 5.1 Implementation Details
141
+
142
+ We use the pre-trained UNITER-base with 12 layers in the official code provided by the authors (Chen et al., 2020). We use the COCO dataset (Fang et al., 2015) to fine-tune UNITER through ranking loss. We use the train and validation split of COCO dataset in (Chen et al., 2020). The number of the training set is $414\mathrm{k}$ , and the validation set is $25\mathrm{k}$ . We set the batch size of 320, learning rate of 2e-6, and fine-tune UNITER for a maximum of 4k steps. We select the model that shows the minimum loss in the validation set. We set margin $M$ as 0.2 in the ranking loss. We repeat training 5 times for each best-performing model.
143
+
144
+ # 5.2 Performance Comparison
145
+
146
+ We compute caption-level Kendall's correlation coefficient with human judgments for the Composite,
147
+
148
+ Flickr8k, and our proposed CapEval1k. For the PASCAL50s, we compute the number of matches between human judgments for each candidate caption pair. For all of the reference based metrics, we use five reference captions and then get average score among the five references except for BERTScore where we use maximum.
149
+
150
+ We present the experimental results for all four datasets in Table 1. We show that although UMIC does not utilize any reference captions, UMIC outperforms the baseline metrics except for VBTScore in all of the datasets that depend on multiple references. We also report the strong unreferenced baseline UMIC_C, which is directly using the pretrained weights from UNITER without contrastive learning. Interestingly, UMIC_C shows a higher performance than most of the metrics. This high performance shows that pre-trained image-text matching layer of UNITER already has a good representation for evaluating image captions. Especially for Composite, both UMIC and UMIC_C significantly outperform baseline metrics. We explain this in the polarized distribution of human judgments as we explained in Section 4.2. In other words, the relevance of most image-caption pairs in this dataset is too obvious so that UNITER can easily distinguish them. However, while UMIC shows higher performance on all datasets, UMIC_C shows relatively low performance on Flickr8k and CapEval1k. And this demonstrates the effectiveness and generalization ability of our contrastive learning objective to develop UMIC.
151
+
152
+ Also, we can observe that the performance of each metric is relatively low and the rank of each metric changes in our proposed CapEval1k dataset. We explain that this is because the captions in CapEval1k are relatively difficult to be evaluated since the score distribution is not biased as explained in Section 4.3.
153
+
154
+ # 5.3 Case Study
155
+
156
+ We visualize one sample each showing the strengths and weaknesses of UMIC in Figure 5. In the above example, the candidate caption is partially relevant to the image, but the single word "three" in the caption is totally incorrect since there are only "two" giraffes in the image. And this leads to a low human judgment of 0.2. Nevertheless, unlike our UMIC, widely used metrics and UMIC_C give this caption a high score due to the many words overlaps or missing the keywords. The bot
157
+
158
+ ![](images/50833b529d7769e052abaaa9eae6cf8548268fa5b6bab409bac3880444319995.jpg)
159
+
160
+ # References
161
+
162
+ - two giraffes standing next to each other in a field.
163
+ - two giraffes are climbing a hill with mountains in the background.
164
+
165
+ # Candidate
166
+
167
+ - three giraffes standing in a field of grass
168
+
169
+ <table><tr><td>BLEU1: 0.324</td><td>ROUGE-L: 0.320</td><td>METEOR: 0.173</td><td>CIDER: 0.866</td></tr><tr><td>SPICE: 0.289</td><td>UMIC: 0.352</td><td>UMIC_/−c: 0.770</td><td>Human: 0.200</td></tr></table>
170
+
171
+ ![](images/1825f7aa36d561f4e538b6c498f8cc8c2660965d778e23eb549fceb6bdb0b1c0.jpg)
172
+ Figure 5: Case study for the various metrics on candidate captions in CapEval1k Dataset. Human judgments are normalized from 0 to 1.
173
+
174
+ # References
175
+
176
+ - a person breadking a bottle with a baseball bat
177
+ - a boy in yellow shirt swinging a baseball bat
178
+
179
+ # Candidate
180
+
181
+ - a man swinging a baseball bat at a ball
182
+
183
+ <table><tr><td>BLEU1: 0.360</td><td>ROUGE-L: 0.354</td><td>METEOR: 0.176</td><td>CIDER: 1.205</td></tr><tr><td>SPICE: 0.192</td><td>UMIC: 0.094</td><td>UMIC/−c: 0.062</td><td>Human: 0.450</td></tr></table>
184
+
185
+ tom example shows one of the error cases and the limitations of our proposed method. Since the detection model in UMIC could not recognize the important object like the "baseball bat", UMIC outputs very low score.
186
+
187
+ # 6 Conclusion
188
+
189
+ In this paper, we propose UMIC, an unreferenced metric that does not require any reference captions for image captioning task through contrastive learning in UNITER. Also, we propose a new benchmark dataset for image captioning that relieve the issues in previous datasets. Experimental results on four benchmark datasets, including our new dataset, show that UMIC outperforms previous metrics.
190
+
191
+ # Acknowledgements
192
+
193
+ We thank anonymous reviewers for their constructive and insightful comments. K. Jung is with ASRI, Seoul National University, Korea. This work was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (No. 2021R1A2C2008855). This work was partially funded by gifts from Adobe Research.
194
+
195
+ # Ethical Considerations
196
+
197
+ We compensate the annotators with competitive pay, which is above hourly USD $10 for collecting human annotated judgments for the model generated captions. Specifically, we pay$ 0.2 for each task that is composed of evaluating four candidate captions for a single image, where each task can be usually done in a minute. And we use public datasets to train the models.
198
+
199
+ # References
200
+
201
+ Somak Aditya, Yezhou Yang, Chitta Baral, Cornelia Fermuller, and Yiannis Aloimonos. 2015. From images to sentences through scene description graphs using commonsense reasoning and knowledge. arXiv preprint arXiv:1511.03292.
202
+ Peter Anderson, Basura Fernando, Mark Johnson, and Stephen Gould. 2016. Spice: Semantic propositional image caption evaluation. In European Conference on Computer Vision, pages 382-398. Springer.
203
+ Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. 2018. Bottom-up and top-down attention for image captioning and visual question answering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6077-6086.
204
+ Satanjeev Banerjee and Alon Lavie. 2005. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization, pages 65-72.
205
+ Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. 2020. Uniter: Universal image-text representation learning. In European Conference on Computer Vision, pages 104-120. Springer.
206
+ Yin Cui, Guandao Yang, Andreas Veit, Xun Huang, and Serge Belongie. 2018. Learning to evaluate image captioning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5804-5812.
207
+ Fartash Faghri, David J Fleet, Jamie Ryan Kiros, and Sanja Fidler. 2018. Vse++: Improving visual-semantic embeddings with hard negatives.
208
+ Hao Fang, Saurabh Gupta, Forrest Iandola, Rupesh K Srivastava, Li Deng, Piotr Dolkar, Jianfeng Gao, Xiaodong He, Margaret Mitchell, John C Platt, et al. 2015. From captions to visual concepts and back. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1473-1482.
209
+ Micah Hodosh, Peter Young, and Julia Hockenmaier. 2013. Framing image description as a ranking task: Data, models and evaluation metrics. Journal of Artificial Intelligence Research, 47:853-899.
210
+ Lun Huang, Wenmin Wang, Jie Chen, and Xiao-Yong Wei. 2019. Attention on attention for image captioning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4634-4643.
211
+ Andrej Karpathy and Li Fei-Fei. 2015. Deep visual-semantic alignments for generating image descriptions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3128-3137.
212
+
213
+ Matt Kusner, Yu Sun, Nicholas Kolkin, and Kilian Weinberger. 2015. From word embeddings to document distances. In International conference on machine learning, pages 957-966.
214
+ Hwanhee Lee, Seunghyun Yoon, Franck Dernoncourt, Doo Soon Kim, Trung Bui, and Kyomin Jung. 2020. Vilbertscore: Evaluating image caption using vision-and-language bert. In Proceedings of the First Workshop on Evaluation and Comparison of NLP Systems, pages 34-39.
215
+ Tomer Levinboim, Ashish V. Thapliyal, Piyush Sharma, and Radu Soricut. 2021. Quality estimation for image captions based on large-scale human evaluations. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3157-3166, Online. Association for Computational Linguistics.
216
+ Chin-Yew Lin. 2004. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pages 74-81.
217
+ Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. 2019. Vilbert: Pretraining task-agnostic visiolinguistic representations for vision-and-language tasks. In Advances in Neural Information Processing Systems, pages 13-23.
218
+ Pranava Swaroop Madhyastha, Josiah Wang, and Lucia Specia. 2019. Vifidel: Evaluating the visual fidelity of image descriptions. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 6539-6550.
219
+ Andre FT Martins, Marcin Junczys-Dowmunt, Fabio N Kepler, Ramón Astudillo, Chris Hokamp, and Roman Grundkiewicz. 2017. Pushing the limits of translation quality estimation. Transactions of the Association for Computational Linguistics, 5:205-218.
220
+ Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pages 311-318.
221
+ Steven J Rennie, Etienne Marcheret, Youssef Mroueh, Jerret Ross, and Vaibhava Goel. 2017. Self-critical sequence training for image captioning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7008-7024.
222
+ Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. 2018. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2556-2565.
223
+
224
+ Lucia Specia, Frédéric Blain, Varvara Logacheva, Ramón Astudillo, and André FT Martins. 2018. Findings of the wmt 2018 shared task on quality estimation. In Proceedings of the Third Conference on Machine Translation: Shared Task Papers, pages 689-709.
225
+ Lucia Specia, Kashif Shah, José GC De Souza, and Trevor Cohn. 2013. Quest-a translation quality estimation framework. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pages 79-84.
226
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008.
227
+ Ramakrishna Vedantam, C Lawrence Zitnick, and Devi Parikh. 2015. Cider: Consensus-based image description evaluation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4566-4575.
228
+ Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. 2015. Show and tell: A neural image caption generator. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3156-3164.
229
+ Jiuniu Wang, Wenjia Xu, Qingzhong Wang, and Antoni B Chan. 2020. Compare and reweight: Distinctive image captioning using similar images sets. In ECCV.
230
+ Yanzhi Yi, Hangyu Deng, and Jinglu Hu. 2020. Improving image captioning evaluation by considering inter references variance. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 985-994.
231
+ Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. 2019. Bertscore: Evaluating text generation with bert. arXiv preprint arXiv:1904.09675.
umicanunreferencedmetricforimagecaptioningviacontrastivelearning/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3028e40f22c8d4f974d5e590be94c75a31152662b01b41a9c1511511806468d
3
+ size 147681
umicanunreferencedmetricforimagecaptioningviacontrastivelearning/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4654bf802cfb9708ae7f8f6af522b812c79fc2210713fb8b32b85da8b11306db
3
+ size 238164
uncertaintyandsurprisaljointlydeliverthepunchlineexploitingincongruitybasedfeaturesforhumorrecognition/a368dd0e-5751-4527-a465-b9f0821eddb7_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3f1bea3a6118d4847f4844eec6811cf4eff686e2ef74142f1b7e9e7d1a5b8da4
3
+ size 46271
uncertaintyandsurprisaljointlydeliverthepunchlineexploitingincongruitybasedfeaturesforhumorrecognition/a368dd0e-5751-4527-a465-b9f0821eddb7_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31946a8505507c57585b80cc41deb1833e8653d5d918ff50bc0bb0078fb377c1
3
+ size 56374
uncertaintyandsurprisaljointlydeliverthepunchlineexploitingincongruitybasedfeaturesforhumorrecognition/a368dd0e-5751-4527-a465-b9f0821eddb7_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2be32e6c86b603c08b4659d7ccb5285909a3ec7cbcc88b8d82fbb4fa412752fa
3
+ size 299836
uncertaintyandsurprisaljointlydeliverthepunchlineexploitingincongruitybasedfeaturesforhumorrecognition/full.md ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Uncertainty and Surprisal Jointly Deliver the Punchline: Exploiting Incongruity-Based Features for Humor Recognition
2
+
3
+ Yubo Xie, Junze Li, and Pearl Pu
4
+ School of Computer and Communication Sciences
5
+ École Polytechnique Fédérale de Lausanne
6
+ Lausanne, Switzerland
7
+ {yubo.xie, junze.li, pearl.pu}@epfl.ch
8
+
9
+ # Abstract
10
+
11
+ Humor recognition has been widely studied as a text classification problem using data-driven approaches. However, most existing work does not examine the actual joke mechanism to understand humor. We break down any joke into two distinct components: the set-up and the punchline, and further explore the special relationship between them. Inspired by the incongruity theory of humor, we model the setup as the part developing semantic uncertainty, and the punchline disrupting audience expectations. With increasingly powerful language models, we were able to feed the set-up along with the punchline into the GPT-2 language model, and calculate the uncertainty and surprisal values of the jokes. By conducting experiments on the SemEval 2021 Task 7 dataset, we found that these two features have better capabilities of telling jokes from non-jokes, compared with existing baselines.
12
+
13
+ # 1 Introduction
14
+
15
+ One of the important aspects of computational humor is to develop computer programs capable of recognizing humor in text. Early work on humor recognition (Mihalcea and Strapparava, 2005) proposed heuristic-based humor-specific stylistic features, for example alliteration, antonymy, and adult slang. More recent work (Yang et al., 2015; Chen and Soo, 2018; Weller and Seppi, 2019) regarded the problem as a text classification task, and adopted statistical machine learning methods and neural networks to train models on humor datasets. However, only few of the deep learning methods have tried to establish a connection between humor recognition and humor theories. Thus, one research direction in humor recognition is to bridge the disciplines of linguistics and artificial intelligence.
16
+
17
+ In this paper, we restrict the subject of investigation to jokes, one of the most common humor types
18
+
19
+ ![](images/4ee3945b83e31e8ea34b3c5ff7ed95e72aa6f008945c39e4f59ebc7cfdfeca27.jpg)
20
+ Figure 1: A joke example consisting of a set-up and a punchline. A violation can be observed between the punchline and the expectation.
21
+
22
+ in text form. As shown in Figure 1, these jokes usually consist of a set-up and a punchline. The set-up creates a situation that introduces the hearer into the story framework, and the punchline concludes the joke in a succinct way, intended to make the hearer laugh. Perhaps the most suitable humor theory for explaining such humor phenomenon is the incongruity theory, which states that the cause of laughter is the perception of something incongruous (the punchline) that violates the hearer's expectation (the set-up).
23
+
24
+ Based on the incongruity theory, we propose two features for humor recognition, by calculating the degree of incongruity between the set-up and the punchline. Recently popular pre-trained language models enable us to study such relationship based on large-scale corpora. Specifically, we fed the set-up along with the punchline into the GPT-2 language model (Radford et al., 2019), and obtained the surprisal and uncertainty values of the joke, indicating how surprising it is for the model to generate the punchline, and the uncertainty while generating it. We conducted experiments on a manually labeled humor dataset, and the results showed that
25
+
26
+ these two features could better distinguish jokes from non-jokes, compared with existing baselines. Our work made an attempt to bridge humor theories and humor recognition by applying large-scale pre-trained language models, and we hope it could inspire future research in computational humor.
27
+
28
+ # 2 Related Work
29
+
30
+ Humor Data Mihalcea and Strapparava (2005) created a one-liner dataset with humorous examples extracted from webpages with humor theme and non-humorous examples from Reuters titles, British National Corpus (BNC) sentences, and English Proverbs. Yang et al. (2015) scraped puns from the Pun of the Day website<sup>1</sup> and negative examples from various news websites. There is also work on the curation of non-English humor datasets (Zhang et al., 2019; Blinov et al., 2019). Hasan et al. (2019) developed UR-FUNNY, a multimodal humor dataset that involves text, audio and video information extracted from TED talks.
31
+
32
+ Humor Recognition Most of the existing work on humor recognition in text focuses on one-liners, one type of jokes that delivers the laughter in a single line. The methodologies typically fall into two categories: feature engineering and deep learning. Mihalcea and Strapparava (2005) designed three human-centric features (alliteration, antonymy and synonym) for recognizing humor in the curated one-liner dataset. Mihalcea et al. (2010) approached the problem by calculating the semantic relatedness between the set-up and the punchline (they evaluated 150 one-liners by manually splitting them into "setup" and "punchline"). Shahaf et al. (2015) investigated funny captions for cartoons and proposed several features including perplexity to distinguish between funny and less funny captions. Morales and Zhai (2017) proposed a probabilistic model and leveraged background text sources (such as Wikipedia) to identify humorous Yelp reviews. Liu et al. (2018) proposed to model sentiment association between elementary discourse units and designed features based on discourse relations. Cattle and Ma (2018) explored the usage of word associations as a semantic relatedness feature in a binary humor classification task. With neural networks being popular in recent years, some deep learning structures have been developed for the recognition of humor in text. Chen and Lee (2017) and
33
+
34
+ Chen and Soo (2018) adopted convolutional neural networks, while Weller and Seppi (2019) used a Transformer architecture to do the classification task. Fan et al. (2020) incorporated extra phonetic and semantic (ambiguity) information into the deep learning framework. In addition to these methodological papers, there are also some tasks dedicated to computational humor in recent years. SemEval 2020 Task 7 (Hossain et al., 2020) aims at assessing humor in edited news headlines. SemEval 2021 Task 7 (Meaney et al., 2021) involves predicting the humor rating of the given text, and if the rating is controversial or not. In this task, Xie et al. (2021) adopted the DeBERTa architecture (He et al., 2020) with disentangled attention mechanism to predict the humor labels.
35
+
36
+ Although the work of Mihalcea et al. (2010) is the closest to ours, we are the first to bridge the incongruity theory of humor and large-scale pretrained language models. Other work (Bertero and Fung, 2016) has attempted to predict punchlines in conversations extracted from TV series, but their subject of investigation should be inherently different from ours—punchlines in conversations largely depend on the preceding utterances, while jokes are much more succinct and self-contained.
37
+
38
+ # 3 Humor Theories
39
+
40
+ The attempts to explain humor date back to the age of ancient Greece, where philosophers like Plato and Aristotle regarded the enjoyment of comedy as a form of scorn, and held critical opinions towards laughter. These philosophical comments on humor were summarized as the superiority theory, which states that laughter expresses a feeling of superiority over other people's misfortunes or shortcomings. Starting from the $18^{\text{th}}$ century, two other humor theories began to challenge the dominance of the superiority theory: the relief theory and the incongruity theory. The relief theory argues that laughter serves to facilitate the relief of pressure for the nervous system (Morreall, 2020). This explains why laughter is caused when people recognize taboo subjects—one typical example is the wide usage of sexual terms in jokes. The incongruity theory, supported by Kant (1790), Schopenhauer (1883), and many later philosophers and psychologists, states that laughter comes from the perception of something incongruous that violates the expectations. This view of humor fits well the types of jokes commonly found in stand-up comedies,
41
+
42
+ where the set-up establishes an expectation, and then the punchline violates it. As an expansion of the incongruity theory, Raskin (1979) proposed the Semantic Script-based Theory of Humor (SSTH) by applying the semantic script theory. It posits that, in order to produce verbal humor, two requirements should be fulfilled: (1) The text is compatible with two different scripts; (2) The two scripts with which the text is compatible are opposite.
43
+
44
+ # 4 Methodology
45
+
46
+ The incongruity theory attributes humor to the violation of expectation. This means the punchline delivers the incongruity that turns over the expectation established by the set-up, making it possible to interpret the set-up in a completely different way. With neural networks blooming in recent years, pretrained language models make it possible to study such relationship between the set-up and the punchline based on large-scale corpora. Given the set-up, language models are capable of writing expected continuations, enabling us to measure the degree of incongruity, by comparing the actual punchline with what the language model is likely to generate.
47
+
48
+ In this paper, we leverage the GPT-2 language model (Radford et al., 2019), a Transformer-based architecture trained on the WebText dataset. We chose GPT-2 because: (1) GPT-2 is already pretrained on massive data and publicly available online, which spares us the training process; (2) it is domain independent, thus suitable for modeling various styles of English text. Our goal is to model the set-up and the punchline as a whole piece of text using GPT-2, and analyze the probability of generating the punchline given the set-up. In the following text, we denote the set-up as $x$ , and the punchline as $y$ . Basically, we are interested in two quantities regarding the probability distribution $p(y|x)$ : uncertainty and surprisal, which are elaborated in the next two sections.
49
+
50
+ # 4.1 Uncertainty
51
+
52
+ The first question we are interested in is: given the set-up, how uncertain it is for the language model to continue? This question is related to SSTH, which states that, for a piece of text to be humorous, it should be compatible with two different scripts. To put it under the framework of set-up and punchline, this means the set-up could have multiple ways of interpretation, according to the following punchline. Thus, one would expect a higher uncertainty
53
+
54
+ ![](images/b4b39bbce169f3c1f6124fdd63d46181e57922f098a22146b36b72bfcb0d6fe6.jpg)
55
+ Figure 2: The set-up $x$ and the punchline $y$ are concatenated and fed into GPT-2 for predicting the next token. $v_{i}$ 's are probability distributions on the vocabulary.
56
+
57
+ value when the language model tries to continue the set-up and generate the punchline.
58
+
59
+ We propose to calculate the averaged entropy of the probability distributions at all token positions of the punchline, to represent the degree of uncertainty. As shown in Figure 2, the set-up $x$ and the punchline $y$ are concatenated and then fed into GPT-2 to predict the next token. While predicting the tokens of $y$ , GPT-2 produces a probability distribution $v_{i}$ over the vocabulary. The averaged entropy is then defined as
60
+
61
+ $$
62
+ U (x, y) = - \frac {1}{| y |} \sum_ {i = 1} ^ {n} \sum_ {w \in V} v _ {i} ^ {w} \log v _ {i} ^ {w}, \tag {1}
63
+ $$
64
+
65
+ where $V$ is the vocabulary.
66
+
67
+ # 4.2 Surprisal
68
+
69
+ The second question we would like to address is: how surprising it is when the language model actually generates the punchline? As the incongruity theory states, laughter is caused when something incongruous is observed and it violates the previously established expectation. Therefore, we expect the probability of the language model generating the actual punchline to be relatively low, which indicates the surprisal value should be high. Formally, the surprisal is defined as
70
+
71
+ $$
72
+ \begin{array}{l} S (x, y) = - \frac {1}{| y |} \log p (y | x) \\ = - \frac {1}{| y |} \sum_ {i = 1} ^ {n} \log v _ {i} ^ {y _ {i}}. \tag {2} \\ \end{array}
73
+ $$
74
+
75
+ # 5 Experiments
76
+
77
+ We evaluated and compared the proposed features with several baselines by conducting experiments
78
+
79
+ in two settings: predicting using individual features, and combining the features with a content-based text classifier.
80
+
81
+ # 5.1 Baselines
82
+
83
+ Similar to our approach of analyzing the relationship between the set-up and the punchline, Mihalcea et al. (2010) proposed to calculate the semantic relatedness between the set-up and the punchline. The intuition is that the punchline (which delivers the surprise) will have a minimum relatedness to the set-up. For our experiments, we chose two relatedness metrics that perform the best in their paper as our baselines, plus another similarity metric based on shortest paths in WordNet (Miller, 1995):
84
+
85
+ - Leacock & Chodorow similarity (Leacock and Chodorow, 1998), defined as
86
+
87
+ $$
88
+ \operatorname {S i m} _ {l c h} = - \log \frac {\text {l e n g t h}}{2 * D}, \tag {3}
89
+ $$
90
+
91
+ where length is the length of the shortest path between two concepts using node-counting, and $D$ is the maximum depth of WordNet.
92
+
93
+ - Wu & Palmer similarity (Wu and Palmer, 1994) calculates similarity by considering the depths of the two synsets in WordNet, along with the depth of their LCS (Least Common Subsumer), which is defined as
94
+
95
+ $$
96
+ \operatorname {S i m} _ {w u p} = \frac {2 * \operatorname {d e p t h} (L C S)}{\operatorname {d e p t h} \left(C _ {1}\right) + \operatorname {d e p t h} \left(C _ {2}\right)}, \tag {4}
97
+ $$
98
+
99
+ where $C_1$ and $C_2$ denote synset 1 and synset 2 respectively.
100
+
101
+ - Path similarity (Rada et al., 1989) is also based on the length of the shortest path between two concepts in WordNet, which is defined as
102
+
103
+ $$
104
+ \operatorname {S i m} _ {\text {p a t h}} = \frac {1}{1 + \text {l e n g t h}}. \tag {5}
105
+ $$
106
+
107
+ In addition to the metrics mentioned above, we also consider the following two baselines related to the phonetic and semantic styles of the input text:
108
+
109
+ - Alliteration. The alliteration value is computed as the total number of alliteration chains and rhyme chains found in the input text (Mihalcea and Strapparava, 2005).
110
+
111
+ - Ambiguity. Semantic ambiguity is found to be a crucial part of humor (Miller and Gurevych, 2015). We follow the work of Liu et al. (2018) to compute the ambiguity value:
112
+
113
+ $$
114
+ \log \prod_ {w \in s} \operatorname {n u m} _ {\text {o f}} \operatorname {s e n s e s} (w), \tag {6}
115
+ $$
116
+
117
+ where $w$ is a word in the input text $s$ .
118
+
119
+ # 5.2 Dataset
120
+
121
+ We took the dataset from SemEval 2021 Task 7. The released training set contains 8,000 manually labeled examples in total, with 4,932 being positive, and 3,068 negative. To adapt the dataset for our purpose, we only considered positive examples with exactly two sentences, and negative examples with at least two sentences. For positive examples (jokes), the first sentence was treated as the set-up and the second the punchline. For negative examples (non-jokes), consecutive two sentences were treated as the set-up and the punchline, respectively. After splitting, we cleaned the data with the following rules: (1) We restricted the length of set-ups and punchlines to be under 20 (by counting the number of tokens); (2) We only kept punchlines whose percentage of alphabetical letters is greater than or equal to $75\%$ ; (3) We discarded punchlines that do not begin with an alphabetical letter. As a result, we obtained 3,341 examples in total, consisting of 1,815 jokes and 1,526 non-jokes. To further balance the data, we randomly selected 1,526 jokes, and thus the final dataset contains 3,052 labeled examples in total. For the following experiments, we used 10-fold cross validation, and the averaged scores are reported.
122
+
123
+ # 5.3 Predicting Using Individual Features
124
+
125
+ To test the effectiveness of our features in distinguishing jokes from non-jokes, we built an SVM classifier (parameters can be found in Appendix A) for each individual feature (uncertainty and surprisal, plus the baselines). The resulted scores are reported in Table 1. Compared with the baselines, both of our features (uncertainty and surprisal) achieved higher scores for all the four metrics. In addition, we also tested the performance of uncertainty combined with surprisal (last row
126
+
127
+ <table><tr><td></td><td>P</td><td>R</td><td>F1</td><td>Acc</td></tr><tr><td>Random</td><td>0.4973</td><td>0.4973</td><td>0.4958</td><td>0.4959</td></tr><tr><td>Simlch</td><td>0.5291</td><td>0.5179</td><td>0.4680</td><td>0.5177</td></tr><tr><td>Simwup</td><td>0.5289</td><td>0.5217</td><td>0.4919</td><td>0.5190</td></tr><tr><td>Simpath</td><td>0.5435</td><td>0.5298</td><td>0.4903</td><td>0.5291</td></tr><tr><td>Alliteration</td><td>0.5353</td><td>0.5349</td><td>0.5343</td><td>0.5354</td></tr><tr><td>Ambiguity</td><td>0.5461</td><td>0.5365</td><td>0.5127</td><td>0.5337</td></tr><tr><td>Uncertainty</td><td>0.5840</td><td>0.5738</td><td>0.5593</td><td>0.5741</td></tr><tr><td>Surprisal</td><td>0.5617</td><td>0.5565</td><td>0.5455</td><td>0.5570</td></tr><tr><td>U+S</td><td>0.5953</td><td>0.5834</td><td>0.5695</td><td>0.5832</td></tr></table>
128
+
129
+ Table 1: Performance of individual features. Last row $(\mathrm{U} + \mathrm{S})$ is the combination of uncertainty and surprisal. P: Precision, R: Recall, F1: F1-score, Acc: Accuracy, P, R, and F1 are macro-averaged, and the scores are reported on 10-fold cross validation.
130
+
131
+ <table><tr><td></td><td>P</td><td>R</td><td>F1</td><td>Acc</td></tr><tr><td>GloVe</td><td>0.8233</td><td>0.8232</td><td>0.8229</td><td>0.8234</td></tr><tr><td>GloVe+Simlch</td><td>0.8255</td><td>0.8251</td><td>0.8247</td><td>0.8250</td></tr><tr><td>GloVe+Simwup</td><td>0.8264</td><td>0.8260</td><td>0.8254</td><td>0.8257</td></tr><tr><td>GloVe+Simpath</td><td>0.8252</td><td>0.8244</td><td>0.8239</td><td>0.8244</td></tr><tr><td>GloVe+Alliter.</td><td>0.8299</td><td>0.8292</td><td>0.8291</td><td>0.8297</td></tr><tr><td>GloVe+Amb.</td><td>0.8211</td><td>0.8203</td><td>0.8198</td><td>0.8201</td></tr><tr><td>GloVe+U</td><td>0.8355</td><td>0.8359</td><td>0.8353</td><td>0.8359</td></tr><tr><td>GloVe+S</td><td>0.8331</td><td>0.8326</td><td>0.8321</td><td>0.8326</td></tr><tr><td>GloVe+U+S</td><td>0.8368</td><td>0.8368</td><td>0.8363</td><td>0.8365</td></tr></table>
132
+
133
+ Table 2: Performance of the features when combined with a content-based classifier. U denotes uncertainty and S denotes surprisal. P: Precision, R: Recall, F1: F1-score, Acc: Accuracy. P, R, and F1 are macro-averaged, and the scores are reported on 10-fold cross validation.
134
+
135
+ of the table), and the resulting classifier shows a further increase in the performance. This suggests that, by jointly considering uncertainty and surprisal of the set-up and the punchline, we are better at recognizing jokes.
136
+
137
+ # 5.4 Boosting a Content-Based Classifier
138
+
139
+ Now that we have shown the advantage of our features when used individually in prediction, we would like to validate their effectiveness when combined with the commonly used word embeddings. Thus, we evaluated our features as well as the baselines under the framework of a content-based classifier. The idea is to see if the features could further boost the performance of existing text classifiers. To create a starting point, we encoded each set-up and punchline into vector representations by aggregating the GloVe (Pennington et al., 2014) embeddings of the tokens (sum up and then normalize by the length). We used the GloVe embeddings
140
+
141
+ ![](images/2206a0057953b613b450221fbe47e885b5da241de4f1bfc9949b67b1b31096c0.jpg)
142
+ Figure 3: Histograms of uncertainty (left) and surprisal (right), plotted separately for jokes and non-jokes. Mdn stands for Median.
143
+
144
+ ![](images/99f4c8d202b6b3bfa6bc8d8ee6c94ef48afd8563c848f5b24ddbc2ecee427fb4.jpg)
145
+
146
+ with dimension 50, and then concatenated the setup vector and the punchline vector, to represent the whole piece of text as a vector of dimension 100. For each of the features (uncertainty and surprisal, plus the baselines), we appended it to the GloVe vector, and built an SVM classifier to do the prediction. Scores are reported in Table 2. As we can see, compared with the baselines, our features produce larger increases in the performance of the content-based classifier, and similar to what we have observed in Table 1, jointly considering uncertainty and surprisal gives further increase in the performance.
147
+
148
+ # 6 Visualizing Uncertainty and Surprisal
149
+
150
+ To get a straightforward vision of the uncertainty and surprisal values for jokes versus non-jokes, we plot their histograms in Figure 3 (for all 3,052 labeled examples). It can be observed that, for both uncertainty and surprisal, jokes tend to have higher values than non-jokes, which is consistent with our expectations in Section 4.
151
+
152
+ # 7 Conclusion
153
+
154
+ This paper makes an attempt in establishing a connection between the humor theories and the nowadays popular pre-trained language models. We proposed two features according to the incongruity theory of humor: uncertainty and surprisal. We conducted experiments on a humor dataset, and the results suggest that our approach has an advantage in humor recognition over the baselines. The proposed features can also provide insight for the task of two-line joke generation—when designing the text generation algorithm, one could exert extra constraints so that the set-up is chosen to be compatible with multiple possible interpretations, and the punchline should be surprising in a way that violates the most obvious interpretation. We hope our work could inspire future research in the community of computational humor.
155
+
156
+ # References
157
+
158
+ Dario Bertero and Pascale Fung. 2016. A long short-term memory framework for predicting humor in dialogues. In Proceedings of NAACL-HLT 2016, pages 130-135.
159
+ Vladislav Blinov, Valeria Bolotova-Baranova, and Pavel Braslavski. 2019. Large dataset and language model fun-tuning for humor recognition. In Proceedings of ACL 2019, pages 4027-4032.
160
+ Andrew Cattle and Xiaojuan Ma. 2018. Recognizing humour using word associations and humour anchor extraction. In Proceedings of COLING 2018, pages 1849-1858.
161
+ Lei Chen and Chong Min Lee. 2017. Convolutional neural network for humor recognition. CoRR, abs/1702.02584.
162
+ Peng-Yu Chen and Von-Wun Soo. 2018. Humor recognition using deep learning. In Proceedings of NAACL-HLT 2018, Volume 2 (Short Papers), pages 113-117.
163
+ Xiaochao Fan, Hongfei Lin, Liang Yang, Yufeng Diao, Chen Shen, Yonghe Chu, and Tongxuan Zhang. 2020. Phonetics and ambiguity comprehension gated attention network for humor recognition. Complex., 2020:2509018:1-2509018:9.
164
+ Md. Kamrul Hasan, Wasifur Rahman, AmirAli Bagher Zadeh, Jianyuan Zhong, Md. Iftekhar Tanveer, Louis-Philippe Morency, and Mohammed (Ehsan) Hoque. 2019. UR-FUNNY: A multimodal language dataset for understanding humor. In Proceedings of EMNLP-IJCNLP 2019, pages 2046-2056.
165
+ Pengcheng He, Xiaodong Liu, Jianfeng Gao, and Weizhu Chen. 2020. DeBERTa: Decoding-enhanced BERT with disentangled attention. CoRR, abs/2006.03654.
166
+ Nabil Hossain, John Krumm, Michael Gamon, and Henry A. Kautz. 2020. SemEval-2020 Task 7: Assessing humor in edited news headlines. In Proceedings of SemEval@COLING 2020, pages 746-758.
167
+ Immanuel Kant. 1790. Critique of judgment, ed. and trans. WS Pluhar; Indianapolis: Hackett.
168
+ Claudia Leacock and Martin Chodorow. 1998. Combining local context and WordNet sense similarity for word sense identification. In WordNet, An Electronic Lexical Database. The MIT Press.
169
+ Lizhen Liu, Donghai Zhang, and Wei Song. 2018. Modeling sentiment association in discourse for humor recognition. In Proceedings of ACL 2018, Volume 2 (Short Papers), pages 586-591.
170
+ J.A. Meaney, Steven R. Wilson, Luis Chiruzzo, Adam Lopez, and Walid Magdy. 2021. SemEval 2021 Task 7: HaHackathon, detecting and rating humor and offense. In Proceedings of SemEval@ACL 2021.
171
+
172
+ Rada Mihalcea and Carlo Strapparava. 2005. Making computers laugh: Investigations in automatic humor recognition. In Proceedings of HLT/EMNLP 2005, pages 531-538.
173
+ Rada Mihalcea, Carlo Strapparava, and Stephen G. Pulman. 2010. Computational models for incongruity detection in humour. In Proceedings of CICling 2010, volume 6008 of Lecture Notes in Computer Science, pages 364-374.
174
+ George A. Miller. 1995. Wordnet: A lexical database for English. Commun. ACM, 38(11):39-41.
175
+ Tristan Miller and Iryna Gurevych. 2015. Automatic disambiguation of English puns. In Proceedings of ACL 2015, pages 719-729.
176
+ Alex Morales and Chengxiang Zhai. 2017. Identifying humor in reviews using background text sources. In Proceedings of EMNLP 2017, pages 492-501.
177
+ John Morreall. 2020. Philosophy of Humor. In Edward N. Zalta, editor, The Stanford Encyclopedia of Philosophy, fall 2020 edition. Metaphysics Research Lab, Stanford University.
178
+ Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. GloVe: Global vectors for word representation. In Proceedings of EMNLP 2014, pages 1532-1543.
179
+ Roy Rada, Hafedh Mili, Ellen Bicknell, and Maria Blettner. 1989. Development and application of a metric on semantic nets. IEEE Trans. Syst. Man Cybern., 19(1):17-30.
180
+ Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9.
181
+ Victor Raskin. 1979. Semantic mechanisms of humor. In Annual Meeting of the Berkeley Linguistics Society, volume 5, pages 325-335.
182
+ Arthur Schopenhauer. 1883. The world as will and idea (vols. i, ii, & iii). Haldane, RB, & Kemp, J.(3 Vols.). London: Kegan Paul, Trench, Trubner, 6.
183
+ Dafna Shahaf, Eric Horvitz, and Robert Mankoff. 2015. Inside jokes: Identifying humorous cartoon captions. In Proceedings of SIGKDD 2015, pages 1065-1074.
184
+ Orion Weller and Kevin D. Seppi. 2019. Humor detection: A transformer gets the last laugh. In Proceedings of EMNLP-IJCNLP 2019, pages 3619-3623.
185
+ Zhibiao Wu and Martha Palmer. 1994. Verbs semantics and lexical selection. In Proceedings of ACL 1994, page 133-138.
186
+ Yubo Xie, Junze Li, and Pearl Pu. 2021. HumorHunter at SemEval-2021 Task 7: Humor and offense recognition with disentangled attention. In Proceedings of SemEval@ACL 2021.
187
+
188
+ <table><tr><td></td><td>Running Time</td></tr><tr><td>Simlch</td><td>1.76 sec</td></tr><tr><td>Simwup</td><td>1.71 sec</td></tr><tr><td>Simpath</td><td>1.71 sec</td></tr><tr><td>Alliteration</td><td>1.70 sec</td></tr><tr><td>Ambiguity</td><td>2.94 sec</td></tr><tr><td>Uncertainty</td><td>2.12 sec</td></tr><tr><td>Surprisal</td><td>2.49 sec</td></tr><tr><td>Uncertainty + Surprisal</td><td>2.26 sec</td></tr></table>
189
+
190
+ Table 3: Running time of the SVM classifiers trained on individual features.
191
+
192
+ <table><tr><td></td><td>Running Time</td></tr><tr><td>GloVe</td><td>7.54 sec</td></tr><tr><td>GloVe + Simlch</td><td>14.85 sec</td></tr><tr><td>GloVe + Simwup</td><td>15.90 sec</td></tr><tr><td>GloVe + Simpath</td><td>13.76 sec</td></tr><tr><td>GloVe + Alliteration</td><td>15.41 sec</td></tr><tr><td>GloVe + Ambiguity</td><td>14.28 sec</td></tr><tr><td>GloVe + Uncertainty</td><td>14.70 sec</td></tr><tr><td>GloVe + Surprisal</td><td>13.84 sec</td></tr><tr><td>GloVe + U + S</td><td>19.27 sec</td></tr></table>
193
+
194
+ Table 4: Running time of the content-based SVM classifiers combined with individual features. U denotes uncertainty and S denotes surprisal.
195
+
196
+ Diyi Yang, Alon Lavie, Chris Dyer, and Eduard H. Hovy. 2015. Humor recognition and humor anchor extraction. In Proceedings of EMNLP 2015, pages 2367-2376.
197
+
198
+ Dongyu Zhang, Heting Zhang, Xikai Liu, Hongfei Lin, and Feng Xia. 2019. Telling the whole story: A manually annotated chinese dataset for the analysis of humor in jokes. In Proceedings of EMNLP-IJCNLP 2019, pages 6401-6406.
199
+
200
+ # A Model Parameters
201
+
202
+ For the SVM classifier, we set the regularization parameter $C = 1.0$ , and used the RBF kernel with the kernel coefficient $\gamma = 1 / n_{\mathrm{features}}$ . All models were trained and evaluated on a machine with Intel Core i7-6700K CPU, Nvidia GeForce GTX 1080 GPU, and 16GB RAM. The running time of each method is listed in Table 3 and Table 4.
uncertaintyandsurprisaljointlydeliverthepunchlineexploitingincongruitybasedfeaturesforhumorrecognition/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d35ac6784f3b5613bfd49cec46157cdeaafe200937acf990473d357268dc897c
3
+ size 237373
uncertaintyandsurprisaljointlydeliverthepunchlineexploitingincongruitybasedfeaturesforhumorrecognition/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e576989cf2ebc2dac3b71bc3d0e1b7d788ab8df63bfb3e5b48f8c756c29e42a7
3
+ size 199307
unsupervisedcrossdomainprerequisitechainlearningusingvariationalgraphautoencoders/71e6e818-0c73-47ef-a521-c67a075769f5_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2bfdd9a26d43385b60af36fc92f19170f3ad916c97c893686e93265e7782b240
3
+ size 44564
unsupervisedcrossdomainprerequisitechainlearningusingvariationalgraphautoencoders/71e6e818-0c73-47ef-a521-c67a075769f5_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e38aeb642257c052c44b30abf3b1764a57e8fe852e5f199e1d219d67320276a
3
+ size 52137