SlowGuess commited on
Commit
81d7a2e
·
verified ·
1 Parent(s): db75c4c

Add Batch d95f1bdd-6229-47ca-bd8d-9e871a1e9c1b

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. priorknowledgeandmemoryenrichedtransformerforsignlanguagetranslation/a9635648-236d-4d42-b6aa-46746a82cef1_content_list.json +3 -0
  2. priorknowledgeandmemoryenrichedtransformerforsignlanguagetranslation/a9635648-236d-4d42-b6aa-46746a82cef1_model.json +3 -0
  3. priorknowledgeandmemoryenrichedtransformerforsignlanguagetranslation/a9635648-236d-4d42-b6aa-46746a82cef1_origin.pdf +3 -0
  4. priorknowledgeandmemoryenrichedtransformerforsignlanguagetranslation/full.md +370 -0
  5. priorknowledgeandmemoryenrichedtransformerforsignlanguagetranslation/images.zip +3 -0
  6. priorknowledgeandmemoryenrichedtransformerforsignlanguagetranslation/layout.json +3 -0
  7. probingbertspriorswithserialreproductionchains/ad47dabe-c438-4db3-8161-7747579ccc7a_content_list.json +3 -0
  8. probingbertspriorswithserialreproductionchains/ad47dabe-c438-4db3-8161-7747579ccc7a_model.json +3 -0
  9. probingbertspriorswithserialreproductionchains/ad47dabe-c438-4db3-8161-7747579ccc7a_origin.pdf +3 -0
  10. probingbertspriorswithserialreproductionchains/full.md +290 -0
  11. probingbertspriorswithserialreproductionchains/images.zip +3 -0
  12. probingbertspriorswithserialreproductionchains/layout.json +3 -0
  13. probingfactuallygroundedcontenttransferwithfactualablation/a2e2f91a-29f6-4b58-b1b7-411e32161e98_content_list.json +3 -0
  14. probingfactuallygroundedcontenttransferwithfactualablation/a2e2f91a-29f6-4b58-b1b7-411e32161e98_model.json +3 -0
  15. probingfactuallygroundedcontenttransferwithfactualablation/a2e2f91a-29f6-4b58-b1b7-411e32161e98_origin.pdf +3 -0
  16. probingfactuallygroundedcontenttransferwithfactualablation/full.md +448 -0
  17. probingfactuallygroundedcontenttransferwithfactualablation/images.zip +3 -0
  18. probingfactuallygroundedcontenttransferwithfactualablation/layout.json +3 -0
  19. probingmultilingualcognatepredictionmodels/719be75c-bac0-4ff4-b57c-19ec62b50927_content_list.json +3 -0
  20. probingmultilingualcognatepredictionmodels/719be75c-bac0-4ff4-b57c-19ec62b50927_model.json +3 -0
  21. probingmultilingualcognatepredictionmodels/719be75c-bac0-4ff4-b57c-19ec62b50927_origin.pdf +3 -0
  22. probingmultilingualcognatepredictionmodels/full.md +325 -0
  23. probingmultilingualcognatepredictionmodels/images.zip +3 -0
  24. probingmultilingualcognatepredictionmodels/layout.json +3 -0
  25. promptdrivenneuralmachinetranslation/c20d4e78-18a1-4e96-9932-9ebf36784474_content_list.json +3 -0
  26. promptdrivenneuralmachinetranslation/c20d4e78-18a1-4e96-9932-9ebf36784474_model.json +3 -0
  27. promptdrivenneuralmachinetranslation/c20d4e78-18a1-4e96-9932-9ebf36784474_origin.pdf +3 -0
  28. promptdrivenneuralmachinetranslation/full.md +349 -0
  29. promptdrivenneuralmachinetranslation/images.zip +3 -0
  30. promptdrivenneuralmachinetranslation/layout.json +3 -0
  31. prompttuningfordiscriminativepretrainedlanguagemodels/2bb65d2d-f8fd-4016-b677-42b37efbb12e_content_list.json +3 -0
  32. prompttuningfordiscriminativepretrainedlanguagemodels/2bb65d2d-f8fd-4016-b677-42b37efbb12e_model.json +3 -0
  33. prompttuningfordiscriminativepretrainedlanguagemodels/2bb65d2d-f8fd-4016-b677-42b37efbb12e_origin.pdf +3 -0
  34. prompttuningfordiscriminativepretrainedlanguagemodels/full.md +195 -0
  35. prompttuningfordiscriminativepretrainedlanguagemodels/images.zip +3 -0
  36. prompttuningfordiscriminativepretrainedlanguagemodels/layout.json +3 -0
  37. queryandextractrefiningeventextractionastypeorientedbinarydecoding/c5dc43d9-fb58-40e8-a821-2d94f1cba382_content_list.json +3 -0
  38. queryandextractrefiningeventextractionastypeorientedbinarydecoding/c5dc43d9-fb58-40e8-a821-2d94f1cba382_model.json +3 -0
  39. queryandextractrefiningeventextractionastypeorientedbinarydecoding/c5dc43d9-fb58-40e8-a821-2d94f1cba382_origin.pdf +3 -0
  40. queryandextractrefiningeventextractionastypeorientedbinarydecoding/full.md +394 -0
  41. queryandextractrefiningeventextractionastypeorientedbinarydecoding/images.zip +3 -0
  42. queryandextractrefiningeventextractionastypeorientedbinarydecoding/layout.json +3 -0
  43. questionansweringinfusedpretrainingofgeneralpurposecontextualizedrepresentations/d6fd042f-9bc1-4628-b8c3-aebdba908d6c_content_list.json +3 -0
  44. questionansweringinfusedpretrainingofgeneralpurposecontextualizedrepresentations/d6fd042f-9bc1-4628-b8c3-aebdba908d6c_model.json +3 -0
  45. questionansweringinfusedpretrainingofgeneralpurposecontextualizedrepresentations/d6fd042f-9bc1-4628-b8c3-aebdba908d6c_origin.pdf +3 -0
  46. questionansweringinfusedpretrainingofgeneralpurposecontextualizedrepresentations/full.md +441 -0
  47. questionansweringinfusedpretrainingofgeneralpurposecontextualizedrepresentations/images.zip +3 -0
  48. questionansweringinfusedpretrainingofgeneralpurposecontextualizedrepresentations/layout.json +3 -0
  49. questiongenerationforreadingcomprehensionassessmentbymodelinghowandwhattoask/3c9d33d5-9ea8-4716-a998-899cd4c4c14c_content_list.json +3 -0
  50. questiongenerationforreadingcomprehensionassessmentbymodelinghowandwhattoask/3c9d33d5-9ea8-4716-a998-899cd4c4c14c_model.json +3 -0
priorknowledgeandmemoryenrichedtransformerforsignlanguagetranslation/a9635648-236d-4d42-b6aa-46746a82cef1_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5eb21a0bfa987710341da1cc91ce6d3f118508d7d8d09a2e95427cdbd650c024
3
+ size 77565
priorknowledgeandmemoryenrichedtransformerforsignlanguagetranslation/a9635648-236d-4d42-b6aa-46746a82cef1_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4344f2320c41201c4b0571f5f6a1ef6e53f282c8cab64392d64f4bb09b518e29
3
+ size 91750
priorknowledgeandmemoryenrichedtransformerforsignlanguagetranslation/a9635648-236d-4d42-b6aa-46746a82cef1_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91618545bf71ac644a9721c10aca12935d29c535687ed21c674e2361981956b6
3
+ size 1315496
priorknowledgeandmemoryenrichedtransformerforsignlanguagetranslation/full.md ADDED
@@ -0,0 +1,370 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Prior Knowledge and Memory Enriched Transformer for Sign Language Translation
2
+
3
+ Tao Jin
4
+
5
+ Zhejiang University
6
+
7
+ jint_zju@zju.edu.cn
8
+
9
+ Meng Zhang
10
+
11
+ Huawei Noah's Ark Lab
12
+
13
+ zhangmeng92@huawei.com
14
+
15
+ # Abstract
16
+
17
+ This paper attacks the challenging problem of sign language translation (SLT), which involves not only visual and textual understanding but also additional prior knowledge learning (i.e. performing style, syntax). However, the majority of existing methods with vanilla encoder-decoder structures fail to sufficiently explore all of them. Based on this concern, we propose a novel method called Prior knowledge and memory Enriched Transformer (PET) for SLT, which incorporates the auxiliary information into vanilla transformer. Concretely, we develop gated interactive multi-head attention which associates the multimodal representation and global signing style with adaptive gated functions. One Part-of-Speech (POS) sequence generator relies on the associated information to predict the global syntactic structure, which is thereafter leveraged to guide the sentence generation. Besides, considering that the visual-textual context information, and additional auxiliary knowledge of a word may appear in more than one video, we design a multi-stream memory structure to obtain higher-quality translations, which stores the detailed correspondence between a word and its various relevant information, leading to a more comprehensive understanding for each word. We conduct extensive empirical studies on RWTHPHOENIX-Weather-2014T dataset with both signer-dependent and signer-independent conditions. The quantitative and qualitative experimental results comprehensively reveal the effectiveness of PET.
18
+
19
+ # 1 Introduction
20
+
21
+ Recently, the combination of vision and language attracts increasing attention. Sign language translation which aims to provide translated natural sentences for sign language videos is a valuable but challenging task in this topic (Camgoz et al., 2018,
22
+
23
+ Zhou Zhao†
24
+
25
+ Zhejiang University
26
+
27
+ zhaozhou@zju.edu.cn
28
+
29
+ Xingshan Zeng
30
+
31
+ Huawei Noah's Ark Lab
32
+
33
+ zxshamson@gmail.com
34
+
35
+ ![](images/10d130ee0259523f1477d0bd2f1412e3422a03d658e2f03e9b376d8a8a6e230d.jpg)
36
+ Translation: im (ADP) | western (NOUN) | ist (VERB) | es (PRON) | freundlich (ADJ)
37
+ Figure 1: An example of sign language translation, where the video frames and the sentence correspond to each other. Besides, each word (red) has its syntactic attribute (green).
38
+
39
+ 2020a,b; Jin and Zhao, 2021). Since the visual and textual modalities are not aligned strictly in a weakly-supervised manner, the difficulties of sign language translation mainly lie in the multimodal representation learning of both modalities and the alignments between them. Besides, additional prior knowledge (i.e. the performing style of different signers, the common syntactic structures of sentences) also has a strong influence on multimodal learning.
40
+
41
+ Encoder-decoder structures built upon long short-term memory unit (Hochreiter and Schmidhuber, 1997) (LSTM) or transformer (Vaswani et al., 2017) are widely used in end-to-end sign language translation, which directly generates natural sentences without intermediate products like gloss sequences. Generally, the encoder extracts and encodes the sign language information, the decoder makes full use of the encoded results with cross-modal interaction. Camgoz et al. (2018) first proposes the sign language translation task and utilizes LSTMs combined with attention mechanism (e.g. Luong Attention (Luong et al., 2015), Badanau Attention (Bahdanau et al., 2014)) to solve it. Due to the insufficient capacity to capture the long-range temporal correlations, Camgoz et al. (2020b) replaces LSTM with transformer, which could correlate any two-time steps of sequential features. The stacked attention blocks improve most of the metrics by a large margin. Camgoz et al. (2020a) combines multiple articulatory channels with an
42
+
43
+ choring losses and proposes a novel multi-channel transformer architecture for sign language translation. Li et al. (2020) employs video segment representation with multiple temporal granularities to develop a semantic pyramid network. In summary, many endeavors are devoted to the improvement of deep architectures for multimodal representation learning. However, the influences of additional prior knowledge are totally ignored. For example, as shown in Fig. 1, the natural sentence has its unique syntactic structure.
44
+
45
+ Motivated by the above observations, we propose a new method called prior knowledge and memory enriched transformer for sign language translation. Specifically, we develop gated interactive multi-head attention which associates the multimodal representation and global signing style with adaptive gated functions. Besides, we employ sentence templates that consist of POS tags to represent the syntactic structures of natural sentences, and accordingly, syntax learning is performed by directly inferring POS tags with the style-specific multimodal representation. The natural sentences are generated conditioned on such auxiliaries. Furthermore, we find that the visual and textual context information, and additional auxiliary knowledge of a word may appear in more than one sign language video. For example, a word that comes up with different words may lead to various contextual visual perceptions, and the general gestural tendency of a word could support the decoding process. Therefore, we design a multi-stream memory structure to store the full-spectrum correspondence between a word and its various relevant information in training data. The obtained memory contents are employed to aid in decoding. We conduct extensive empirical studies on the benchmark dataset, RWTH-PHOENIX-Weather-2014T (PHOENIX14T) (Camgoz et al., 2018), with both signer-dependent and signer-independent conditions. The quantitative and qualitative results comprehensively reveal the effectiveness and generalization of PET. The main contributions of this paper can be summarized as follows:
46
+
47
+ - We propose a new method called prior knowledge and memory enriched transformer for sign language translation, which explores not only multimodal understanding but also the influences of additional prior knowledge on multimodal learning.
48
+ - We develop gated interactive multi-head attenuate
49
+
50
+ tion by associating the multimodal representation and global signing style with adaptive gated functions. The POS sequence generator relies on the style-specific multimodal information to predict the syntactic structure, which is leveraged to guide the natural sentence generation.
51
+
52
+ - We design a multi-stream memory structure to store the full-spectrum correspondence between a word and its various relevant information in training data, leading to a more comprehensive understanding for each word.
53
+ - The quantitative and qualitative results on the challenging dataset, PHOENIX14T of both signer-dependent and signer-independent conditions comprehensively reveal the effectiveness and generalization of PET.
54
+
55
+ # 2 Related Work
56
+
57
+ # 2.1 Sign Language Translation
58
+
59
+ Sign language recognition (SLR) aims to recognize single gestures from an input video clip. Many endeavors are devoted to SLR (Camgoz et al., 2016, 2017; Cui et al., 2019; Graves et al., 2006; Wang et al., 2018; Cui et al., 2017). Sign language translation is the final goal of recognition, which aims to directly translate the sign language videos into natural sentences. SLT is similar to video captioning (Jin et al., 2019a, 2020, 2019b; Pei et al., 2019), to some extent. Existing methods are categorized into two-stage and end-to-end methods. Two-stage methods first transform the videos into gloss (gesture) sequences and then rearrange them to generate natural sentences. To guarantee the fluency of sentences, some words that do not carry visual information are added (Camgoz et al., 2018). End-to-end sign language translation aims to directly translate the original sign language videos into natural sentences without intermediate products. Camgoz et al. (2018) first proposes the sign language translation task and utilizes both two-stage and end-to-end methods to solve it. Camgoz et al. (2018) adopts vanilla LSTM-based encoder-decoder structure. Due to the insufficient capacity to capture the long-range temporal correlations. Camgoz et al. (2020b) replaces LSTM with transformer, which could correlate any two-time steps of sequential features. The stacked attention blocks improve most of the metrics with a large margin. Li et al. (2020)
60
+
61
+ employs video segment representation with multiple temporal granularities to develop a semantic pyramid network.
62
+
63
+ However, the methods mentioned above fail to explore the multimodal understanding and additional prior knowledge learning sufficiently. In this paper, we propose PET to solve this problem.
64
+
65
+ # 3 Approach
66
+
67
+ Fig. 2 shows the overall framework of prior knowledge and memory enriched transformer based on encoder-decoder structure. We develop gated interactive multi-head attention in all the attention blocks with adaptive gated control of signing style embeddings. In the decoder, we treat the sentence templates which consist of POS tags as the syntax-aware auxiliary for natural sentence generation. Practically, two consecutive decoding blocks (syntactic and textual blocks) rely on the style-specific multimodal representation to predict the target words. Furthermore, we design a multistream memory structure to enhance the comprehensive understanding for each word.
68
+
69
+ # 3.1 Style-Aware Gated Interactive Encoder
70
+
71
+ Following (Camgoz et al., 2020b), we utilize the 2D-CNN (Tan and Le, 2019) pre-trained with recognition task (Koller et al., 2019) to extract visual features of sign language videos. Concretely, we first sample video frames and then send them to 2D-CNN. For convenience, we use $I \in \mathbb{R}^{T_i \times d}$ to denote the extracted features, where $T_i$ is the number of video frames. As shown in Fig. 2, the encoder consists of stacked attention blocks. Considering the fact that different signers have corresponding performing styles (i.e. body, pose), we perform adaptive gated interaction for the self-attention mechanism, which associates the visual representation and signing style with adaptive gated functions. Note that, for each specific signer, we obtain the performing style embedding $g$ by simply mean-pooling all the visual features of the corresponding signer (both videos and frames) in the dataset. Specifically, the self-attention layer is formulated as:
72
+
73
+ $$
74
+ \operatorname {G I} _ {-} \operatorname {S e l f} (I) = \operatorname {G I} _ {-} \operatorname {M H} (I, I | g) \tag {1}
75
+ $$
76
+
77
+ where "GI", "Self", "MH" denote gated interactive, self attention, and multi-head attention, respectively. The first $I$ in GI_MH(.) denotes query, the second $I$ denotes key and value. Further, the calculation of each head is expressed as:
78
+
79
+ $$
80
+ \operatorname {G I} _ {\mathbf {M H}} (I, I | g) = \left[ h d _ {1}, \dots , h d _ {h} \right] W _ {1}
81
+ $$
82
+
83
+ $$
84
+ h d _ {i} = \mathbf {G I} _ {-} \mathbf {A T} (I W _ {i} ^ {Q}, I W _ {i} ^ {K}, I W _ {i} ^ {V} | g W _ {i} ^ {G}) \tag {2}
85
+ $$
86
+
87
+ where $[.]$ denotes concatenation operation, $hd_{i}$ denotes the output of $i$ -th head, $W_{1} \in \mathbb{R}^{d \times d}$ , $W_{i}^{Q}, W_{i}^{K}, W_{i}^{V} \in \mathbb{R}^{d \times \frac{d}{h}}$ are trainable variables. "GI_AT" takes the signing style embedding into consideration and the process is as below:
88
+
89
+ $$
90
+ \operatorname {G I} _ {-} \operatorname {A T} (Q, K, V | s) = \operatorname {s o f t m a x} \left(\frac {Q ^ {\prime} K ^ {\prime} \mathbf {T}}{\sqrt {d _ {k}}}\right) V \tag {3}
91
+ $$
92
+
93
+ where we utilize $Q, K, V$ , and $s$ to denote $IW_{i}^{Q}$ , $IW_{i}^{K}$ , $IW_{i}^{V}$ , and $gW_{i}^{G}$ to save space. $Q'$ and $K'$ are the results of style-specific interaction with adaptive gated functions:
94
+
95
+ $$
96
+ Q ^ {'} = (1 + G _ {q}) \odot Q, \quad G _ {q} = \sigma ([ s, Q _ {\mathrm {M}}, s \odot Q _ {\mathrm {M}} ] W _ {q})
97
+ $$
98
+
99
+ $$
100
+ K ^ {\prime} = \left(1 + G _ {k}\right) \odot K, \quad G _ {k} = \sigma \left(\left[ s, K _ {\mathrm {M}}, s \odot K _ {\mathrm {M}} \right] W _ {k}\right) \tag {4}
101
+ $$
102
+
103
+ where $\odot$ denotes element-wise multiplication, $\sigma(.)$ denotes sigmoid gated function, the subscript of $K_{\mathbf{M}} \in \mathbb{R}^{\frac{d}{h}}$ and $Q_{\mathbf{M}} \in \mathbb{R}^{\frac{d}{h}}$ denotes mean-pooling, $W_{q}$ , $W_{k} \in \mathbb{R}^{\frac{3d}{h} \times \frac{d}{h}}$ are trainable variables. We employ residual connection and layer normalization following the self-attention layer:
104
+
105
+ $$
106
+ I ^ {\prime} = \operatorname {L N} (I + \operatorname {G I} _ {-} \operatorname {S e l f} (I)) \tag {5}
107
+ $$
108
+
109
+ where "LN" denotes layer normalization, followed by a feed-forward layer (FFN) to introduce nonlinear transformation:
110
+
111
+ $$
112
+ \operatorname {F F N} \left(I ^ {\prime}\right) = \operatorname {M a x} \left(0, I ^ {\prime} W _ {2} + b _ {2}\right) W _ {3} + b _ {3} \tag {6}
113
+ $$
114
+
115
+ $$
116
+ I ^ {\prime \prime} = \operatorname {L N} \left(I ^ {\prime} + \operatorname {F F N} \left(I ^ {\prime}\right)\right)
117
+ $$
118
+
119
+ where $W_{2}\in \mathbb{R}^{d\times 4d}$ $b_{2}\in \mathbb{R}^{4d}$ $W_{3}\in \mathbb{R}^{4d\times d}$ $b_{3}\in$ $\mathbb{R}^d$ are trainable variables, $I''\in \mathbb{R}^{T_i\times d}$ represents the encoded visual features.
120
+
121
+ # 3.2 Syntax-Aware Memory Enriched Decoder
122
+
123
+ The decoder also consists of stacked attention blocks as shown in Fig. 2. Note that the structures of syntactic and textual blocks are the same as those of encoder-decoder attention blocks. Specifically, to predict the word $y_{t_e}$ at $t_e$ -th time step, we utilize $E_{< t_e} \in \mathbb{R}^{t_e \times d}$ that denotes the embeddings of "BOS" token and the words whose time steps are less than $t_e$ . The process of the masked
124
+
125
+ ![](images/c11366a201d141753a152f692014d702bec3d704d60761540fb13e692516b3eb.jpg)
126
+ Figure 2: Left is the overall framework of PET, where the encoder processes extracted video features with stacked gated interactive self-attention blocks and the decoder makes full use of the visual features with encoder-decoder attention blocks. Note that the structures of syntactic and textual blocks are the same as those of encoder-decoder attention blocks. "TAG" and "EMB" denote POS tag and embedding, respectively. The multi-stream memory structure is leveraged for auxiliary decoding, where $v$ , $u$ , and $x$ denote visual, textual, and syntactic memory, respectively. Right is the structures of self-attention block and encoder-decoder attention block.
127
+
128
+ ![](images/1801820ff55067e96200e5095aa317cf1b737ad0ebd78ddb72bc2f73c6ff2d69.jpg)
129
+
130
+ ![](images/f74980a0a2b67f24f75cff0d290efd9389725b2b8a4f075d8f75b20402c261f1.jpg)
131
+
132
+ self-attention layer and the following normalization layer is formulated as:
133
+
134
+ $$
135
+ E _ {< t _ {e}} ^ {\prime} = \mathrm {L N} \left(E _ {< t _ {e}} + \mathrm {G I} \_ \text {S e l f} \left(E _ {< t _ {e}}\right)\right) \tag {7}
136
+ $$
137
+
138
+ where we also perform adaptive gated interaction for self-attention mechanism. The obtained $E_{< t_e}^{\prime}$ are utilized to correlate the encoded visual features in the following layer with cross-modal attention:
139
+
140
+ $$
141
+ \begin{array}{l} E _ {< t _ {e}} ^ {\prime \prime} = \mathrm {L N} \left(E _ {< t _ {e}} ^ {\prime} + \mathrm {G I} _ {-} \mathrm {M H} \left(E _ {< t _ {e}} ^ {\prime}, I ^ {\prime \prime} | g\right)\right) \tag {8} \\ O = \mathrm {L N} (E _ {< t _ {e}} ^ {\prime \prime} + \mathrm {F F N} (E _ {< t _ {e}} ^ {\prime \prime})) \\ \end{array}
142
+ $$
143
+
144
+ where $E_{< t_e}^{\prime}$ and $I''$ are treated as query and key, respectively. $O \in \mathbb{R}^{t_e \times d}$ denotes the output of one encoder-decoder attention block.
145
+
146
+ # 3.2.1 Syntax-Aware Decoding
147
+
148
+ Since the decoder has $N$ attention blocks, we distinguish the output of different blocks with superscripts, $O^1$ , $O^2,\dots,O^N\in \mathbb{R}^{t_e\times d}$ . Note that $O^{N - 1}$ and $O^N$ are the output of syntactic and textual blocks, respectively. We calculate the probability distributions of different POS tags as:
149
+
150
+ $$
151
+ P _ {s, t _ {e}} = \operatorname {s o f t m a x} \left(W _ {s} O _ {t _ {e}} ^ {N - 1}\right) \tag {9}
152
+ $$
153
+
154
+ where $W_{s} \in \mathbb{R}^{N_{s} \times d}$ is trainable, $N_{s}$ is the vocabulary size of POS tags. We combine the syntactic information and $O_{t_e}^{N-1}$ for the subsequent process. In
155
+
156
+ practice, we project the POS tags into corresponding embeddings: $\left(O_{t_e}^{N - 1}\right)' = O_{t_e}^{N - 1} + E_{t_e}^s$ , where $E_{t_e}^s$ denotes POS embedding at $t_e$ -th time step. The obtained synthetic representation $\left(O_{t_e}^{N - 1}\right)'$ is considered as the input of textual block. Due to the space limitation, we omit the calculation in textual block which is similar to Eqns. 7 and 8. The output of textual block is used to predict words:
157
+
158
+ $$
159
+ P _ {b, t _ {e}} = \operatorname {s o f t m a x} \left(W _ {p} O _ {t _ {e}} ^ {N}\right) \tag {10}
160
+ $$
161
+
162
+ where $W_{p}\in \mathbb{R}^{N_{w}\times d}$ is also trainable, $N_{w}$ is the vocabulary size of words. Overall, we jointly model the multimodal representation and global syntactic structure for sign language translation by developing an end-to-end trainable neural network.
163
+
164
+ # 3.2.2 Multi-Stream Memory Structure
165
+
166
+ We develop a multi-stream memory structure for auxiliary decoding. The rationale behind this design is that a word in the vocabulary may appear in multiple sign language videos. Since a word that comes up with different words may lead to various contextual visual perceptions and one word may correspond to more than one syntactic category, the memory structure is developed to capture the detailed relevant information from different sign language videos where the same word appears, leading to a comprehensive understanding for this word.
167
+
168
+ (1). Weakly-Aligned Visual Memory: The memory structure is developed to store the descriptive information for each word in the vocabulary. We
169
+
170
+ construct a dictionary $\langle w, r \rangle$ to record the words $w$ and corresponding representation $r$ . Since the fine-grained alignments between natural words and video frames are not provided, we could not directly obtain the visual memory. However, the end-to-end training of PET provides the weakly-supervised alignments through the cross-modal interaction in the encoder-decoder attention blocks. Therefore, we adopt a separate training scheme. Concretely, we first train a basic sign language translation model with prior knowledge enriched transformer introduced in previous sections to acquire the weakly-supervised alignments between words and video frames. In practice, we only keep the cross-modal attention weights in the textual block. The visual context information $v_{j,i}$ for the $j$ -th word $i$ -th head is modeled as:
171
+
172
+ $$
173
+ \begin{array}{l} v _ {j, i} = \frac {\sum_ {n _ {v} = 1} ^ {N _ {v}} \sum_ {n _ {f} = 1} ^ {N _ {f}} \left(a _ {n _ {v} , n _ {f}} ^ {i} f _ {n _ {v} , n _ {f}} ^ {v , i}\right)}{\sum_ {n _ {v} = 1} ^ {N _ {v}} \sum_ {n _ {f} = 1} ^ {N _ {f}} \left(a _ {n _ {v} , n _ {f}} ^ {i}\right)} \tag {11} \\ v _ {j} = \left[ v _ {j, 1}, \dots , v _ {j, i}, \dots , v _ {j, h} \right] \\ \end{array}
174
+ $$
175
+
176
+ where $N_{v}$ denotes the number of related videos in the training set, $N_{f}$ denotes the number of frames. Note that we only retain the top- $N_{f}$ relevant video frames to reduce the invalid information. $a_{n_v,n_f}^i$ denotes $n_f$ -th attention weight among the top- $N_{f}$ weights and $f_{n_v,n_f}^{v,i}$ denotes the corresponding visual features in $i$ -th head. Note that we only focus on the visual features of the last encoding block. The context features are normalized to make the magnitude consistent for words with different frequencies. The final context information $v_{j}$ is obtained by concatenating the results of all the heads. (2). Global Syntactic Memory: Considering the fact that a word appearing in multiple sentences may have different syntactic information, we calculate the ratio of different POS categories for each word. The syntactic representation $u_{j}$ for the $j$ -th word is modeled as:
177
+
178
+ $$
179
+ u _ {j} = \sum_ {n _ {s} = 1} ^ {N _ {s}} b _ {n _ {s}} ^ {s} f _ {n _ {s}} ^ {s}, \quad \sum_ {n _ {s} = 1} ^ {N _ {s}} b _ {n _ {s}} ^ {s} = 1 \tag {12}
180
+ $$
181
+
182
+ where $b_{n_s}^s$ and $f_{n_s}^s$ denote the weight and embedding of $n_s$ -th POS tag, respectively.
183
+
184
+ (3). Adjacent Textual Memory: The vanilla transformer-based decoder does not model the compatibility between adjacent words explicitly. Thus, the textual memory is designed to capture the information of adjacent words. Concretely, we set the
185
+
186
+ maximal adjacent step to $N_{a}$ , which means that we retain the word embeddings of adjacent words and the threshold is $N_{a}$ . The context representation $x_{j}$ for the $j$ -th word is modeled as:
187
+
188
+ $$
189
+ x _ {j} = \frac {\sum_ {n _ {v} = 1} ^ {N _ {v}} \sum_ {n _ {a} = 1} ^ {2 N _ {a} + 1} f _ {n _ {v} , n _ {a}} ^ {t}}{N _ {v} \left(2 N _ {a} + 1\right)} \tag {13}
190
+ $$
191
+
192
+ where $f_{n_v,n_a}^t$ denotes the $n_a$ -th word embedding among the $2N_{a} + 1$ adjacent embeddings. We also employ normalization for the final result. In summary, we obtain the multi-stream memory structure which records full-spectrum information $r_j$ for each word $w_j$ with a map structure: $\langle w_j,r_j\rangle = \langle w_j,\{v_j,u_j,x_j\} \rangle$ .
193
+
194
+ # 3.2.3 Memory Enriched Decoding
195
+
196
+ We employ the constructed multi-stream memory structure to build an auxiliary decoding system, where the translation results are further combined with the generated sentences by the syntax-aware decoding system. In this way, the translation quality is improved.
197
+
198
+ In detail, the memory enriched decoding system is built upon the backbone of the syntax-aware decoding system as an auxiliary module. The probability distributions of different words are calculated similarly to Eqn. 10:
199
+
200
+ $$
201
+ P _ {m, t _ {e}} = \operatorname {s o f t m a x} \left(Q _ {t _ {e}}\right) \tag {14}
202
+ $$
203
+
204
+ where $Q_{t_e} \in \mathbb{R}^{N_w}$ denotes the relevance scores of different words and $Q_{t_e,j} \in \mathbb{R}$ denotes the $j$ -th element among them. We employ $Q_{t_e,j}$ to measure the qualification of $j$ -th word for $t_e$ -th time step based on its memory contents:
205
+
206
+ $$
207
+ \begin{array}{l} Q _ {t _ {e}, j} = w _ {p} ^ {\mathbf {T}} \tanh \left(W _ {v} \left[ v _ {j}, O _ {t _ {e}} ^ {N} \right] + W _ {u} \left[ u _ {j}, E _ {t _ {e}} ^ {s} \right]\right) \tag {15} \\ \left. + W _ {x} \left[ x _ {j}, E _ {t _ {e ^ {- 1}}} ^ {y}\right)\right) \\ \end{array}
208
+ $$
209
+
210
+ where we concatenate the memory contents $(v_{j},u_{j}$ $x_{j})$ with corresponding representation $(O_{te}^{N},E_{te}^{s}$ $E_{te - 1}^y)$ at $t_e$ -th time step. For instance, $u_{j},E_{te}^{s}\in \mathbb{R}^{d}$ both denote syntactic information, $x_{j},E_{t e - 1}^{y}\in \mathbb{R}^{d}$ both denote textual information. $W_{v},W_{u},W_{x}\in$ $\mathbb{R}^{d\times 2d}$ $w_{p}\in \mathbb{R}^{d}$ are all trainable variables.
211
+
212
+ # 3.3 Training
213
+
214
+ The optimization goal of sign language translation is to minimize the cross-entropy loss function defined as accumulative loss from all the time steps. Consequently, the syntax-aware decoder is trained by minimizing the combined loss:
215
+
216
+ $$
217
+ L _ {b} = - \sum_ {t _ {e} = 1} ^ {T _ {e}} \left[ \log P _ {b, t _ {e}} \left(y _ {t _ {e}}\right) + \lambda \log P _ {s, t _ {e}} \left(s _ {t _ {e}}\right) \right] \tag {16}
218
+ $$
219
+
220
+ where $y_{t_e}$ and $s_{t_e}$ denote the ground-truth word and POS tag at $t_e$ -th time step, respectively. $\lambda$ is a hyper-parameter to balance the two losses. In practice, we set it to 0.5. The memory enriched decoder is trained in a similar way:
221
+
222
+ $$
223
+ L _ {m} = - \sum_ {t _ {e} = 1} ^ {T _ {e}} \log P _ {m, t _ {e}} \left(y _ {t _ {e}}\right) \tag {17}
224
+ $$
225
+
226
+ The syntax-aware decoder and memory enriched decoder are trained in order. We fix the trainable variables except for those in Eqn. 15 when training memory enriched decoder. During inference, we combine the generated results of both decoders.
227
+
228
+ # 4 Experiments
229
+
230
+ In this section, we present the experimental settings of sign language translation and report the results on the benchmark datasets.
231
+
232
+ Table 1: The statistical results of PHOENIX14T, where the total number of samples is 8257.
233
+
234
+ <table><tr><td>Signer</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td></tr><tr><td>All</td><td>2191</td><td>95</td><td>683</td><td>1207</td><td>1933</td><td>47</td><td>866</td><td>966</td><td>269</td></tr></table>
235
+
236
+ # 4.1 Dataset and Protocols
237
+
238
+ PHOENIX14T (Signer-Dependent) is the first complete sign language understanding dataset, where a training or testing sample contains a sign language video and the corresponding signer, gloss annotations, natural language translation. Concretely, PHOENIX14T is labeled by 9 different signers (the training, validation, and test sets all contain these signers) with a vocabulary of 1066 different sign glosses. In general, one gloss may correspond to multiple natural words, and some words that do not carry visual information are added to guarantee the fluency of sentences, leading to a vocabulary of 2887 words for translation into German language.
239
+
240
+ PHOENIX14T (Signer-Independent) is obtained by re-dividing the original PHOENIX14T dataset. Since the 9 signers are in both the training set and test set, there are no unseen signers for evaluating the generalization. We simply choose the
241
+
242
+ Table 2: Evaluation results on PHOENIX14T (Signer-Dependent), where B@{1, 2, 3, 4} denotes BLEU-{1, 2, 3, 4} and R denotes ROUGE-L.
243
+
244
+ <table><tr><td rowspan="2">Method</td><td colspan="5">PHOENIX14T</td></tr><tr><td>B@1</td><td>B@2</td><td>B@3</td><td>B@4</td><td>R</td></tr><tr><td>Multitask</td><td>37.22</td><td>23.88</td><td>17.08</td><td>13.25</td><td>36.28</td></tr><tr><td>DeepHand</td><td>38.50</td><td>25.64</td><td>18.59</td><td>14.56</td><td>38.05</td></tr><tr><td>Mul-Ch.</td><td>-</td><td>-</td><td>-</td><td>19.51</td><td>45.90</td></tr><tr><td>NSLT</td><td>32.24</td><td>19.03</td><td>12.83</td><td>9.58</td><td>31.80</td></tr><tr><td>TSPNet</td><td>36.10</td><td>23.12</td><td>16.88</td><td>13.41</td><td>34.96</td></tr><tr><td>SL-Trans.</td><td>47.20</td><td>34.46</td><td>26.75</td><td>21.80</td><td>-</td></tr><tr><td>ST-Trans.</td><td>48.61</td><td>35.97</td><td>28.37</td><td>23.65</td><td>-</td></tr><tr><td>STMC-T</td><td>48.73</td><td>36.53</td><td>29.03</td><td>24.00</td><td>46.77</td></tr><tr><td>PET</td><td>49.54</td><td>37.19</td><td>29.30</td><td>24.02</td><td>49.97</td></tr></table>
245
+
246
+ Table 3: Evaluation results on PHOENIX14T (Signer-Independent), where * denotes that we implement the methods by ourselves, since none of the previous work conducts experiments on signer-independent setting.
247
+
248
+ <table><tr><td rowspan="2">Method</td><td colspan="5">PHOENIX14T</td></tr><tr><td>B@1</td><td>B@2</td><td>B@3</td><td>B@4</td><td>R</td></tr><tr><td>NSLT*</td><td>26.01</td><td>13.84</td><td>8.95</td><td>6.28</td><td>25.22</td></tr><tr><td>TSPNet*</td><td>28.10</td><td>16.81</td><td>11.82</td><td>9.15</td><td>31.00</td></tr><tr><td>SL-Trans.*</td><td>40.15</td><td>26.70</td><td>19.22</td><td>14.78</td><td>40.22</td></tr><tr><td>PET</td><td>41.72</td><td>28.97</td><td>21.36</td><td>16.94</td><td>42.45</td></tr></table>
249
+
250
+ signers 8, 9 (1235 samples) for testing and the other signers (7022 samples) for training and validation, the statistical info is shown in Table 1.
251
+
252
+ We follow the commonly used protocol Sign2Text (S2T) in the previous work (Camgoz et al., 2020b), which aims to directly translate the sign language videos into natural sentences without converting the input into intermediate products. Since the visual and textual modalities are not aligned strictly in a weakly-supervised manner, the difficulties of Sign2Text mainly lie in the multimodal alignments.
253
+
254
+ # 4.2 Implementation Details
255
+
256
+ Framework: Following (Camgoz et al., 2020b), a modified version of JoeyNMT (Kreutzer et al., 2019) is employed to implement PET. We utilize PyTorch and Tensorflow frameworks. Except for the CTC beam search decoding module which is
257
+
258
+ Table 4: Evaluation results of style-specific interaction, where P14T (SD) and P14T (SI) denote PHOENIX14T with signer-dependent and singer-independent settings.
259
+
260
+ <table><tr><td rowspan="2">Method</td><td colspan="5">P14T (SD)</td><td colspan="5">P14T (SI)</td></tr><tr><td>B@1</td><td>B@2</td><td>B@3</td><td>B@4</td><td>R</td><td>B@1</td><td>B@2</td><td>B@3</td><td>B@4</td><td>R</td></tr><tr><td>w/o. GI</td><td>48.61</td><td>35.24</td><td>27.58</td><td>22.89</td><td>48.34</td><td>40.22</td><td>27.36</td><td>20.05</td><td>15.42</td><td>40.36</td></tr><tr><td>Add</td><td>49.04</td><td>36.05</td><td>28.32</td><td>23.40</td><td>48.88</td><td>40.91</td><td>28.19</td><td>20.65</td><td>16.36</td><td>40.76</td></tr><tr><td>Enc.</td><td>49.45</td><td>36.57</td><td>28.95</td><td>23.45</td><td>49.15</td><td>41.37</td><td>28.54</td><td>20.57</td><td>16.66</td><td>41.54</td></tr><tr><td>Dec.</td><td>49.30</td><td>36.32</td><td>28.84</td><td>23.42</td><td>49.08</td><td>41.43</td><td>28.52</td><td>20.89</td><td>16.72</td><td>41.28</td></tr><tr><td>PET</td><td>49.54</td><td>37.19</td><td>29.30</td><td>24.02</td><td>49.97</td><td>41.72</td><td>28.97</td><td>21.36</td><td>16.94</td><td>42.45</td></tr></table>
261
+
262
+ implemented with Tensorflow, the other modules are developed with PyTorch.
263
+
264
+ Network Details: The hidden size is set to 512 for all the multi-head attention mechanisms. The numbers of heads and attention blocks are 8 and 3, respectively. The ground-truth POS tags could be obtained by Stanford POS Tagger, which are divided into 13 categories: ADJ, ADV, ADP, VERB, NOUN, DET, PRON, AUX, CONJ, PROPN, NUM, UNK, PUNCT, we project them into 512-dimensional syntactic embeddings. We train all of the networks from scratch.
265
+
266
+ Training: In the training stage, we utilize Adam algorithm (Kingma and Ba, 2014) to optimize the loss function. The batch size is set to 64. The learning rate is set to $5 \times 10^{-4}$ initially. We evaluate our network every 100 iterations. If the metric on validation set does not improve for 9 evaluation steps, we decrease the learning rate by a factor of 0.5. When the learning rate is less than $10^{-6}$ , we finish the training stage.
267
+
268
+ Testing: Since the test set may have unseen signers, we calculate the style embedding with mean-pooling operation for the acquired visual features similarly. Beam search is a commonly used method to decode words during evaluation. We adopt the beam size 5. We employ the commonly-used metrics, BLEU-n and ROUGE-L.
269
+
270
+ # 4.3 Compared Baseline Methods
271
+
272
+ NSLT (Camgoz et al., 2018): NSLT first proposes the SLT task and employs LSTM-based structure to translate sign language videos.
273
+
274
+ Multitask (Orbay and Akarun, 2020): Multitask employs joint learning scheme to enhance the SLT performance.
275
+
276
+ DeepHand (Orbay and Akarun, 2020): DeepHand transfers the knowledge of hand dataset to the SLT task.
277
+
278
+ ![](images/cc80bfe4ab5917bf32ec2c292de845f1a7942db8eec47a0e6ca72ff0752a98dd.jpg)
279
+ Figure 3: The trade-off between different losses in Eqn. 16, where we set $\lambda = 0$ as the baseline.
280
+
281
+ SL-Trans. (Camgoz et al., 2020b): SL-Trans. is the recent mainstream method for SLT, the encoder and decoder both consist of Transformer modules. TSPNet (Li et al., 2020): TSPNet employs video segment representation with multiple temporal granularities to develop a semantic pyramid network.
282
+
283
+ Mul-Ch. (Camgoz et al., 2020a): Mul-Ch. combines multiple articulatory channels with anchoring losses and proposes a novel multi-channel transformer architecture for sign language translation.
284
+
285
+ ST-Trans. (Voskou et al., 2021): ST-Trans. equips Transformer with stochastically competing linear units and performs variational Bayesian inference over all connection weights, throughout the network.
286
+
287
+ STMC-T (Yin and Read, 2020): STMC-T employs spatial-temporal multi-channel Transformer to solve the SLT task.
288
+
289
+ # 4.4 Quantitative Results
290
+
291
+ We compare PET with the recent state-of-the-art methods. Following the previous work (Camgoz et al., 2020b), for PHOENIX14T (Signer-Dependent), we develop the gloss-based PET by
292
+
293
+ Table 5: Evaluation of memory-enriched decoding
294
+
295
+ <table><tr><td rowspan="2">Method</td><td colspan="5">P14T (SD)</td><td colspan="5">P14T (SI)</td></tr><tr><td>B@1</td><td>B@2</td><td>B@3</td><td>B@4</td><td>R</td><td>B@1</td><td>B@2</td><td>B@3</td><td>B@4</td><td>R</td></tr><tr><td>w/o. Vis</td><td>49.63</td><td>36.28</td><td>28.58</td><td>23.40</td><td>49.32</td><td>41.24</td><td>28.35</td><td>20.89</td><td>16.30</td><td>41.46</td></tr><tr><td>w/o. Tex</td><td>49.52</td><td>36.54</td><td>28.83</td><td>23.44</td><td>49.12</td><td>41.05</td><td>28.16</td><td>20.74</td><td>16.44</td><td>40.93</td></tr><tr><td>w/o. Syn</td><td>49.69</td><td>36.42</td><td>28.75</td><td>23.55</td><td>49.48</td><td>41.58</td><td>28.55</td><td>21.07</td><td>16.64</td><td>41.32</td></tr><tr><td>w/o. Mem</td><td>48.94</td><td>35.64</td><td>28.07</td><td>22.71</td><td>49.05</td><td>40.54</td><td>27.53</td><td>20.25</td><td>15.56</td><td>40.64</td></tr><tr><td>PET</td><td>49.54</td><td>37.19</td><td>29.30</td><td>24.02</td><td>49.97</td><td>41.72</td><td>28.97</td><td>21.36</td><td>16.94</td><td>42.45</td></tr></table>
296
+
297
+ adding the gloss supervision with CTC loss in the encoder. Table 2 shows the experimental results, we could find that PET (model-based) outperforms all the model-based and feature-based methods, NSLT (Camgoz et al., 2018), Multitask (Orbay and Akarun, 2020), DeepHand (Orbay and Akarun, 2020), SL-Trans. (Camgoz et al., 2020b), TSPNet (Li et al., 2020), Mul-Ch. (Camgoz et al., 2020a), ST-Trans. (Voskou et al., 2021) and STMC-T (Yin and Read, 2020) on all the metrics. In particular, PET achieves $49.97\%$ on ROUGE-L, making a large improvement of $3.20\%$ over STMC-T.
298
+
299
+ Table 3 shows the results on PHOENIX14T (Signer-Independent), we implement several state-of-the-art methods manually, since none of the previous work conducts experiments on the signer-independent setting (PET is model-based method, so we mainly reproduce the model-based methods, since the methods of other types are compatible with PET). Note that, to keep fairness, we employ the same method of feature extraction in the original paper for NSLT, TSPNet, and SL-Transformer, respectively. The experimental results demonstrate the generalization of PET for unseen signers.
300
+
301
+ # 4.5 Ablation Study
302
+
303
+ In this section, we evaluate the effectiveness of all the contributions with ablation experiments.
304
+
305
+ # 4.5.1 Effect of Adaptive Gated Interaction
306
+
307
+ As shown in Table 4, we design four control experiments to demonstrate the effectiveness of adaptive gated interaction, where w/o. GI denotes that we remove the adaptive gated interaction from all attention blocks and keep the other contributions, Add denotes that we add the style embedding to the multimodal features, Enc (only) denotes that we only keep the adaptive gated interaction in the encoder, while Dec (only) denotes that we discard the adaptive gated interaction in the encoder. It
308
+
309
+ is observed that PET outperforms four ablation methods on the benchmark datasets and w/o. GI achieves the worst performances on both BLEU and ROUGE-L, which demonstrates that the translation results benefit from the style information. The remaining ablation results illustrate that gated interaction is better than naive addition. In addition, the adaptive gated interaction enhances the multimodal alignments, corresponding results are shown in the appendix.
310
+
311
+ # 4.5.2 Effect of Syntax-Aware Auxiliary
312
+
313
+ We adjust the ratio of different losses in Eqn. 16 and obtain the experimental results that are shown in Fig. 3. To make the comparison more intuitive, we set $\lambda = 0$ as the baseline and provide the relative performances of BLEU-1 and BLEU-4 on PHOENIX14T (SD). We find that the performances improve as the $\lambda$ increases when $\lambda$ is less than 0.5. Subsequently, the performances are beginning to level off. Such results demonstrate the effectiveness of syntax-aware auxiliary.
314
+
315
+ # 4.5.3 Effect of Memory-Enriched Decoding
316
+
317
+ As shown in Table 5, we also design several control experiments to evaluate the impact of the memory enriched decoding, where w/o. Mem denotes the model without memory mechanism, w/o. Vis denotes the model only without visual memory, w/o. Tex, w/o. Syn denote the models without textual memory and syntactic memory, respectively. We find that PET outperforms all the ablation methods on both BLEU-4 and ROUGE-L. Particularly, compared with w/o. Mem, PET achieves a significant improvement on BLEU-4 (1.38% for SI, 1.31% for SD).
318
+
319
+ # 4.6 Qualitative Results
320
+
321
+ We would like to investigate the generation process of our model by qualitative results in this section.
322
+
323
+ Table 6: Qualitative results of PET, where “Ref” denotes reference, “SL-Trans.” denotes SL-Transformer. As the annotations in the PHOENIX14T dataset are in German, we share both the produced sentences and their translations in English. Note that the words highlighted in red are those that require critical translation, the words highlighted in blue are the failure cases of current mainstream method SL-Transformer.
324
+
325
+ <table><tr><td>Ref:</td><td>und zum wochenende wird es dann soccer wieder ein bisschen kälter .</td></tr><tr><td>SL-Trans.:</td><td>( and at the weekend it even gets a little colder again . )</td></tr><tr><td rowspan="4">PET:</td><td>und der januar .</td></tr><tr><td>( and january . )</td></tr><tr><td>und das wird dann am wochenende ein bisschen kälter .</td></tr><tr><td>( and that gets a bit colder on the weekend . )</td></tr><tr><td>Ref:</td><td>ganz ähnliche temperaten wie heute zwischen sechs und elf grad .</td></tr><tr><td rowspan="3">SL-Trans.:</td><td>( very similar temperatures as today between six and eleven degrees . )</td></tr><tr><td>hier und da ähnliche temperaten wie heute meist ein grad .</td></tr><tr><td>( here and there temperatures similar to today, mostly one degree . )</td></tr><tr><td rowspan="2">PET:</td><td>ähnliches wetter heute nacht nur sechs bis elf grad .</td></tr><tr><td>( similar weather tonight only six to eleven degrees . )</td></tr><tr><td>Ref:</td><td>deutschland liegt morgen unter hochdruckeinfluss der die wolken weltgehend vertreibt .</td></tr><tr><td rowspan="3">SL-Trans.:</td><td>( tomorrow germany will be under the influence of high pressure which will largely drive away the clouds . )</td></tr><tr><td>in Deutschland liegt morgen unter tiefdruckeinfluss und wolken .</td></tr><tr><td>( in germany tomorrow is under the influence of low pressure and clouds . )</td></tr><tr><td rowspan="2">PET:</td><td>Morgen wird Deutschland von hohem Druck betroffen sein .</td></tr><tr><td>( tomorrow germany will be hit by high pressure . )</td></tr></table>
326
+
327
+ Here we provide some sign language translation examples in Table 6. As the annotations in the PHOENIX14T dataset are in German, we share both the produced sentences and their translations in English. Note that the words highlighted in red are those that require critical translation, the words highlighted in blue are the failure cases of current mainstream method SL-Transformer. Benefiting from the style-specific interaction, syntax-aware auxiliary, and memory enriched decoding, PET could accurately translate some detailed information compared with SL-Transformer and retain the whole contents of the ground truth better than SL-Transformer, which demonstrates the effectiveness again.
328
+
329
+ # 5 Conclusion
330
+
331
+ In this paper, we have proposed a new method called prior knowledge and memory enriched transformer for sign language translation. Specifically, we develop the adaptive gated interaction which associates the multimodal representation and global signing style in all the attention blocks. One POS sequence generator relies on the associated information to predict the global syntactic structure, which is thereafter leveraged to guide the sentence generation. Besides, considering that the visual and textual context information, and additional auxiliary knowledge of a word appear in more than one
332
+
333
+ video, we design a memory structure to store the full-spectrum correspondence between a word and its various relevant information in the training data. The experimental results reveal the effectiveness and generalization of PET.
334
+
335
+ # Acknowledgments
336
+
337
+ This work was supported in part by the National Key R&D Program of China under Grant No.2020YFC0832505, National Natural Science Foundation of China under Grant No.61836002, No.62072397 and Zhejiang Natural Science Foundation under Grant LR19F020006.
338
+
339
+ # References
340
+
341
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473.
342
+ Necati Cihan Camgoz, Simon Hadfield, Oscar Koller, and Richard Bowden. 2017. Subunets: End-to-end hand shape and continuous sign language recognition. In 2017 IEEE International Conference on Computer Vision (ICCV), pages 3075-3084. IEEE.
343
+ Necati Cihan Camgoz, Simon Hadfield, Oscar Koller, Hermann Ney, and Richard Bowden. 2018. Neural sign language translation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7784-7793.
344
+ Necati Cihan Camgoz, Ahmet Alp Kindirouglu, and Lale Akarun. 2016. Sign language recognition for assisting the deaf in hospitals. In International Workshop on Human Behavior Understanding, pages 89-101. Springer.
345
+ Necati Cihan Camgoz, Oscar Koller, Simon Hadfield, and Richard Bowden. 2020a. Multi-channel transformers for multi-articulatory sign language translation. In European Conference on Computer Vision, pages 301-319. Springer.
346
+ Necati Cihan Camgoz, Oscar Koller, Simon Hadfield, and Richard Bowden. 2020b. Sign language transformers: Joint end-to-end sign language recognition and translation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10023-10033.
347
+ Runpeng Cui, Hu Liu, and Changshui Zhang. 2017. Recurrent convolutional neural networks for continuous sign language recognition by staged optimization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7361-7369.
348
+ Runpeng Cui, Hu Liu, and Changshui Zhang. 2019. A deep neural framework for continuous sign language
349
+
350
+ recognition by iterative training. IEEE Transactions on Multimedia, 21(7):1880-1891.
351
+ Alex Graves, Santiago Fernández, Faustino Gomez, and Jürgen Schmidhuber. 2006. Connectionist temporal classification: labelling unsegmented sequence data with recurrent neural networks. In Proceedings of the 23rd international conference on Machine learning, pages 369-376.
352
+ Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735-1780.
353
+ Tao Jin, Siyu Huang, Ming Chen, Yingming Li, and Zhongfei Zhang. 2020. Sbat: Video captioning with sparse boundary-aware transformer. arXiv preprint arXiv:2007.11888.
354
+ Tao Jin, Siyu Huang, Yingming Li, and Zhongfei Zhang. 2019a. Low-rank hoca: Efficient high-order cross-modal attention for video captioning. arXiv preprint arXiv:1911.00212.
355
+ Tao Jin, Yingming Li, and Zhongfei Zhang. 2019b. Recurrent convolutional video captioning with global and local attention. Neurocomputing, 370:118-127.
356
+ Tao Jin and Zhou Zhao. 2021. Contrastive disentangled meta-learning for signer-independent sign language translation. In Proceedings of the 29th ACM International Conference on Multimedia, pages 5065-5073.
357
+ Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.
358
+ Oscar Koller, Necati Cihan Camgoz, Hermann Ney, and Richard Bowden. 2019. Weakly supervised learning with multi-stream cnn-lstm-hmms to discover sequential parallelism in sign language videos. IEEE transactions on pattern analysis and machine intelligence, 42(9):2306-2320.
359
+ Julia Kreutzer, Jasmijn Bastings, and Stefan Riezler. 2019. Joey nmt: A minimalist nmt toolkit for novices. arXiv preprint arXiv:1907.12484.
360
+ Dongxu Li, Chenchen Xu, Xin Yu, Kaihao Zhang, Ben Swift, Hanna Suominen, and Hongdong Li. 2020. Tspnet: Hierarchical feature learning via temporal semantic pyramid for sign language translation. arXiv preprint arXiv:2010.05468.
361
+ Minh-Thang Luong, Hieu Pham, and Christopher D. Manning. 2015. Effective approaches to attention-based neural machine translation. arXiv preprint arXiv:1508.04025.
362
+ Alptekin Orbay and Lale Akarun. 2020. Neural sign language translation by learning tokenization. arXiv preprint arXiv:2002.00479.
363
+ Wenjie Pei, Jiyuan Zhang, Xiangrong Wang, Lei Ke, Xiaoyong Shen, and Yu-Wing Tai. 2019. Memory-attended recurrent network for video captioning. In
364
+
365
+ Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8347-8356.
366
+ Mingxing Tan and Quoc Le. 2019. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning, pages 6105-6114. PMLR.
367
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. arXiv preprint arXiv:1706.03762.
368
+ Andreas Voskou, Konstantinos P Panousis, Dimitrios Kosmopoulos, Dimitris N Metaxas, and Sotirios Chatzis. 2021. Stochastic transformer networks with linear competing units: Application to end-to-end sl translation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 11946-11955.
369
+ Shuo Wang, Dan Guo, Wen-gang Zhou, Zheng-Jun Zha, and Meng Wang. 2018. Connectionist temporal fusion for sign language translation. In Proceedings of the 26th ACM international conference on Multimedia, pages 1483-1491.
370
+ Kayo Yin and Jesse Read. 2020. Better sign language translation with stmc-transformer. arXiv preprint arXiv:2004.00588.
priorknowledgeandmemoryenrichedtransformerforsignlanguagetranslation/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2ee3627ec26a65d5c631f9af8926ae0ffe7931e820ae4054df6b529a3ca74c0
3
+ size 509604
priorknowledgeandmemoryenrichedtransformerforsignlanguagetranslation/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d84837c9a2c59ff1ced445404acce9774d893c13a52a641f4d812f82c06c8373
3
+ size 386714
probingbertspriorswithserialreproductionchains/ad47dabe-c438-4db3-8161-7747579ccc7a_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8991c6ebe382a7879937bfa6614db9b15b708d39e308d78323ce1eb94bffd9ef
3
+ size 82403
probingbertspriorswithserialreproductionchains/ad47dabe-c438-4db3-8161-7747579ccc7a_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1aa3f7d78b266cb712517d95aecc00cc7c9095e02481eec8abf650fb296a6fd8
3
+ size 101793
probingbertspriorswithserialreproductionchains/ad47dabe-c438-4db3-8161-7747579ccc7a_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7cd4c087305e471e19605a8cc1d097db38b201ddeb2e3183347148efcaf66b9e
3
+ size 3629584
probingbertspriorswithserialreproductionchains/full.md ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Probing BERT's priors with serial reproduction chains
2
+
3
+ Takateru Yamakoshi $^{1,2}$ , Thomas L. Griffiths $^{1}$ , Robert D. Hawkins $^{1}$
4
+
5
+ <sup>1</sup>Princeton University, <sup>2</sup>The University of Tokyo
6
+
7
+ {takateru,tomg,rdhawkins}@princeton.edu
8
+
9
+ # Abstract
10
+
11
+ Sampling is a promising bottom-up method for exposing what generative models have learned about language, but it remains unclear how to generate representative samples from popular masked language models (MLMs) like BERT. The MLM objective yields a dependency network with no guarantee of consistent conditional distributions, posing a problem for naive approaches. Drawing from theories of iterated learning in cognitive science, we explore the use of serial reproduction chains to sample from BERT's priors. In particular, we observe that a unique and consistent estimator of the ground-truth joint distribution is given by a Generative Stochastic Network (GSN) sampler, which randomly selects which token to mask and reconstruct on each step. We show that the lexical and syntactic statistics of sentences from GSN chains closely match the ground-truth corpus distribution and perform better than other methods in a large corpus of naturalness judgments. Our findings establish a firmer theoretical foundation for bottom-up probing and highlight richer deviations from human priors<sup>1</sup>.
12
+
13
+ # 1 Introduction
14
+
15
+ Large neural language models have become the representational backbone of natural language processing. By learning to predict words from their context, these models have induced surprisingly human-like linguistic knowledge, from syntactic structure (Linzen and Baroni, 2021; Tenney et al., 2019; Warstadt et al., 2019) and subtle lexical biases (Hawkins et al., 2020) to more insidious social biases and stereotypes (Caliskan et al., 2017; Garg et al., 2018). At the same time, efforts to probe these models have revealed significant deviations from natural language (Braverman et al., 2020; Holtzman et al., 2019; Dasgupta et al., 2020).
16
+
17
+ food was running short, and winters were colder. time was running short, and winters were colder. time was running out, and winters were colder.
18
+
19
+ ![](images/8a27d426582ab88f7b4d99609fce97028b87ca047678c6bbf60fe96faba9ca83.jpg)
20
+ Figure 1: We use a serial reproduction method to probe BERT's prior over possible sentences (visualization of reproduction chains obtained by running t-sne on sentence embeddings; chains are color-coded and fade to black across their burn-in period).
21
+
22
+ Observations of incoherent or "weird" behavior may often be amusing, as when a generated recipe begins with "1/4 pounds of bones or fresh bread" (Shane, 2019), but also pose significant dangers in real-world settings (Bender et al., 2021).
23
+
24
+ These deviations present a core theoretical and methodological puzzle for computational linguistics. How do we elicit and characterize the full prior² that a particular model has learned over possible sentences in a language? A dominant approach has been to design benchmark suites that
25
+
26
+ <table><tr><td colspan="2">Type of unnaturalness</td><td>Example</td></tr><tr><td>word-level</td><td>morphological</td><td>Higher education school xur divided into six institutions.</td></tr><tr><td rowspan="5">phrase-level</td><td>syntactic</td><td>Swallowing hard, Verity stared at the these, desperately wanting to see if they congealed.</td></tr><tr><td rowspan="2">semantic</td><td>The west section is a fig octagon.</td></tr><tr><td>A private apartment with nothing but hot cooled water.</td></tr><tr><td rowspan="2">predication</td><td>He already costumes his relationship with my mother carefully.</td></tr><tr><td>Voices rapped on the incremental door.</td></tr><tr><td rowspan="4">sentence-level</td><td>out-of-context</td><td>Like a cataract, Horatius responds, “You are better than me.”</td></tr><tr><td>self-contradictory</td><td>The newspaper is published weekly and biannually.</td></tr><tr><td rowspan="2">pragmatic</td><td>She grew up with three sisters and ten sisters.</td></tr><tr><td>It should apply between the extreme and the extreme.</td></tr></table>
27
+
28
+ Table 1: Examples of sentences sampled from BERT's prior that received low naturalness ratings from our participants, including sources forms of unnaturalness like predicability or category errors (e.g. doors typically do not have the property of "incrementality"), semantic incoherence ("hot cooled water"), or contradictory constructions (especially for longer sentences). More examples can be found in table S2 and in the online supplement.
29
+
30
+ probe theoretically important aspects of the prior, and compare model behavior to human behavior on those tasks (e.g. Warstadt et al., 2020; Ettinger, 2020). Yet this approach can be restrictive and piecemeal: it is not clear ahead of time which tasks will be most diagnostic, and many sources of "weirdness" are not easily operationalized (Kuribayashi et al., 2021).
31
+
32
+ A more holistic, bottom-up alternative is to directly examine samples from the model's prior and compare them against those from human priors. However, many successful models do not explicitly expose this distribution, and many generation methods optimize the "best" sentences rather than theoretically meaningful or representative ones. For example, masked language models (MLMs) like BERT (Devlin et al., 2018) are dependency networks (Heckerman et al., 2000; Toutanova et al., 2003), trained to efficiently learn an independent collection of conditional distributions without enforcing consistency between them. In other words, these conditionals may not correspond to any coherent joint distribution at all, leading recent work to focus on other score-based sampling objectives (Goyal et al., 2021).
33
+
34
+ Here, we explore the use of serial reproduction chains (see Fig. 1) to overcome these challenges. While a naive (pseudo-)Gibbs sampler is indeed problematic for MLMs, the literature on Generative Stochastic Networks (GSNs; Bengio et al., 2014) has formally shown that a simple algorithmic variant we call GSN sampling produces a stationary distribution that is, in fact, a unique and consis
35
+
36
+ tent estimator of the ground-truth joint distribution. Furthermore, while the independent conditionals learned by dependency networks may be arbitrarily inconsistent in theory, empirical work has found that these deviations tend to be negligible in practice, especially on larger datasets (Heckerman et al., 2000; Neville and Jensen, 2007). Thus, we argue that it is both theoretically and empirically justified to take these samples as uniquely representative of the model's prior over language.
37
+
38
+ We begin in Section 2 by introducing the serial reproduction approach and clarifying the problem of re-constructing a joint distribution from a dependency network. We then validate that our chains are well-behaved (Section 3) and compare the statistics of samples from BERT's prior to the lexical and syntactic statistics of its ground-truth training corpus to measure distributional similarity (Section 4). Finally, in Section 5, we present a large-scale behavioral study eliciting naturalness judgments from human speakers and identify features of the generated sentences which most strongly predict human ratings of "weirdness" (see Table 1). We find that GSN samples closely approximate the ground-truth distribution and are judged to be more natural than other methods, while also revealing areas of improvement that have been difficult to quantify with top-down benchmarks.
39
+
40
+ # 2 Approach
41
+
42
+ # 2.1 Serial reproduction
43
+
44
+ Our approach is inspired by serial reproduction games like Telephone, where an initial message is
45
+
46
+ ![](images/5d4aa79b79fa2c9e40e7da1b504b865be701e479e8d760a397e1d97306a9d6c5.jpg)
47
+ LM Bayes net (acyclic)
48
+
49
+ ![](images/9605c42d5c91e86fff0d84396face9cb06c3d9200a0f27d700ac4028185bd659.jpg)
50
+ MLM dependency net (cyclic)
51
+ Figure 2: While autoregressive language models (LMs) are Bayes nets, masked language models (MLMs) are dependency networks with cyclic dependencies.
52
+
53
+ gradually relayed along a chain from one speaker to the next. At each step, the message is changed subtly as a result of noisy transmission and reconstruction, and the final version of the message often differs drastically from the first. This serial reproduction method, initially introduced to psychology by Bartlett (1932), has become an invaluable tool for revealing human inductive biases (Xu and Griffiths, 2010; Langlois et al., 2021; Sanborn et al., 2010; Harrison et al., 2020). Because reconstructing a noisy message is guided by the listener's prior expectations, such chains eventually converge to a stationary distribution that is equivalent to the population's prior, reflecting what people expect others to say (Kalish et al., 2007; Griffiths and Kalish, 2007; Beppu and Griffiths, 2009). For example, Meylan et al. (2021) recently evaluated the ability of neural language models to predict the changes made to sentences by human participants at each step of a serial reproduction chain. Thus, while serial reproduction is commonly used to probe human priors, and to compare models against human data, it is not yet in wide use for probing the models themselves.
54
+
55
+ # 2.2 BERT as a dependency network
56
+
57
+ There has been considerable confusion in the recent literature over how to interpret the MLM objective used to train models like BERT, and how to interpret samples from such models. Wang and Cho (2019) initially observed that BERT was a Markov Random Field (MRF) and proposed a Gibbs sampler that iteratively masks and reconstructs different sites $k$ by sampling from the conditional given the tokens at all other sites $\hat{P}(w_k | w_{-k})$ . As observed by Goyal et al. (2021), however, this procedure does not actually correspond to inference in the MRF. Unlike auto-regression language models (LMs) like GPT-3 (Brown et al., 2020), which define an acyclic dependency graph (or Bayes net)
58
+
59
+ from left-to-right, MLMs have cyclic dependencies (see Fig. 2) and are therefore usefully interpreted as dependency networks rather than Bayes networks (Heckerman et al., 2000). Because dependency networks estimate independent conditionals, there is no guarantee that these conditionals are consistent (i.e. they may violate Bayes rule) and therefore do not represent a coherent joint distribution.
60
+
61
+ Still, it is possible to re-construct a joint distributions from these conditionals. For example, Heckerman et al. (2000) proved that if sites are visited in a fixed order, a (pseudo-)Gibbs chain similar to the one used by Wang and Cho (2019) does converge to a stationary distribution that is a well-formed joint. The problem is that different orders may yield different joint distributions, making it difficult to interpret any distributions as definitive. This ambiguity was resolved by the Generative Stochastic Network framework proposed by Bengio et al. (2014). Instead of visiting sites in a fixed order, a GSN sampler randomly chooses which site to visit at each step (with replacement), thus preserving aperiodicity and ergodicity. Specifically, this algorithm begins by initializing with a sequence $\{w_1^0,\dots ,w_n^0\}$ . At each step $t$ of the chain, we randomly choose a site $k\in 1,\ldots ,n$ to mask out, and we sample a new value $w_{k}^{t + 1}$ from the conditional distribution $P(w_{k}|w_{-k}^{t})$ with the other $n - 1$ sites fixed.
62
+
63
+ A key theorem of Bengio et al. (2013, 2014) proves that the stationary distribution arising from the GSN sampler defines a unique joint distribution, and furthermore, this stationary distribution is a consistent estimator of the ground-truth joint distribution<sup>3</sup>. Importantly, this stationary distribution differs from the one given by the Metropolis-Hastings (MH) approach suggested by Goyal et al. (2021), which uses the GSN sampler as a proposal distribution but accepts or rejects proposals based on an energy-based pseudo-likelihood defined by the sum of the conditional scores at each location (Salazar et al., 2020). This MH sampler instead converges to an implicit stationary distribution defined by the energy objective<sup>4</sup>.
64
+
65
+ # 2.3 Mixture kernels
66
+
67
+ In practice, Markov chain sampling methods have many failure modes. Most prominently, because samples in the chains are not independent, it is challenging to guarantee convergence to a stationary distribution, and the chain is easily "stuck" in local regions of the sample space (Gelman et al., 1992). Typically, samples from a burn-in period (e.g. the first $m$ epochs) are discarded to reduce dependence on the initial state, and a lag between samples (e.g. recording only every $l$ epochs) is introduced to reduce auto-correlation. However, the problem is particularly severe for language models like BERT where there are strong mutual dependencies between words at different sites. For example, once the chain reaches a tri-gram like 'Papua New Guinea', it is unlikely to change any single word while keeping the other words constant. To ensure ergodicity, we use a mixture kernel introducing a small constant probability ( $\epsilon = 0.001$ ) of returning to the initial distribution of [MASK] tokens on each epoch, allowing the chain to burn in again.
68
+
69
+ # 3 Validating the stationary distribution
70
+
71
+ In this section, we validate that the samples produced by our serial reproduction method are representative of the stationary prior distribution. More specifically, we consider two basic properties of the chain: convergence and independence. For these analyses, we consider samples from the pretrained bert-base-uncased model with 12 layers, 12 heads, and 110M parameters<sup>5</sup>.
72
+
73
+ # 3.1 Convergence
74
+
75
+ We begin by checking the convergence time for chains generated by GSN sampling. Theoretical bounds derived for serial reproduction chains give a convergence time of $n \log n$ , where $n$ is the number of sites (see Rafferty et al., 2014). To check these convergence bounds in practice, we set $n = 21$ and select 20 sentences from Wikipedia to serve as initial states, and run 10 chains initialized at each sentence. We ensured that half of these sentences have high initial probability (under BERT's energy score) and half have low initial probability. We find that these distributions indeed begin to quickly mix in probability (see Figure S1). Because longer sentences may require a longer burn-in time, we conservatively set our burn-in window to $m = 1000$ epochs for our subsequent experiments.
76
+
77
+ # 3.2 Independence
78
+
79
+ Second, we want to roughly ensure independence of samples, so that the statistics of our distribution of samples isn't simply reflecting auto-correlation in the chain. For a worst-case analysis of a local minimum, suppose $P(w_{i}|w_{-i}) < \delta$ ( $0 < \delta < 1$ ) for all $i \in [1,\dots ,k]$ , where $k$ is the sentence length in tokens. Then the probability of re-sampling the same sentence is roughly $< \delta^{k\cdot n}$ after $n$ epochs. We can solve for the number of epochs $n$ we need to bound the probability of re-sampling the exact same sentence under $\epsilon$ for a given worst-case $\delta$ . For example, if $\delta = 0.99$ and we want to ensure that the probability of re-sampling the same sentence is below a threshold $\epsilon = 0.01$ , then $n = 47$ epochs will likely suffice. Ensuring complete turnover in the worst case scenario requires much longer lags, i.e. $[1 - (1 - \delta)^{k}]^{n} < \epsilon$ .
80
+
81
+ To evaluate the extent to which these cases arise in practice, we examine auto-correlation rates on longer chains (50,000 epochs). We calculate correlations between the energy scores at each epoch as a proxy for the state: when the chain gets stuck re-sampling the same sentence, the same scores appear repeatedly. We find that auto-correlation is generally high, but our mixture kernel prevents the worst local minima for both the MH chain (Goyal et al., 2021) and our GSN chain (see Fig. S2), although we still found higher auto-correlation rates for the MH chain. To further examine these minima, we examined edit rates: the number of changes made to the sentence within an epoch. Without the mixture kernel, we observe long regions of consistently low edit rates (e.g. in some cases, 5000 epochs in a row of exactly the same sentence) which disappear under the mixture kernel (see Fig. S3).
82
+
83
+ Based on these observations, we set the lag to $l = 500$ epochs to maintain relatively high independence between samples.
84
+
85
+ # 4 Distributional comparisons
86
+
87
+ In this section, we examine the extent to which higher-order statistics of sentences from BERT's prior are well-calibrated to the data it was trained on. This kind of comparison provides a richer sense of what the model has learned or failed to learn than traditional scalar metrics like perplexity (Takahashi and Tanaka-Ishii, 2017; Meister and Cotterell, 2021; Takahashi and Tanaka-Ishii, 2019; Pillutla et al., 2021).
88
+
89
+ ![](images/a9954f3f32e0493230a62966ceb18a240b4d50b1acba0fc4021cb3b9e77ce46f.jpg)
90
+ Figure 3: The lexical frequencies of our GSN samples (A) closely match the Zipfian distribution of the corpus and (B) closely correlate with the corresponding frequencies of the corpus distribution.
91
+
92
+ ![](images/1ab8a362bc423a3a49ac0d8693b86de445afe0ddd993785441eb5ba6f1da14a1.jpg)
93
+
94
+ # 4.1 Corpus preparation
95
+
96
+ The version of BERT we analyzed in the previous section was trained on a combination of two corpora: Wikipedia and BookCorpus. In order to make valid comparisons between human priors and machine priors, we needed to closely match BERT-generated sentences with a comparable subset of human-generated sentences from these combined corpora. There are two technical challenges we must overcome to ensure comparable samples, concerning the sentencizer and tokenizer steps.
97
+
98
+ First, because our unit of comparison is the sentence, we needed to control for any artifacts that may be induced by how we determine what sentences are (e.g. if our Wikipedia sentences were systematically split on abbreviations, skewing the distribution toward fragments). We therefore applied the same punkt sentencizer to create our distribution of Wikipedia sentences and to check our BERT samples for cases where the generated sequence contained multiple sentences or ended with a colon or semicolon.
99
+
100
+ Second, we needed a tokenizer that equates sentence length. Because bi-directional models like BERT operate over sequences of fixed length, all samples drawn from a single chain have the same number of tokens.
101
+
102
+ Critically, however, BERT chains are defined over sequences of WordPiece tokens, so once these sequences are decoded back into natural language text, they may yield sentences of varying length,
103
+
104
+ depending on how the sub-word elements are combined together $^6$ (see Fig. S5). We solve this alignment problem by using the WordPiece tokenizer to extract sentences of fixed sub-word token length from our text corpora, yielding equivalence classes of corpus sentences that are all tokenized to the same number of WordPiece tokens. We ran GSN and MH chains over sentences of $n = 11$ tokens, representing the modal lengths of sentences in BookCorpus (see Fig. S4). We obtained 5,000 independent sentences from each sampling method after applying our conservative burn-in and lag, and combined the Wikipedia and BookCorpus sentences together into a single corpus that is representative of BERT's training regime.
105
+
106
+ # 4.2 Lexical distributions
107
+
108
+ We begin by comparing the lexical frequency statistics of our samples from BERT against the ground-truth corpus statistics. First, we note that the relationship between rank and frequency of tokens in the GSN sampling matches the Zipfian distribution of its training corpus better than those produced by MH sampling (see Fig. 3A). However, it is possible to produce the same overall distribution without
109
+
110
+ ![](images/0019cb3d87ae63767a4e41ddab6ea15aa3c7225956a6abc9c38aaa1d526c6750.jpg)
111
+ Figure 4: The relative frequencies of different parts of speech (left) and dependencies (right) in the ground-truth training corpora closely matched for GSN samples. In all cases, the GSN frequencies fell closer to the ground-truth than the MH frequencies.
112
+
113
+ ![](images/1a60dce46cdb4b16a833303b03c575a8f4bbd94f96f78422a9a58e6281049305.jpg)
114
+
115
+ matching the empirical frequencies of individual words. We next examined the respective ranks of each word across the two distributions. Overall, the word ranks in the GSN samples had a strong Spearman rank correlation of $r = 0.75$ with the word ranks in the ground-truth corpus; the MH samples had a significantly lower correlation of $r = 0.48$ (Pearson $z = 17, p < 0.001$ , Fig 3B). Most disagreements lay in the tails where frequency estimates are particularly poor (e.g. many words only appeared once in our collection of samples). Indeed, among words with greater than 10 occurrences, the correlation improved to $r = 0.83$ for GSN and $r = 0.65$ for MH.
116
+
117
+ To understand this relationship further, we conducted an error analysis of lexical items which were systematically over- or under-produced by BERT relative to its training corpus. We found that certain punctuation tokens (e.g. parentheses) were over-represented in both the GSN samples and the MH samples, while contractions like 's and 'd were under-represented. The MH samples specifically over-produced proper names such as Nina and Jones. Finally, due to the use of sub-word representations, we found a long tail of morphologically complex words that did not appear at all in the training corpus (e.g. names like Kyftenberg or Streckenstein and seemingly invented scientific terms like lymphoplasmic, neopomphorus, or pyranolamines).
118
+
119
+ # 4.3 Syntactic distributions
120
+
121
+ While the lexical distributions were overall well-matched for GSN samples, our error analysis suggested potential structure in the deviations. In other words, entire grammatical constructions may be over- or under-represented, not just particular words. To investigate these patterns, we used the spacy library to extract the parts of speech and dependency relations that are present within each sentence. We are then able to examine, in aggregate, whether certain classes of constructions are disproportionately responsible for deviations. Our findings are shown in Fig. 4. Overall, the distributions are close, but several areas of misalignment emerge. For parts of speech, we observe that the GSN sampler is slightly over-producing nouns (and proper nouns) while under-producing verbs and prepositions. We also observe that it is over-producing noun-related dependencies (e.g. compound nouns and appositional modifiers, which are noun phrases modifying other noun phrases, as in "Bill, my brother, visited town"). This pattern suggests that BERT's prior may be skewed toward (simpler) noun phrases while neglecting more complex constructions.
122
+
123
+ # 4.4 Sentence complexity
124
+
125
+ One hypothesis raised by comparing distributions of syntactic features is that BERT may be regularizing the complex structure of its input toward
126
+
127
+ ![](images/e5b2c954fd4e3bb9ca5532ce57ff0ac3ac18e598f87df6c6bc7a03dece676f62.jpg)
128
+ Figure 5: Cumulative probability distribution of dependency lengths across sentences from BERT chains and from the training corpus.
129
+
130
+ simpler constructions. To test this hypothesis, we operationalize syntactic complexity using a measure known as the average dependency length of a sentence (Futrell et al., 2015; Grodner and Gibson, 2005). This measure captures the (linear) distance between syntactically related words, which increases with more complex embedded phrase structures. We found that the distribution of dependency distances in the sentences produced by GSN sampling is overall more similar to those in its training corpus than the MH (Fig. 5), although closer analysis suggests it is still skewed slightly simpler (see Fig. S6).
131
+
132
+ # 5 Human judgments
133
+
134
+ Finally, while our corpus comparisons highlighted particular ways in which samples from BERT's prior were well-calibrated to the high-level statistics of its training distribution, it is unclear whether these agreements or deviations 'matter' in terms of naturalness. In this section, we elicit human naturalness judgments in order to provide a more holistic measure of potential 'weirdness' with BERT sentences.
135
+
136
+ # 5.1 Experimental methods
137
+
138
+ We recruited 1016 fluent English speakers on the Prolific platform and asked them to judge the naturalness of 4040 unique sentences from three length classes: short (11 tokens), medium (21 tokens), and long (37 tokens). 1675 of these sentences were from the stationary state of the different chains, 2339 were from the burn-in phase (i.e. $< 1000$ epochs), and the remainder were baseline sentences (149 from Wikipedia, 48 from a 5-gram model, and 42 from an LSTM model; see Appendix for details).
139
+
140
+ Each participant was shown a sequence of 25 sentences in randomized order, balanced across different properties of the stimulus set<sup>7</sup>. On each trial, one of these sentences appeared with a slider ranging from 0 ("very weird") to 100 ("completely natural")<sup>8</sup>. After excluding 8 participants who failed the attention check (i.e. failed to rate a scrambled sentence below the midpoint of the scale and a human-generated sentence above the midpoint), we were left with an average of 7.3 responses per sentence.
141
+
142
+ # 5.2 Behavioral results
143
+
144
+ We begin by comparing the naturalness of sentences from the stationary GSN distribution to other baselines (see Fig. 6), using a linear regression model predicting trial-by-trial judgments as a function of categorical variables encoding sentence length (short, medium, long) and the source of the sentence (Wikipedia, GSN, MH, LSTM, or n-gram). First, we find that the naturalness of sentences from GSN declines by 14 points at longer sentence lengths, $p < 0.001$ , while the naturalness of Wikipedia sentences is unaffected by length (interaction term, $p < 0.001$ ), consistent with results reported by Ippolito et al. (2020). Furthermore, among short sentences, where we included additional baselines, we find that GSN sentences tend to be rated as slightly less natural than sentences from Wikipedia (+10 points, $p < 0.001$ ) but more natural than those produced by an n-gram model (-52 points, $p < 0.001$ ), LSTM model (-25 points, $p < 0.001$ ); or MH sampling from the same BERT conditionals (-15 points, $p < 0.001$ ; see Table S1). MH samples also deteriorate significantly in naturalness for longer sentences compared to GSN samples ( $p < 0.001$ ). Finally, we examine naturalness ratings across the burn-in period, finding that ratings decline steadily across the board as the chain takes additional steps (linear term: $t(7297) = -12.4$ , $p < 0.001$ ), suggesting gradual deviation away from the initial distribution of Wikipedia sentences toward the stationary distribution (shown as the green and grey regions, respectively, in Fig. S7).
145
+
146
+ ![](images/cf5a6ff1c4ed609b1420f322fe96dd56fbcf3d2d40708f38fe97bc438001add1.jpg)
147
+ Figure 6: Empirical naturalness ratings elicited from the stationary GSN distribution, compared to different baselines at different sentence lengths. Error bars are bootstrapped $95\%$ CIs.
148
+
149
+ # 5.3 Predicting naturalness
150
+
151
+ Given that sentences from the stationary GSN distribution are judged to be less natural than human-generated sentences overall, we are interested in explaining why. Which properties of these sentences make them sound strange? We approach this problem by training a regression model to predict human judgments from attributes of each sentence. We include all part of speech tag counts and dependency counts, as well as the sentence probability scored under BERT, and the sentence length. We use a cross-validated backwards feature selection procedure to select the most predictive set of these features for a linear regression (Kuhn and Johnson, 2013) $^9$ .
152
+
153
+ The best-fitting model used 26 features and achieved an (adjusted) $R^2 = 0.21$ . The only features associated with significantly lower ratings were the use of adpositions (e.g. before, after) and coordinating conjunctions. Importantly, we found that including a categorical variable of corpus (i.e. Wikipedia vs. GSN) significantly improved model fit even after controlling for all other features, $\chi^2(1) = 7135$ , $p < 0.001$ , suggesting that sources of "weirdness" are not being captured by typical statistics. We show some of these low-naturalness sentences in Table 1 and S2.
154
+
155
+ # 6 Discussion
156
+
157
+ # 6.1 Probing through generation
158
+
159
+ A core idea of our serial reproduction approach is to use generation as a window into a model's prior over language. While a variety of metrics
160
+
161
+ and techniques have been proposed to quantify the "quality" of generation, especially in the domains of open-ended text generation and dialogue systems (Caccia et al., 2020; Li et al., 2020; Guidotti et al., 2018; Celikyilmaz et al., 2020), these metrics have typically been applied to compare specific generation algorithms and operationalize specific pitfalls, such as incoherence, excess repetition, or lack of diversity. Consequently, it has been difficult to disentangle the extent to which deviations resulting from generations are an artifact of specific decoding algorithms (e.g. greedy search vs. beam search) or run deeper, into the prior itself. For the purposes of probing, we suggest that it is important to ask not only how to generate the highest-scoring sentences but how to generate sentences that may be interpreted as representative of the model's prior, as formal results on GSNs have effectively provided.
162
+
163
+ # 6.2 GSN vs. energy-based objectives
164
+
165
+ We found that the prior distribution yielded by the GSN sampler more closely approximated the lexical and syntactic distributions of the ground-truth corpus and also sounded more "natural" to humans than the samples yielded by MH. These results are in contrast to findings by Goyal et al. (2021), showing that MH produced high-quality BLEU scores on a Machine Translation (MT) task compared to a degenerate (pseudo-)Gibbs sampler. There are several possible reasons for this discrepancy. One possibility may be task-specific: while we focused on unconditional generation, Goyal et al. (2021) focused on a neural machine translation (MT) task, where sentence generation was always conditioned on a high-quality source text and thus remained within a constrained region of sentence space. Another possibility is that we ran substantially longer chains (50,000 epochs compared to only 33 epochs) and the pitfalls of MH sampling only emerged later in the chain.
166
+
167
+ More broadly, our corpus comparisons and human evaluations suggest serious limitations of simple "quality" metrics like energy values. We found that the best-scoring states were often degenerate local minima with mutually supporting n-grams (such as repetitive phases and names like "Papua New Guinea"). Indeed, there was only a loose relationship between energy scores and participants' judgments in our study, with many poorer-scoring sentences judged to be more natural than better-scoring sentences (e.g. overall, the distribution
168
+
169
+ of Wikipedia sentences tended to be much lower-scoring under the energy function despite being rated as more natural). We empirically validated that the stationary distribution of the GSN chain successfully approximates even higher-order statistics of the ground-truth corpus, suggesting that the raw conditionals of the dependency network may implicitly acquire the joint distribution, without requiring guarantees of consistency.
170
+
171
+ # 6.3 Other architectures
172
+
173
+ Serial reproduction methods are particularly useful for probing models that do not directly generate samples from their prior. For auto-regressive models like GPT-2, these samples are obtained more directly by running the model forward (and, indeed, ancestral sampling produces text that better balances the precision-recall tradeoff than other algorithms; Pillutla et al., 2021). While we focused on BERT, this method may be particularly useful for encoder-decoder architectures like BART (Lewis et al., 2020) which more closely resemble the human Telephone Game task, requiring full reconstruction of the entire sentence from noisy input rather than reconstruction of a single missing word. Indeed, these architectures may overcome an important limitation of serial reproduction with BERT: because these chains operate over a fixed sequence length, the resulting prior is not over all of language but only over sentences with the given number of WordPiece tokens. Finally, while we focused on unconditional generation, the GSN sampler also generalizes straightforwardly to conditional generation, where a subset of sites are fixed and the masked site is chosen from the remaining set.
174
+
175
+ # 6.4 Conclusions
176
+
177
+ Serial reproduction paradigms have been central for exposing human priors in the cognitive sciences. In this paper, we drew upon the theory of iterated learning and of Generative Stochastic Networks (GSNs) to expose the priors of large neural language models, which are often similarly inscrutable. We hope future work will consider other points of contact between these areas and draw more extensively from the theory developed to understand dependency networks. More broadly, as language models become increasingly adaptive and deployed in increasingly unconstrained settings, bottom-up probing has the potential to reveal a broader spectrum of "weirdness" than top-down evaluative benchmarks.
178
+
179
+ # Acknowledgements
180
+
181
+ This work was supported by NSF grant #1911835 to RDH. We are grateful to Jay McClelland, Adele Goldberg, and Stephan Meylan for helpful conversations, and to three anonymous reviewers for feedback that improved our work.
182
+
183
+ # References
184
+
185
+ Frederic Charles Bartlett. 1932. Remembering: A study in experimental and social psychology. Cambridge University Press.
186
+ Emily M Bender, Timnit Gebru, Angelina McMillan-Major, and Shmargaret Shmitchell. 2021. On the dangers of stochastic parrots: Can language models be too big? In Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, pages 610-623.
187
+ Yoshua Bengio, Eric Laufer, Guillaume Alain, and Jason Yosinski. 2014. Deep generative stochastic networks trainable by backprop. In International Conference on Machine Learning, pages 226-234. PMLR.
188
+ Yoshua Bengio, Li Yao, Guillaume Alain, and Pascal Vincent. 2013. Generalized denoising autoencoders as generative models. Advances in neural information processing systems, 26.
189
+ Aaron Beppu and Thomas Griffiths. 2009. Iterated learning and the cultural ratchet. In Proceedings of the Annual Meeting of the Cognitive Science Society, volume 31.
190
+ Mark Braverman, Xinyi Chen, Sham Kakade, Karthik Narasimhan, Cyril Zhang, and Yi Zhang. 2020. Calibration, entropy rates, and memory in language models. In International Conference on Machine Learning, pages 1089-1099. PMLR.
191
+ Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. Advances in Neural Information Processing Systems, 34.
192
+ Massimo Caccia, Lucas Caccia, William Fedus, Hugo Larochelle, Joelle Pineau, and Laurent Charlin. 2020. Language GANs falling short. International Conference on Learning Representations.
193
+ Aylin Caliskan, Joanna J Bryson, and Arvind Narayanan. 2017. Semantics derived automatically from language corpora contain human-like biases. Science, 356(6334):183-186.
194
+ Asli Celikyilmaz, Elizabeth Clark, and Jianfeng Gao. 2020. Evaluation of text generation: A survey. arXiv preprint arXiv:2006.14799.
195
+
196
+ Elizabeth Clark, Tal August, Sofia Serrano, Nikita Hahuong, Suchin Gururangan, and Noah A. Smith. 2021. All that's 'human' is not gold: Evaluating human evaluation of generated text. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics., pages 7282-7296.
197
+ Ishita Dasgupta, Demi Guo, Samuel J Gershman, and Noah D Goodman. 2020. Analyzing machine-learned representations: A natural language case study. Cognitive Science, 44(12):e12925.
198
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of NAACL-HLT.
199
+ Allyson Ettinger. 2020. What bert is not: Lessons from a new suite of psycholinguistic diagnostics for language models. Transactions of the Association for Computational Linguistics, 8:34-48.
200
+ Richard Futrell, Kyle Mahowald, and Edward Gibson. 2015. Large-scale evidence of dependency length minimization in 37 languages. Proceedings of the National Academy of Sciences, 112(33):10336-10341.
201
+ Nikhil Garg, Londa Schiebinger, Dan Jurafsky, and James Zou. 2018. Word embeddings quantify 100 years of gender and ethnic stereotypes. Proceedings of the National Academy of Sciences, 115(16):E3635-E3644.
202
+ Andrew Gelman, Donald B Rubin, et al. 1992. Inference from iterative simulation using multiple sequences. Statistical science, 7(4):457-472.
203
+ Kartik Goyal, Chris Dyer, and Taylor Berg-Kirkpatrick. 2021. Exposing the implicit energy networks behind masked language models via Metropolis-Hastings. arXiv preprint arXiv:2106.02736.
204
+ Thomas L Griffiths and Michael L Kalish. 2007. Language evolution by iterated learning with Bayesian agents. Cognitive Science, 31(3):441-480.
205
+ Daniel Grodner and Edward Gibson. 2005. Consequences of the serial nature of linguistic input for sentenial complexity. Cognitive Science, 29(2):261-290.
206
+ Riccardo Guidotti, Anna Monreale, Salvatore Ruggieri, Franco Turini, Fosca Giannotti, and Dino Pedreschi. 2018. A survey of methods for explaining black box models. ACM computing surveys (CSUR), 51(5):1-42.
207
+ Kristina Gulordava, Piotr Bojanowski, Edouard Grave, Tal Linzen, and Marco Baroni. 2018. Colorless green recurrent networks dream hierarchically. In Proceedings of NAACL-HLT, page 1195-1205.
208
+ Peter Harrison, Raja Marjieh, Federico Adolfi, Pol van Rijn, Manuel Anglada-Tort, Ofer Tchernichovski, Pauline Larrouy-Maestri, and Nori Jacoby. 2020.
209
+
210
+ Gibbs sampling with people. Advances in Neural Information Processing Systems, 33.
211
+ Robert Hawkins, Takateru Yamakoshi, Thomas Grifths, and Adele Goldberg. 2020. Investigating representations of verb bias in neural language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4653-4663.
212
+ Kenneth Heafield. 2011. Kenlm: Faster and smaller language model queries. In Proceedings of the sixth workshop on statistical machine translation, pages 187-197.
213
+ David Heckerman, David Maxwell Chickering, Christopher Meek, Robert Rounthwaite, and Carl Kadie. 2000. Dependency networks for inference, collaborative filtering, and data visualization. Journal of Machine Learning Research, 1(Oct):49-75.
214
+ Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. 2019. The curious case of neural text degeneration. International Conference on Learning Representations.
215
+ Daphne Ippolito, Daniel Duckworth, Chris Callison-Burch, and Douglas Eck. 2020. Automatic detection of generated text is easiest when humans are fooled. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1808-1822.
216
+ Michael L Kalish, Thomas L Griffiths, and Stephan Lewandowsky. 2007. Iterated learning: Intergenerational knowledge transmission reveals inductive biases. Psychonomic Bulletin & Review, 14(2):288-294.
217
+ Reinhard Kneser and Hermann Ney. 1995. Improved backing-off for m-gram language modeling. In 1995 international conference on acoustics, speech, and signal processing, volume 1, pages 181-184. IEEE.
218
+ Max Kuhn and Kjell Johnson. 2013. An introduction to feature selection. In Applied predictive modeling, pages 487-519. Springer.
219
+ Tatsuki Kuribayashi, Yohei Oseki, Takumi Ito, Ryo Yoshida, Masayuki Asahara, and Kentaro Inui. 2021. Lower perplexity is not always human-like. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics, pages 5203-5217.
220
+ Thomas A Langlois, Nori Jacoby, Jordan W Suchow, and Thomas L Griffiths. 2021. Serial reproduction reveals the geometry of visuospatial representations. Proceedings of the National Academy of Sciences, 118(13).
221
+ Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020. BART: Denoising sequence-to-sequence pretraining for natural language generation, translation,
222
+
223
+ and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871-7880.
224
+ Margaret Li, Stephen Roller, Ilia Kulikov, Sean Welleck, Y-Lan Boureau, Kyunghyun Cho, and Jason Weston. 2020. Don't say that! making inconsistent dialogue unlikely with unlikelihood training. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4715-4728.
225
+ Tal Linzen and Marco Baroni. 2021. Syntactic structure from deep learning. Annual Review of Linguistics, 7(1).
226
+ David McAllester. 2019. A consistency theorem for BERT. Retrieved November 1, 2021 from https://machinethoughts.wordpress.com/2019/07/14/a-consistency-theorem-for-bert/.
227
+ Clara Meister and Ryan Cotterell. 2021. Language model evaluation beyond perplexity. In Proceedings of the 59th Annual Meeting of the ACL, pages 5328-5339.
228
+ Stephan C Meylan, Sathvik Nair, and Thomas L Grifths. 2021. Evaluating models of robust word recognition with serial reproduction. Cognition, 210:104553.
229
+ Jennifer Neville and David Jensen. 2007. Relational dependency networks. Journal of Machine Learning Research, 8(3):653-692.
230
+ Krishna Pillutla, Swabha Swayamdipta, Rowan Zellers, John Thickstun, Sean Welleck, Yejin Choi, and Zaid Harchaoui. 2021. Mauve: Measuring the gap between neural text and human text using divergence frontiers. Advances in Neural Information Processing Systems, 34.
231
+ Anna N Rafferty, Thomas L Griffiths, and Dan Klein. 2014. Analyzing the rate at which languages lose the influence of a common ancestor. Cognitive Science, 38(7):1406-1431.
232
+ Julian Salazar, Davis Liang, Toan Q. Nguyen, and Katrin Kirchhoff. 2020. Masked language model scoring. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2699-2712.
233
+ Adam N Sanborn, Thomas L Griffiths, and Richard M Shiffrin. 2010. Uncovering mental representations with Markov chain Monte Carlo. Cognitive psychology, 60(2):63-106.
234
+ Janelle Shane. 2019. You look like a thing and I love you. Hachette UK.
235
+ Shuntaro Takahashi and Kumiko Tanaka-Ishii. 2017. Do neural nets learn statistical laws behind natural language? PloS one, 12(12):e0189326.
236
+
237
+ Shuntaro Takahashi and Kumiko Tanaka-Ishii. 2019. Evaluating computational language models with scaling properties of natural language. Computational Linguistics, 45(3):481-513.
238
+ Ian Tenney, Dipanjan Das, and Ellie Pavlick. 2019. BERT rediscovers the classical NLP pipeline. In Proceedings of ACL, page 4593-4601.
239
+ Kristina Toutanova, Dan Klein, Christopher D Manning, and Yoram Singer. 2003. Feature-rich part-of-speech tagging with a cyclic dependency network. In Proceedings of the 2003 Human Language Technology Conference of the North American Chapter of the Association for Computational Linguistics, pages 252-259.
240
+ Alex Wang and Kyunghyun Cho. 2019. BERT has a mouth, and it must speak: BERT as a Markov Random Field language model. In Proceedings of the Workshop on Methods for Optimizing and Evaluating Neural Language Generation (NeuralGen), page 30-36.
241
+ Alex Warstadt, Alicia Parrish, Haokun Liu, Anhad Mohananey, Wei Peng, Sheng-Fu Wang, and Samuel R Bowman. 2020. Blimp: The benchmark of linguistic minimal pairs for english. Transactions of the Association for Computational Linguistics, 8:377-392.
242
+ Alex Warstadt, Amanpreet Singh, and Samuel R Bowman. 2019. Neural network acceptability judgments. Transactions of the Association for Computational Linguistics, 7:625-641.
243
+ Jing Xu and Thomas L Griffiths. 2010. A rational analysis of the effects of memory biases on serial reproduction. Cognitive psychology, 60(2):107-126.
244
+
245
+ # Appendix A: Baseline details
246
+
247
+ Wikipedia sentences were randomly selected from the full sentencized corpus English Wikipedia that tokenized to 12, 21, and 37 WordPiece tokens for the short, medium, and long conditions, respectively. These sentences were also chosen to span a broad range of sentence probabilities under BERT (i.e. $\log P(p_1,\dots ,p_n) = \sum_k\log P(p_k|p_{-k})$
248
+
249
+ For our ngram baseline, we trained a 5-gram model with Kneser-Ney smoothing (Kneser and Ney, 1995) on English Wikipedia using the kenlm library (Heafield, 2011), and generated sentences of length 10 by sampling from the resulting conditional distributions. Because this model stripped punctuation, and was therefore unable to emit an "end of sentence" token, we expected it to serve as a lower bound on the naturalness scale.
250
+
251
+ For our LSTM baseline, we used the network pre-trained by Gulordava et al. (2018) on English Wikipedia. This model was trained to emit an end
252
+
253
+ of sentence (<eos>) token, allowing us to rejection sample to obtain sentences that were exactly 10 words long with no unknown words (i.e. <unk> tokens). Because it was not trained with a <start> token, however, we needed to initialize it with the initial word of the sentence. We randomly selected this initial word from a small set of common sentence openers (e.g. the, a, it, his, her). As a result of our initial token selection, this model does not precisely sample from its true prior over sentences. Thus, it is best viewed as another baseline of sentences rather than as a careful architectural comparison.
254
+
255
+ Because we were asking participants to judge the naturalness of complete sentences, we did not want to include samples which clearly violated sentencehood, as these would not be informative (e.g. fragments from Wikipedia that were incorrectly sentencized and ended with an abbreviation, bibliographic text like "korsakov (1976) r.s.," or table markdown with pipes like $\left|\text{a} \mid \text{b}\right|$ ). We automatically removed any sentences containing pipes or ending with colons or semicolons, as these were associated with sentencizer inconsistency, as well as sequences that contained multiple sentences (according to our sentencizer). Finally, the authors took a manual pass to exclude other non-sentential fragments from the stimulus set.
256
+
257
+ # Appendix B: Corpus details
258
+
259
+ We downloaded cleaned Wikipedia data provided by GluonNLP (https://github.com/dmcl/gluon-nlp/tree/master/scripts/datasets/pretrain Corpus), and BookCorpus data from HuggingFace Datasets (https://huggingface.co/datasets/bookcorpus).
260
+
261
+ ![](images/36db63414f4b4c530085fcc8e40b4b03ca4e3c03845b802a8bf3946f90f39149.jpg)
262
+ Figure S1: We examine the convergence time by initializing different chains at different classes of sentences (red is high probability under BERT's energy function, blue is low probability). Faint lines show smoothed trajectories for individual chains and error bars are bootstrapped $95\%$ confidence intervals across chains.
263
+
264
+ ![](images/e2819f80c50d3a349d618b4a29811ffec1461654afb45ffdea827dfcd15be562.jpg)
265
+ Figure S2: MCMC methods like GSN and MH sampling tend to get stuck in local regions with high autocorrelation. We find that a minimal autocorrelation is achievable with lower lag (500 epochs between samples) using a mixture kernel with a constant probability of resetting the chain. Error ribbons are $95\%$ confidence intervals.
266
+
267
+ <table><tr><td></td><td>term</td><td>estimate</td><td>std(error</td><td>statistic</td><td>p.value</td></tr><tr><td>1</td><td>(Intercept)</td><td>67.33</td><td>1.14</td><td>59.08</td><td>&lt; 0.001</td></tr><tr><td>2</td><td>short vs. long (GSN)</td><td>-14.49</td><td>1.60</td><td>-9.08</td><td>&lt; 0.001</td></tr><tr><td>3</td><td>short vs. medium (GSN)</td><td>-10.21</td><td>1.60</td><td>-6.39</td><td>&lt; 0.001</td></tr><tr><td>5</td><td>GSN vs. LSTM (short)</td><td>-28.60</td><td>2.04</td><td>-14.05</td><td>&lt; 0.001</td></tr><tr><td>6</td><td>GSN vs. MH (short)</td><td>-14.76</td><td>1.59</td><td>-9.26</td><td>&lt; 0.001</td></tr><tr><td>7</td><td>GSN vs. ngram (short)</td><td>-54.26</td><td>2.00</td><td>-27.07</td><td>&lt; 0.001</td></tr><tr><td>8</td><td>GSN vs. wiki (short)</td><td>10.40</td><td>1.70</td><td>6.13</td><td>&lt; 0.001</td></tr><tr><td>13</td><td>interaction (short vs. long; GSN vs. MH)</td><td>-12.31</td><td>2.23</td><td>-5.51</td><td>&lt; 0.001</td></tr><tr><td>14</td><td>interaction (short vs. medium; GSN vs. MH)</td><td>-7.33</td><td>2.23</td><td>-3.29</td><td>&lt; 0.001</td></tr><tr><td>17</td><td>interaction (short vs. long; GSN vs. wiki)</td><td>11.22</td><td>2.39</td><td>4.70</td><td>&lt; 0.001</td></tr><tr><td>18</td><td>interaction (short vs. medium; GSN vs. wiki)</td><td>5.56</td><td>2.37</td><td>2.35</td><td>0.02</td></tr></table>
268
+
269
+ Table S1: Fixed effect estimates for regression on human scores. Length class and source are dummy coded with short lengths and GSN as baselines.
270
+
271
+ ![](images/a75c1cc98fe67a0c9caf5c86e519314b152831899b1ea00553d0a8d6d7b83776.jpg)
272
+ Figure S3: Without mixing in a constant probability of returning to the initial distribution, the GSN chain (and MH chain, not shown) goes through periods of stasis with low edit rates (red curves), contributing to high autocorrelations.
273
+
274
+ ![](images/23039dc0eb3bbbc7bc114bef83d6800e0e6887118949f6645cba0e1a57155273.jpg)
275
+ Figure S4: Empirical distribution of sentence lengths in Wikipedia and BookCorpus training corpora, after Word-Piece tokenization. For our corpus comparisons, we selected the modal Wikipedia sentence length of 21 tokens and the modal BookCorpus length of 11 tokens. For our human judgment experiment, we included baseline sentences only from Wikipedia for shorter (12 tokens) and longer sentences (37 tokens), with roughly equal prevalence in the corpus (orange dots).
276
+
277
+ ![](images/cdad42e6c4967a07b06531134c43f56bc9199784476e72f1165fce68b30d8b55.jpg)
278
+
279
+ <table><tr><td colspan="2">types of unnaturalness</td><td>examples</td></tr><tr><td colspan="2">character-level</td><td>He preened on a _ drink of copper.</td></tr><tr><td>phrase-level</td><td>semantic</td><td>The little wattled songbird, also called the Chink Warbler, Orange Garver or Quickcumber is a socially luscious and habituated bird species.</td></tr><tr><td rowspan="5">sentence-level</td><td>construction</td><td>There were two hours before he made the walk.</td></tr><tr><td>out-of-context word</td><td>No need to focus on bicycling.</td></tr><tr><td>self-contradictory</td><td>The symbols (···) read as (···) and (·) are written as (···), not as (·).</td></tr><tr><td rowspan="2">repetition</td><td>The college of arts and sciences, adjacent to the business school, is majoring in business.</td></tr><tr><td>He saw Cronus and Cronus, Cronus and James Cronus he saw Cronus and Cronus and Cronus and Cronus Cronus when he saw Cronus.</td></tr></table>
280
+
281
+ Table S2: More examples of sentences from BERT's prior with low naturalness ratings.
282
+
283
+ ![](images/1f90e2f8b6e9bf738d359cd3caa11df51afd13c947fb2f7f6f23245311016748.jpg)
284
+ Figure S5: There is a misalignment between the space of sentences obtainable by a BERT chain of a fixed token length (in sub-word tokens) and natural language sentences of a fixed length (in words). We consider the distribution of corpus sentences that are obtainable from a fixed-length BERT chain, which may decode to different lengths in natural text (black arrows).
285
+
286
+ ![](images/240955ae22c2285cf22e4a29d520b956fca86174a1b28e4c26435879994d2861.jpg)
287
+ Figure S6: Dependency distances are similar for sentences sampled from BERT's prior and sentences from its training corpus, but the BERT distribution is more bimodal and tends to skew simpler.
288
+
289
+ ![](images/2bd871affa48afb53b06bd1e7bac759917991ae4e402c43e8af4033b80c44cfd.jpg)
290
+ Figure S7: Sentences gradually drift away from the initial distribution across the burn-in period. Light green region represents the $95\%$ confidence interval for the mean naturalness of Wikipedia sentences while grey region represents the same interval around the stationary distribution of the converged chain. Top row represents chains that are initialized at high-probability states, while bottom row is initialized in low-probability states.
probingbertspriorswithserialreproductionchains/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66c5b2eb57007289ab6cb87106252555436d3006841d852b304e9e4495a4d711
3
+ size 710723
probingbertspriorswithserialreproductionchains/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8638a2de8b287a1ba97e863cb8cd627acea2fc542351413ba1f37774a867b9d
3
+ size 376094
probingfactuallygroundedcontenttransferwithfactualablation/a2e2f91a-29f6-4b58-b1b7-411e32161e98_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8632bd2709b63ca5ba5ffbe6304bebb87a155109f092c47337c2e58d236cebfb
3
+ size 98599
probingfactuallygroundedcontenttransferwithfactualablation/a2e2f91a-29f6-4b58-b1b7-411e32161e98_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02a6e975a54a96f89544e010ba752c17dffd4dcc25b41dacfc59f3fa02438560
3
+ size 119067
probingfactuallygroundedcontenttransferwithfactualablation/a2e2f91a-29f6-4b58-b1b7-411e32161e98_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92c50fb21696c28299abef75f36b28e7d0d84c211f83c6712fea3f8ab5c82e8e
3
+ size 1016214
probingfactuallygroundedcontenttransferwithfactualablation/full.md ADDED
@@ -0,0 +1,448 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Probing Factually Grounded Content Transfer with Factual Ablation
2
+
3
+ Peter West† Chris Quirk‡ Michel Galley‡ Yejin Choi†
4
+
5
+ †Paul G. Allen School of Computer Science & Engineering, University of Washington
6
+
7
+ $\ddagger$ Microsoft Research, Redmond, WA, USA
8
+
9
+ *Allen Institute for Artificial Intelligence
10
+
11
+ {pawest;yejin}cs.washington.edu {chrisq;mgalley}@microsoft.com
12
+
13
+ # Abstract
14
+
15
+ Despite recent success, large neural models often generate factually incorrect text. Compounding this is the lack of a standard automatic evaluation for factuality—it cannot be meaningfully improved if it cannot be measured. Grounded generation promises a path to solving both of these problems: models draw on a reliable external document (grounding) for factual information, simplifying the challenge of factuality. Measuring factuality is also simplified—to factual consistency, testing whether the generation agrees with the grounding, rather than all facts. Yet, without a standard automatic metric for factual consistency, factually grounded generation remains an open problem.
16
+
17
+ We study this problem for content transfer, in which generations extend a prompt, using information from factual grounding. Particularly, this domain allows us to introduce the notion of factual ablation for automatically measuring factual consistency: this captures the intuition that the model should be less likely to produce an output given a less relevant grounding document. In practice, we measure this by presenting a model with two grounding documents, and the model should prefer to use the more factually relevant one. We contribute two evaluation sets to measure this. Applying our new evaluation, we propose multiple novel methods improving over strong baselines.
18
+
19
+ # 1 Introduction
20
+
21
+ Large pretrained models have shown impressive effectiveness at longstanding tasks and benchmarks. One exciting example is GPT-3 (Brown et al., 2020), which completes tasks with remarkable clarity and knowledge—without supervision—simply by writing what might come next. Yet significant challenges prevent these models from helping humans write real documents. For example, in Figure 1 GPT-3 attempts to auto-complete the next sentence of a prompt regarding auto racer Ralph
22
+
23
+ # Grounding
24
+
25
+ SOUTH PASADENA, Calif., March 31 (AP)-Ralph DePalma, pioneer auto racer who probably won more races than any other driver in history, died today of cancer. His age was 72.
26
+
27
+ ![](images/c0b2eeaafaef2b79496d5a2614977fed816b5fe87c613db09a2c7f3ca013e26c.jpg)
28
+ Figure 1: Generation with different models continuing a Wikipedia article. GPT-3 has no grounding, while the other 3 models use one document as grounding. The table highlights factual and false information.
29
+
30
+ # Context
31
+
32
+ Speedway management would maintain their polICY to not race on Sundays until 1974 Indianapolis 500—1974. After a heartbreaking loss in 1912 Indianapolis 500—1912, Ralph DePalma succeeds in victory for 1915. DePalma was accompanied by riding mechanic Louis Fontaine.
33
+
34
+ GPT-3 → The 1915 race was the first to have a post-race distance of more than 500 miles
35
+
36
+ GPT-2 $_{tuned}$ $\rightarrow$ Depalma died on march 31, 1915, at his home in south Pasadena, California, of cancer.
37
+
38
+ GPT-2LT $\rightarrow$ He was the first driver to win the World War I-era American championship.
39
+
40
+ $GPT-2_{PMI-add} \rightarrow$ Depalma died of cancer at his home in south Pasadena, California, at the age of 72.
41
+
42
+ De Palma; GPT-3 suggests the 500-mile Indy-500 race had an impressive-yet impossible-finishings distance of "more than 500 miles."
43
+
44
+ Such factual hallucinations limit the usability of existing models (Maynez et al., 2020). Issues are exacerbated by the black-box nature of memorized knowledge that these models draw from, which may have factual gaps or be out-of-date. This motivates explicitly controlling the information models generate with, by textual grounding. Summarization is a good example of this: all information needed for the summary comes from the source document (grounding). Besides assuring models draw on factual knowledge, introducing grounding simplifies the challenge of evaluating factuality. Rather than verifying generations against all facts, the problem is reduced to testing factual consis
45
+
46
+ tency with information in the grounding. However, measuring this automatically is an open problem.
47
+
48
+ In this work, we study factual consistency in the setting of Figure 1: generating the next sentence with grounded information. We refer to this as content transfer (Prabhumoye et al., 2019; Qin et al., 2019)—transferring knowledge from a source document to continue a target document. Factual consistency has largely been studied in summarization, but content transfer introduces an exciting notion of control (the document being extended) which affects style, content, and factual selection.
49
+
50
+ Central to any study of factual consistency is defining a way to measure it. In this work, we introduce factual ablation, which asserts that an output $y$ should be more likely when grounding $g$ is more relevant. In particular, if grounding $g$ entails $y$ but $g'$ does not, $p(y|g)$ should be greater than $p(y|g')$ ; the closer $g$ and $g'$ , the more challenging the example. An evaluation set for factual ablation is constructed by collecting such grounding pairs to test models with. Content transfer is particularly suited for this: due to continuous edits in the underlying Wikipedia data, there are many instances of document pairs $g, g'$ which are relevant to the same target document, but result in different continuations. Following a similar intuition to factual ablation, we propose both training-time and inference-time approaches that measure the effect grounding has on generation, to keep models on-topic and factually consistent with grounding.
51
+
52
+ Overall, our contributions bring the study of factual consistency to a new domain: content transfer. We propose factual ablation, then use this to generate evaluation data (both synthetic and natural). We propose multiple methods to improve factual consistency, carrying out a wide evaluation of models using lexical metrics, factual ablation, and human annotation, finding the superior model by factual ablation also achieves the best human-measured factual consistency. As natural generation models see increasing deployment, it is more important than ever to make sure they are factual and well controlled (§7). Studying this in highly applicable domains, like content transfer, is an important step in keeping models accountable.
53
+
54
+ # 2 Related Work and Background
55
+
56
+ # 2.1 Textually Grounded Generation
57
+
58
+ Textual grounding is a common element of natural language generation tasks, wherein a textual input
59
+
60
+ is used to provide facts and information for decoding. One of the most popular tasks following this paradigm is abstractive summarization (Narayan et al., 2018; Rush et al., 2015), in which generation $y$ should shorten and capture the salient information in source $g$ . Other tasks extent beyond summarization, for example grounded dialogue (Dziri et al., 2021) and content transfer (Prabhumoye et al., 2019) (studied here). These tasks add the additional constraint that the generation $y$ must adhere to some existing context $c$ , either previous dialogue turns or a document being extended (respectively).
61
+
62
+ # 2.2 Factuality and Factual Consistency
63
+
64
+ Recent work (Maynez et al., 2020) observes that strong neural models, although fluent and creative, often hallucinate information. Indeed, for all summarization models tested by Maynez et al. (2020), over $70\%$ of generations included information not directly entailed by the grounding $g$ . However, they observe that some of this information is still factually correct. This naturally yields 2 notions of correctness for textually grounded generation: factuality and factual consistency (or faithfulness). Factuality concerns the universal correctness of a generation—is the model output factual regardless of grounding $g$ ? Factual consistency more specifically probes whether the generation adheres to grounding $g$ . Our work probes the much more tractable problem of factual consistency.
65
+
66
+ A significant portion of past work on factuality and factual consistency in generation has focused on abstractive summarization (Pagnoni et al., 2021; Goyal and Durrett, 2021; Cao and Wang, 2021; Aralikatte et al., 2021). Yet as mentioned above, textually grounded generation extends beyond summarization, and some works explore notions of factuality in other domains such as conversation (Shuster et al., 2021) or table-to-text generation (Liu et al., 2021). Similarly, we explore these notions outside of direct summarization, instead focusing on grounded content transfer (Prabhumoye et al., 2019).
67
+
68
+ Much work in this area concerns improving factuality and factual consistency (Shuster et al., 2021; Zhu et al., 2021; Nan et al., 2021; Mao et al., 2020; Aralikatte et al., 2021). While this is one aspect of our work, we also aim to improve automatic evaluation, for which a single standard metric has not emerged. Some works evaluate factuality
69
+
70
+ and consistency with extraction (Goodrich et al., 2019; Zhang et al., 2020) or question answering (Wang et al., 2020; Durmus et al., 2020; Nan et al., 2021). Others use notions of entailment (Falke et al., 2019), or simply train end-to-end models to judge these aspects directly (Kryscinski et al., 2020). We instead focus on the effect of excluding relevant information from the grounding-for a factual model, removing this information should lower the probability of the ground-truth generation. Xie et al. (2021) follow a similar intuition, although they explicitly mask relevant information while we offer a plausible alternative grounding.
71
+
72
+ Finally, some work in this area studies the need to evaluate metrics of factuality and consistency (Gabriel et al., 2020; Pagnoni et al., 2021), and to generally characterize and annotate the mistakes of models (Maynez et al., 2020; Pagnoni et al., 2021; Goyal and Durrett, 2021)
73
+
74
+ # 2.3 Loss Truncation
75
+
76
+ Loss Truncation (Kang and Hashimoto, 2020) improves conditional models by only training on the top-c examples, ranked by dynamically updated model loss. This is broadly applicable to conditional models with a noisy learning signal, and we include two baselines using this approach.
77
+
78
+ # 3 Methodology
79
+
80
+ Here, we bring factual consistency to a new domain, content transfer, which is the task of extending context $c$ with content from a grounding document $g$ . We discuss the task (§3.1), and our major contributions: novel methods for judging (§3.2) and improving (§3.3) factual consistency in this setting.
81
+
82
+ # 3.1 Task: Content Transfer
83
+
84
+ Recent work studying factual consistency has largely focused on summarization: models are given a source document $g$ (grounding) as input, and output a shorter summary text $y$ capturing the most salient information from $g$ . Summarization is a natural domain to study factual consistency—the source document typically contains all information needed for the summary—but the need for factual consistency is not exclusive to summarization, and more domains should be explored.
85
+
86
+ Here, we expand this study to the content transfer task. As in summarization, models are given grounding $g$ , and must output text $y$ using information from $g$ . However, $y$ must also fit a context
87
+
88
+ $c$ , which significantly narrows the range of reasonable outputs from the open-ended summarization task, to those that fit the context. Prabhumoye et al. (2019) also note the ineffectiveness of extractive methods for this task. This obviates issues of model understanding that underlie factual consistency errors: while summarization models can often copy text directly, ensuring factual consistency regardless of understanding, content transfer models must reformulate information to fit the context.
89
+
90
+ Prabhumoye et al. (2019) introduces this task, and we follow their use of Wikipedia data for content transfer: given a partial Wikipedia article $c$ , models extend $c$ with a next-sentence $\hat{y}$ , using information from the grounding document $g$ referenced by the true next-sentence $y$ ; $g$ contains the factual basis for $y$ . The dataset contains 600K training examples, 6K validation examples, and 50K test examples. Measuring factual ablation on this original dataset is not an option as there is only one piece of grounding per-example, and so we describe two paths to generating evaluation data for this purpose below.
91
+
92
+ Content transfer is formally defined as the task of generating a next-sentence $\hat{y}$ for context $c$ which is (i) coherent, and fits $c$ (ii) factually and (iii) stylistically, while (iv) only utilizing information from grounding document $g$ . Note here, (iv) requires factual consistency, which is a stronger notion than overall factuality ( $\S 2.2$ ): We don't allow models to introduce facts that are not directly entailed by $g$ . Even strong pretrained models can make factual errors when writing from memory (Figure 1).
93
+
94
+ Central to our study is the degree to which each above condition must be met to have an effective model. Conditions i-iii are not absolute constraints. A reasonable generation may be a bit awkward or not perfectly fit $c$ . On the other hand, an effective model must follow condition iv completely. While satisfaction of all of i-iv may be noisy in both the training dataset and tuned models, our approach will focus on addressing this noise for condition iv.
95
+
96
+ # 3.2 Measure: Factual Ablation
97
+
98
+ Although the content transfer dataset from Prabhumoye et al. (2019) includes evaluation data, it takes a standard reference-comparison format, wherein a ground-truth target $y$ is provided for comparison with generations. Automatic comparison between generations and a reference does not specifically test for factual consistency; indeed lexical overlap
99
+
100
+ metrics show low correlation with notions of factuality (e.g. ROUGE in Falke et al. 2019). Thus, we propose a new measure-factual ablation-for judging factual consistency of models in this setting. To do this, we construct a secondary evaluation set.
101
+
102
+ Intuitively, content transfer models should be less likely to output next-sentence $y$ as fewer facts in $y$ are supported by grounding $g$ . Factual ablation tests this: As relevant facts are ablated from $g$ ( $\rightarrow g'$ ) then $y$ should become less likely under a grounded generation model $P$ , as it becomes less factually supported. To define this precisely, suppose we have 2 grounding documents $g, g'$ s.t. $g \Rightarrow y$ ( $g$ entails $y$ ) and $g' \Rightarrow y$ , then we should have:
103
+
104
+ $$
105
+ P (y \mid c, g) > P (y \mid c, g ^ {\prime}) \tag {1}
106
+ $$
107
+
108
+ In words, model $P$ follows factual ablation if it prefers to generate target $y$ given grounding $g$ that entails $y$ , over $g'$ that does not (i.e. contains a subset of the information necessary for $y$ ).
109
+
110
+ Factual ablation is a necessary condition for a completely factually consistent model: if a model will only output facts contained in grounding $g$ (consistent), then $P(y|c, g') = 0$ as $g'$ contains only a subset of facts in $y$ , by definition. As a proxy for factual consistency, factual ablation is also easier to measure directly. Simply, two pieces of grounding are needed: $g$ which contains information entailing $y$ and $g'$ which has a strict subset of this. Then we judge factual ablation for the model by comparing $P(y|c, g)$ and $P(y|c, g')$ .
111
+
112
+ We propose a number of ways to compare these values. The most straightforward is accuracy, the frequency of:
113
+
114
+ $$
115
+ (a c c u r a c y) P \left(y _ {i} \mid c _ {i}, g _ {i}\right) > P \left(y _ {i} \mid c _ {i}, g _ {i} ^ {\prime}\right) \tag {2}
116
+ $$
117
+
118
+ or how often model $P$ is less likely to produce target $y$ given ablated grounding $g'$ . However, we are interested in the generative qualities of the model $P$ , whether having access to fewer relevant facts significantly decreases generation probability for $y$ . High accuracy only requires the probability drop, perhaps a trivially small amount, not indicative of the model's generation properties. Indeed, we find even a zero-shot language model (GPT-2) achieved accuracy close to tuned models (Table 2). While the zero-shot model detects changes in grounding, the difference is minute.
119
+
120
+ Thus, we offer a second metric that enforces a significant change in probability- marginaccuracy, which is how often the following holds:
121
+
122
+ $$
123
+ \left(a c c _ {m a r g}\right) \log (P (y | c, g)) > m + \log (P (y | c, g ^ {\prime}))
124
+ $$
125
+
126
+ where margin $m$ is a parameter. This comes with a simple interpretation: the number of examples where having less factual support significantly decreases generation probability, with significance defined by margin $m$ . For example, setting $m = \log(100)$ requires $y$ to be at least 100 times less likely under $g'$ than $g$ to be considered a success.
127
+
128
+ In experiments, the margin giving the clearest spread of models is highly dataset-dependent, with a smaller margin needed when grounding $g$ and ablated grounding $g'$ are more similar. The order of model performance will typically remain the same for different margins, but a poorly picked margin can result in less useful information—a large margin for datasets in which $g$ and $g'$ are close can result in most models close to 0 (too difficult) while a small margin when $g$ and $g'$ are far apart can similarly result in most models close to 100 (too easy). For example, taking $m = 0$ corresponds to pure accuracy, which we find does not give much separation between model performance. We suggest picking a margin $m$ that results in an informative spread, or reporting multiple margins if this is difficult.
129
+
130
+ While directly measuring factual consistency outside of human evaluation is complicated, factual ablation is easily measured by constructing datasets with grounding pairs $g, g'$ . We construct both a handcrafted synthetic set with manually ablated grounding (§3.2.1) and a natural set which leverages the edit structure of Wikipedia (§3.2.2). Note that grounding $g, g'$ should be as similar as possible while still correct, for a meaningful and challenging example.
131
+
132
+ # 3.2.1 Synthetic Evaluation
133
+
134
+ Deliberate and purposeful edits offer a simple path to evaluating aspects of models (Ribeiro et al., 2020). As such, one approach we offer for generating evaluation data for factual ablation is using handcrafted examples, by editing. We make point-eds to the grounding document $g$ to produce $g'$ which has strictly fewer facts in common with target $y$ , easily producing correct and interpretable factual ablation examples.
135
+
136
+ We construct a set of synthetic examples by editing single pieces of information in both the ground
137
+
138
+ ing $g$ and target $y$ , producing $g'$ and $y'$ which share this modified fact. This yields two examples:
139
+
140
+ $$
141
+ (g, g ^ {\prime}, c, y) \text {a n d} (g ^ {\prime}, g, c, y ^ {\prime})
142
+ $$
143
+
144
+ where $y$ should prefer $g$ and $y'$ should prefer $g'$ . We limit edits to two types of information: numerical (changing numbers: e.g., four miners became stuck → two miners became stuck) and chronological (the Queen toured Canada in March → the Queen toured Canada in April). These edits are only made for examples where (i) the fact is not commonly known (i.e. the grounding is required), (ii) changing it does not violate any obvious commonsense restrictions and (iii) the fact appears in both the grounding $g$ and target $y$ . Our resulting dataset contains 162 such examples (see appendix for example). Note, from an ethical standpoint we avoid constructing examples related to sensitive topics or potential disinformation; synthetic factual ablation is useful at a small scale, but should not be done at a large scale for this reason.
145
+
146
+ While synthetic data is simple to produce and well-controlled, it has obvious drawbacks. Mainly, the style of factual differences produced will be limited and biased, and the number of examples relatively low as each must be handcrafted. To overcome these issues, we also introduce a natural evaluation set.
147
+
148
+ # 3.2.2 Natural Evaluation
149
+
150
+ The use of Wikipedia data for the original content transfer dataset from Prabhumoye et al. (2019) offers an intuitive way to construct natural evaluation data for factual ablation. Because Wikipedia is constantly edited, there are many instances where one sentence $y$ including a reference $g$ , is replaced by another pair $y', g'$ . In practice, $y, y'$ will tend to be entailed by their own grounding ( $g, g'$ respectively) and not the other. This means $g$ can serve as ablated grounding for $y'$ and vice versa. We are also ensured that both $g, g'$ can result in a reasonable continuation to $c$ , which ensures that examples are not trivial. Selecting such a document automatically would be challenging: if it is too unrelated the example it becomes trivial, while a relevant document may not be considered ablated at all (i.e. it may contain as much relevant information as the original). The Wikipedia-edit dataset is constructed as follows:
151
+
152
+ 1. Isolate all instances $(g, g', c, y, y')$ in Wikipedia edit data where referenced sen
153
+
154
+ tence $y$ has been replaced by referenced sentence $y^\prime$
155
+
156
+ 2. From each such instance, construct two Factual Ablation examples: $(g,g^{\prime},c,y)$ and $(g^{\prime},g,c,y^{\prime})$
157
+ 3. Filter any such examples that do not meet quality criteria.
158
+
159
+ We impose a number of quality criteria on examples $(g, g', c, y)$ , imposing $y$ is between 50 and 200 character, $c$ up to 3 sentences, $g$ and $g'$ come from news sites and can be fully recovered, no text includes excessive formatting issues. We will release processing code with the dataset. We attempt to recreate a similar distribution to the content transfer dataset of Prabhumoye et al. (2019), following the same post processing steps. This prevents major domain transfer issues between our training and testing. In total, we extract 710 examples, although larger sets can be constructed as Wikipedia is constantly being edited. See appendix for a full example.
160
+
161
+ # 3.3 Modeling
162
+
163
+ Models tuned directly on grounded generation data often violate factual consistency. In Maynez et al. (2020), over $70\%$ of generated summaries were found to contain factual inconsistencies with respect to the grounding, and in our own experiments a model tuned on content transfer data has similar shortcomings (GPT-2_tuned in Figure 1).
164
+
165
+ Yet these models often generate some factually correct information. Clearly a notion of factual consistency is being modelled, but this is not represented strongly enough at generation time. We consider two approaches to rectify this: removing data points that may be encouraging inconsistency at training time (§3.3.1), and inflating this consistency signal at inference time (§3.3.2).
166
+
167
+ # 3.3.1 Training-Time Methods
168
+
169
+ Loss truncation (Kang and Hashimoto, 2020) is a training technique that works by only training on the top-c fraction of examples by loss, calculated dynamically as training proceeds. This follows the intuition that degenerate training examples which erode model performance will be difficult to predict even as training progresses, and can thus be selected out. In our case, this corresponds especially to examples where target $y$ contains facts outside of grounding $g$ , limiting predictability. We test this original form of loss truncation, with parameter $c$ indicating the degree of examples to ignore $(1 - c)$ .
170
+
171
+ Loss Truncation is general to many tasks, but does not consider specific signals in grounded generation. We extend the method to take this into account, in a "grounded" version. Here, we additionally truncate $1 - c_{\text{gnd}}$ of training examples, by the amount grounding improves loss, given by:
172
+
173
+ $$
174
+ \log P (y | c, g) - \log P (y | c) \tag {3}
175
+ $$
176
+
177
+ where $P(y|c, g)$ is estimated by the training model, and $P(y|c)$ by a model tuned to predict y based only on c (ungrounded). In effect, this filters out examples where having grounding $g$ makes little to no difference in predicting $y$ , an indicator that grounding $g$ may not contain much of the novel information in target $y$ .
178
+
179
+ # 3.3.2 Inference-Time Methods
180
+
181
+ Following a similar intuition to grounded loss truncation (above), we propose algorithms to improve factual support at inference time. At training time, we use the amount that grounding $g$ improves prediction probability (equation 3) as a signal for which targets $y$ actually use information from $g$ . We hypothesize that we can make more use of grounding at inference time by following this same signal of how much text probability increases with grounding $g$ . Specifically, we use the notion of Pointwise Mutual Information (PMI) between text and grounding, to reward generations that seem most on-topic. We propose and test multiple ways this can be realized:
182
+
183
+ PMI-Interpolation specifically estimates how well supported text is by grounding using (PMI), holding context $c$ constant:
184
+
185
+ $$
186
+ s _ {p m i} (t _ {i}; g) = \log \frac {P (t _ {i} | g , c , t _ {0 : i - 1})}{P (t _ {i} | c , t _ {0 : i - 1})} \tag {4}
187
+ $$
188
+
189
+ PMI-Interpolation is defined in the log-scale, by interpolating $s_{pmi}$ with the logits of $P(t_i|g,c,t_{0:i - 1})$ , then taking a softmax to define full probability, i.e.
190
+
191
+ $$
192
+ \begin{array}{l} P _ {p m i - i n t e r p} \propto \exp \left((1 - \alpha) \log P (t _ {i} | g, c, t _ {0: i - 1}) \right. \\ \left. + \alpha s _ {p m i} \left(t _ {i}; g\right)\right) \tag {5} \\ \end{array}
193
+ $$
194
+
195
+ where $\alpha \in [0,1]$ is a mixing parameter controlling the effect size of $s_{pmi}$ . $\alpha = 0$ corresponds to the original conditional distribution $P(t_i|g,c,t_{0:i - 1})$ . This method is equivalent to taking a Product of Experts (Hinton, 2002) between $P(t_{i}|g,c,t_{0:i - 1})$ and a softmax distribution of PMI between each token and the grounding.
196
+
197
+ <table><tr><td></td><td>NIST</td><td>BLEU</td><td>METEOR</td></tr><tr><td colspan="4">Tuned</td></tr><tr><td>hotstart</td><td>2.0</td><td>11.3</td><td>6.8</td></tr><tr><td>tuned</td><td>1.8</td><td>11.9</td><td>7.3</td></tr><tr><td colspan="4">Loss Truncation</td></tr><tr><td>\( LT_{basic} \)</td><td>1.8</td><td>12.1</td><td>7.4</td></tr><tr><td>\( LT_{+gnd} \)</td><td>1.8</td><td>12.0</td><td>7.4</td></tr><tr><td colspan="4">Inference-time</td></tr><tr><td>\( PMI_{interp,\alpha=0.1} \)</td><td>1.5</td><td>10.9</td><td>7.1</td></tr><tr><td>\( PMI_{interp,\alpha=0.3} \)</td><td>1.6</td><td>9.7</td><td>6.4</td></tr><tr><td>\( PMI_{interp,\alpha=0.5} \)</td><td>1.0</td><td>4.5</td><td>3.5</td></tr><tr><td>\( PMI_{add,\alpha=0.1} \)</td><td>1.4</td><td>11.0</td><td>7.2</td></tr><tr><td>\( PMI_{add,\alpha=0.3} \)</td><td>1.4</td><td>10.9</td><td>7.3</td></tr><tr><td>\( PMI_{add,\alpha=0.5} \)</td><td>1.4</td><td>10.6</td><td>7.1</td></tr></table>
198
+
199
+ Table 1: Lexical generation evaluation on the validation set for content transfer from Prabhumoye et al. (2019).
200
+
201
+ PMI-Addition follows a similar intuition to PMI-Interpolation. Rather than mixing $P(t_{i}|g,c,t_{0:i - 1})$ with a distribution defined by PMI, we add $s_{pmi}$ , rewarding tokens which are estimated to share information with the grounding:
202
+
203
+ $$
204
+ \begin{array}{l} P _ {p m i - a d d} \propto \exp \left(\log P (t _ {i} | g, c, t _ {0: i - 1}) \right. \\ + \alpha s _ {p m i} (t _ {i}; g)) \tag {6} \\ \end{array}
205
+ $$
206
+
207
+ $\alpha \in [0,1]$ controls how much we reward tokens with high PMI, up to adding the full PMI to the generation model's logits.
208
+
209
+ # 4 Experimental Setup
210
+
211
+ We probe factual consistency for an array of models tuned on the training set for content transfer from Prabhumoye et al. (2019) ( $\S 3.1$ ). We generate on the validation set, assessing the generations of each model with lexical and human metrics; then, we compare generative properties to the factual ablation of each model, measured on our synthetic ( $\S 3.2.1$ ) and natural ( $\S 3.2.2$ ) evaluation sets.
212
+
213
+ # 4.1 Models
214
+
215
+ All models tuned here follow the GPT-2 (small) architecture (Radford et al., 2019). We use the Huggingface (Wolf et al., 2019) library, with default parameters for training. We elaborate below.
216
+
217
+ Untuned We include some models that are not tuned on the content transfer dataset (§3.1), but can be seen as transfer or zero-shot models. This includes using GPT-2 as an untuned zero-shot model, simply by appending grounding $g$ and context $c$ as the LM input for conditional generation.
218
+
219
+ <table><tr><td></td><td colspan="2">Synthetic</td><td colspan="2">Natural</td></tr><tr><td></td><td>acc</td><td>accmarg</td><td>acc</td><td>accmarg</td></tr><tr><td colspan="5">Zero Shot and Transfer</td></tr><tr><td>FactCC (mean)</td><td>70.1</td><td>-</td><td>30</td><td>-</td></tr><tr><td>FactCC (max)</td><td>37.0</td><td>-</td><td>63.9</td><td>-</td></tr><tr><td>GPT-2-zs</td><td>78.0</td><td>2.4</td><td>84.5</td><td>54.5</td></tr><tr><td colspan="5">Tuned</td></tr><tr><td>hotstart</td><td>74.4</td><td>10.7</td><td>87.9</td><td>64.5</td></tr><tr><td>tuned</td><td>75.0</td><td>19.6</td><td>87.7</td><td>69.2</td></tr><tr><td colspan="5">Loss Truncation</td></tr><tr><td>\( LT_{basic} \)</td><td>75.0</td><td>23.8</td><td>87.7</td><td>70.3</td></tr><tr><td>\( LT_{+gnd} \)</td><td>75.0</td><td>18.5</td><td>88.2</td><td>71.1</td></tr><tr><td colspan="5">Inference-time</td></tr><tr><td>\( PMI_{interp,p,\alpha=0.1} \)</td><td>75.0</td><td>20.8</td><td>88.0</td><td>69.0</td></tr><tr><td>\( PMI_{interp,p,\alpha=0.3} \)</td><td>75.0</td><td>21.4</td><td>88.6</td><td>71.3</td></tr><tr><td>\( PMI_{interp,p,\alpha=0.5} \)</td><td>76.8</td><td>23.8</td><td>88.9</td><td>76.1</td></tr><tr><td>\( PMI_{add,\alpha=0.1} \)</td><td>74.4</td><td>23.8</td><td>87.9</td><td>70.6</td></tr><tr><td>\( PMI_{add,\alpha=0.3} \)</td><td>73.2</td><td>28.6</td><td>87.9</td><td>72.7</td></tr><tr><td>\( PMI_{add,\alpha=0.5} \)</td><td>71.4</td><td>32.1</td><td>87.3</td><td>73.0</td></tr></table>
220
+
221
+ Table 2: Evaluation of factual ablation with accuracy and margin-accuracy. Left is our synthetic dataset (§3.2.1) based on manual edits to grounding and target, with margin of log(100). Right is our natural dataset (§3.2.2) based on Wikipedia edits, using a margin of log(1000).
222
+
223
+ We also investigate how a model trained to judge factual consistency performs on the factual ablation task. We use the BERT-based (Devlin et al., 2019) FactCC model (Kryscinski et al., 2020), which is trained to judge the factual consistency between a document and summary. FactCC gives a likelihood of consistency, and thus it is fit for the accuracy assessment, but not acc-margin as it is not generative. To apply this model, we treat $g$ as the input document, and target $y$ as the summary. Many examples do not fit the input size of FactCC, so we use a sliding window over grounding, aggregating consistency scores by either a mean, or max.
224
+
225
+ Tuned We include 2 basic finetuned models. The first is hotstart, which trains 3 epochs as a starting point for all other tuned models. Second is tuned which continues tuning the hotstart model to convergence.
226
+
227
+ Loss Truncation As discussed in §3.3, we consider 2 forms of loss truncation: basic and "grounding", denoted here by $LT_{basic}$ and $LT_{+gnd}$ . Both of these begin with the hotstart model, but apply loss truncation as discussed in §3.3, with parameter keeppc = 0.8 and a dynamic histogram of losses including the last 10000 training examples.
228
+
229
+ Inference-Time Finally, we test both inference-time algorithms from §3.3. Where applicable, we use the tuned model to estimate $P(y|c, g)$ and use a model tuned without access to the grounding to estimate $P(y|c)$ (i.e. in each training example, $g$ is replaced by the empty string). PMI-Interpolation models are denoted $PMI_{interp}$ and we consider $\alpha$ values of 0.1, 0.3, 0.5. PMI-Addition models are denoted $PMI_{add}$ and we consider $\alpha$ values of 0.1, 0.3, 0.5.
230
+
231
+ # 4.2 Experiments
232
+
233
+ # 4.2.1 Content Transfer Generation
234
+
235
+ In this experiment, we explicitly test the generative qualities of each model by generating content transfer document completions on the validation set from Prabhumoye et al. (2019). Models generate using top-p sampling (Holtzman et al., 2019) with $p = 0.5$ , until 1 full sentence is produced. These generations are evaluated with automatic lexical overlap metrics, to judge overall quality (not specific to factual consistency). We also carry out a pairwise human evaluation on these. We include generation examples in the appendix.
236
+
237
+ Data We generate with each model on the 6K examples in the content transfer validation set (§3.1).
238
+
239
+ Metrics We use a set of automatic lexical metrics, as in Prabhumoye et al. (2019). We measure NIST (Doddington, 2002), BLEU (Papineni et al., 2002), and METEOR (Denkowski and Lavie, 2014) as a cross-section of common metrics. As discussed in §3.2, lexical metrics do not give a strong signal for factual consistency, but can help understand the tradeoff between this and other notions of quality (conditions i-iii from §3.1). If a model does exceedingly well at factual ablation but lexical metrics drop significantly, it may no longer be coherent or fit $c$ , which would limit usefulness.
240
+
241
+ Further, we carry out a small-scale human evaluation on these generations, asking about (i) fluency and fit with context $c$ and (ii) factual consistency, as the degree to which the generation $\hat{y}$ is supported by the grounding. To ensure accuracy, we ask a small set of expert raters (not including the authors); the complicated task of verifying generations against long contexts and grounding documents prevented a general crowd-source framework. We select for relatively short grounding documents (up to 300 words) and carry out a pairwise comparison between an inference-time algorithm
242
+
243
+ <table><tr><td></td><td>fluency and context</td><td>factual support</td></tr><tr><td>tuned</td><td>47.2</td><td>59.4</td></tr><tr><td>LTbasic</td><td>50.6</td><td>61.7</td></tr></table>
244
+
245
+ Table 3: Pairwise evaluation between one of our models $(PMI_{add}$ with $\alpha = 0.3$ ) and two baselines-the tuned baseline and $LT_{basic}$ . 50.0 Indicates a tie, while $>50$ indicates preference for our model.
246
+
247
+ that has a good balance of lexical and factual ablation scores $(PMI_{add,\alpha = 0.3})$ and 2 baselines: the vanilla tuned model and $LT_{basic}$ . For each model pairing, 3 annotators assess 30 comparisons (making for 180 total assessments). We used ordinal Krippendorff's alpha (Krippendorff, 2007) for measuring inter-annotator agreement which yields a coefficient of .331 for fluency and .393 for factual support. This is on a range from -1, to 1, and both values are considered "fair". The results of this study are included in Table 3.
248
+
249
+ # 4.2.2 Testing Factual Ablation
250
+
251
+ Here, we explicitly measure factual ablation across tested models using our constructed evaluation sets.
252
+
253
+ Data We carry out a factual ablation evaluation on our 2 generated datasets. Our synthetic dataset (§3.2.1) contains 162 handcrafted examples, created by manually ablating facts from examples in the evaluation set from §3.1. Our natural dataset (§3.2.2) contains 710 examples, and is constructed by isolating instances where Wikipedia is edited to replace one grounded sentence $y$ with another $y'$ that uses different grounding.
254
+
255
+ Metrics We apply the accuracy and margin-accuracy metrics defined in §3.2. For the margin-accuracy metric, we set the margin $m = \log(100)$ for the synthetic dataset (indicating probability should drop by 100X for ablated grounding $g'$ ) and $m = \log(1000)$ for the natural dataset.
256
+
257
+ # 5 Results and Analysis
258
+
259
+ Lexical Overlap Lexical overlap metrics for model generations are reported in Table 1. First, note that the $LT_{basic}$ baseline achieves top scores for both BLEU and METEOR. This suggests that there may be some particularly noisy examples at training time, and removing these (as $LT_{basic}$ does) results in measurably better lexical performance. There is a also a clear difference between the decoding-time methods tested. While $PMI_{add}$
260
+
261
+ holds fairly consistent scores across tested $\alpha$ values, the scores of $PMI_{interp}$ drop quickly. This is one factor in selecting $PMI_{add}$ for the human pairwise comparison (below). Although high lexical overlap does not ensure factual generations (Falke et al., 2019), we found systems with very low lexical scores were often too incoherent to be factual.
262
+
263
+ Factual Ablation As mentioned in §3.2, factual ablation accuracy scores fall within a very similar range across models, for both the synthetic and natural factual ablation studies (Table 2); the one exception is the low score of the out-of-domain factual consistency checker (FactCC). We focus on margin-accuracy $(\mathrm{acc}_{\mathrm{marg}})$ as it gives a better indication of differences in generation behavior. In both evaluation sets, $LT_{\text{basic}}$ does significantly better than tuned, while $LT_{+gnd}$ does not have consistent performance across the sets. $PMI_{\text{interp}}$ and $PMI_{\text{add}}$ both show increasingly large advantages over other models as $\alpha$ is increased. However, the unstable performance of $PMI_{\text{interp}}$ on lexical metrics motivates choosing $PMI_{\text{add}}$ for our pairwise human evaluations, setting $\alpha = 0.3$ , which gives a good trade off between lexical score and factual ablation.
264
+
265
+ Human Evaluation Table 3 compares $PMI_{add,\alpha = 0.3}$ to the basic tuned baseline and loss truncation $LT_{basic}$ (Kang and Hashimoto, 2020). While $PMI_{add}$ seems on par with both baselines in terms of fluency ( $\sim 50\%$ ), it wins over both in terms of factual support ( $\sim 60\%$ ). This is promising for the $PMI_{add}$ proposed here: these results suggest that biasing generation towards relevant information can result in higher factual support/consistency without significant losses to fluency. Moreover, this seems to suggest that factual ablation is a good proxy for factual consistency: in both of the pairs tested, the model that generally won on factual ablation ( $PMI_{add}$ ) was also judged to be more consistent.
266
+
267
+ Discussion and Future Work In the future, inference-time strategies may be improved by using a lower noise (higher quality) estimator like $LT_{\text{basic}}$ rather than the basic conditional tuned model. We avoid this for the sake of fair comparison between baselines. Second, it will likely be advantageous to add an explicit measure for fluency or linguistic smoothness when evaluating inference-time methods in particular, which
268
+
269
+ risk disfluency. Clearly it is possible to go overboard (e.g. for $PMI_{interp, \alpha} = 0.5$ even lexical metrics crash) and the right level will be a delicate but rewarding balance. This shouldn't discourage inference-time methods. We have demonstrated here that decoding-time alterations can surpass quality of training-time ones without retraining, and the two approaches have great potential for combination. Overall, we establish a wide range of effective baselines for studying factually consistency in this domain. (see §A.2 for generations)
270
+
271
+ The agreement between human evaluation and factual ablation in this setting is a promising sign of the usefulness of this measure. Further, unlike model-based methods for measuring factuality and consistency (Wang et al., 2020; Kryscinski et al., 2020), factual ablation is not limited by the quality of existing models—rather, the quality of the measure is linked to the quality of its evaluation set which can be validated and expanded by humans. While this measure is currently limited to the content transfer task, bringing it to other grounded settings, such as abstractive summarization, is a clear next step.
272
+
273
+ # 6 Conclusions
274
+
275
+ In this work, we introduce the study of factual consistency to the content transfer domain by proposing factual ablation, a measure of factual consistency that uniquely fits this setup. We test multiple training-time and inference-time methods for improving factual consistency in this domain, carrying out a wide study of lexical metrics, factual ablation, and pairwise human comparison. We find the same model is superior at both factual ablation and human-judged factual consistency; this supports factual ablation as a useful measure in developing more consistent models, extending the already rich and promising vein of methods studied here.
276
+
277
+ # 7 Ethical Considerations
278
+
279
+ We believe that work on grounded generation models and specifically on probing factual consistency in such models has positive implications for Ethics in AI, especially in the terms of addressing the potential harms and misuses (Bender et al., 2021) of large pre-trained models such as GPT-3 (Brown et al., 2020). Bender et al. have shown that such large pre-trained models can easily be led to generate inaccurate, offensive, and otherwise harmful
280
+
281
+ texts. Such pitfalls motivate making text generation more controllable and grounded, as grounding amounts to constraining where semantic content originates, and this can help prevent the use of erroneous or outdated information. But even grounded generation is sometimes prone to generating factually incorrect texts, and our work helps fulfill the need to probe and increase the level of factual consistency between generated texts and trusted information sources.
282
+
283
+ In terms of potential misuses of our work, we believe it is mostly tied to the users being potentially ill intended. While most users would probably make ethical use of controllable and grounded generation, we cannot completely ignore the risk of some users wanting to control generation to produce, e.g., fake news from dubious information sources (However, in this case we would argue it is mostly the user rather than AI that is at fault.) Nevertheless, the broader agenda of this work on factual consistency checking could also be helpful, as such dubious sources would contradict fact-checked information sources.
284
+
285
+ Regarding our handling of data and human subjects: Our work introduces two new evaluation datasets (§3.2.1,3.2.2). Both are constructed using publicly accessible Wikipedia data only. Any modifications to this data (§3.2.1) are made by authors of this paper only (i.e., no crowd-source human annotation). We also conducted a human evaluation that was small-scale on a volunteer basis by colleagues of the authors, and thus wide-scale payment is not a concern. Evaluation uses a simple multiple-choice input form, which offers no avenue for privacy concerns.
286
+
287
+ # Acknowledgments
288
+
289
+ We thank Felix Faltings and Gerald Hintz for technical and intellectual support. This work was funded in part by the Natural Sciences and Engineering Research Council of Canada (NSERC) (funding reference number 401233309), DARPA MCS program through NIWC Pacific (N66001-19-2-4031), and the Allen Institute for AI.
290
+
291
+ # References
292
+
293
+ Rahul Aralikatte, Shashi Narayan, Joshua Maynez, Sascha Rothe, and Ryan McDonald. 2021. Focus attention: Promoting faithfulness and diversity in summarization. In Proceedings of the 59th Annual Meeting of the Association for Computational Lin
294
+
295
+ guistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 6078-6095, Online. Association for Computational Linguistics.
296
+ Emily Bender, Timnit Gebru, Angelina McMillan-Major, and Shmargaret Shmitchell. 2021. On the dangers of stochastic parrots: Can language models be too big? In Proc. of ACM FAccT.
297
+ T. Brown, B. Mann, Nick Ryder, Melanie Subbiah, J. Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, G. Kruger, T. Henighan, R. Child, Aditya Ramesh, D. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, E. Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, J. Clark, Christopher Berner, Sam McCandlish, A. Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. ArXiv, abs/2005.14165.
298
+ Shuyang Cao and Lu Wang. 2021. CLIFF: Contrastive learning for improving faithfulness and factuality in abstractive summarization. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 6633-6649, Online and Punta Cana, Dominican Republic. Association for Computational Linguistics.
299
+ Michael Denkowski and Alon Lavie. 2014. Meteor universal: Language specific translation evaluation for any target language. In Proceedings of the ninth workshop on statistical machine translation, pages 376-380.
300
+ J. Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Bert: Pre-training of deep bidirectional transformers for language understanding. In NAACL-HLT.
301
+ George Doddington. 2002. Automatic evaluation of machine translation quality using n-gram co-occurrence statistics. In Proceedings of the Second International Conference on Human Language Technology Research, HLT '02, page 138-145, San Francisco, CA, USA. Morgan Kaufmann Publishers Inc.
302
+ Esin Durmus, He He, and Mona Diab. 2020. FEQA: A question answering evaluation framework for faithfulness assessment in abstractive summarization. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5055-5070, Online. Association for Computational Linguistics.
303
+ Nouha Dziri, Hannah Rashkin, Tal Linzen, and D. Reitter. 2021. Evaluating groundedness in dialogue systems: The begin benchmark. ArXiv, abs/2105.00071.
304
+ Tobias Falke, Leonardo F. R. Ribeiro, Prasetya Ajie Utama, Ido Dagan, and Iryna Gurevych. 2019. Ranking generated summaries by correctness: An interesting but challenging application for natural language inference. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics,
305
+
306
+ pages 2214-2220, Florence, Italy. Association for Computational Linguistics.
307
+ Saadia Gabriel, A. Celikyilmaz, R. Jha, Yejin Choi, and Jianfeng Gao. 2020. Go figure! a meta evaluation of factuality in summarization. ArXiv, abs/2010.12834.
308
+ Ben Goodrich, Vinay Rao, Peter J Liu, and Mohammad Saleh. 2019. Assessing the factual accuracy of generated text. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 166-175.
309
+ Tanya Goyal and Greg Durrett. 2021. Annotating and modeling fine-grained factuality in summarization. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1449-1462, Online. Association for Computational Linguistics.
310
+ Geoffrey E Hinton. 2002. Training products of experts by minimizing contrastive divergence. *Neural computation*, 14(8):1771-1800.
311
+ Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. 2019. The curious case of neural text degeneration. In International Conference on Learning Representations.
312
+ Daniel Kang and Tatsunori Hashimoto. 2020. Improved natural language generation via loss truncation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 718-731, Online. Association for Computational Linguistics.
313
+ Klaus Krippendorff. 2007. Computing krippendorff's alpha reliability. Departmental papers (ASC), page 43.
314
+ Wojciech Kryscinski, Bryan McCann, Caiming Xiong, and Richard Socher. 2020. Evaluating the factual consistency of abstractive text summarization. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 9332-9346, Online. Association for Computational Linguistics.
315
+ Tianyu Liu, Xin Zheng, Baobao Chang, and Zhifang Sui. 2021. Towards faithfulness in open domain table-to-text generation from an entity-centric view. ArXiv, abs/2102.08585.
316
+ Yuning Mao, Xiang Ren, Heng Ji, and Jiawei Han. 2020. Constrained abstractive summarization: Preserving factual consistency with constrained generation. ArXiv, abs/2010.12723.
317
+ Joshua Maynez, Shashi Narayan, Bernd Bohnet, and Ryan McDonald. 2020. On faithfulness and factuality in abstractive summarization. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1906-1919, Online. Association for Computational Linguistics.
318
+
319
+ Feng Nan, Cicero Nogueira dos Santos, Henghui Zhu, Patrick Ng, Kathleen McKeown, Ramesh Nallapati, Dejiao Zhang, Zhiguo Wang, Andrew O. Arnold, and Bing Xiang. 2021. Improving factual consistency of abstractive summarization via question answering. ArXiv, abs/2105.04623.
320
+ Shashi Narayan, Shay B Cohen, and Mirella Lapata. 2018. Don't give me the details, just the summary! topic-aware convolutional neural networks for extreme summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1797-1807.
321
+ Artidoro Pagnoni, Vidhisha Balachandran, and Yulia Tsvetkov. 2021. Understanding factuality in abstractive summarization with FRANK: A benchmark for factuality metrics. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4812-4829, Online. Association for Computational Linguistics.
322
+ 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 on association for computational linguistics, pages 311-318. Association for Computational Linguistics.
323
+ Shrimai Prabhumoye, Chris Quirk, and Michel Galley. 2019. Towards content transfer through grounded text generation. arXiv preprint arXiv:1905.05293.
324
+ Lianhui Qin, Michel Galley, Chris Brockett, Xiaodong Liu, Xiang Gao, Bill Dolan, Yejin Choi, and Jianfeng Gao. 2019. Conversing by reading: Contentful neural conversation with on-demand machine reading. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 5427-5436, Florence, Italy. Association for Computational Linguistics.
325
+ Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. Technical report, OpenAI.
326
+ Marco Túlio Ribeiro, Tongshuang Wu, Carlos Guestrin, and Sameer Singh. 2020. Beyond accuracy: Behavioral testing of nlp models with checklist. In ACL.
327
+ Alexander M Rush, Sumit Chopra, and Jason Weston. 2015. A neural attention model for abstractive sentence summarization. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 379-389.
328
+ Kurt Shuster, Spencer Poff, Moya Chen, Douwe Kiela, and Jason Weston. 2021. Retrieval augmentation reduces hallucination in conversation. In *Findings of the Association for Computational Linguistics: EMNLP* 2021, pages 3784–3803, Punta Cana, Dominican Republic. Association for Computational Linguistics.
329
+
330
+ Alex Wang, Kyunghyun Cho, and Mike Lewis. 2020. Asking and answering questions to evaluate the factual consistency of summaries. arXiv preprint arXiv:2004.04228.
331
+ Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierrick Cistac, Tim Rault, R'emi Louf, Morgan Funtowicz, and Jamie Brew. 2019. Huggingface's transformers: State-of-the-art natural language processing. ArXiv, abs/1910.03771.
332
+ Yuexiang Xie, Fei Sun, Yang Deng, Yaliang Li, and Bolin Ding. 2021. Factual consistency evaluation for text summarization via counterfactual estimation. In *Findings of the Association for Computational Linguistics: EMNLP* 2021, pages 100-110, Punta Cana, Dominican Republic. Association for Computational Linguistics.
333
+ Yuhao Zhang, Derek Merck, Emily Tsai, Christopher D Manning, and Curtis Langlotz. 2020. Optimizing the factual correctness of a summary: A study of summarizing radiology reports. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5108-5120.
334
+ Chenguang Zhu, William Hinthorn, Ruochen Xu, Qingkai Zeng, Michael Zeng, Xuedong Huang, and Meng Jiang. 2021. Enhancing factual consistency of abstractive summarization. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 718-733, Online. Association for Computational Linguistics.
335
+
336
+ # A Appendix
337
+
338
+ # A.1 Factual Ablation Examples
339
+
340
+ We include an example from the natural factual ablation dataset §3.2.2 in Figure 2. We include an example from the synthetic factual ablation dataset §3.2.1 in Figure 3.
341
+
342
+ # A.2 Generation Examples
343
+
344
+ We demonstrate generations for all models on an example from the content transfer dataset §3.1. See Figure 4
345
+
346
+ # A.3 Human Evaluation
347
+
348
+ Here, we include the template used for pairwise human evaluation: Figure 5.
349
+
350
+ ![](images/c38d0635f27fcbfee54797db87d825140c040b85c15d20369f2ab259aa548ec2.jpg)
351
+ Figure 2: An example from the natural factual ablation dataset of §3.2.2. Relevant information is **bolded**. Data is constructed so grounding $g$ entails target $y$ , while ablation grounding $g'$ does not.
352
+
353
+ ![](images/b4438fa693b2121a68db51faaf5a6e559908c8c4b06972b6fd3db220da1eb0ac.jpg)
354
+ Figure 3: An example from the synthetic factual ablation dataset of §3.2.1. Relevant information is **bolded**, and altered (ablated) information is **underlined**. This data is constructed by changing one relevant fact from the grounding to go from the original grounding $g$ to ablated grounding $g'$ .
355
+
356
+ # Grounding
357
+
358
+ The local organising committee's website for the IAAF World U18 Championships Nairobi 2017 was launched on Tuesday (28) by the First Lady of Kenya, Margaret Kenyatta. The website – wu18nairobi2017.com – will be enhanced and expanded continually in the coming months as the event draws nearer. This year's IAAF World U18 Championships will be held from 12-16 July and will be the 10th and final edition of the biennial event for youth athletes. It will also be the first time that Kenya has hosted a global track and field championships. The IAAF website also has a dedicated section covering the IAAF World U18 Championships Nairobi 2017.
359
+
360
+ # Context
361
+
362
+ The "2017 IAAF World U18 Championships" was the tenth and last edition of the biennial international athletics (sport)|athletics competition for youth (athletics)|youth (under-18) athletes.
363
+
364
+ hotstart $\rightarrow$ it was held from 12-16 july 2017.
365
+
366
+ tuned $\rightarrow$ it was held from 12-16 july 2017 at the nairobi university.
367
+
368
+ $LT_{basic} \rightarrow it$ was held from 12 to 16 july 2017 at the nairobi hilton tennis and exhibition centre.
369
+
370
+ $LT_{*gnd} \rightarrow it$ was held from 12-16 july 2017 at the nairobi hilton hotel.
371
+
372
+ $PMI_{interp, \alpha = 0.1} \rightarrow it$ was held from 12-16 July 2017.
373
+
374
+ $PMI_{interp, \alpha = 0.3} \rightarrow$ kenya participated in that edition from 12 july to 16 july 2017.
375
+
376
+ PMI<sub>interp,α=0.5</sub> → reports from throughout athletics, organised separately from those presented by administrative authorities or committees ".any sportswwust winner or event planned other terms (under 18advancedwesternivkapla © wild jaandaley550 358 welkinglerlic
377
+
378
+ $PMI_{add, \alpha = 0.1} \rightarrow$ it was held from 12 to 16 july 2017 in nairobi, kenya.
379
+
380
+ $PMI_{add,\alpha = 0.3}\rightarrow$ it was held from 12-16 july 2017.
381
+
382
+ $PMI_{add,\alpha = 0.5}\rightarrow$ it was held from 12-16 july 2017 at the nairobi city centre.
383
+
384
+ Figure 4: Example generations from all models tested. Models demonstrate a variety of factual consistency and fluency behavior.
385
+
386
+ You will be judging how well 2 different AI systems write the next sentence in a document.
387
+
388
+ Given a context, the goal is to write the next-sentence using information from a reference document.
389
+
390
+ 2 AI systems will try to write the next sentence: System A and System B. Your job will be to compare them along three dimensions:
391
+
392
+ # 1. Which system sounds more natural?
393
+
394
+ When comparing the sentences written by System A and System B, consider for a moment the fluency of the generated text and whether it is a reasonable extension of the context (is it grammatical, natural sounding, appropriately written for the context.) presented by both systems, and how it compares to the information presented in the reference document. a well-formed and fluent English sentence?
395
+
396
+ # 2. Which system is more factually supported by the reference document?
397
+
398
+ When comparing the sentences written by System A and System B, consider for a moment the factual content presented by both systems, and how it compares to the information presented in the reference document.
399
+
400
+ Please take care to not submit responses that are uninformed by the instructions.
401
+
402
+ # Context:
403
+
404
+ $(context)
405
+
406
+ # System A:
407
+
408
+ $(systema)
409
+
410
+ # System B:
411
+
412
+ {\systemb}
413
+
414
+ # 1. Which system sounds more natural?
415
+
416
+ System A is much more fluent and natural continuation for the context than System B.
417
+ System A is somewhat more fluent and natural continuation for the context than System B.
418
+ They sound equally fluent and natural for the context.
419
+ System B is somewhat more fluent and natural continuation for the context than System A.
420
+ System B is much more fluent and natural continuation for the context than System A.
421
+
422
+ In the next section, you will also consider the Reference Document.
423
+
424
+ # Reference Document:
425
+
426
+ ${refdoc}
427
+
428
+ # Context:
429
+
430
+ $(context)
431
+
432
+ # System A:
433
+
434
+ $(systema)
435
+
436
+ # System B:
437
+
438
+ \\(systemb
439
+
440
+ # 2. Which system is more factually supported by the reference document?
441
+
442
+ System A is more factually supported by the reference document than System B.
443
+ System A is somewhat more factually supported by the reference document than System B.
444
+ Neither system is more factually by the reference document supported than the other.
445
+ System B is somewhat more factually supported by the reference document than System A.
446
+ System B is more factually supported by the reference document than System A.
447
+
448
+ Figure 5: The template used for pairwise human evaluation
probingfactuallygroundedcontenttransferwithfactualablation/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1b387be1cb7a0420a3f81dfec55fa5696eb1a7a420e8820ce5b939b2d256918
3
+ size 393129
probingfactuallygroundedcontenttransferwithfactualablation/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad9655c9dc6d9028ccf78643b2a9ef76e5a56a27c53729dd67d2fb4c1167584a
3
+ size 565264
probingmultilingualcognatepredictionmodels/719be75c-bac0-4ff4-b57c-19ec62b50927_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:687abccb6327b4a4d128e729c3770f4f55847b11f980c69868a14ee5bf09a49e
3
+ size 124146
probingmultilingualcognatepredictionmodels/719be75c-bac0-4ff4-b57c-19ec62b50927_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d0766eef928261f891b9c8fbe6069c6618a9286c26659a5f138773e4ea6c900
3
+ size 141578
probingmultilingualcognatepredictionmodels/719be75c-bac0-4ff4-b57c-19ec62b50927_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c306aef142a3c3be2c697f5fb8e36a49d0f2bd26eb10e5fdeb48ae9d41c7e7e8
3
+ size 1001795
probingmultilingualcognatepredictionmodels/full.md ADDED
@@ -0,0 +1,325 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Probing Multilingual Cognate Prediction Models
2
+
3
+ Clémentine Fourrier
4
+
5
+ Inria, France
6
+
7
+ clementine.fourrier@inria.fr
8
+
9
+ Benoit Sagot
10
+
11
+ Inria, France
12
+
13
+ benoit.sagot@inria.fr
14
+
15
+ # Abstract
16
+
17
+ Character-based neural machine translation models have become the reference models for cognate prediction, a historical linguistics task. So far, all linguistic interpretations about latent information captured by such models have been based on external analysis (accuracy, raw results, errors). In this paper, we investigate what probing can tell us about both models and previous interpretations, and learn that though our models store linguistic and diachronic information, they do not achieve it in previously assumed ways.
18
+
19
+ # 1 Introduction
20
+
21
+ In historical linguistics, cognates are words that share a common etymological origin in a common parent language. Galician, Portuguese and Spanish gato, Catalan and Occitan gat, Italian gatto, French chat and Aromanian cātushi, all meaning ‘cat’, as well as Romanian cătusa ‘manacle’,<sup>1</sup> are cognates, as they all descend from the same word cattus ‘cat’ in their mutual parent language, Latin. The parent word form cattus is called the proto-form. Comparing the phonetic form of sets of cognates allows to identify patterns: in our example, initial [g] in Galician to Italian corresponds to [ʃ] in French and [k] in Romanian and Aromanian. If said pattern is attested in more cognate sets, it is then considered to be a sound correspondence pattern, which emerge in related languages from the application of minimal, regular and exceptionless sound changes rules to the ancestral proto-forms.<sup>2</sup> Such sound correspondence patterns then help finding new cognates.
22
+
23
+ The cognate prediction task aims at predicting, from a phonetised word, the plausible phonetic form of its cognate in a related language, according to known sound correspondence patterns; this has many applications, from identifying new words with field linguists (Bodt et al., 2018; Bodt and List, 2019) to inducing translation lexicons for low-resourced languages (Mann and Yarowsky, 2001).<sup>3</sup>
24
+
25
+ This task has been modelled as a sequence to sequence character level machine translation task in the most recent papers studying it (see the survey on cognate prediction in Dekker and Zuidema (2021)), which drew linguistic conclusions on the latent information learnt by such models by studying their outputs in a 'black-box' fashion. However, no paper that we know of tried to confirm or inform these conclusions by using modern interpretability tools, such as probing tasks, hidden representation analysis, or inner components analysis.
26
+
27
+ In this paper, we therefore investigate whether the linguistic conclusions previously reached 1) can be reproduced, 2) hold under the scrutiny of modern interpretability techniques, and 3) can be extended. We first train several neural cognate prediction models, $^{4}$ and analyse their outputs as such. Then, we focus on applying modern interpretability techniques, and compare the insights they provide with prior hypotheses.
28
+
29
+ # 2 Related Works
30
+
31
+ # 2.1 Automatic Cognate Prediction
32
+
33
+ Automatic cognate prediction has been studied using character-level machine translation techniques (Beinborn et al., 2013; Wu and Yarowsky, 2018; Dekker, 2018; Hämäläinen and Rueter, 2019; Four
34
+
35
+ ![](images/8d1d87523fcbac9afbe74ef817ea025f1be068dc69caf753bf28df28f1a8a92c.jpg)
36
+ Figure 1: Relations between studied languages and their families.
37
+
38
+ rier and Sagot, 2020a). Dekker and Zuidema (2021) provide an overview of the different neural approaches used to solve this task (including their own), as well as its applications to other historical linguistic tasks (such as phylogeny reconstruction). However, the current paper follows specifically the tracks of two previous works studying encoder-decoder models for Romance cognate prediction.
39
+
40
+ Fourrier et al. (2021) study which NMT architecture fits the cognate prediction task best, comparing different methods and data augmentation techniques. They conclude that best results are obtained with multilingual RNN encoder-decoders with attention, a setup we shall follow. Meloni et al. (2021) train an encoder-decoder on the prediction of Latin proto-forms from modern Romance cognates sets. They then settle to explain the results linguistically in a 'black-box' fashion; we shall probe their conclusions.
41
+
42
+ # 2.2 Neural Models Interpretability
43
+
44
+ NLP interpretability is a recent field, with the first workshop dedicated to the topic occurring in 2018 (BlackBoxNLP, colocated with EMNLP 2018). Madsen et al. (2021) provide a review of post hoc interpretability techniques (focused on a posteriori model interpretation), which they divide along the level of abstraction (from local to global explanations). Among all the works they mention, we focus on two. Belinkov et al. (2020) develop toolkits for global interpretability in their tutorial: probing tasks and model components interaction and visualisation. Conneau et al. (2018) focus on probing tasks for sequence to sequence models, to investigate different aspects of language captured by the model. In this paper, we therefore focus on global post hoc interpretability techniques, such as visualisation and probing tasks, to linguistically interpret our models.
45
+
46
+ # 3 Paper Objective
47
+
48
+ # 3.1 Reference Task: Cognate Prediction
49
+
50
+ Training Objective The task we are optimising for is cognate prediction, i.e. generating, from a phonetised word, the plausible phonetic forms of its cognates in related languages. This is a sequence to sequence translation problem, going from a sequence of phones to a sequence of phones. To evaluate such 'translations,' we use Post (2018) implementation of BLEU (Papineni et al., 2002), which does not suffer for cognate prediction from the same drawbacks as for NMT (Fourrier et al., 2021).
51
+
52
+ Reference Architectures Best performing models for the task are NMT encoder-decoder models (Fourrier et al., 2021). They are composed of one or several encoder components, encoding the source word into a hidden representation, and of one or several decoder components, each playing the role of a 'conditional language model' (Conneau et al., 2018) that generates the output, in our case the target phonetic form of the word.
53
+
54
+ Languages Choice Sound correspondences and sound change rules are identified by looking at multilingual sets of cognates. If we want our neural models to latently capture such linguistic information, we need our data to be as multilingual as possible in a given language family.
55
+
56
+ We select 9 related Romance languages for which enough cognate data is available: Galician (GL), Portuguese (PT), Spanish (ES), Catalan (CA), Occitan (OC), Italian (IT), French (FR), Romanian (RO) and Aromanian (RUP).
57
+
58
+ The Romance family divided early in two branches (Fig. 1): the Eastern Romance branch (RO, RUP), and the Italo-Western branch (all others). They therefore constitute the two oldest language clusters in our data. However, through external influences on their phonology, French (Ger
59
+
60
+ manic influences) and the Eastern Romance branch (Slavic influences) tend to diverge from the other Romance languages studied. At the opposite end in the spectrum in terms of language closeness, Portuguese and Galician belong to their own language sub-branch, the Galician-Portuguese branch, as do Catalan and Occitan in the Occitano-Romance branch.
61
+
62
+ # 3.2 Steps of Analysis
63
+
64
+ We will first analyse our models and try to understand what they learned based only on their raw scores and prediction errors, as was done by Fourier et al. (2021) and Meloni et al. (2021), to see the amount of linguistic information we can extract as such.
65
+
66
+ Then, we will probe the models, in order to compare the insights we got from a 'black box' analysis to insights obtained when probing specifically for linguistic or historical information. We therefore design the following probing tasks.
67
+
68
+ # 3.2.1 Synchronous Probes
69
+
70
+ Cognates are representative of their language phonetics, and we want to study whether the models learn deeper linguistic information while training on them.
71
+
72
+ Phonotactics To study whether our models learn phonotactics (the allowed arrangement of sounds and sound patterns in a language),[5,6] we adapt the bigram shift probing task (Conneau et al., 2018) to test whether encoders are sensitive to legal phone orders. A binary classifier is trained to distinguish between hidden representations of normal words and words whose phones have been inverted.
73
+
74
+ Phonology To study whether our models learn phonologically meaningful representations, we study our high-dimensionality hidden representation for each item of our vocabulary, as suggested in Madsen et al. (2021). We reduce the dimensionality of our encoded representations using PCA (Pearson, 1901) and t-SNE (der Maaten and Hinton, 2008) and look at the emerging underlying organisation of the phonetic space, as was done in Jacobs and Mailhot (2019) and Shibata et al. (2020) for, respectively, seq2seq phonetic and LSTM syntactic representations analysis.
75
+
76
+ # 3.2.2 Diachronic Probes
77
+
78
+ Cognates carry the historical information of the evolution of their respective languages. We want to see how much of this information was explicitly learned by the model.
79
+
80
+ Sound Correspondences and Contextualised Changes Cognates are usually identified by sound correspondence sets, which they also help define (see Sec. 1). Meloni et al. (2021) provide sample sets containing minimal examples of sound correspondences, as artificial subwords in some Romance languages and the associated Latin parent. To see if our models learn these sound correspondences, we study if they can reconstitute these sets.
81
+
82
+ Proto-form Reconstruction Cognates descend from a common ancestor word, their proto-form. When a multilingual neural model learns mappings between cognates in related languages, the shared joint intermediate representation tends towards their common denominator. $^{7}$ A plausible candidate would be a mapping of a common ancestor space, as proto-form have the overall smallest distance to all their children. To study whether the model contains historical information about the proto-forms, we design a probing task where we train a decoder to predict a Latin word from the fixed encoded representation of its children Romance cognates.
83
+
84
+ # 4 Detailed Experimental Setup
85
+
86
+ # 4.1 Data
87
+
88
+ Extraction and Pre-processing Monolingual $^{8}$ and bilingual $^{9}$ cognate lexicons are extracted from EtymDB2 (Fourrier and Sagot, 2020b), an etymological database, using the scripts provided. All data is then phonised using espeak (Duddington, 2007-2015), with relevant phonetizers for CA, ES, IT, FR, PT, RO, and approximating the phonetization of OC as CA, RUP as RO, and GL as PT. $^{10}$ We segment the data at the character level then split it $85/7.5/7.5\%$ for the train/dev/test sets (see
89
+
90
+ App. A.1.2). The split is repeated 3 times with different shufflings for statistical significance.
91
+
92
+ Description There is considerable variability in the number of word pairs between our bilingual datasets (see Appendix, Table 5): OC $\rightarrow$ RUP (two of our least resourced languages) contains 81 pairs, whereas PO $\rightarrow$ ES contains 1930 pairs. Monolingual datasets vary from 553 words for OC to 6005 words for IT, with CA, ES, FR, IT, and PT sets containing more than 2000 words, and GL, OC, RO and RUP less than 1500. $^{11}$ The total number of phones per pair varies accordingly; the number of unique phones per language pair stands between 32 and 56, depending on the number of shared phones between languages. Average word length varies between 5.3 and 8.3 phones.
93
+
94
+ # 4.2 Models
95
+
96
+ <table><tr><td>Name</td><td>#source</td><td>#target</td><td>With mono</td><td>Sharing</td></tr><tr><td>SMT</td><td>1</td><td>1</td><td>No</td><td>-</td></tr><tr><td>Bi-NMT</td><td>1</td><td>1</td><td>No</td><td>None</td></tr><tr><td>Bi-NMT+m</td><td>1</td><td>1</td><td>Yes</td><td>None</td></tr><tr><td>M-NMT</td><td>9 (all)</td><td>9 (all)</td><td>No</td><td>None</td></tr><tr><td>M-NMT+m</td><td>9 (all)</td><td>9 (all)</td><td>Yes</td><td>None</td></tr><tr><td>+shared_emb</td><td>9 (all)</td><td>9 (all)</td><td>Yes</td><td>Embeddings</td></tr><tr><td>+shared_all</td><td>9 (all)</td><td>9 (all)</td><td>Yes</td><td>All</td></tr></table>
97
+
98
+ Table 1: Model type setups
99
+
100
+ The summary of all our encoder-decoder models is developed in Table 1. Our baselines are SMT models trained for each language direction (SMT), more adapted to very low-resource setups. We train bilingual NMT models, without (Bi-NMT) or with $(\mathbf{Bi} - \mathbf{NMT} + \mathbf{m})$ added monolingual data, $^{12}$ and multilingual models without (M-NMT) or with $(\mathbf{M} - \mathbf{NMT} + \mathbf{m})$ monolingual data, using one encoder and one decoder per language. We also study the impact of sharing components in our likely best setup (in terms of data size seen by the model: M-NMT+m), and either share embeddings layers (M-NMT+m+shared_emb) or share full encoders and decoders across all languages (M-NMT+m+shared_all). Training details can be found in Appendix A.2.
101
+
102
+ ![](images/975774b09b3623351b37aa3dd5b1e2c6bed9cdb8defb086ff3313be7ac499441.jpg)
103
+ Figure 2: Percentage of language pairs for which a given model (left) outperforms an other (bottom).<sup>13</sup>
104
+
105
+ # 5 Blackbox Analysis
106
+
107
+ # 5.1 Raw BLEU Results
108
+
109
+ The full BLEU score tables of all our models on all our language pairs are in Appendix A.5.
110
+
111
+ # 5.1.1 Best Setup Choice
112
+
113
+ We synthesise the respective performance of our models in Fig. 2, comparing their BLEU scores. This heatmap indicates the percentage of language pairs for which a model (left) is better than another model (bottom). Both Bi-NMT models perform worse than the SMT baseline (with and without monolingual data). Multilinguality improves the performance, as the M-NMT model outperforms the baseline in $58\%$ of cases. However, the best results are obtained when the models see the most data; the different M-NMT+m models outperform all other models for $80\%$ of language pairs minimum. Another slight increase is obtained by sharing embeddings, as the M-NMT+m+shared_emb outperforms the M-NMT+m model in $58\%$ of cases. We will therefore focus on the M-NMT+m and M-NMT+m+shared_emb models, our two best setups.
114
+
115
+ # 5.1.2 Impact of Parameters
116
+
117
+ To study performance on all language pairs separately, we generate the heatmap of average BLEU scores (Fig. 3) from all sources (y-axis) to all targets (x-axis) for our two best architectures and the baseline, with high/low scores in red/blue, and big/small datasets indicated by $+ / -$ respectively. Our models and baseline behave similarly, with
118
+
119
+ ![](images/9fb3017edb78ede9c6901d81f7d15a7b19e90151ef31c5cd3fffe9eb8d402627.jpg)
120
+
121
+ ![](images/ec00ed066901d2b612a2b8fe2820c164be8a53ee23fbfe9113459c9592b59f6d.jpg)
122
+
123
+ Figure 3: Heatmap of the BLEU scores for our models of interest.
124
+ ![](images/c24119287e45ebb3918fcccd143201a542b8b14f2b6c937f6b3239ac599b9422.jpg)
125
+ Languages: source in y, target in x. Data size: + indicates more than 1000 word pairs, - less than 300.
126
+
127
+ ![](images/ae0a5b9f5f180a6f1343a84e2f4f683019797bf01e6f22935f075f13a07a6151.jpg)
128
+
129
+ overall good BLEU scores, which seem to be slightly correlated with data size, except for some outliers. Firstly, predicting RO and RUP from/to all other languages has a considerably lower BLEU than all other pairs, except for RO-RUP itself: predicting between languages from too dissimilar language branches (Eastern-Romance and Italo-Western Romance), unsurprisingly, seems harder than translating within either of those branches. Secondly, $\mathrm{GL}\leftrightarrow \mathrm{PT}$ and $\mathrm{OC}\leftrightarrow \mathrm{CA}$ have higher BLEU than we could expect based on data size only. $^{14}$ In all setups, it therefore appears to be easier to predict cognates for closely related languages. $^{15}$
130
+
131
+ # 5.2 Predictions Analysis
132
+
133
+ We compare the predictions and errors made by the models in three cases: the language pair is highly resourced and gets a good BLEU score (ES-PT), the language pair has average resources but contains close languages and gets a good BLEU
134
+
135
+ score (PT-GL), the language pair has almost no resource and gets a bad BLEU (RO-FR).
136
+
137
+ We use the Needleman and Wunsch (1970) dynamic programming algorithm, modified by Gotoh (1982) $^{16}$ to compute the pairwise alignment between predictions and gold targets in 1 or 2-grams. $^{17}$ We can then better see which predicted phones match the gold or not, and why. $^{18}$
138
+
139
+ # 5.2.1 General Observations
140
+
141
+ When looking at the phone level model predictions, we observe that they can be: (1) correct (equal to gold); (2) phonetically close to the gold (ex: [β], a voiced bilabial fricative, instead of [b], a voiced bilabial plosive); (3) either a known sound correspondence, incorrect in the current example but attested in others (ex: [v], a voiced labiodental fricative, instead of [b], a voiced bilabial plosive) or a wrong prediction (ex: [a], a vowel, instead of [b], a consonant) (Table 2). In 2-gram, this classification becomes (1) correct (identical 2-grams); (2) close (identical/close phone and close phone); (3) the rest, which can then be divided in (a) 'one correct/close and one wrong', or (b) 'two wrong' phones, other patterns almost not occurring.
142
+
143
+ For our high-resource pair (ES $\rightarrow$ PT), our models perform similarly to the baseline: they are correct in $90\%$ of cases, and more often close than wrong the rest of the time.
144
+
145
+ We observe two different behaviours for our comparatively less-resourced pairs. For the pair with close languages (PT $\rightarrow$ GL), multilinguality decreases performance (by 2 to 5 points) with respect to the baseline. For our extremely low-resourced and sparsely related pair (RO $\rightarrow$ FR), however, the multilingual models outperform the SMT baseline for the first time (by 9 to 15 points), likely thanks to data augmentation provided by multilinguality. Sharing embeddings seems to have a significant impact only when the languages are far away and the data quantity low, as it inverts the ratio of close to wrong results from 1:3 to 3:2, seemingly increasing the model language modelling capability.
146
+
147
+ # 5.2.2 Error Patterns
148
+
149
+ Errors can be separated between those which occur only once, and tend to be nonsensical, and those
150
+
151
+ <table><tr><td colspan="2">Pair</td><td colspan="3">ES→PT</td><td colspan="3">PT→GL</td><td colspan="3">RO→FR</td></tr><tr><td colspan="2">Prediction</td><td>Correct</td><td>Close</td><td>Wrong</td><td>Correct</td><td>Close</td><td>Wrong</td><td>Correct</td><td>Close</td><td>Wrong</td></tr><tr><td rowspan="3">1-gram:</td><td>SMT</td><td>90.9%</td><td>5.3%</td><td>3.8%</td><td>95.5%</td><td>2.4%</td><td>2.1%</td><td>62.7%</td><td>12.7%</td><td>24.5%</td></tr><tr><td>M-NMT+m</td><td>89.1%</td><td>5.5%</td><td>5.4%</td><td>93.6%</td><td>3.4%</td><td>3.1%</td><td>71.6%</td><td>8.8%</td><td>19.6%</td></tr><tr><td>+shared_emb</td><td>90.7%</td><td>5.1%</td><td>4.3%</td><td>92.4%</td><td>3.9%</td><td>3.7%</td><td>73.8%</td><td>14.6%</td><td>11.7%</td></tr><tr><td rowspan="3">2-gram:</td><td>SMT</td><td>83.4%</td><td>9.7%</td><td>6.9%</td><td>93.2%</td><td>4.1%</td><td>2.6%</td><td>49.1%</td><td>14.0%</td><td>36.8%</td></tr><tr><td>M-NMT+m</td><td>81.5%</td><td>9.8%</td><td>8.6%</td><td>89.3%</td><td>6.2%</td><td>4.5%</td><td>64.4%</td><td>8.5%</td><td>27.1%</td></tr><tr><td>+shared_emb</td><td>83.3%</td><td>9.6%</td><td>7.1%</td><td>88.0%</td><td>6.8%</td><td>5.2%</td><td>58.6%</td><td>24.1%</td><td>17.2%</td></tr></table>
152
+
153
+ Table 2: Prediction types frequency for 1 and 2 grams, for three language pairs: ES→PT (good BLEU, big data size), PT→GL (good BLEU, average data size, close languages), RO→FR (bad BLEU, small data size).
154
+
155
+ with a higher apparition frequency, which tend to be plausible and similar between neural models and baseline. We only analyse frequent errors in the following section, therefore not studying RO $\rightarrow$ FR, whose errors tend to occur only once and be nonsensical (likely the result of the difficulty of learning on so little data).
156
+
157
+ Wrong phones in 1-gram or 2-gram case (a) correspond to high-mid vocalic alternations patterns, $\left[\circ\right] / \left[\mathrm{u}\right]$ , $\left[\varepsilon\right] / \left[\mathrm{i}\right]-\left[\mathrm{i}\right]$ , exchange of consonants linked by a sound correspondence $\left[\mathrm{v}\right] / \left[\mathrm{b}\right]$ , or less frequently, in 2-gram only, to a $[\mathrm{k}]/[\mathrm{z}]$ or $[\mathrm{w}]/[\mathrm{l}]$ confusion. [19] 2-gram case (b) correspond to metathesis (phone inversions, ex: $\left[\mathrm{m}\right]/\left[\mathrm{n}\right]$ or $\left[\mathrm{er}\right]/\left[\mathrm{ii}\right]$ ) $30\%$ of the time, the rest being nonsensical errors.
158
+
159
+ These results seem to confirm the observations made by Meloni et al. (2021) that most errors made by the models are not arbitrary but tend to correlate with historical linguistic phenomenon.
160
+
161
+ # 5.3 Conclusion
162
+
163
+ Analysing our models using standard error analysis methods allow us to conclude that (1) multilinguality helps considerably to predict cognates, which might reflect information transfer or sharing in the models, and (2) errors made by the models suggest that they learn (a) phonetic similarity and (b) linguistic phenomena.
164
+
165
+ # 6 Synchronous Probing
166
+
167
+ Using previously defined probes, we study whether our models learn synchronous linguistic information.
168
+
169
+ # 6.1 Phonotactics
170
+
171
+ Probe Training We trained MLP classifiers to detect whether encoded words contain a switched bigram of phones or not. For a given language, the
172
+
173
+ encoder used is either randomly initialised or coming from our multilingual models. This experiment is reproduced for all data shuffles and all languages. No matter the setup, the classifier performance is systematically around $50\%$ , no better than random.
174
+
175
+ Fine-tuning We decide to try fine-tuning our multilingual models on the classification of bigram switches, to see if this is information our models can learn to distinguish. We use the same setup as for the probing tasks, except that the encoders are now fine-tuned along the classifier training. The results are again no better than random.
176
+
177
+ Conclusion When learning to predict cognates, the encoder does not spontaneously encode phonotactics information, nor does it learn to encode it when fine-tuned specifically on that. This is interesting, because sound correspondences relations between cognates are partly linked to phonotactics. If the model does not learn this information explicitly, it has to learn something else instead.
178
+
179
+ # 6.2 Vocabulary Information
180
+
181
+ We study learned phone proximity by using dimension reductions techniques (PCA, t-SNE) on the encoders' hidden representation. We present here 3-dimensional PCA for the vowels' representations (Fig. 4), but observations we make also hold true for consonants (see Appendix A.4).
182
+
183
+ Language Relatedness Along one dimension, the space seems to be organised through a linguistic continuum (with vowels in French together, then the rest of the Gallo-Romance branch, then the Eastern-Romance branch, then the Ibero-Romance branch).<sup>20</sup> However, this continuum is not constant across data shufflings; depending on the data seed, the model places different languages close to one
184
+
185
+ ![](images/db53597efdf4a03e3e9f71a5be53e4effe0d5cbe6466c5a48bf496c18121466d.jpg)
186
+ Figure 4: Vowels PCA, seed 0. Left: coloured on language. Right: coloured on pole of the vocalic triangle
187
+
188
+ ![](images/e00e18933e32448aa4b734442dd6e3ea498a04da698efc1e8119fb3c81229613.jpg)
189
+
190
+ another in the intermediate representation—models learn a language separation of the space, but not constant language relationships.
191
+
192
+ Phonetic Organisation Along the other two dimensions appears a pattern of phonetic organisation seemingly similar to the vocalic diagram,[21] which proves stable across all our runs. All our NMT models, no matter the data shuffling trained on, seem to have the three phonetic vocalic poles in their PCA ('u/o', 'i/e', and 'a'), more or less some outliers. These outliers fall in two categories: rare French phones (e.g. nasal vowels, which do not exist in the other Romance languages, and therefore are harder to place), or, interestingly, phones actually clustered with the most similar pole orthographically and not phonetically. For example, o is linked to 'u/o' instead of 'a' (and both [ɔ] and [ɔ] sounds usually come from the letter o), ε to 'i/e' instead of 'a' ([ε] and [e] from e). The models appear to have learned to encode similarly phones occurring in similar contexts, and not phones that are actually phonetically similar.[22] We can therefore say that, though the models seem to have learned a 'phonologically meaningful taxonomy of phonemes without explicit supervision' (Meloni et al., 2021), a faithful and not just plausible interpretation (Jacovi and Goldberg, 2020) is that they have actually learned something akin to a 'phonetic language model'. However, since sound changes occur reg-
193
+
194
+ ularly, phones in similar contexts in related languages will tend to have evolved from a common ancestor phone: closer intermediate representations belonging to contextually similar phones tends to confirm a form of historical mapping.
195
+
196
+ # 7 Diachronic Probing
197
+
198
+ # 7.1 Do the Models Learn Phone Correspondences?
199
+
200
+ <table><tr><td>Spanish to</td><td>IT</td><td>PT</td><td>FR</td><td>RO</td><td>Avg.</td></tr><tr><td>SMT</td><td>76</td><td>73</td><td>64</td><td>73</td><td>71</td></tr><tr><td>M-NMT+m</td><td>67</td><td>61</td><td>52</td><td>61</td><td>60</td></tr><tr><td>+shared_emb</td><td>61</td><td>61</td><td>58</td><td>64</td><td>61</td></tr><tr><td>Italian to</td><td>ES</td><td>PT</td><td>FR</td><td>RO</td><td>Avg.</td></tr><tr><td>SMT</td><td>88</td><td>64</td><td>73</td><td>76</td><td>75</td></tr><tr><td>M-NMT+m</td><td>61</td><td>70</td><td>27</td><td>58</td><td>54</td></tr><tr><td>+shared_emb</td><td>70</td><td>61</td><td>52</td><td>55</td><td>59</td></tr><tr><td>Portuguese to</td><td>ES</td><td>IT</td><td>FR</td><td>RO</td><td>Avg.</td></tr><tr><td>SMT</td><td>88</td><td>82</td><td>67</td><td>76</td><td>78</td></tr><tr><td>M-NMT+m</td><td>76</td><td>76</td><td>76</td><td>70</td><td>74</td></tr><tr><td>+shared_emb</td><td>73</td><td>67</td><td>55</td><td>67</td><td>65</td></tr><tr><td>French to</td><td>ES</td><td>IT</td><td>PT</td><td>RO</td><td>Avg.</td></tr><tr><td>SMT</td><td>61</td><td>67</td><td>36</td><td>64</td><td>57</td></tr><tr><td>M-NMT+m</td><td>70</td><td>70</td><td>76</td><td>61</td><td>69</td></tr><tr><td>+shared_emb</td><td>73</td><td>64</td><td>76</td><td>48</td><td>65</td></tr><tr><td>Romanian to</td><td>ES</td><td>IT</td><td>PT</td><td>FR</td><td>Avg.</td></tr><tr><td>SMT</td><td>72</td><td>62</td><td>59</td><td>62</td><td>64</td></tr><tr><td>M-NMT+m</td><td>56</td><td>69</td><td>66</td><td>34</td><td>56</td></tr><tr><td>+shared_emb</td><td>53</td><td>69</td><td>62</td><td>41</td><td>56</td></tr></table>
201
+
202
+ Table 3: % of cases where our models predicted the good artificial correspondence among the 5-best predictions (for the Meloni et al. (2021) sets). Best in bold.
203
+
204
+ Meloni et al. (2021) provide sets of minimal phonemes test sequences representing known sound correspondences in RO, FR, IT, ES and PT, to evaluate their models' generalisation. For example, the minimal set for sound changes linked to word initial Latin /pl/ is, for an artificial Latin origin [pla]: RO [pla], FR [pla], IT [pja], ES [a] and PT [fa]. We predict 5-best 'cognates' for the provided artificial segments, to see if our models can generalise sound correspondences too. The correct results appear in 1st or 2nd position most of the time (Table 6 in Appendix). Our neural models reach between $54\%$ and $74\%$ average accuracy from a given language (Table 3),[23] and the statistical baseline tends to perform better overall. However, sound correspondences where the source languages are the most divergent in our Romance family (French and Romanian, see Sec. 3.1) are better captured with the neural models by 3 to 40 points (for language pairs with enough data, such as FR $\rightarrow$ ES, IT, PT, or RO $\rightarrow$ IT, PT). Adding shared embeddings increases performance with our more typical Romance languages as source and decreases performance for the previous languages, while still performing better than the baseline. We can therefore say that sound correspondences information is captured by our models.
205
+
206
+ # 7.2 Do the Models Capture Diachronic Information?
207
+
208
+ We used very small RNN decoders with attention $^{24}$ as probes, and trained them to predict Latin protoforms from the NMT encoded hidden representations of several models. We trained our probes to predict from M-NMT+m frozen encoders. Then, to assess if multilinguality is helpful in capturing latent historical information, we trained probes on the source-to-source Bi-NMT+m frozen encoders, which have learnt a coherent hidden representation of the source language, but possess no extra linguistic information. To make sure that our probes are not too expressive, we trained some on an untrained encoder frozen after random initialisation, as an untrained baseline (Conneau et al., 2018; Zhang and Bowman, 2018). Too expressive networks can learn to fit any random noise, and have
209
+
210
+ <table><tr><td>Model</td><td>CA</td><td>ES</td><td>FR</td></tr><tr><td>Top baseline</td><td>32.3 ± 4.7</td><td>46.7 ± 0.6</td><td>31.7 ± 3.6</td></tr><tr><td>M-NMT+m</td><td>36.8 ± 1.3</td><td>38.8 ± 2.4</td><td>31.7 ± 0.9</td></tr><tr><td>Bi-NMT+m</td><td>28.5 ± 3.7</td><td>38.0 ± 1.9</td><td>29.9 ± 0.8</td></tr><tr><td>Untrained baseline</td><td>5.2 ± 0.9</td><td>3.1 ± 0.5</td><td>3.1 ± 1.0</td></tr><tr><td>Model</td><td>GL</td><td>IT</td><td>OC</td></tr><tr><td>Top baseline</td><td>23.8 ± 4.3</td><td>50.5 ± 3.0</td><td>6.5 ± 1.0</td></tr><tr><td>M-NMT+m</td><td>26.8 ± 1.9</td><td>45.1 ± 0.6</td><td>9.6 ± 1.4</td></tr><tr><td>Bi-NMT+m</td><td>20.7 ± 2.1</td><td>44.0 ± 0.6</td><td>9.0 ± 3.1</td></tr><tr><td>Untrained baseline</td><td>2.8 ± 0.5</td><td>5.5 ± 1.8</td><td>1.8 ± 0.1</td></tr><tr><td>Model</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>Top baseline</td><td>36.4 ± 2.9</td><td>18.2 ± 6.2</td><td>9.9 ± 1.9</td></tr><tr><td>M-NMT+m</td><td>35.1 ± 0.6</td><td>21.1 ± 2.5</td><td>18.1 ± 4.5</td></tr><tr><td>Bi-NMT+m</td><td>31.1 ± 0.9</td><td>26.2 ± 0.8</td><td>16.8 ± 0.4</td></tr><tr><td>Untrained baseline</td><td>4.8 ± 0.7</td><td>2.6 ± 0.9</td><td>2.5 ± 0.3</td></tr></table>
211
+
212
+ Table 4: Probe BLEU test scores for 3 seeds (20 epochs)
213
+
214
+ therefore no value as probes.[25] Lastly, we compare everything to the best possible setup, our top baseline: a Bi-NMT model trained specifically on the task of learning Latin from the current source. On Table 4, we plotted the BLEU test scores obtained at each epoch by the different setups for the different languages. Our bottom baselines' low performance confirms that our probes are selective enough to prevent rote memorisation of anything. M-NMT+m encoders, without any fine-tuning on the prediction of Latin, reach or surpass the performance of models specifically trained on this task, and are outperformed by our Bi-NMT+m encoders only once.[26] Multilinguality therefore introduces latent linguistic information, which helps reconstruct the proto-form better than when using bilingual models only.
215
+
216
+ # 8 Conclusion
217
+
218
+ After training and selecting the best multilingual machine translation models for the task of cognate prediction, we confirmed the black-box analysis previously made of similar models (they capture language relatedness information and phonetic similarity). We then probed our models and discovered that latent linguistic information learned by the model seemed to encode a phonetic 'contextual language model' rather than explicit phonology or phonotactics. We also discovered that our mod
219
+
220
+ els learn diachronic information: they are able to produce sound correspondences, and, even more interestingly, they contain enough historical linguistic information to allow the reconstruction of the proto-form with no fine-tuning, performing at least as well as models trained specifically for this task. We can therefore conclude that synchronic multilingual cognate prediction models learn latent diachronic information, though further work is needed to understand more precisely under which form this information is stored.
221
+
222
+ # Acknowledgements
223
+
224
+ This work was performed using HPC resources from GENCI-IDRIS (Grant 2021-AD011011459R1).
225
+
226
+ # References
227
+
228
+ Lisa Beinborn, Torsten Zesch, and Iryna Gurevych. 2013. Cognate production using character-based machine translation. In Proceedings of the Sixth International Joint Conference on Natural Language Processing, pages 883-891, Nagoya, Japan. Asian Federation of Natural Language Processing.
229
+ Yonatan Belinkov, Sebastian Gehrmann, and Ellie Pavlick. 2020. Interpretability and analysis in neural NLP. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: Tutorial Abstracts, pages 1-5, Online. Association for Computational Linguistics.
230
+ Timotheus A. Bodt, Nathan W Hill, and Johann-Mattis List. 2018. Prediction experiment for missing words in Kho-Bwa language data. Open Science Framework Preregistration.
231
+ Timotheus A. Bodt and Johann-Mattis List. 2019. Testing the predictive strength of the comparative method: an ongoing experiment on unattested words in Western Kho-Bwa languages. *Papers in Historical Phonology*, 4:22-44.
232
+ Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1724-1734, Doha, Qatar. Association for Computational Linguistics.
233
+ Peter J. A. Cock, Tiago Antao, Jeffrey T. Chang, Brad A. Chapman, Cymon J. Cox, Andrew Dalke, Iddo Friedberg, Thomas Hamelryck, Frank Kauff, Bartek Wilczynski, and Michiel J. L. de Hoon. 2009. Biopython: freely available Python tools for computational
234
+
235
+ molecular biology and bioinformatics. Bioinformatics, 25(11):1422-1423.
236
+ Alexis Conneau, German Kruszewski, Guillaume Lample, Loic Barrault, and Marco Baroni. 2018. What you can cram into a single $\$ \& !\#$ * vector: Probing sentence embeddings for linguistic properties. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2126-2136, Melbourne, Australia. Association for Computational Linguistics.
237
+ Peter Dekker. 2018. Reconstructing language ancestry by performing word prediction with neural networks. Master's thesis, University of Amsterdam.
238
+ Peter Dekker and Willem Zuidema. 2021. Word prediction in computational historical linguistics. Journal of Language Modelling, 8(2):295-336.
239
+ Laurens Van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-sne. Journal of Machine Learning Research, 9(86):2579-2605.
240
+ Jonathan Duddington. 2007-2015. espeak text to speech.
241
+ Clémentine Fourrier, Rachel Bawden, and Benoit Sagot. 2021. Can cognate prediction be modelled as a low-resource machine translation task? In *Findings of the Association for Computational Linguistics: ACLIJCNLP* 2021, pages 847-861, Online. Association for Computational Linguistics.
242
+ Clémentine Fourrier and Benoit Sagot. 2020a. Comparing statistical and neural models for learning sound correspondences. In Proceedings of LT4HALA 2020 - 1st Workshop on Language Technologies for Historical and Ancient Languages, pages 79-83, Marseille, France. European Language Resources Association (ELRA).
243
+ Clémentine Fourrier and Benoit Sagot. 2020b. Methodological aspects of developing and managing an etymological lexical resource: Introducing EtymDB-2.0. In Proceedings of the 12th Language Resources and Evaluation Conference, pages 3207-3216, Marseille, France. European Language Resources Association.
244
+ Osamu Gotoh. 1982. An improved algorithm for matching biological sequences. Journal of Molecular Biology, 162(3):705-708.
245
+ Mika Hämäläinen and Jack Rueter. 2019. Finding Sami cognates with a character-based NMT approach. In Proceedings of the 3rd Workshop on the Use of Computational Methods in the Study of Endangered Languages Volume 1 (Papers), pages 39-45, Honolulu. Association for Computational Linguistics.
246
+ Kenneth Heafield. 2011. KenLM: Faster and smaller language model queries. In Proceedings of the Sixth Workshop on Statistical Machine Translation, pages 187-197, Edinburgh, Scotland, UK. Association for Computational Linguistics.
247
+
248
+ John Hewitt and Percy Liang. 2019. Designing and interpreting probes with control tasks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 2733-2743, Hong Kong, China. Association for Computational Linguistics.
249
+ Cassandra L. Jacobs and Fred Mailhot. 2019. Encoder-decoder models for latent phonological representations of words. In Proceedings of the 16th Workshop on Computational Research in Phonetics, Phonology, and Morphology, pages 206-217, Florence, Italy. Association for Computational Linguistics.
250
+ Alon Jacovi and Yoav Goldberg. 2020. Towards faithfully interpretable NLP systems: How should we define and evaluate faithfulness? In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4198-4205, Online. Association for Computational Linguistics.
251
+ Taku Kudo and John Richardson. 2018. SentencePiece: A simple and language independent subword tokenizer and tokenizer for neural text processing. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 66-71, Brussels, Belgium. Association for Computational Linguistics.
252
+ Thang Luong, Hieu Pham, and Christopher D. Manning. 2015. Effective approaches to attention-based neural machine translation. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 1412-1421, Lisbon, Portugal. Association for Computational Linguistics.
253
+ Andreas Madsen, Siva Reddy, and Sarath Chandar. 2021. Post-hoc interpretability for neural nlp: A survey. arxiv.
254
+ Gideon S. Mann and David Yarowsky. 2001. Multipath translation lexicon induction via bridge languages. In Second Meeting of the North American Chapter of the Association for Computational Linguistics.
255
+ Carlo Meloni, Shauli Ravfogel, and Yoav Goldberg. 2021. Ab antiquo: Neural proto-language reconstruction. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4460-4473, Online. Association for Computational Linguistics.
256
+ Saul B. Needleman and Christian D. Wunsch. 1970. A general method applicable to the search for similarities in the amino acid sequence of two proteins. Journal of Molecular Biology, 48(3):443-453.
257
+ Franz Josef Och and Hermann Ney. 2003. A systematic comparison of various statistical alignment models. Computational Linguistics, 29(1):19-51.
258
+ Hermann Osthoff and Karl Brugmann. 1878. Morphologische Untersuchungen auf dem Gebiete der indogermanischen Sprachen. Hirzel, Leipzig, Germany.
259
+
260
+ Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. *fairoseq: A fast, extensible toolkit for sequence modeling*. In *Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics* (Demonstrations), pages 48-53, Minneapolis, Minnesota. Association for Computational Linguistics.
261
+ 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, Philadelphia, Pennsylvania, USA. Association for Computational Linguistics.
262
+ Karl Pearson. 1901. Liii. on lines and planes of closest fit to systems of points in space. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 2(11):559-572.
263
+ Matt Post. 2018. A call for clarity in reporting BLEU scores. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 186-191, Brussels, Belgium. Association for Computational Linguistics.
264
+ Chihiro Shibata, Kei Uchiumi, and Daichi Mochihashi. 2020. How LSTM encodes syntax: Exploring context vectors and semi-quantization on natural text. In Proceedings of the 28th International Conference on Computational Linguistics, pages 4033-4043, Barcelona, Spain (Online). International Committee on Computational Linguistics.
265
+ 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 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 5998-6008.
266
+ Winston Wu and David Yarowsky. 2018. Creating largescale multilingual cognate tables. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018), Miyazaki, Japan. European Language Resources Association (ELRA).
267
+ Kelly Zhang and Samuel Bowman. 2018. Language modeling teaches you more than translation does: Lessons learned through auxiliary syntactic task analysis. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 359-361, Brussels, Belgium. Association for Computational Linguistics.
268
+
269
+ # A Appendix
270
+
271
+ # A.1 Data Presentation
272
+
273
+ # A.1.1 Data size
274
+
275
+ <table><tr><td>FROM CATALAN (CA) TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>#words</td><td>2612</td><td>1233</td><td>466</td><td>449</td><td>970</td><td>324</td><td>1031</td><td>235</td><td>144</td></tr><tr><td>#phones</td><td>16472</td><td>16171</td><td>5706</td><td>5724</td><td>12511</td><td>3486</td><td>13601</td><td>2162</td><td>1307</td></tr><tr><td>#unique phones</td><td>36</td><td>41</td><td>47</td><td>44</td><td>56</td><td>35</td><td>44</td><td>42</td><td>40</td></tr><tr><td>Avg word length</td><td>7.31</td><td>7.56</td><td>7.12</td><td>7.37</td><td>7.45</td><td>6.38</td><td>7.60</td><td>5.60</td><td>5.54</td></tr><tr><td>FROM SPANISH (ES) TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>#words</td><td>1236</td><td>4967</td><td>693</td><td>732</td><td>1880</td><td>230</td><td>1930</td><td>463</td><td>291</td></tr><tr><td>#phones</td><td>16198</td><td>34176</td><td>8931</td><td>9760</td><td>25686</td><td>2534</td><td>26156</td><td>4700</td><td>2898</td></tr><tr><td>#unique phones</td><td>41</td><td>35</td><td>46</td><td>44</td><td>54</td><td>38</td><td>44</td><td>42</td><td>39</td></tr><tr><td>Avg word length</td><td>7.55</td><td>7.88</td><td>7.45</td><td>7.67</td><td>7.83</td><td>6.51</td><td>7.78</td><td>6.08</td><td>5.98</td></tr><tr><td>FROM FRENCH (FR) TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>#words</td><td>466</td><td>694</td><td>3772</td><td>215</td><td>715</td><td>110</td><td>600</td><td>135</td><td>86</td></tr><tr><td>#phones</td><td>5707</td><td>8941</td><td>21225</td><td>2641</td><td>9332</td><td>1126</td><td>7665</td><td>1183</td><td>737</td></tr><tr><td>#unique phones</td><td>47</td><td>46</td><td>46</td><td>42</td><td>54</td><td>41</td><td>43</td><td>37</td><td>36</td></tr><tr><td>Avg word length</td><td>7.13</td><td>7.44</td><td>6.63</td><td>7.15</td><td>7.53</td><td>6.12</td><td>7.39</td><td>5.39</td><td>5.30</td></tr><tr><td>FROM GALICIAN (GL) TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>#words</td><td>449</td><td>732</td><td>215</td><td>1464</td><td>558</td><td>138</td><td>882</td><td>176</td><td>106</td></tr><tr><td>#phones</td><td>5724</td><td>9759</td><td>2641</td><td>9509</td><td>7196</td><td>1455</td><td>11117</td><td>1703</td><td>1005</td></tr><tr><td>#unique phones</td><td>44</td><td>44</td><td>42</td><td>35</td><td>51</td><td>41</td><td>37</td><td>38</td><td>37</td></tr><tr><td>Avg word length</td><td>7.37</td><td>7.67</td><td>7.15</td><td>7.50</td><td>7.45</td><td>6.27</td><td>7.30</td><td>5.84</td><td>5.74</td></tr><tr><td>FROM ITALIAN (IT) TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>#words</td><td>973</td><td>1885</td><td>717</td><td>558</td><td>6005</td><td>234</td><td>1557</td><td>618</td><td>378</td></tr><tr><td>#phones</td><td>12534</td><td>25742</td><td>9346</td><td>7190</td><td>44073</td><td>2660</td><td>21199</td><td>6834</td><td>4046</td></tr><tr><td>#unique phones</td><td>56</td><td>54</td><td>54</td><td>51</td><td>49</td><td>50</td><td>55</td><td>50</td><td>47</td></tr><tr><td>Avg word length</td><td>7.44</td><td>7.83</td><td>7.52</td><td>7.44</td><td>8.34</td><td>6.68</td><td>7.81</td><td>6.53</td><td>6.35</td></tr><tr><td>FROM OCCITAN (OC) TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>#words</td><td>324</td><td>230</td><td>109</td><td>138</td><td>234</td><td>553</td><td>222</td><td>117</td><td>81</td></tr><tr><td>#phones</td><td>3486</td><td>2534</td><td>1120</td><td>1455</td><td>2659</td><td>3026</td><td>2391</td><td>1044</td><td>724</td></tr><tr><td>#unique phones</td><td>35</td><td>38</td><td>41</td><td>41</td><td>50</td><td>33</td><td>42</td><td>38</td><td>36</td></tr><tr><td>Avg word length</td><td>6.38</td><td>6.51</td><td>6.14</td><td>6.27</td><td>6.68</td><td>6.47</td><td>6.39</td><td>5.46</td><td>5.47</td></tr><tr><td>FROM PORTUGUESE (PT) TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>#words</td><td>1031</td><td>1930</td><td>596</td><td>883</td><td>1556</td><td>223</td><td>4891</td><td>399</td><td>261</td></tr><tr><td>#phones</td><td>13606</td><td>26158</td><td>7624</td><td>11125</td><td>21188</td><td>2399</td><td>33046</td><td>3991</td><td>2569</td></tr><tr><td>#unique phones</td><td>44</td><td>44</td><td>43</td><td>37</td><td>55</td><td>42</td><td>37</td><td>39</td><td>38</td></tr><tr><td>Avg word length</td><td>7.60</td><td>7.78</td><td>7.40</td><td>7.30</td><td>7.81</td><td>6.38</td><td>7.76</td><td>6.00</td><td>5.92</td></tr><tr><td>FROM ROMANIAN (RO) TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>#words</td><td>236</td><td>465</td><td>136</td><td>175</td><td>621</td><td>117</td><td>398</td><td>1088</td><td>412</td></tr><tr><td>#phones</td><td>2173</td><td>4715</td><td>1193</td><td>1696</td><td>6859</td><td>1044</td><td>3984</td><td>5833</td><td>4251</td></tr><tr><td>#unique phones</td><td>42</td><td>42</td><td>37</td><td>38</td><td>50</td><td>38</td><td>39</td><td>32</td><td>32</td></tr><tr><td>Avg word length</td><td>5.60</td><td>6.07</td><td>5.39</td><td>5.85</td><td>6.52</td><td>5.46</td><td>6.01</td><td>6.36</td><td>6.16</td></tr><tr><td>FROM AROMANIAN (RUP) TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>#words</td><td>146</td><td>292</td><td>87</td><td>107</td><td>378</td><td>81</td><td>259</td><td>412</td><td>817</td></tr><tr><td>#phones</td><td>1327</td><td>2907</td><td>745</td><td>1015</td><td>4038</td><td>724</td><td>2551</td><td>4251</td><td>4531</td></tr><tr><td>#unique phones</td><td>40</td><td>39</td><td>37</td><td>37</td><td>47</td><td>36</td><td>38</td><td>32</td><td>29</td></tr><tr><td>Avg word length</td><td>5.54</td><td>5.98</td><td>5.29</td><td>5.74</td><td>6.34</td><td>5.47</td><td>5.92</td><td>6.16</td><td>6.55</td></tr></table>
276
+
277
+ Table 5: Detailed dataset statistics for our lexicons.
278
+
279
+ # A.1.2 Data segmentation and splitting
280
+
281
+ We segmented the data at the character (not subword) level using the SentencePiece (Kudo and Richardson, 2018) library; more precisely, we trained a character-level model per language for all models,
282
+
283
+ except M-NMT+m+shared_emb and M-NMT+m+shared_all, where sharing embeddings or encoders meant sharing the vocabulary across all languages: in this last case, we used a single segmentation model for all languages (which tend to have similar phone distributions, apart from the rarest phones, such as nasal vowels in French). The vocab size parameter was 100, superior to the total number of unique phones.
284
+
285
+ As this is not a common task, there is no "standard" for splitting this kind of data set. We tried to balance training on the maximum amount of data possible (85%) without loosing accuracy (by asserting that our runs are statistically significant, launching all experiments with 3 different data splits).
286
+
287
+ # A.2 Training Details
288
+
289
+ For our SMT baseline, we use the Moses toolkit to train an SMT model for each language direction. The data is aligned with GIZA++ (Och and Ney, 2003), while a 3-gram language model is trained with KenLM (Heafield, 2011) on the pair of interest target data, then models are tuned using MERT.
290
+
291
+ For our NMT models, we use RNN encoder-decoder models with attention (Cho et al., 2014; Luong et al., 2015), since Transformers (Vaswani et al., 2017) have been shown to under-perform for this task because of data scarcity (Fourrier et al., 2021). We use the fairseq toolkit (Ott et al., 2019); the encoders are composed of one embedding layer followed by a bidirectional GRU (embedding dimension: 20, hidden dimension: 50, 1 layer), and the decoders are composed of one embedding layer and one unidirectional GRU with its own attention (same parameters). Each model can share encoders/decoders/embedding layers or not across languages. Each model is trained using the Adam optimizer (learning rate: 0.005) and the cross entropy loss, stopping on the first of either 15 epochs or convergence of the BLEU score on the development set used during training.
292
+
293
+ # A.3 Sound Correspondence Prediction
294
+
295
+ We also compute the average position for the correct result among the 5-best predictions, and observe that all models have similar behaviours: when answers are correctly predicted, they usually are predicted in first or second position on average (the neural models being better than the baseline for our linguistically more original languages, Romanian and French).
296
+
297
+ <table><tr><td>Spanish to</td><td>Italian</td><td>Portuguese</td><td>French</td><td>Romanian</td></tr><tr><td>SMT</td><td>1.5</td><td>2.4</td><td>1.4</td><td>1.8</td></tr><tr><td>M-NMT+m</td><td>1.5</td><td>2.0</td><td>2.0</td><td>1.7</td></tr><tr><td>+shared_emb</td><td>1.2</td><td>1.4</td><td>2.0</td><td>1.8</td></tr><tr><td>Italian to</td><td>Spanish</td><td>Portuguese</td><td>French</td><td>Romanian</td></tr><tr><td>SMT</td><td>1.4</td><td>2.7</td><td>1.4</td><td>2.0</td></tr><tr><td>M-NMT+m</td><td>1.4</td><td>2.1</td><td>2.6</td><td>1.7</td></tr><tr><td>+shared_emb</td><td>1.7</td><td>2.0</td><td>1.9</td><td>1.9</td></tr><tr><td>Portuguese to</td><td>Spanish</td><td>Italian</td><td>French</td><td>Romanian</td></tr><tr><td>SMT</td><td>1.4</td><td>1.6</td><td>1.1</td><td>2.5</td></tr><tr><td>M-NMT+m</td><td>1.7</td><td>1.9</td><td>1.7</td><td>1.4</td></tr><tr><td>+shared_emb</td><td>1.5</td><td>1.9</td><td>2.3</td><td>1.7</td></tr><tr><td>French to</td><td>Spanish</td><td>Italian</td><td>Portuguese</td><td>Romanian</td></tr><tr><td>SMT</td><td>1.4</td><td>2.8</td><td>3.2</td><td>1.6</td></tr><tr><td>M-NMT+m</td><td>1.5</td><td>1.9</td><td>1.2</td><td>1.9</td></tr><tr><td>+shared_emb</td><td>1.6</td><td>1.9</td><td>2.0</td><td>2.2</td></tr><tr><td>Romanian to</td><td>Spanish</td><td>Italian</td><td>Portuguese</td><td>French</td></tr><tr><td>SMT</td><td>2.7</td><td>2.6</td><td>3.5</td><td>2.3</td></tr><tr><td>M-NMT+m</td><td>1.3</td><td>2.1</td><td>1.4</td><td>2.0</td></tr><tr><td>+shared_emb</td><td>1.2</td><td>1.9</td><td>1.7</td><td>1.8</td></tr></table>
298
+
299
+ Table 6: Average position of the correct result in 5-best
300
+
301
+ # A.4 Consonants PCA and t-SNE
302
+
303
+ We plot the PCA (Figure 5) and t-SNE (Figure 6) for consonants, coloured on either manner or place, and observe the same patterns are mentioned in the paper. Letters seem to be grouped phonetically at a first glance, but are actually grouped by orthographic context more than phonetic similarity: ([b], [β], [v] together, or [g], [y], [k] together, and so forth).
304
+
305
+ ![](images/dbf3d387bf72c2bd7ba70d463167c3e623c37223d91ef2abfa3e15ebef50973f.jpg)
306
+
307
+ ![](images/a268e0f90001ae1260913090d40165b302ed9884a374eed4037a99def5e6c2d2.jpg)
308
+ Figure 5: Consonant PCA, seed 0, coloured on manner above and on place below
309
+
310
+ ![](images/0633d070186ac6f96653b17f2c28caf59068501564a45b0cfa59061cc187c8d4.jpg)
311
+
312
+ ![](images/cda74403a601cfc736832174a3dcdda1bf52413b757159cba7465adb700e6319.jpg)
313
+ Figure 6: Consonant t-SNE, seed 0, coloured on manner above and on place below
314
+
315
+ # A.5 Complete Models BLEU Score Tables
316
+
317
+ The tables introduced here are the complete BLEU score tables for all our models language pairs, in 1-best and 10-best prediction. The standard deviation and mean are computed across all data shufflings used to train our models. These tables therefore represent 255 models (81 language directions * 3 bilingual models * 3 shuffling seeds, +4 multilingual models trained on all directions at once * 3 shuffling seeds).
318
+
319
+ <table><tr><td>FROM CA TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>1-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>100.0 ± 0.0</td><td>72.0 ± 3.6</td><td>68.4 ± 2.3</td><td>63.4 ± 0.8</td><td>57.3 ± 0.6</td><td>85.0 ± 5.8</td><td>74.2 ± 3.0</td><td>32.6 ± 10.7</td><td>39.4 ± 3.7</td></tr><tr><td>Bi-NMT</td><td>99.6 ± 0.1</td><td>64.1 ± 3.4</td><td>45.0 ± 4.8</td><td>34.7 ± 2.3</td><td>43.9 ± 3.0</td><td>39.2 ± 7.8</td><td>52.8 ± 1.5</td><td>5.7 ± 3.0</td><td>4.8 ± 0.3</td></tr><tr><td>Bi-NMT+m</td><td>99.6 ± 0.1</td><td>74.0 ± 1.5</td><td>60.7 ± 4.6</td><td>58.4 ± 2.8</td><td>53.4 ± 2.7</td><td>77.6 ± 9.9</td><td>73.9 ± 2.9</td><td>19.9 ± 15.6</td><td>19.7 ± 8.2</td></tr><tr><td>M-NMT</td><td>nan ± nan</td><td>64.9 ± 2.7</td><td>61.2 ± 5.9</td><td>58.7 ± 4.1</td><td>52.7 ± 1.7</td><td>63.2 ± 2.0</td><td>63.3 ± 4.5</td><td>38.4 ± 1.2</td><td>46.9 ± 5.5</td></tr><tr><td>M-NMT+m</td><td>89.7 ± 0.9</td><td>74.6 ± 2.4</td><td>74.5 ± 4.3</td><td>73.0 ± 2.5</td><td>58.8 ± 0.4</td><td>75.9 ± 4.3</td><td>77.2 ± 2.4</td><td>50.2 ± 11.4</td><td>49.2 ± 8.0</td></tr><tr><td>+shared_emb</td><td>89.2 ± 1.7</td><td>74.0 ± 0.1</td><td>73.4 ± 1.8</td><td>67.0 ± 2.7</td><td>62.1 ± 0.9</td><td>84.9 ± 5.7</td><td>77.0 ± 5.0</td><td>39.3 ± 11.6</td><td>47.3 ± 7.7</td></tr><tr><td>+shared_all</td><td>59.3 ± 1.3</td><td>65.0 ± 2.8</td><td>66.7 ± 4.9</td><td>62.4 ± 4.3</td><td>51.5 ± 1.7</td><td>81.2 ± 5.8</td><td>69.2 ± 3.6</td><td>45.0 ± 11.7</td><td>43.7 ± 6.5</td></tr><tr><td>10-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>100.0 ± 0.0</td><td>89.8 ± 0.6</td><td>86.6 ± 2.5</td><td>81.2 ± 3.2</td><td>81.3 ± 2.3</td><td>90.2 ± 4.7</td><td>91.4 ± 2.1</td><td>63.7 ± 10.4</td><td>57.2 ± 4.5</td></tr><tr><td>Bi-NMT</td><td>99.9 ± 0.1</td><td>85.4 ± 1.2</td><td>69.9 ± 3.9</td><td>56.1 ± 3.9</td><td>64.1 ± 3.8</td><td>63.5 ± 5.3</td><td>78.3 ± 1.2</td><td>20.4 ± 9.6</td><td>12.6 ± 3.1</td></tr><tr><td>Bi-NMT+m</td><td>99.9 ± 0.1</td><td>90.2 ± 0.3</td><td>81.0 ± 2.2</td><td>76.4 ± 2.8</td><td>76.5 ± 2.7</td><td>83.8 ± 8.6</td><td>88.6 ± 2.2</td><td>35.4 ± 18.8</td><td>35.9 ± 2.9</td></tr><tr><td>M-NMT</td><td>nan ± nan</td><td>87.1 ± 1.4</td><td>84.3 ± 3.6</td><td>79.6 ± 3.4</td><td>77.2 ± 1.6</td><td>80.6 ± 1.2</td><td>86.1 ± 3.1</td><td>63.0 ± 6.0</td><td>71.8 ± 3.6</td></tr><tr><td>M-NMT+m</td><td>97.8 ± 0.3</td><td>90.9 ± 1.5</td><td>89.9 ± 3.1</td><td>89.8 ± 3.1</td><td>85.7 ± 1.3</td><td>88.8 ± 4.1</td><td>92.4 ± 1.1</td><td>71.2 ± 7.9</td><td>74.5 ± 6.9</td></tr><tr><td>+shared_emb</td><td>97.9 ± 0.5</td><td>91.8 ± 0.9</td><td>89.6 ± 3.4</td><td>84.4 ± 3.8</td><td>88.0 ± 0.4</td><td>92.5 ± 4.5</td><td>91.7 ± 1.3</td><td>66.1 ± 6.4</td><td>77.1 ± 6.9</td></tr><tr><td>+shared_all</td><td>75.2 ± 1.0</td><td>87.6 ± 1.3</td><td>89.7 ± 2.0</td><td>83.9 ± 4.1</td><td>77.1 ± 2.0</td><td>93.9 ± 3.4</td><td>89.9 ± 1.6</td><td>63.8 ± 8.4</td><td>73.5 ± 10.9</td></tr><tr><td>FROM ES TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>1-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>71.2 ± 0.4</td><td>100.0 ± 0.0</td><td>62.4 ± 0.9</td><td>67.4 ± 4.1</td><td>63.0 ± 0.5</td><td>48.6 ± 9.4</td><td>76.7 ± 2.6</td><td>34.4 ± 3.4</td><td>38.3 ± 5.5</td></tr><tr><td>Bi-NMT</td><td>73.9 ± 4.6</td><td>99.5 ± 0.1</td><td>51.6 ± 3.4</td><td>56.0 ± 3.0</td><td>57.7 ± 2.6</td><td>3.0 ± 0.2</td><td>65.9 ± 8.3</td><td>19.2 ± 5.1</td><td>5.7 ± 2.6</td></tr><tr><td>Bi-NMT+m</td><td>81.2 ± 2.9</td><td>99.5 ± 0.1</td><td>59.1 ± 4.4</td><td>69.4 ± 0.8</td><td>67.2 ± 2.2</td><td>37.8 ± 3.4</td><td>76.7 ± 2.6</td><td>26.2 ± 1.0</td><td>22.9 ± 13.1</td></tr><tr><td>M-NMT</td><td>72.1 ± 4.7</td><td>nan ± nan</td><td>57.5 ± 2.7</td><td>70.5 ± 4.4</td><td>53.4 ± 2.5</td><td>75.7 ± 9.5</td><td>69.0 ± 3.7</td><td>37.6 ± 7.7</td><td>48.8 ± 9.0</td></tr><tr><td>M-NMT+m</td><td>79.0 ± 1.9</td><td>88.6 ± 1.1</td><td>67.3 ± 2.0</td><td>72.1 ± 6.2</td><td>63.1 ± 1.2</td><td>86.1 ± 3.3</td><td>73.7 ± 2.1</td><td>46.8 ± 2.7</td><td>45.9 ± 6.4</td></tr><tr><td>+shared_emb</td><td>80.8 ± 0.8</td><td>90.3 ± 2.5</td><td>71.4 ± 0.2</td><td>74.8 ± 2.6</td><td>64.8 ± 1.2</td><td>84.2 ± 8.0</td><td>76.4 ± 4.8</td><td>48.2 ± 5.6</td><td>42.4 ± 8.4</td></tr><tr><td>+shared_all</td><td>72.4 ± 3.0</td><td>61.8 ± 0.4</td><td>64.5 ± 1.9</td><td>67.3 ± 3.5</td><td>49.5 ± 3.7</td><td>78.7 ± 8.9</td><td>69.8 ± 2.5</td><td>38.2 ± 5.2</td><td>42.2 ± 8.1</td></tr><tr><td>10-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>90.3 ± 1.6</td><td>100.0 ± 0.0</td><td>79.6 ± 2.5</td><td>87.2 ± 2.1</td><td>86.3 ± 0.8</td><td>78.0 ± 5.4</td><td>91.9 ± 0.9</td><td>60.4 ± 6.8</td><td>53.7 ± 7.1</td></tr><tr><td>Bi-NMT</td><td>89.3 ± 2.8</td><td>100.0 ± 0.0</td><td>69.6 ± 2.3</td><td>75.8 ± 1.1</td><td>82.7 ± 2.4</td><td>8.8 ± 1.8</td><td>85.2 ± 6.2</td><td>44.1 ± 0.8</td><td>14.0 ± 5.9</td></tr><tr><td>Bi-NMT+m</td><td>91.9 ± 1.9</td><td>100.0 ± 0.0</td><td>79.0 ± 1.0</td><td>84.7 ± 2.3</td><td>86.4 ± 2.3</td><td>60.0 ± 2.6</td><td>91.4 ± 1.1</td><td>48.3 ± 2.4</td><td>41.6 ± 8.2</td></tr><tr><td>M-NMT</td><td>89.9 ± 2.5</td><td>nan ± nan</td><td>80.6 ± 4.2</td><td>86.5 ± 4.6</td><td>80.0 ± 2.0</td><td>92.5 ± 4.5</td><td>87.6 ± 2.0</td><td>62.4 ± 7.2</td><td>71.0 ± 6.7</td></tr><tr><td>M-NMT+m</td><td>93.8 ± 1.4</td><td>97.9 ± 0.4</td><td>83.8 ± 2.0</td><td>88.8 ± 3.3</td><td>86.1 ± 0.1</td><td>94.9 ± 2.5</td><td>91.5 ± 0.7</td><td>68.4 ± 6.9</td><td>69.2 ± 3.1</td></tr><tr><td>+shared_emb</td><td>93.9 ± 1.1</td><td>98.6 ± 0.5</td><td>85.5 ± 2.8</td><td>90.6 ± 3.1</td><td>87.2 ± 0.6</td><td>91.8 ± 6.8</td><td>93.5 ± 2.6</td><td>71.0 ± 2.9</td><td>69.3 ± 5.6</td></tr><tr><td>+shared_all</td><td>91.4 ± 2.0</td><td>79.9 ± 1.5</td><td>80.2 ± 4.0</td><td>88.6 ± 4.2</td><td>80.0 ± 1.8</td><td>92.6 ± 4.7</td><td>91.2 ± 0.6</td><td>64.5 ± 2.6</td><td>65.9 ± 4.5</td></tr><tr><td>FROM FR TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>1-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>67.7 ± 2.7</td><td>63.4 ± 1.1</td><td>100.0 ± 0.0</td><td>55.9 ± 6.7</td><td>50.0 ± 3.9</td><td>32.6 ± 5.3</td><td>58.4 ± 2.9</td><td>21.5 ± 2.3</td><td>18.5 ± 6.8</td></tr><tr><td>Bi-NMT</td><td>40.1 ± 3.6</td><td>39.3 ± 5.4</td><td>98.7 ± 0.4</td><td>10.0 ± 5.8</td><td>28.9 ± 3.4</td><td>5.1 ± 0.7</td><td>31.2 ± 7.5</td><td>3.8 ± 1.5</td><td>2.3 ± 0.3</td></tr><tr><td>Bi-NMT+m</td><td>62.1 ± 3.2</td><td>58.1 ± 5.9</td><td>98.7 ± 0.4</td><td>34.3 ± 4.4</td><td>48.1 ± 5.4</td><td>7.2 ± 2.6</td><td>51.0 ± 2.1</td><td>8.4 ± 2.3</td><td>8.8 ± 2.9</td></tr><tr><td>M-NMT</td><td>66.0 ± 3.8</td><td>53.7 ± 2.6</td><td>nan ± nan</td><td>62.8 ± 6.9</td><td>45.6 ± 3.2</td><td>62.8 ± 8.3</td><td>54.8 ± 3.5</td><td>21.8 ± 6.4</td><td>30.9 ± 19.8</td></tr><tr><td>M-NMT+m</td><td>74.9 ± 7.9</td><td>64.5 ± 1.5</td><td>83.8 ± 1.6</td><td>68.7 ± 4.9</td><td>53.2 ± 4.3</td><td>75.9 ± 10.8</td><td>64.8 ± 2.1</td><td>28.4 ± 3.0</td><td>21.4 ± 13.3</td></tr><tr><td>+shared_emb</td><td>70.9 ± 3.8</td><td>65.9 ± 4.1</td><td>81.9 ± 4.3</td><td>69.5 ± 5.6</td><td>56.3 ± 3.9</td><td>81.3 ± 10.3</td><td>65.2 ± 3.0</td><td>34.6 ± 6.4</td><td>14.5 ± 5.6</td></tr><tr><td>+shared_all</td><td>66.3 ± 3.8</td><td>54.0 ± 4.0</td><td>53.0 ± 5.7</td><td>57.9 ± 4.4</td><td>46.1 ± 5.4</td><td>67.3 ± 5.6</td><td>54.6 ± 2.0</td><td>28.0 ± 9.5</td><td>18.4 ± 8.8</td></tr><tr><td>10-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>85.1 ± 0.9</td><td>79.9 ± 3.1</td><td>100.0 ± 0.0</td><td>72.7 ± 5.5</td><td>70.9 ± 4.4</td><td>60.1 ± 2.8</td><td>77.1 ± 2.4</td><td>32.1 ± 10.9</td><td>28.4 ± 12.7</td></tr><tr><td>Bi-NMT</td><td>59.5 ± 1.7</td><td>60.5 ± 5.8</td><td>99.2 ± 0.3</td><td>24.7 ± 5.6</td><td>49.9 ± 7.4</td><td>9.2 ± 1.2</td><td>51.4 ± 7.8</td><td>8.6 ± 1.3</td><td>9.1 ± 0.8</td></tr><tr><td>Bi-NMT+m</td><td>79.0 ± 2.6</td><td>73.2 ± 5.7</td><td>99.2 ± 0.3</td><td>55.5 ± 5.0</td><td>66.7 ± 6.1</td><td>21.1 ± 5.1</td><td>69.4 ± 1.1</td><td>15.5 ± 5.8</td><td>23.6 ± 18.4</td></tr><tr><td>M-NMT</td><td>83.6 ± 2.3</td><td>79.8 ± 2.0</td><td>nan ± nan</td><td>82.2 ± 5.5</td><td>70.2 ± 4.4</td><td>81.4 ± 2.5</td><td>76.7 ± 2.6</td><td>46.6 ± 8.7</td><td>60.4 ± 27.2</td></tr><tr><td>M-NMT+m</td><td>89.8 ± 4.0</td><td>85.8 ± 1.9</td><td>94.9 ± 0.9</td><td>86.7 ± 3.0</td><td>78.8 ± 1.1</td><td>85.1 ± 12.1</td><td>82.0 ± 2.8</td><td>57.8 ± 2.5</td><td>54.4 ± 20.8</td></tr><tr><td>+shared_emb</td><td>89.4 ± 2.1</td><td>84.9 ± 2.3</td><td>93.3 ± 2.0</td><td>88.2 ± 5.6</td><td>76.9 ± 3.7</td><td>95.5 ± 3.2</td><td>80.7 ± 1.1</td><td>64.1 ± 7.9</td><td>42.1 ± 16.1</td></tr><tr><td>+shared_all</td><td>84.7 ± 3.8</td><td>76.7 ± 4.5</td><td>66.8 ± 4.2</td><td>82.2 ± 4.2</td><td>66.8 ± 3.3</td><td>92.5 ± 5.4</td><td>74.8 ± 0.7</td><td>47.0 ± 10.9</td><td>40.7 ± 14.3</td></tr><tr><td>FROM GL TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>1-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>59.6 ± 4.1</td><td>74.9 ± 4.2</td><td>56.4 ± 9.0</td><td>100.0 ± 0.0</td><td>57.7 ± 6.6</td><td>54.6 ± 8.1</td><td>86.4 ± 1.6</td><td>29.7 ± 8.1</td><td>46.1 ± 13.6</td></tr><tr><td>Bi-NMT</td><td>38.8 ± 3.9</td><td>58.9 ± 3.0</td><td>11.4 ± 5.6</td><td>98.9 ± 1.3</td><td>30.5 ± 3.1</td><td>3.6 ± 0.5</td><td>72.7 ± 4.4</td><td>6.6 ± 1.0</td><td>4.7 ± 1.2</td></tr><tr><td>Bi-NMT+m</td><td>63.2 ± 1.7</td><td>73.2 ± 4.4</td><td>40.9 ± 7.2</td><td>98.9 ± 1.3</td><td>48.9 ± 7.7</td><td>22.6 ± 6.7</td><td>85.0 ± 0.7</td><td>15.2 ± 5.3</td><td>19.8 ± 2.2</td></tr><tr><td>M-NMT</td><td>69.0 ± 1.1</td><td>68.6 ± 4.7</td><td>59.6 ± 4.9</td><td>nan ± nan</td><td>56.3 ± 3.8</td><td>67.9 ± 9.2</td><td>75.5 ± 1.9</td><td>45.7 ± 13.6</td><td>39.6 ± 4.6</td></tr><tr><td>M-NMT+m</td><td>89.3 ± 3.7</td><td>82.8 ± 2.8</td><td>64.1 ± 8.6</td><td>86.6 ± 5.0</td><td>59.8 ± 6.8</td><td>71.3 ± 14.2</td><td>82.9 ± 1.9</td><td>52.1 ± 11.0</td><td>62.3 ± 6.2</td></tr><tr><td>+shared_emb</td><td>72.7 ± 2.1</td><td>74.3 ± 1.5</td><td>61.5 ± 11.3</td><td>91.1 ± 1.1</td><td>62.6 ± 0.9</td><td>75.5 ± 4.0</td><td>87.1 ± 0.6</td><td>57.5 ± 11.6</td><td>57.1 ± 17.6</td></tr><tr><td>+shared_all</td><td>68.3 ± 3.5</td><td>68.9 ± 3.9</td><td>55.9 ± 10.7</td><td>64.2 ± 5.7</td><td>59.1 ± 5.8</td><td>69.3 ± 10.9</td><td>78.7 ± 3.9</td><td>51.0 ± 11.3</td><td>59.5 ± 4.7</td></tr><tr><td>10-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>85.8 ± 0.4</td><td>89.0 ± 1.6</td><td>72.5 ± 4.4</td><td>100.0 ± 0.0</td><td>77.0 ± 5.7</td><td>78.1 ± 6.8</td><td>93.9 ± 2.2</td><td>59.3 ± 5.1</td><td>58.5 ± 14.5</td></tr><tr><td>Bi-NMT</td><td>58.9 ± 2.5</td><td>79.3 ± 2.4</td><td>22.8 ± 5.1</td><td>99.5 ± 0.6</td><td>48.3 ± 2.2</td><td>8.1 ± 2.7</td><td>87.2 ± 2.4</td><td>11.7 ± 2.3</td><td>12.6 ± 4.8</td></tr><tr><td>Bi-NMT+m</td><td>77.1 ± 1.1</td><td>87.5 ± 0.8</td><td>53.7 ± 8.3</td><td>99.5 ± 0.6</td><td>68.0 ± 6.6</td><td>48.0 ± 9.6</td><td>93.9 ± 1.0</td><td>31.1 ± 6.1</td><td>42.4 ± 7.9</td></tr><tr><td>M-NMT</td><td>85.3 ± 4.7</td><td>85.7 ± 2.7</td><td>76.3 ± 5.6</td><td>61.6 ± 4.0</td><td>nan ± nan</td><td>89.5 ± 0.2</td><td>93.4 ± 2.0</td><td>66.3 ± 4.2</td><td>81.3 ± 3.0</td></tr><tr><td>M-NMT+m</td><td>89.3 ± 3.7</td><td>89.5 ± 2.4</td><td>66.4 ± 5.3</td><td>96.4 ± 2.1</td><td>82.2 ± 5.1</td><td>88.2 ± 5.3</td><td>96.4 ± 2.3</td><td>77.0 ± 4.8</td><td>85.0 ± 6.8</td></tr><tr><td>+shared_emb</td><td>91.1 ± 1.0</td><td>90.2 ± 2.0</td><td>84.9 ± 2.8</td><td>98.7 ± 0.6</td><td>81.4 ± 1.5</td><td>94.2 ± 1.4</td><td>95.2 ± 1.1</td><td>78.8 ± 5.5</td><td>80.9 ± 5.6</td></tr><tr><td>+shared_all</td><td>88.2 ± 5.3</td><td>84.7 ± 1.1</td><td>80.4 ± 6.6</td><td>85.2 ± 4.2</td><td>76.9 ± 6.3</td><td>87.3 ± 7.8</td><td>93.3 ± 2.6</td><td>68.5 ± 7.0</td><td>80.0 ± 5.0</td></tr><tr><td>FROM IT TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>1-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>63.3 ± 3.1</td><td>74.8 ± 1.7</td><td>61.6 ± 2.8</td><td>58.2 ± 7.5</td><td>100.0 ± 0.0</td><td>44.7 ± 13.8</td><td>70.4 ± 3.1</td><td>48.6 ± 3.1</td><td>49.2 ± 0.9</td></tr><tr><td>Bi-NMT</td><td>35.5 ± 3.9</td><td>70.8 ± 0.6</td><td>31.7 ± 8.6</td><td>30.7 ± 2.9</td><td>99.6 ± 0.1</td><td>6.5 ± 5.2</td><td>61.5 ± 1.3</td><td>29.8 ± 2.6</td><td>21.9 ± 5.0</td></tr><tr><td>Bi-NMT+m</td><td>68.0 ± 0.8</td><td>73.0 ± 2.8</td><td>59.6 ± 6.4</td><td>55.2 ± 7.8</td><td>99.6 ± 0.1</td><td>35.6 ± 14.6</td><td>70.6 ± 1.5</td><td>44.7 ± 4.3</td><td>34.1 ± 4.7</td></tr><tr><td>M-NMT</td><td>61.0 ± 4.3</td><td>60.0 ± 4.8</td><td>55.1 ± 3.8</td><td>61.6 ± 4.0</td><td>nan ± nan</td><td>55.8 ± 4.7</td><td>58.7 ± 3.5</td><td>51.9 ± 2.9</td><td>50.6 ± 3.8</td></tr><tr><td>M-NMT+m</td><td>73.3 ± 1.4</td><td>72.3 ± 1.7</td><td>64.3 ± 7.5</td><td>69.1 ± 5.4</td><td>81.8 ± 0.9</td><td>73.4 ± 5.8</td><td>72.9 ± 3.3</td><td>51.7 ± 2.2</td><td>52.8 ± 5.0</td></tr><tr><td>+shared_emb</td><td>72.8 ± 0.5</td><td>70.2 ± 3.9</td><td>66.5 ± 4.1</td><td>69.3 ± 5.4</td><td>81.4 ± 1.5</td><td>73.4 ± 8.3</td><td>73.5 ± 3.5</td><td>58.9 ± 2.8</td><td>50.9 ± 1.9</td></tr><tr><td>+shared_all</td><td>68.9 ± 4.1</td><td>60.8 ± 0.8</td><td>54.0 ± 6.6</td><td>59.6 ± 8.3</td><td>70.0 ± 3.9</td><td>71.2 ± 18.2</td><td>62.5 ± 2.1</td><td>44.2 ± 1.8</td><td>44.2 ± 1.1</td></tr></table>
320
+
321
+ Table 7: Results of our different models for the cognate prediction task - 1
322
+
323
+ <table><tr><td>FROM IT TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>10-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>83.8 ± 2.1</td><td>89.1 ± 0.4</td><td>76.7 ± 3.0</td><td>78.3 ± 6.5</td><td>100.0 ± 0.0</td><td>68.1 ± 9.7</td><td>87.9 ± 1.7</td><td>70.2 ± 4.6</td><td>70.6 ± 1.5</td></tr><tr><td>Bi-NMT</td><td>56.0 ± 5.7</td><td>85.2 ± 1.6</td><td>53.4 ± 8.4</td><td>50.1 ± 1.5</td><td>99.9 ± 0.1</td><td>12.4 ± 4.2</td><td>83.5 ± 2.4</td><td>51.7 ± 1.7</td><td>41.2 ± 6.4</td></tr><tr><td>Bi-NMT+m</td><td>82.8 ± 0.9</td><td>87.3 ± 1.1</td><td>77.4 ± 6.4</td><td>74.8 ± 3.5</td><td>99.9 ± 0.1</td><td>51.1 ± 15.5</td><td>86.2 ± 0.6</td><td>67.2 ± 2.4</td><td>58.0 ± 3.8</td></tr><tr><td>M-NMT</td><td>81.8 ± 1.5</td><td>82.2 ± 3.0</td><td>76.5 ± 5.0</td><td>81.4 ± 4.4</td><td>nan ± nan</td><td>79.9 ± 2.9</td><td>81.9 ± 2.1</td><td>70.5 ± 4.5</td><td>72.7 ± 4.4</td></tr><tr><td>M-NMT+m</td><td>90.4 ± 1.8</td><td>88.0 ± 0.6</td><td>80.0 ± 3.4</td><td>86.6 ± 2.4</td><td>96.7 ± 0.8</td><td>84.1 ± 9.8</td><td>90.0 ± 0.9</td><td>80.1 ± 1.4</td><td>73.4 ± 1.0</td></tr><tr><td>+shared_emb</td><td>89.6 ± 0.6</td><td>89.4 ± 1.7</td><td>80.6 ± 3.9</td><td>87.3 ± 3.1</td><td>96.5 ± 0.6</td><td>85.7 ± 9.3</td><td>89.7 ± 1.5</td><td>77.1 ± 2.0</td><td>72.2 ± 0.3</td></tr><tr><td>+shared_all</td><td>83.5 ± 0.7</td><td>81.3 ± 2.0</td><td>76.6 ± 7.1</td><td>80.6 ± 4.5</td><td>91.9 ± 1.6</td><td>83.3 ± 10.1</td><td>87.3 ± 1.4</td><td>71.4 ± 4.0</td><td>67.4 ± 6.9</td></tr><tr><td>FROM OC TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>1-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>88.2 ± 1.8</td><td>57.8 ± 7.1</td><td>34.1 ± 5.0</td><td>57.5 ± 9.3</td><td>53.1 ± 3.0</td><td>100.0 ± 0.0</td><td>44.0 ± 6.0</td><td>21.2 ± 10.4</td><td>30.7 ± 13.8</td></tr><tr><td>Bi-NMT</td><td>60.6 ± 10.6</td><td>7.3 ± 1.1</td><td>3.4 ± 1.4</td><td>4.1 ± 2.0</td><td>8.2 ± 2.6</td><td>97.8 ± 1.1</td><td>4.0 ± 0.9</td><td>3.2 ± 1.4</td><td>4.6 ± 1.4</td></tr><tr><td>Bi-NMT+m</td><td>84.9 ± 1.2</td><td>42.4 ± 4.7</td><td>11.6 ± 6.1</td><td>19.1 ± 6.2</td><td>42.9 ± 2.5</td><td>97.8 ± 1.1</td><td>39.5 ± 7.4</td><td>10.2 ± 2.4</td><td>7.5 ± 0.3</td></tr><tr><td>M-NMT</td><td>75.2 ± 8.8</td><td>56.7 ± 7.8</td><td>49.1 ± 11.0</td><td>64.7 ± 8.0</td><td>55.4 ± 2.1</td><td>nan ± nan</td><td>59.4 ± 2.6</td><td>47.3 ± 6.5</td><td>69.9 ± 5.5</td></tr><tr><td>M-NMT+m</td><td>84.8 ± 2.4</td><td>69.5 ± 4.8</td><td>54.6 ± 5.5</td><td>71.5 ± 7.4</td><td>72.0 ± 4.5</td><td>82.3 ± 6.3</td><td>59.5 ± 10.6</td><td>58.9 ± 5.6</td><td>61.1 ± 5.0</td></tr><tr><td>+shared_emb</td><td>86.3 ± 7.1</td><td>73.8 ± 11.2</td><td>53.5 ± 1.5</td><td>76.1 ± 13.2</td><td>69.0 ± 7.1</td><td>84.2 ± 3.8</td><td>60.0 ± 16.2</td><td>70.1 ± 13.0</td><td>74.1 ± 5.3</td></tr><tr><td>+shared_all</td><td>86.5 ± 2.2</td><td>60.5 ± 10.0</td><td>41.2 ± 8.7</td><td>64.7 ± 10.3</td><td>58.4 ± 6.8</td><td>59.1 ± 3.4</td><td>57.2 ± 7.8</td><td>51.3 ± 18.7</td><td>57.5 ± 11.5</td></tr><tr><td>10-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>92.4 ± 2.6</td><td>80.0 ± 8.4</td><td>42.2 ± 5.3</td><td>74.0 ± 8.2</td><td>71.5 ± 2.6</td><td>100.0 ± 0.0</td><td>72.1 ± 3.4</td><td>35.9 ± 10.4</td><td>45.8 ± 6.4</td></tr><tr><td>Bi-NMT</td><td>75.2 ± 6.1</td><td>13.6 ± 3.2</td><td>8.3 ± 4.6</td><td>7.7 ± 3.5</td><td>18.6 ± 3.3</td><td>99.4 ± 0.8</td><td>8.0 ± 1.6</td><td>8.4 ± 1.9</td><td>10.4 ± 1.3</td></tr><tr><td>Bi-NMT+m</td><td>93.0 ± 2.4</td><td>63.6 ± 8.3</td><td>19.5 ± 9.8</td><td>38.0 ± 17.4</td><td>61.3 ± 1.9</td><td>99.4 ± 0.8</td><td>53.4 ± 8.5</td><td>25.1 ± 8.4</td><td>17.4 ± 4.9</td></tr><tr><td>M-NMT</td><td>91.0 ± 6.5</td><td>85.3 ± 6.0</td><td>61.9 ± 9.1</td><td>79.7 ± 5.5</td><td>79.5 ± 2.5</td><td>nan ± nan</td><td>84.3 ± 3.9</td><td>76.4 ± 4.5</td><td>88.9 ± 11.5</td></tr><tr><td>M-NMT+m</td><td>94.9 ± 2.5</td><td>89.2 ± 6.0</td><td>70.5 ± 5.9</td><td>88.8 ± 6.4</td><td>88.5 ± 3.3</td><td>92.4 ± 3.1</td><td>86.7 ± 3.3</td><td>70.7 ± 4.2</td><td>88.1 ± 4.9</td></tr><tr><td>+shared_emb</td><td>97.1 ± 2.1</td><td>86.1 ± 7.2</td><td>67.9 ± 4.6</td><td>91.4 ± 3.2</td><td>85.6 ± 8.8</td><td>94.1 ± 1.3</td><td>86.8 ± 8.3</td><td>79.3 ± 4.0</td><td>86.0 ± 10.4</td></tr><tr><td>+shared_all</td><td>94.4 ± 2.4</td><td>83.1 ± 6.6</td><td>66.2 ± 5.1</td><td>85.1 ± 6.2</td><td>77.1 ± 6.2</td><td>72.0 ± 2.1</td><td>85.3 ± 3.1</td><td>71.5 ± 10.3</td><td>80.5 ± 12.3</td></tr><tr><td>FROM PT TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>1-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>75.0 ± 0.1</td><td>75.4 ± 0.3</td><td>63.2 ± 5.0</td><td>89.2 ± 0.7</td><td>59.4 ± 5.9</td><td>50.8 ± 4.7</td><td>100.0 ± 0.0</td><td>42.2 ± 1.9</td><td>45.5 ± 2.3</td></tr><tr><td>Bi-NMT</td><td>66.0 ± 4.1</td><td>69.2 ± 1.0</td><td>39.0 ± 7.8</td><td>75.3 ± 3.5</td><td>50.8 ± 3.1</td><td>6.3 ± 1.6</td><td>99.3 ± 0.4</td><td>11.9 ± 5.7</td><td>10.9 ± 3.0</td></tr><tr><td>Bi-NMT+m</td><td>75.9 ± 3.0</td><td>74.9 ± 2.1</td><td>56.2 ± 2.7</td><td>86.0 ± 2.1</td><td>59.5 ± 4.2</td><td>29.2 ± 5.9</td><td>99.3 ± 0.4</td><td>28.8 ± 6.8</td><td>27.3 ± 3.8</td></tr><tr><td>M-NMT</td><td>74.0 ± 3.3</td><td>69.2 ± 2.3</td><td>63.9 ± 3.6</td><td>77.2 ± 0.3</td><td>55.4 ± 3.7</td><td>72.4 ± 6.6</td><td>nan ± nan</td><td>48.8 ± 6.4</td><td>62.1 ± 5.6</td></tr><tr><td>M-NMT+m</td><td>78.7 ± 3.9</td><td>75.8 ± 4.0</td><td>67.8 ± 0.5</td><td>83.9 ± 1.7</td><td>63.8 ± 1.6</td><td>89.1 ± 3.3</td><td>89.0 ± 1.7</td><td>55.7 ± 5.9</td><td>61.0 ± 12.6</td></tr><tr><td>+shared_emb</td><td>78.0 ± 3.4</td><td>73.1 ± 2.9</td><td>70.3 ± 4.1</td><td>82.2 ± 3.0</td><td>61.4 ± 2.3</td><td>81.9 ± 5.7</td><td>88.4 ± 1.9</td><td>52.9 ± 7.2</td><td>61.7 ± 3.2</td></tr><tr><td>+shared_all</td><td>76.4 ± 3.0</td><td>67.3 ± 0.7</td><td>63.4 ± 3.6</td><td>78.0 ± 3.7</td><td>55.1 ± 2.9</td><td>71.2 ± 5.4</td><td>64.2 ± 2.2</td><td>47.7 ± 5.6</td><td>56.1 ± 8.8</td></tr><tr><td>10-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>86.9 ± 1.1</td><td>91.6 ± 0.7</td><td>83.1 ± 4.9</td><td>96.2 ± 1.0</td><td>80.9 ± 3.6</td><td>76.4 ± 9.6</td><td>100.0 ± 0.0</td><td>67.8 ± 4.8</td><td>74.2 ± 2.1</td></tr><tr><td>Bi-NMT</td><td>80.1 ± 3.3</td><td>88.5 ± 0.5</td><td>61.0 ± 5.2</td><td>89.1 ± 2.3</td><td>73.6 ± 2.5</td><td>11.7 ± 1.5</td><td>99.8 ± 0.1</td><td>24.2 ± 1.3</td><td>36.5 ± 3.3</td></tr><tr><td>Bi-NMT+m</td><td>86.5 ± 2.7</td><td>89.5 ± 0.8</td><td>76.0 ± 4.0</td><td>93.9 ± 1.6</td><td>82.0 ± 3.6</td><td>43.6 ± 3.7</td><td>99.8 ± 0.1</td><td>43.2 ± 4.6</td><td>51.3 ± 2.4</td></tr><tr><td>M-NMT</td><td>88.5 ± 2.2</td><td>89.0 ± 1.4</td><td>85.8 ± 2.8</td><td>93.0 ± 1.1</td><td>80.0 ± 3.6</td><td>90.4 ± 2.4</td><td>nan ± nan</td><td>70.3 ± 5.9</td><td>83.8 ± 2.2</td></tr><tr><td>M-NMT+m</td><td>90.0 ± 3.1</td><td>92.1 ± 1.0</td><td>86.6 ± 3.0</td><td>94.5 ± 1.9</td><td>85.1 ± 2.1</td><td>96.4 ± 4.3</td><td>98.7 ± 0.7</td><td>77.8 ± 4.2</td><td>80.3 ± 11.6</td></tr><tr><td>+shared_emb</td><td>89.7 ± 2.8</td><td>91.4 ± 1.0</td><td>89.0 ± 2.6</td><td>95.8 ± 1.3</td><td>85.2 ± 2.8</td><td>95.4 ± 3.9</td><td>97.7 ± 1.1</td><td>73.6 ± 9.8</td><td>84.4 ± 3.2</td></tr><tr><td>+shared_all</td><td>87.0 ± 1.1</td><td>88.6 ± 2.3</td><td>85.5 ± 1.9</td><td>92.9 ± 1.3</td><td>75.9 ± 2.1</td><td>93.1 ± 4.2</td><td>84.6 ± 3.0</td><td>69.6 ± 2.8</td><td>85.0 ± 1.5</td></tr><tr><td>FROM RO TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>1-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>32.9 ± 5.3</td><td>37.6 ± 5.8</td><td>20.2 ± 2.6</td><td>29.7 ± 10.4</td><td>43.5 ± 5.6</td><td>25.5 ± 2.8</td><td>32.7 ± 0.6</td><td>100.0 ± 0.0</td><td>66.3 ± 1.7</td></tr><tr><td>Bi-NMT</td><td>10.4 ± 3.4</td><td>22.6 ± 4.5</td><td>6.3 ± 1.4</td><td>2.1 ± 0.5</td><td>33.1 ± 8.7</td><td>7.1 ± 2.5</td><td>14.9 ± 6.2</td><td>98.5 ± 1.4</td><td>59.0 ± 8.3</td></tr><tr><td>Bi-NMT+m</td><td>18.1 ± 4.8</td><td>34.2 ± 3.0</td><td>7.2 ± 3.3</td><td>15.9 ± 2.5</td><td>44.7 ± 7.0</td><td>12.9 ± 1.8</td><td>21.7 ± 7.3</td><td>98.5 ± 1.4</td><td>67.4 ± 9.8</td></tr><tr><td>M-NMT</td><td>47.9 ± 2.4</td><td>48.5 ± 2.1</td><td>37.9 ± 9.2</td><td>47.0 ± 3.9</td><td>42.0 ± 6.6</td><td>51.0 ± 17.3</td><td>42.0 ± 5.6</td><td>nan ± nan</td><td>58.1 ± 8.3</td></tr><tr><td>M-NMT+m</td><td>47.2 ± 4.0</td><td>56.4 ± 7.4</td><td>36.9 ± 10.7</td><td>55.6 ± 4.1</td><td>53.2 ± 2.2</td><td>59.1 ± 13.5</td><td>45.7 ± 3.4</td><td>70.4 ± 2.3</td><td>70.7 ± 9.4</td></tr><tr><td>+shared_emb</td><td>57.7 ± 7.1</td><td>54.2 ± 3.7</td><td>36.0 ± 4.7</td><td>54.6 ± 6.6</td><td>55.1 ± 4.9</td><td>63.0 ± 13.4</td><td>50.7 ± 6.3</td><td>70.4 ± 1.8</td><td>75.6 ± 8.0</td></tr><tr><td>+shared_all</td><td>53.7 ± 5.3</td><td>33.1 ± 5.6</td><td>37.8 ± 6.3</td><td>50.9 ± 6.8</td><td>37.3 ± 2.2</td><td>56.8 ± 11.5</td><td>38.4 ± 7.3</td><td>48.1 ± 0.9</td><td>63.4 ± 7.4</td></tr><tr><td>10-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>57.9 ± 3.9</td><td>63.7 ± 7.6</td><td>38.1 ± 6.1</td><td>47.0 ± 6.4</td><td>72.1 ± 4.2</td><td>44.5 ± 9.6</td><td>58.3 ± 2.3</td><td>100.0 ± 0.0</td><td>87.4 ± 2.0</td></tr><tr><td>Bi-NMT</td><td>22.5 ± 10.8</td><td>45.4 ± 0.7</td><td>10.0 ± 0.4</td><td>6.0 ± 0.2</td><td>58.1 ± 5.6</td><td>14.2 ± 3.8</td><td>30.8 ± 4.8</td><td>99.6 ± 0.5</td><td>80.8 ± 9.8</td></tr><tr><td>Bi-NMT+m</td><td>38.2 ± 8.4</td><td>58.3 ± 4.5</td><td>16.2 ± 5.2</td><td>32.9 ± 8.8</td><td>64.9 ± 4.3</td><td>27.2 ± 3.9</td><td>51.5 ± 4.0</td><td>99.6 ± 0.5</td><td>85.7 ± 8.8</td></tr><tr><td>M-NMT</td><td>79.6 ± 4.8</td><td>75.7 ± 5.9</td><td>56.6 ± 16.0</td><td>66.9 ± 2.0</td><td>71.3 ± 4.5</td><td>74.7 ± 15.3</td><td>70.2 ± 3.7</td><td>nan ± nan</td><td>80.1 ± 9.2</td></tr><tr><td>M-NMT+m</td><td>75.9 ± 5.6</td><td>80.5 ± 8.0</td><td>52.8 ± 8.8</td><td>76.2 ± 5.9</td><td>80.8 ± 3.9</td><td>77.9 ± 7.5</td><td>75.8 ± 3.7</td><td>89.3 ± 3.3</td><td>87.2 ± 4.9</td></tr><tr><td>+shared_emb</td><td>80.8 ± 5.5</td><td>82.7 ± 4.6</td><td>65.2 ± 6.1</td><td>81.0 ± 5.3</td><td>82.4 ± 2.1</td><td>83.0 ± 14.0</td><td>76.0 ± 2.4</td><td>89.5 ± 1.0</td><td>90.2 ± 7.0</td></tr><tr><td>+shared_all</td><td>74.6 ± 9.8</td><td>64.5 ± 6.2</td><td>60.8 ± 7.1</td><td>69.7 ± 8.4</td><td>67.0 ± 3.3</td><td>66.9 ± 14.3</td><td>68.3 ± 4.6</td><td>64.5 ± 1.6</td><td>84.8 ± 6.3</td></tr><tr><td>FROM RUP TO</td><td>CA</td><td>ES</td><td>FR</td><td>GL</td><td>IT</td><td>OC</td><td>PT</td><td>RO</td><td>RUP</td></tr><tr><td>1-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>29.2 ± 2.4</td><td>32.4 ± 1.9</td><td>21.7 ± 2.9</td><td>29.5 ± 13.2</td><td>36.6 ± 4.1</td><td>26.1 ± 12.4</td><td>42.0 ± 5.5</td><td>63.3 ± 7.3</td><td>100.0 ± 0.0</td></tr><tr><td>Bi-NMT</td><td>2.7 ± 0.7</td><td>3.3 ± 0.7</td><td>5.7 ± 1.0</td><td>3.1 ± 1.9</td><td>26.7 ± 2.6</td><td>5.2 ± 2.0</td><td>27.1 ± 3.0</td><td>48.8 ± 5.1</td><td>95.2 ± 1.8</td></tr><tr><td>Bi-NMT+m</td><td>16.4 ± 4.5</td><td>23.4 ± 1.9</td><td>9.1 ± 1.7</td><td>15.4 ± 9.1</td><td>30.6 ± 0.4</td><td>14.4 ± 5.3</td><td>28.9 ± 12.6</td><td>64.8 ± 5.4</td><td>95.2 ± 1.8</td></tr><tr><td>M-NMT</td><td>50.1 ± 12.7</td><td>36.7 ± 6.3</td><td>32.0 ± 12.7</td><td>33.4 ± 1.9</td><td>44.4 ± 4.9</td><td>29.9 ± 3.1</td><td>56.8 ± 5.6</td><td>57.7 ± 3.0</td><td>nan ± nan</td></tr><tr><td>M-NMT+m</td><td>60.0 ± 4.8</td><td>51.8 ± 7.4</td><td>24.6 ± 14.4</td><td>49.6 ± 8.0</td><td>44.7 ± 3.5</td><td>63.5 ± 7.9</td><td>60.4 ± 7.1</td><td>67.9 ± 4.7</td><td>70.4 ± 6.0</td></tr><tr><td>+shared_emb</td><td>59.2 ± 8.4</td><td>47.2 ± 3.5</td><td>46.7 ± 5.0</td><td>54.6 ± 6.7</td><td>48.9 ± 4.3</td><td>41.7 ± 11.4</td><td>61.6 ± 5.6</td><td>66.7 ± 3.4</td><td>75.6 ± 3.2</td></tr><tr><td>+shared_all</td><td>46.9 ± 20.6</td><td>25.1 ± 6.7</td><td>35.2 ± 18.3</td><td>37.3 ± 12.1</td><td>34.0 ± 5.0</td><td>53.6 ± 9.9</td><td>39.0 ± 12.7</td><td>52.6 ± 6.4</td><td>59.8 ± 2.1</td></tr><tr><td>10-best</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>SMT</td><td>53.8 ± 14.2</td><td>60.4 ± 7.7</td><td>32.4 ± 11.5</td><td>45.7 ± 6.8</td><td>62.6 ± 0.7</td><td>35.2 ± 11.3</td><td>62.7 ± 9.1</td><td>83.1 ± 7.4</td><td>100.0 ± 0.0</td></tr><tr><td>Bi-NMT</td><td>8.3 ± 4.1</td><td>15.6 ± 6.8</td><td>13.4 ± 3.8</td><td>7.0 ± 2.3</td><td>44.6 ± 2.0</td><td>7.3 ± 10.0</td><td>46.6 ± 5.3</td><td>72.0 ± 7.0</td><td>98.4 ± 1.3</td></tr><tr><td>Bi-NMT+m</td><td>25.1 ± 6.0</td><td>51.8 ± 4.7</td><td>17.8 ± 5.4</td><td>22.1 ± 10.9</td><td>51.9 ± 1.8</td><td>31.1 ± 15.8</td><td>51.8 ± 9.9</td><td>80.9 ± 8.1</td><td>98.4 ± 1.3</td></tr><tr><td>M-NMT</td><td>77.4 ± 9.0</td><td>72.3 ± 1.5</td><td>62.2 ± 11.2</td><td>66.9 ± 8.0</td><td>69.4 ± 6.0</td><td>46.7 ± 12.2</td><td>79.0 ± 1.5</td><td>79.5 ± 0.7</td><td>nan ± nan</td></tr><tr><td>M-NMT+m</td><td>73.6 ± 10.6</td><td>80.1 ± 6.5</td><td>53.4 ± 18.4</td><td>78.7 ± 12.1</td><td>72.5 ± 3.3</td><td>77.2 ± 7.1</td><td>81.6 ± 5.6</td><td>83.2 ± 4.0</td><td>89.2 ± 4.4</td></tr><tr><td>+shared_emb</td><td>79.2 ± 12.5</td><td>78.6 ± 11.0</td><td>63.4 ± 9.6</td><td>77.6 ± 7.2</td><td>84.9 ± 3.3</td><td>82.3 ± 3.3</td><td>80.8 ± 1.5</td><td>83.4 ± 5.6</td><td>89.9 ± 3.2</td></tr><tr><td>+shared_all</td><td>69.1 ± 13.9</td><td>60.9 ± 7.2</td><td>62.4 ± 14.9</td><td>62.3 ± 1.5</td><td>64.0 ± 3.4</td><td>73.6 ± 18.8</td><td>72.9 ± 4.8</td><td>77.9 ± 8.4</td><td>59.8 ± 0.9</td></tr></table>
324
+
325
+ Table 8: Results of our different models for the cognate prediction task - 2
probingmultilingualcognatepredictionmodels/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb8e7a28ab38138da16d94ba7dfe46ec600e7cfcfb708ed47f4f272b3bd39bd1
3
+ size 1943742
probingmultilingualcognatepredictionmodels/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c10d3c28e528959761b86ebba275083a1e6a860ccd872e671f90a684c9307cd3
3
+ size 413397
promptdrivenneuralmachinetranslation/c20d4e78-18a1-4e96-9932-9ebf36784474_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:83d7897421c1305edbafbaa46ba05d1dede05108733864b64f8080b9c3ca86cc
3
+ size 80515
promptdrivenneuralmachinetranslation/c20d4e78-18a1-4e96-9932-9ebf36784474_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fbcc6bf39bcde3f36ba6e5aa52ce219e39c30fc76528590745efe6a164bc2254
3
+ size 97428
promptdrivenneuralmachinetranslation/c20d4e78-18a1-4e96-9932-9ebf36784474_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59ce50bab446d3a8a88ca56e281c091b3dab4972153a93893da5cdd537ecc994
3
+ size 805552
promptdrivenneuralmachinetranslation/full.md ADDED
@@ -0,0 +1,349 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Prompt-Driven Neural Machine Translation
2
+
3
+ Yafu Li $\spadesuit$ ♥, Yongjing Yin $\spadesuit$ ♥, Jing Li $\spadesuit$ , Yue Zhang $\diamondsuit$
4
+
5
+ $\spadesuit$ Zhejiang University
6
+
7
+ $\hat{\mathcal{O}}$ School of Engineering, Westlake University
8
+
9
+ $\diamond$ Institute of Advanced Technology, Westlake Institute for Advanced Study
10
+
11
+ $\clubsuit$ Sichuan Lan-bridge Information Technology Co., Ltd.
12
+
13
+ yafuly@gmail.com yinyongjing@westlake.edu.cn
14
+
15
+ judyli.5266@gmail.com yue.zhang@wias.org.cn
16
+
17
+ # Abstract
18
+
19
+ Neural machine translation (NMT) has obtained significant performance improvement over the recent years. However, NMT models still face various challenges including fragility and lack of style flexibility. Moreover, current methods for instance-level constraints are limited in that they are either constraint-specific or model-specific. To this end, we propose prompt-driven neural machine translation to incorporate prompts for enhancing translation control and enriching flexibility. Empirical results demonstrate the effectiveness of our method in both prompt responding and translation quality. Through human evaluation, we further show the flexibility of prompt control and the efficiency in human-in-the-loop translation.
20
+
21
+ Prompt: the translation should include "on the desk"
22
+
23
+ Translation: Yesterday, I ate the apple pie on the desk.
24
+
25
+ (a)
26
+
27
+ Prompt: "苹果派" should be translated before "我"
28
+
29
+ Translation: The apple pie on the table was eaten by me yes-terday.
30
+
31
+ (c)
32
+
33
+ Prompt: "苹果派" should be translated into "Apple Pie"
34
+
35
+ Translation: Yesterday, I ate the Apple Pie on the table.
36
+
37
+ (b)
38
+
39
+ Prompt: the translation should begin with "T"
40
+
41
+ Translation: I ate the apple pie on the table yesterday.
42
+
43
+ (d)
44
+
45
+ Figure 1: A Prompt-driven NMT model outputs different translations for the sentence “昨天, 我吃了桌上的苹果派。”(English: Yesterday, I ate the apple pie on the table.) based on the given prompts. One can specify phrase translations, guarantee translation positions or alter word order by feeding the system with different prompts.
46
+
47
+ # 1 Introduction
48
+
49
+ Neural machine translation (NMT) has achieved much performance improvement over the recent years (Vaswani et al., 2017; Edunov et al., 2018; Hassan et al., 2018; Liu et al., 2020), yet still faces various challenges such as low cross-domain robustness (Müller et al., 2020), fragility (Li et al., 2021) and lack of style flexibility (Li and Jurafsky, 2016; Shu et al., 2019). To address these issues, a line of work considers introducing constraints to the translation outputs, typically in the form of lexical constraints (Song et al., 2019; Chen et al., 2020) and style control (Sennrich et al., 2016a; Michel and Neubig, 2018; Shu et al., 2019). For example, Song et al. (2019) ensure that polysemous words are translated to their domain-specific senses in eCommerce.
50
+
51
+ Such instance-level constraint has been shown useful for improving both the translation adequacy and readability in practical applications (Song et al., 2019; Chen et al., 2020; Jwalapuram et al., 2020; Konieczny, 2021; Chen et al., 2021a). However, they are limited in being (1) model-specific and (2)
52
+
53
+ constraint-specific. For instance, lexical constraints are typically integrated into a model by either modifying the decoding process (Hokamp and Liu, 2017; Post and Vilar, 2018; Chen et al., 2021a) or introducing special post-processing (Song et al., 2019; Chen et al., 2020). Style constraints are learned through data synthesis (Sennrich et al., 2016a; Niu and Carpuat, 2020) or specialized model design (Michel and Neubig, 2018). As a result, the engineering cost of accommodating and simultaneously optimizing for various constraints and styles can be high.
54
+
55
+ We consider prompt-driven neural machine translation, a general form of introducing translation constraints. The basic idea is shown in Figure 1, where a prompt-driven NMT system can accept a source input, together with an arbitrary number of instructions, and generate a target translation in accordance. Since the translation constraints are specified in textual form, we can integrate different types of control easily into the input, such as specifying the translation of a source phrase (Figure 1b), controlling word order (Figure 1c) and laying
56
+
57
+ out the beginning of the target sentence (Figure 1d), in addition to the traditional lexical constraints (Figure 1a). In addition, when there are no input constraints, the NMT system should give competitive performance as a unconstrained NMT model.
58
+
59
+ Without losing generality, we consider the forms of constraints in Figure 1 in this work. Building on a standard Transformer (Vaswani et al., 2017) baseline, we consider the following research questions. First, what is the most effective system architecture for encoding both the source sentence and the prompt? To this end, we compare various methods including concatenating source sentences with prompts, encoding prompts using a dedicated module, and incorporating prompt representations with an attention layer. The model performance is also compared with previous work on lexical constraints, a form of constraints in Figure 1 that has been much studied in the literature. Second, can different types of constraints be effectively trained within the same model? To this end, we design an algorithm to automatically construct different types of prompts from a standard MT training corpus, training a model with mixed prompts. Third, can a prompt-driven NMT system accept different number of prompts, while maintaining the same level of performance compared to a Transformer baseline without constraints? To this question, we consider a sampling-based training strategy, where the model receives random combinations of arbitrary number of prompts or no prompt at all for each sample during training. Fourth, can the set of flexible constraints we use serve to improve the efficiency of human-in-the-loop translation? We deploy our prompt-drive system in a real application scenario where professional translators conduct machine translation post editing (MTPE) by using prompts.
60
+
61
+ Empirical results show that the Prompt-driven Transformer (Prompt-Transformer) responds to different prompts effectively, while giving competitive performance when used as a unconstrained NMT model. In addition, prompt-driven model outperforms previous lexical constraints methods (Song et al., 2019; Chen et al., 2021b) by a large margin. Human experiments further demonstrate the control flexibility and effectiveness of our method. Through system deployment in a practical scenario, we show that the prompt-driven NMT system achieves a trade-off between translation quality and human efficiency, as compared with full NMT
62
+
63
+ or NMT with human post editing. Our code is released on https://github.com/yafuly/PromptNMT.
64
+
65
+ # 2 Related Work
66
+
67
+ Lexical constraint has received much attention for machine translation. Some researchers incorporate the constraints into the beam search algorithm (Hokamp and Liu, 2017; Post and Vilar, 2018), and recently Chen et al. (2021b) investigate alignment-based constrained decoding methods using attention weights. Another approach focuses on data augmentation. Song et al. (2019) and Dinu et al. (2019) create a synthetic code-switching corpus. Jon et al. (2021) augment the input sentences with lemmatized constraints to correct inflection. Chen et al. (2020) propose a lexical constraint-aware Transformer model (LeCA) by concatenating constraints and source sentence. Lexical constraints is one of the application scenarios of our method. Prompt-driven model gives strong results, while also simultaneously enables structural and style constraints with the versatility of prompts.
68
+
69
+ There has been study on controlling the global output style in MT (Mima et al., 1997; van der Wees et al., 2016; Rabinovich et al., 2017; Michel and Neubig, 2018; Sennrich et al., 2016a; Niu and Carpuat, 2020). van der Wees et al. (2016) analyze the impact of dialogue specific aspects in SMT for fictional dialogues. Rabinovich et al. (2017) employ personalized SMT models for better preservation of gender traits, and Michel and Neubig (2018) propose to adapt the bias of the output softmax to different users of an NMT system. Sennrich et al. (2016a) use target-constraint T-V annotation in NMT training to control the level of politeness. Niu and Carpuat (2020) propose a formality-sensitive NMT model taking formality levels as an extra input. Our work is similar in that the output of our model can be adaptive at inference time, but different in that the control is more fine-grained and not limited to certain styles.
70
+
71
+ Human in the loop for NMT (Turchi et al., 2017; Weng et al., 2019) has been proved effective to domain adaptation. Cheng et al. (2016) propose an interactive framework which takes two human actions: picking a critical translation error and revising the translation. Petrushkov et al. (2018) propose a simple sentence-level weighting method to integrate partial chunk-based feedback into NMT. Kreutzer et al. (2018) improve NMT with explicit and implicit user feedback collected on the ecom
72
+
73
+ ![](images/b66984f863b4f751738773db1510fd32d1c0b9065f43396b4e5db0971361673f.jpg)
74
+ Figure 2: The overall framework of Prompt-Transformer. During training, the prompts are sampled from the prompt candidate pool, which contains all possible prompts for each sentence pair. In deployment, the translators give arbitrary prompts to control output translations according to their needs.
75
+
76
+ merce platform. Domingo et al. (2019) leverage data generated during the post-editing process. The above methods improve the performance of NMT by leveraging extra training signals from human feedback. Different from them, our method allows human to control the NMT output by training a model with mixed prompts, without the requirement of human in training.
77
+
78
+ # 3 Problem Definition
79
+
80
+ In neural machine translation, a set of parallel sentence pairs $D = \{(X,Y)\}$ is given where $X = (x_{1},\dots,x_{T_{x}})$ and $Y = (y_{1},\dots,y_{T_{y}})$ , and the NMT systems model the conditional probability:
81
+
82
+ $$
83
+ p (Y | X; \theta) = \prod_ {t} ^ {T _ {y}} p \left(y _ {t} \mid y _ {< t}, X; \theta\right), \tag {1}
84
+ $$
85
+
86
+ where $\theta$ is the set of trainable parameters. We introduce prompts $P = (P_{1},\dots,P_{N})$ to control translation, which is defined as
87
+
88
+ $$
89
+ p (Y | X, P; \theta) = \prod_ {t} ^ {T _ {t}} p \left(y _ {t} \mid y _ {< t}, X, P; \theta\right). \tag {2}
90
+ $$
91
+
92
+ The prompts can be general and flexible. In this paper, we consider the following three types of common prompts:
93
+
94
+ - translation prompts that indicate the specific translation of a source segment (Fig 1 (b)).
95
+ - target-constraint prompts including some specific segments that the translation must contain, begin or end with (Fig 1 (a) and (d)).
96
+ - ordering prompts that indicate a source segment should be translated before another source segment (Fig 1 (c)).
97
+
98
+ # 4 Approach
99
+
100
+ The overall architecture of our system is shown in Figure 2. In particular, we take a Transformer baseline (Section 4.1), discussing different ways to additionally encode prompt constraints (Section 4.2). We propose a sampling-based training framework (Section 4.4), with automatic methods for generating rich constraints from standard MT training instances (Section 4.3).
101
+
102
+ # 4.1 Transformer
103
+
104
+ The vanilla Transformer (Vaswani et al., 2017) is composed of an encoder and a decoder. The Transformer encoder has a stack of $L$ identical multi-head self-attention layers, which takes the embedding of a source sentence $X$ as input and outputs contextualized source representations. For the $l$ -th encoder layer, the representations are computed as
105
+
106
+ $$
107
+ H ^ {l} = \operatorname {E n c L a y e r} \left(H ^ {l - 1}\right), \tag {3}
108
+ $$
109
+
110
+ where $H^{l - 1}$ is the output hidden state of the $(l - 1)$ -th layer.
111
+
112
+ The decoder introduces a cross-attention sublayer in each layer to attend to the source representations $H^{L}$ , taking previously generated target tokens as input and generating the next token. For the $l$ -th decoder layer, the hidden states of decoder are calculated as
113
+
114
+ $$
115
+ S ^ {l} = \operatorname {D e c L a y e r} \left(S ^ {l - 1}, H ^ {L}\right), \tag {4}
116
+ $$
117
+
118
+ where $S^{l - 1}$ is the output of the $(l - 1)$ -th layer.
119
+
120
+ # 4.2 Prompt-driven Transformer
121
+
122
+ We investigate three different approaches to incorporate prompts into the Transformer model.
123
+
124
+ (1) Separate Encoding. A straightforward way is to introduce a Prompt Encoder that is identical to the Transformer encoder, which encodes the prompt sequence separately. We concatenate the source representations and the prompt representations as the final encoder memory for the decoder:
125
+
126
+ $$
127
+ H _ {P} ^ {L} = \operatorname {P r o m p t - E n c o d e r} (P), \tag {5}
128
+ $$
129
+
130
+ $$
131
+ \hat {H} _ {L} = \operatorname {C o n c a t} \left(H ^ {L}, H _ {P} ^ {L}\right), \tag {6}
132
+ $$
133
+
134
+ where $P$ is a prompt sequence.
135
+
136
+ (2) Input Augmentation. We follow Chen et al. (2020) and construct pseudo source sequences by augmenting each input source sequence with the corresponding prompt sequence:
137
+
138
+ $$
139
+ \hat {X} = \operatorname {C o n c a t} \left(X, P _ {1}, P _ {2}, \dots , P _ {N}\right), \tag {7}
140
+ $$
141
+
142
+ where $N$ is the number of prompts. The augmented input $\hat{X}$ is fed into the standard Transformer.
143
+
144
+ (3) Prompt Attention. On top of the concatenation method, we can also use a dedicated prompt attention sub-layer after the cross-attention module in each decoder layer. The prompt attention takes the decoder hidden representations as queries and takes the prompt representations as keys and values to perform multi-head attention:
145
+
146
+ $$
147
+ \operatorname {P r o m p t A t t n} \left(S ^ {l}, H _ {P} ^ {L}\right) = \mathrm {M H A} \left(S ^ {l - 1}, H _ {P} ^ {L}, H _ {P} ^ {L}\right), \tag {8}
148
+ $$
149
+
150
+ where $\mathrm{MHA}(\cdot)$ is the multi-head attention mechanism (Vaswani et al., 2017).
151
+
152
+ # 4.3 Training Prompt Construction
153
+
154
+ Given a parallel dataset $D = \{(X,Y)\}$ , we propose an automatic method to generate prompts for each sentence pair based on word alignment, resulting in a corpus $\hat{D} = \{(X,Y,\hat{P})\}$ , where $\hat{P}$ is the corresponding prompt candidate pool containing all prompts. Specifically, we train an alignment tool on a parallel corpus and obtain possibly aligned phrases. For each sentence pair, we extract all possible prompts using the aligned phrases to build the prompt candidate pool.
155
+
156
+ First, we insert pre-defined symbols between source phrase segments and the corresponding aligned target segments (e.g., “ $<\mathrm{AB}>$ menschliche gesundheit $\langle \mathbf{\Pi} / \mathbf{A}\mathbf{M}\rangle$ human health”) to construct translation prompts. Second, we append predefined symbols before target phrase segments to construct target-constraint prompts: (1) “ $\langle \mathbf{\Pi} / \mathbf{T}\mathbf{B} \rangle$ ” denotes the target sequence begins with specific
157
+
158
+ segments (e.g., “ $<\mathrm{TB}>$ we know”); (2) “ $<\mathrm{TI}>$ ” denotes the target sequence includes specific segments (e.g., “ $<\mathrm{TI}>$ the complex science”); (3) “ $<\mathrm{TE}>$ ” denotes the target sequence ends with specific segments (e.g., “ $<\mathrm{TE}>$ we’ve experienced that”). Third, for ordering prompts, we find pairs of source phrases of which the aligned target phrases appear in the opposite order in the target sequence, indicating word-reordering is involved in translating these phrases. We insert pre-defined symbols between these 2 source segments (e.g., “ $<\mathrm{RB}>$ the apple pie $\langle \mathrm{RM}\rangle$ on the table”, meaning that “on the table” should be translated before “the apple pie” in the target language).
159
+
160
+ # 4.4 Training
161
+
162
+ Given $\hat{D} = \{(X,Y,\hat{P})\}$ , we propose a sampling based training framework to train the prompt-driven NMT model. For each instance $(X,Y,\hat{P})$ , we define whether to use prompts as a discrete Bernoulli variable $u \sim \mathcal{B}(\mu)$ , where $\mu$ is a hyperparameter (Bernoulli ratio) and a higher $\mu$ indicates more prompt-driven samples during training. If prompt is not used, the training objective is to maximize the log-likelihood:
163
+
164
+ $$
165
+ \sum_ {(X, Y) \in B a t c h} \operatorname {l o g p} (Y | X; \theta), \tag {9}
166
+ $$
167
+
168
+ where $Batch$ is a mini-batch of parallel sentence pairs.
169
+
170
+ If prompt is used, we sample a certain proportion of prompts for each prompt type from the corresponding prompt candidates without replacement. In particular, we define the proportion of the sampled prompts as a continuous random variable with a uniform distribution $\mathcal{U}(0,p_u)$ , where $p_u$ is a hyper-parameter, uniform ratio. A larger $p_u$ indicates more prompts are sampled for each sentence if there are. All sampled prompts are concatenated together to form the final prompt sequence $P$ , and the training objective is to maximize the log-likelihood defined as:
171
+
172
+ $$
173
+ \sum_ {(X, Y, P) \in B a t c h} \operatorname {l o g p} (Y | X, P; \theta). \tag {10}
174
+ $$
175
+
176
+ The randomness in prompts enables the model to cope with complicated situations containing different prompts and output accurate translations without prompts as well.
177
+
178
+ <table><tr><td rowspan="2">Model</td><td rowspan="2"># params</td><td colspan="2">BLEU</td><td rowspan="2">ResR</td></tr><tr><td>w/o prompts</td><td>w/ prompts</td></tr><tr><td>Transformer-IWSLT</td><td>36.74M</td><td>34.78</td><td>34.78</td><td>-</td></tr><tr><td>Prompt Encoder</td><td>43.05M</td><td>34.27</td><td>53.73</td><td>92.08</td></tr><tr><td>Param-share Prompt Encoder</td><td>36.74M</td><td>34.44</td><td>54.83</td><td>93.30</td></tr><tr><td>Prompt Enc &amp; Prompt Attention</td><td>49.36M</td><td>34.28</td><td>53.79</td><td>92.20</td></tr><tr><td>Param-Share Prompt Enc &amp; Prompt Attn</td><td>43.06M</td><td>34.04</td><td>55.06</td><td>94.35</td></tr><tr><td>Input Augmentation</td><td>36.74M</td><td>33.69</td><td>56.10</td><td>95.19</td></tr></table>
179
+
180
+ Table 1: Performance of different prompt-feeding methods on IWSLT'14 De-En.
181
+
182
+ # 5 Experimental Settings
183
+
184
+ Setup. As a preliminary experiment, we use a small size dataset IWSLT'14 De $\rightarrow$ En to investigate the effectiveness of our model under different settings. We use the Moses tokenizer $^{1}$ and apply BPE (Sennrich et al., 2016b) with 10,000 merge operations on the merged corpus of both side. For large-scale test, we extend our method to WMT'17 En $\rightarrow$ Zh, which contains 20.6M sentence pairs after preprocessing. We use Moses tokenizer to tokenize English side and jieba segmenter $^{2}$ to tokenize Chinese side. We apply BPE with 55,000 operations on the concatenated corpus and obtain a shared vocabulary for both sides. We use fast_align (Dyer et al., 2013) to obtain word alignment, based on which we apply the algorithm in Section 4.3 to generate prompts and build the prompt candidate pool. Data statistics is presented in Appendix A. We implement the Transformer baseline and PromptTransformer based on THUMT (Tan et al., 2020). We use iwslt_de_en for IwSTLT'14 De $\rightarrow$ En and transformer_base for WMT'16 En $\rightarrow$ Zh. The default Prompt Encoder consists of 3 Transformer layers. We use Adam (Kingma and Ba, 2015) to optimize the network with $\beta_{1} = 0.9$ , $\beta_{2} = 0.98$ . The default Bernoulli and uniform ratios are set as 0.3 and 0.35, respectively. For inference, we set the beam width as 5 and length penalty as 0.6. Details are presented in Appendix B.
185
+
186
+ Evaluation Metrics. We use both automatic and human evaluation to measure the performance of our prompt-driven NMT model, taking commonly-used BLEU scores (Papineni et al., 2002) to measure translation quality automatically. For fair comparison with previous work, we use multi-bleu.perl for De-En and sacreBLEU (Post, 2018) for $\mathrm{En - Zh}^3$ . In addition, we use Response Rate (ResR) to quantify how the model responses to the given prompts,
187
+
188
+ which is defined as the percentage of prompts being correctly responded. Specifically, for translation prompts, ResR denotes the ratio of prompt translations that appear in the sentence translation; for target-constraint prompts, ResR measures the ratio of prompts that exist at the beginning of, at the end of or in the translation accordingly; for ordering prompts, ResR is calculated as the ratio of translations that satisfy the word ordering information induced by the prompts.
189
+
190
+ For human evaluation, we follow Knight (2000) and ask professional translators to assign adequacy and fluency scores for each translation ranging from one to five. The five point scale for adequacy indicates how much of the meaning expressed in the reference translation is also expressed in a hypothesis translation: $5 = \text{All}$ , $4 = \text{Most}$ , $3 = \text{Much}$ , $2 = \text{Little}$ , and $1 = \text{None}$ . The five point scale for fluency indicates how fluent the translation is: $5 = \text{Flawless}$ , $4 = \text{Good}$ , $3 = \text{Non-native}$ , $2 = \text{Disfluent}$ , and $1 = \text{Incomprehensible}$ .
191
+
192
+ We investigate the effectiveness of our method in the context of automatic evaluation in Section 6, where prompts are constructed towards reference translation. In Section 7, we conduct human evaluation to demonstrate the control flexibility of the Prompt-driven NMT system. Finally, in Section 8 we show an application of the method in the context of human-in-the-loop translation.
193
+
194
+ # 6 Experiments on the Model Design
195
+
196
+ We evaluate models under two test scenarios using IWSLT'14 De-En: inference without prompt and inference with prompt. The former is the same as the vanilla machine translation setting and is evaluated using BLEU score. For the latter, we also evaluate the model's effectiveness on responding to prompts by calculating ResR. We apply sampling strategy same to training and run on the test set once to build a deterministic prompt sets.
197
+
198
+ ![](images/a122e78375a9e39ccada4d5abd5eedba06d506b5c454c77ee7caa1b95244dd32.jpg)
199
+ Figure 3: BLEU scores with respect to the number of prompts during inference.
200
+
201
+ ![](images/a8798312ac47cc07a116023c997750100ab6181074ec19faf3c10a1ad30cd802.jpg)
202
+ Figure 4: ResR and BLEU scores with respect to the Bernoulli ratio during training.
203
+
204
+ Number of prompts during decoding. We investigate how prompts improve translation performance by feeding different number of prompts during decoding. Specifically, we randomly select certain number of prompts from the prompt candidate pool and construct test prompts accordingly. The results are shown in Figure 3. Prompt-Transformer further achieves higher BLEU scores when there are more prompts. Given as many as 10 prompts, the BLEU reaches 60.59. We also investigate how the sampling ratio affects decoding performance, which is discussed in Appendix C.
205
+
206
+ Robustness to different prompts. We explore how the model behaves under different prompt sets, by fixing the sampling ratios but varying the seed for prompt sampling. We conduct experiments with 10 seeds, under which the model receives different prompts for translation, calculating the mean and standard deviation of BLEU scores and ResR over each seed. For each sentence, the model is provided with 1 to 8 sampled prompts. The model achieves a average BLEU score of 54.79 with a standard deviation of 0.17, and an average of 92.82 with a standard deviation of 0.14 for ResR, demonstrating that the model is stable for flexible types of prompt
207
+
208
+ combinations.
209
+
210
+ Influences of model architecture. Based on the modules in Section 4.2, we compare different model architectures to incorporate prompts using a fixed prompt seed. As shown in Table 1, all prompt-driven models obtain higher BLEU scores over Transformer when provided with prompts. Input augmentation achieves the highest ResR, but suffers from larger performance deterioration without prompts. For the prompt encoding method, we find that reusing the sentence encoder as the prompt encoder (Param-share Prompt Encoder) achieves higher ResR than introducing extra parameters (Prompt Encoder). We attribute this pattern to the better generalization ability of the reused encoder in Param-share Prompt Encoder. The effects of prompt encoder depth is discussed in Appendix D. For incorporating prompt representations, introducing Prompt Attention (Prompt Enc & Prompt Attention and Param-Share Prompt Enc & Prompt Attn) is beneficial for responding effectiveness, compared with concatenating source and prompt representations for cross-attention. Overall, Param-share Prompt Encoder gives a balance between BLEU in unprompted cases and the response rate, without introducing extra parameters. We thus choose the model for the other experiments.
211
+
212
+ Number of prompts during training. The sampling strategy in Section 4.4 can affect the performance. We investigate how varying the Bernoulli ratio during training affects the model performance. The Bernoulli ratio indicates how many of samples in the train set are driven by prompts. For example, a Bernoulli ratio of 0.3 denotes $65.7\%$ of the training samples are provided with prompts. The result is shown in Figure 4. We can observe that ResR grows steadily with the increasing ratio during training. The model gives a low ResR with a Bernoulli ratio of 0.1, as there are limited samples for the model to capture prompt patterns. Despite the increasing ResR, there is a sharp decline on BLEU scores when the ratio exceeds 0.5. This is because high Bernoulli ratios indicate almost all training samples are prompted (e.g., a ratio of 0.7 denotes $97.3\%$ of training samples are provided with prompts). Therefore, the model learns to output translations by over reliance on prompts, but fails to build correspondence between source and target languages. Thus it is important to balance the learning of translation and receiving prompts.
213
+
214
+ <table><tr><td>Prompts</td><td>Translations</td></tr><tr><td>Null</td><td>在庭审中,双方就王志安是否侵犯了兰玉峰的名誉权进行了辩论。(English: in the court hearing, the two sides launched a debate on whether wang zhian violated the reputation right of lan yuefeng.)</td></tr><tr><td>&lt;/AB&gt; lan yuefeng &lt;/AM&gt; Lan Yuefeng</td><td>在庭审中,双方就王志安是否侵犯了Lan Yuefeng的名誉权进行了辩论。(English: in the court hearing, the two sides launched a debate on whether wang zhian violated the reputation right of Lan Yuefeng.)</td></tr><tr><td>&lt;/TB&gt; 双方</td><td>双方 在庭审中争论王志安是否侵犯了兰玉峰的名誉权。(English: the two sides argued in the court hearing whether wang zhian violated the reputation right of lan yuefeng.)</td></tr><tr><td>&lt;/RB&gt; wang zhian &lt;/RM&gt; argued</td><td>双方在庭审中争辩说,王志安是否侵犯了兰玉峰的名誉权。(English: the two sides argued in the court hearing, whether wang zhian violated the reputation right of lan yuefeng.)</td></tr><tr><td>&lt;/TB&gt; 在庭审中
215
+ &lt;/RB&gt; wang zhian &lt;/RM&gt; argued</td><td>在庭审中,双方争辩说王志安是否侵犯了兰玉峰的名誉权。(English: in the court hearing, the two sides argued whether wang zhian violated the reputation right of lan yuefeng.)</td></tr><tr><td>&lt;/AB&gt; lan yuefeng &lt;/AM&gt; Lan Yufeng
216
+ &lt;/TB&gt; 在庭审中
217
+ &lt;/RB&gt; wang zhian &lt;/RM&gt; argued</td><td>在庭审中,双方争辩说王志安是否侵犯了Lan Yufeng的名誉权。(English: in the court hearing, the two sides argued whether wang zhian violated the reputation right of Lan Yuefeng.)</td></tr></table>
218
+
219
+ Table 2: Given different prompts, Prompt-Transformer generates different translations for the sentence "in the court hearing , the two sides argued whether wang zhian violated the reputation right of lan yuefeng."
220
+
221
+ <table><tr><td rowspan="2">Model</td><td colspan="2">BLEU</td><td rowspan="2">CSR</td><td rowspan="2">ResR</td></tr><tr><td>w/o P</td><td>w/ P</td></tr><tr><td>TF-IWSLT</td><td>34.78</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Code-Switch</td><td>33.88</td><td>37.15</td><td>93.69</td><td>90.21</td></tr><tr><td>LeCA</td><td>34.66</td><td>37.10</td><td>89.32</td><td>82.97</td></tr><tr><td>Prompt-TF</td><td>34.44</td><td>38.30</td><td>95.75</td><td>94.26</td></tr></table>
222
+
223
+ Table 3: Prompt-driven Transformer for lexical constraints on IWSLT'14 De-En. P denotes 'prompts'.
224
+
225
+ <table><tr><td rowspan="2">Model</td><td colspan="2">BLEU</td><td rowspan="2">ResR</td></tr><tr><td>w/o prompts</td><td>w/ prompts</td></tr><tr><td>TF-Base</td><td>34.06</td><td>34.06</td><td>-</td></tr><tr><td>Prompt-TF</td><td>33.88</td><td>48.93</td><td>91.80</td></tr></table>
226
+
227
+ Table 4: Performance on WMT'17 En-Zh.
228
+
229
+ Comparison with existing work on lexical constraints. Among the types of prompts we accommodate, lexical constraints have been investigated by existing work. We compare our method with two typical methods, i.e., CodeSwitch (Song et al., 2019) and LeCA (Chen et al., 2021b). Following Song et al. (2019) and Chen et al. (2021b), the copy success rate (CSR) is also calculated, which is the percentage of successfully generated tokens in constraints, differing from ResR which is the ratio of correctly responded prompts (i.e., phrases for lexical constraints). Compared with CodeSwitch, Prompt-Transformer maintains better performance without prompts, while also achieves a higher score of CSR and ResR. Although LeCA is slightly better in terms of BLEU without prompts, Prompt-Transformer outperforms LeCA by a large margin in terms of CSR and ResR. Performance in lexical constraints further demonstrates the effectiveness
230
+
231
+ of our method for controlling translation and meanwhile maintaining performance without prompts.
232
+
233
+ Experiments on WMT. For a large scale test, we apply Prompt-Transformer on the WMT'17 $\mathrm{En} \rightarrow \mathrm{Zh}$ dataset. Based on the preliminary experiments, we choose the Param-share Prompt Encoder architecture. As shown in Table 4, Prompt-Transformer gives an improved BLEU with prompts (48.93 vs. 34.06) and a ResR of 91.80, verifying the scalability of the proposed method on large-scale datasets. We use this model for experiments in Section 7 and Section 8.
234
+
235
+ # 7 Experiments on Prompts
236
+
237
+ We evaluate how model responds to prompts in practical scenarios, where no "gold-standard" references are given. We sample 100 source sentences from the WMT'17 En-Zh test set and ask 2 professional translators to assign each sentence with two different prompt groups, each of which includes at least one type of prompts. In particular, for constructing translation prompts, the translators are asked to give a source segment two different valid translations (e.g., "translation-segment-1" or "translation-segment-2"); for constructing target-constraint prompts, the translators should choose two different ways to prompt the model; for constructing ordering prompts, the translators provide two opposite orderings (e.g., "source-segment1" should be translated before and after "source-segment2", respectively). The model is expected to output two different and correct trans
238
+
239
+ lations corresponding to the two prompt groups, respectively. We ask 3 professional translators to evaluate the ResR and translation quality based on the adequacy and fluency metrics in Section 5.
240
+
241
+ The system achieves ResR scores of 89.80, 94.74, 90.20 for translation prompts, target-constraint prompts, and ordering prompts, respectively, showing the effectiveness of our proposed model on responding to human prompts. The system obtains a competitive performance compared to the unprompted baseline in tuns of both adequacy (3.49 vs. 3.40) and fluency (3.24 vs. 3.31), demonstrating that our system can enable flexible translation style and maintain translation quality at the same time.
242
+
243
+ Table 2 shows a case study, where the system responds to different types of prompts and their combinations accurately given the same source sentence. Moreover, the system generates translations with different styles under the target-constraint prompts and ordering prompts. For instance, with the prompt “</TB> 双方” (English: </TB> the two sides), the system translates the word “argued” to “争论” (English: argued) instead of “进行了辩论” (English: launched a debate) in the unprompted case. A similar pattern can be observed when the system receives the ordering prompt “</RB> wang zhian </RM> argued”, which indicates that the word “argued” should be translated before “wang zhian” in Chinese.
244
+
245
+ # 8 Human-in-the-loop Translation
246
+
247
+ Machine translation post-editing (MTPE) is widely used by translation companies to improve efficiency as well as ensure translation quality. Studies show that conducting post-editing over high-quality MT can increase the productivity of professional translators compared to manual translation 'from scratch' (Guerberof, 2009; Plitt and Masselot, 2010). However, MTPE still can be expensive in heavy involvement of human efforts in editing. To alleviate human labor, Prompt-driven methods can be used for a better trade-off between translation quality and efficiency.
248
+
249
+ To verify our hypothesis, we ask professional translators to compare two methods for editing on MT translations: the traditional MTPE or giving prompts based on MT translations (MTPrompt). We compare MT, MTPE and MTPrompt based on time efficiency and translation quality. MT refers to use machine translations without editing. For
250
+
251
+ ![](images/0d6f6782a425e2907babd7ac786e80f41176f5d5b05dc89ecfdb2d5629b4356d.jpg)
252
+ Figure 5: Translation quality based on adequacy and fluency.
253
+
254
+ ![](images/c112627b2bee41c385296f48d404d50ea666c3d6c14e66afdf45315a10ee0c4f.jpg)
255
+ Figure 6: Time cost (hours) for MTPrompt with respect to the round of MTPrompt.
256
+
257
+ MTPE, translators are required to edit translations output by the WMT-trained Transformer baseline in Section 6. For MTPrompt, translators are required to observe output translation errors and give prompts to correct them. More details are presented in Appendix E.
258
+
259
+ The translation quality is presented in Figure 5. MTPE achieves full marks on both adequacy and fluency, whereas the scores for MT translations are on average around 2.5. Translations with prompt obtain substantial improvement over MT translations, with both the adequacy and fluency scores being close to 4 (i.e., the translations cover most meaning and also have good fluency).
260
+
261
+ In terms of speed, the average time spent on MTPE is 3.75 hours, which is stable for more batches since the translators have strong experience in MTPE. In contrast, the time cost can be lower as they conduct more MTPrompt actions. We ask two translators to conduct multiple rounds of MTPrompt edit, with each round containing 50 translations. The time cost for each round is shown in Figure 6. We can observe that as the translators get familiar with the MTPrompt mode, they become more efficient in giving prompts. The fastest batch costs an average of 1.1 hours for MTPrompt, which is 2.4 times more efficient than MTPE, and meanwhile translation quality is maintained (adequacy: 3.87 vs. 3.84 and fluency: 3.71 vs. 3.63).
262
+
263
+ # 9 Conclusion
264
+
265
+ We proposed a prompt-driven Transformer model to incorporate flexible constraints on translation. Under a sampling-based training framework, the model learned prompt responding effectively and achieved competitive performance compared with both the unconstrained baseline and existing work on lexical constraints. Human experiments further demonstrated that Prompt-Transformer was able to respond to various combinations of prompts accurately, and generate versatile translations. Through deployment in an application scenario, we showed that our system could serve to improve the efficiency of human-in-the-loop translation.
266
+
267
+ # 10 Ethics Consideration
268
+
269
+ As mentioned, we collected our data from IWSLT and WMT that all are public to academic use, and they contain no sensitive information. The legal advisor of our institute confirms that the sources of our data are freely accessible online without copyright constraint to academic use. Our human experiments (Section 7 and Section 8) involves manual annotation. Annotators were asked to give prompts, post-edit machine translation and evaluate translations, which do not involve any personal sensitive information. We hired 4 annotators who have degrees in English Linguistics or Applied Linguistics. Before formal annotation, annotators were asked to annotate a few samples randomly extracted from the dataset, and based on average annotation time we set a fair salary (i.e., 30 dollars per hour) for them. During their training annotation process, they were paid as well.
270
+
271
+ # Acknowledgements
272
+
273
+ Yue Zhang is the corresponding author. We thank all reviewers for their insightful comments. This publication has emanated from research conducted with the financial support of the "Pioneer" and "Leading Goose" R&D Program of Zhejiang under Grant Number 2022SDXHDX0003. This work is also under a grant from Lan-bridge Information Technology Co., Ltd. We thank colleagues from Lan-bridge for examining data and evaluating results.
274
+
275
+ # References
276
+
277
+ Guanhua Chen, Yun Chen, and Victor O. K. Li. 2021a. Lexically constrained neural machine translation with
278
+
279
+ explicit alignment guidance. In Thirty-Fifth AAAI Conference on Artificial Intelligence, AAAI 2021, Thirty-Third Conference on Innovative Applications of Artificial Intelligence, IAAI 2021, The Eleventh Symposium on Educational Advances in Artificial Intelligence, EAAI 2021, Virtual Event, February 2-9, 2021, pages 12630-12638.
280
+ Guanhua Chen, Yun Chen, and Victor O. K. Li. 2021b. Lexically constrained neural machine translation with explicit alignment guidance. In Thirty-Fifth AAAI Conference on Artificial Intelligence, AAAI 2021, Thirty-Third Conference on Innovative Applications of Artificial Intelligence, IAAI 2021, The Eleventh Symposium on Educational Advances in Artificial Intelligence, EAAI 2021, Virtual Event, February 2-9, 2021, pages 12630-12638.
281
+ Guanhua Chen, Yun Chen, Yong Wang, and Victor O. K. Li. 2020. Lexical-constraint-aware neural machine translation via data augmentation. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI 2020, pages 3587-3593.
282
+ Shanbo Cheng, Shujian Huang, Huadong Chen, Xin-Yu Dai, and Jiajun Chen. 2016. PRIMT: A pick-revise framework for interactive machine translation. In Proc. of NAACL-HLT, pages 1240-1249.
283
+ Georgiana Dinu, Prashant Mathur, Marcello Federico, and Yaser Al-Onaizan. 2019. Training neural machine translation to apply terminology constraints. In Proc. of ACL, pages 3063-3068.
284
+ Miguel Domingo, Mercedes García-Martínez, Álvaro Peris, Alexandre Helle, Amando Estela, Laurent Bié, Francisco Casacuberta, and Manuel Herranz. 2019. Incremental adaptation of NMT for professional posteditors: A user study. In Proceedings of Machine Translation Summit XVII: Translator, Project and User Tracks, pages 219-227.
285
+ Chris Dyer, Victor Chahuneau, and Noah A. Smith. 2013. A simple, fast, and effective reparameterization of IBM model 2. In Proc. of NAACL-HLT, pages 644-648.
286
+ Sergey Edunov, Myle Ott, Michael Auli, and David Grangier. 2018. Understanding back-translation at scale. In Proc. of EMNLP, pages 489-500.
287
+ Ana Guerberof. 2009. Productivity and quality in MT post-editing. In Beyond Translation Memories: New Tools for Translators Workshop.
288
+ Hany Hassan, Anthony Aue, Chang Chen, Vishal Chowdhary, Jonathan Clark, Christian Federmann, Xuedong Huang, Marcin Junczys-Dowmunt, William Lewis, Mu Li, Shujie Liu, Tie-Yan Liu, Renqian Luo, Arul Menezes, Tao Qin, Frank Seide, Xu Tan, Fei Tian, Lijun Wu, Shuangzhi Wu, Yingce Xia, Dongdong Zhang, Zhirui Zhang, and Ming Zhou. 2018. Achieving human parity on automatic chinese to english news translation. CoRR, abs/1803.05567.
289
+
290
+ Chris Hokamp and Qun Liu. 2017. Lexically constrained decoding for sequence generation using grid beam search. In Proc. of ACL, pages 1535-1546.
291
+ Josef Jon, João Paulo Aires, Dusan Varis, and Ondrej Bojar. 2021. End-to-end lexically constrained machine translation for morphologically rich languages. In Proc. of ACL, pages 4019-4033.
292
+ Prathyusha Jwalapuram, Shafiq Joty, and Youlin Shen. 2020. Pronoun-targeted fine-tuning for NMT with hybrid losses. In Proc. of EMNLP, pages 2267-2279.
293
+ Diederik P. Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In Proc. of ICLR.
294
+ Kevin Knight. 2000. Statistical machine translation. In Proceedings of the Fourth Conference of the Association for Machine Translation in the Americas: Tutorial Descriptions.
295
+ Jakub Konieczny. 2021. Training of neural machine translation model to apply terminology constraints for language with robust inflection. In *Position and Communication Papers of the 16th Conference on Computer Science and Intelligence Systems*, Online, September 2-5, 2021, pages 233-234.
296
+ Julia Kreutzer, Shahram Khadivi, Evgeny Matusov, and Stefan Riezler. 2018. Can neural machine translation be improved with user feedback? In Proc. of NAACL-HLT, pages 92-105.
297
+ Jiwei Li and Dan Jurafsky. 2016. Mutual information and diverse decoding improve neural machine translation. CoRR, abs/1601.00372.
298
+ Yafu Li, Yongjing Yin, Yulong Chen, and Yue Zhang. 2021. On compositional generalization of neural machine translation. In Proc. of ACL, pages 4767-4780.
299
+ Xiaodong Liu, Kevin Duh, Liyuan Liu, and Jianfeng Gao. 2020. Very deep transformers for neural machine translation. CoRR, abs/2008.07772.
300
+ Paul Michel and Graham Neubig. 2018. Extreme adaptation for personalized neural machine translation. In Proc. of ACL, pages 312-318.
301
+ Hideki Mima, Osamu Furuse, and Hitoshi Iida. 1997. Improving performance of transfer-driven machine translation with extra-linguistic information from context, situation and environment. In Proceedings of the Fifteenth International Joint Conference on Artificial Intelligence, IJCAI 97, Nagoya, Japan, August 23-29, 1997, 2 Volumes, pages 983-989.
302
+ Mathias Müller, Annette Rios, and Rico Sennrich. 2020. Domain robustness in neural machine translation. In Proceedings of the 14th Conference of the Association for Machine Translation in the Americas (Volume 1: Research Track), pages 151-164.
303
+
304
+ Xing Niu and Marine Carpuat. 2020. Controlling neural machine translation formality with synthetic supervision. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 8568-8575.
305
+ Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proc. of ACL, pages 311-318.
306
+ Pavel Petrushkov, Shahram Khadivi, and Evgeny Matusov. 2018. Learning from chunk-based feedback in neural machine translation. In Proc. of ACL, pages 326-331.
307
+ Mirko Plitt and François Masselot. 2010. A productivity test of statistical machine translation post-editing in a typical localisation context. Prague Bull. Math. Linguistics, pages 7-16.
308
+ Matt Post. 2018. A call for clarity in reporting BLEU scores. In Proceedings of the Third Conference on Machine Translation: Research Papers, pages 186-191.
309
+ Matt Post and David Vilar. 2018. Fast lexically constrained decoding with dynamic beam allocation for neural machine translation. In Proc. of NAACL-HLT, pages 1314-1324.
310
+ Ella Rabinovich, Raj Nath Patel, Shachar Mirkin, Lucia Specia, and Shuly Wintner. 2017. Personalized machine translation: Preserving original author traits. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 1, Long Papers, pages 1074-1084.
311
+ Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016a. Controlling politeness in neural machine translation via side constraints. In Proc. of NAACL-HLT, pages 35-40.
312
+ Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016b. Neural machine translation of rare words with subword units. In Proc. of ACL, pages 1715-1725.
313
+ Raphael Shu, Hideki Nakayama, and Kyunghyun Cho. 2019. Generating diverse translations with sentence codes. In Proc. of ACL, pages 1823-1827.
314
+ Kai Song, Yue Zhang, Heng Yu, Weihua Luo, Kun Wang, and Min Zhang. 2019. Code-switching for enhancing NMT with pre-specified translation. In Proc. of NAACL-HLT, pages 449-459.
315
+ Zhixing Tan, Jiacheng Zhang, Xuancheng Huang, Gang Chen, Shuo Wang, Maosong Sun, Huanbo Luan, and Yang Liu. 2020. THUMT: An open-source toolkit for neural machine translation. In Proceedings of the 14th Conference of the Association for Machine
316
+
317
+ Translation in the Americas (Volume 1: Research Track), pages 116-122.
318
+ Marco Turchi, Matteo Negri, M. Amin Farajian, and Marcello Federico. 2017. Continuous learning from human post-edits for neural machine translation. Prague Bull. Math. Linguistics, pages 233-244.
319
+ Marlies van der Wees, Arianna Bisazza, and Christof Monz. 2016. Measuring the effect of conversational aspects on machine translation quality. In Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, pages 2571-2581.
320
+ 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 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 5998-6008.
321
+ Rongxiang Weng, Hao Zhou, Shujian Huang, Lei Li, Yifan Xia, and Jiajun Chen. 2019. Correct-and-memorize: Learning to translate from interactive revisions. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10-16, 2019, pages 5255-5263.
322
+
323
+ # A Data Statistics
324
+
325
+ <table><tr><td>Dataset</td><td># sents</td><td>avg. Tr</td><td>avg. Tc</td><td>avg. O</td></tr><tr><td>IWSLT</td><td>160,239</td><td>41.28</td><td>41.56</td><td>0.38</td></tr><tr><td>WMT</td><td>20,616,247</td><td>34.69</td><td>34.69</td><td>18.24</td></tr></table>
326
+
327
+ Table 5: Data statistics with the right 4 columns accordingly denoting number of sentences, average number of translation prompts, target-constraint prompts and ordering prompts for each sentence.
328
+
329
+ # B Experiment Details
330
+
331
+ We implement the Transformer baseline and Prompt-Transformer based on THUMT (Tan et al., 2020). Except for the prompt encoding modules, Prompt-Transformer shares the same settings with the Transformer baseline. The prompt encoder layer shares the same setting with the vanilla Transformer encoder layer, and the prompt attention module is the same as the Transformer crossattention module. For IwSLT'14 De→En, we use the iwslt_de_en setting with dropout ratio 0.3. For WMT'16 En→Zh, we use the transformer_base setting with a dropout of 0.1. We use the Adam (Kingma and Ba, 2015) to optimize the network with $\beta_{1} = 0.9$ , $\beta_{2} = 0.98$ . The batch size for training De→En models is 4,096 and 32,768 for En→Zh models. The default Bernoulli and uniform ratio is set as 0.3 and 0.35 respectively. For inference, we set the beam width as 5 and length penalty as 0.6.
332
+
333
+ # C Effects of Uniform Ratio during Decoding
334
+
335
+ We investigate how prompts improve translation performance, by using the same sampling strategy during training but setting the Bernoulli ratio to 1, so that the number of prompts is only determined by the uniform ratio (Section 4.4). By varying the uniform ratio, the model receives different number of prompts for each sentence. The results are shown in Figure 7. We can observe that PromptTransformer behaves similarly to the Transformer baseline when the uniform ratio is 0, i.e., all sentences are translated without prompts. The translation performance is improved in a large degree when the uniform ratio is as small as 0.05. PromptTransformer further achieves higher BLEU scores when there are more prompts. With all prompts (0.35 ratio), the BLEU reaches 54.88, 20.06 higher than the baseline of 34.78.
336
+
337
+ ![](images/330206ac96da740e5c3aa6f2cbfd3ea384aca90bd588cad0f73dad6ff27c174e.jpg)
338
+ Figure 7: BLEU scores with respect to the uniform ratio during inference.
339
+
340
+ ![](images/fdaba819b21a972c8296f1d0a8184a22b73a12895c066c5145c50099f6ed1728.jpg)
341
+ Figure 8: ResR and BLEU scores with respect to the number of prompt encoder layers.
342
+
343
+ # D Effects of Prompt Encoder Depth
344
+
345
+ We investigate how the depth of the prompt encoder affects model performance. The results are shown in Figure 8. We can observe that the model performs steadily well with a prompt encoder of one to four Transformer layers. However, the ResR and BLEU score with prompts decrease sharply when the depth grows to 5 layers. This can be because that too deep prompt encoders overfit to the small scale MT dataset and thus fail to generalize to unseen prompts robustly.
346
+
347
+ # E Prompt in Human-in-the-loop Translation
348
+
349
+ We sample 100 sentences from the WMT'17 En-Zh test set and ask 2 professional translators to conduct MTPE and MTPrompt on the corresponding translations. The first translator is asked to perform MTPE on the first 50 sentences and MTPrompt on the other 50 sentences, whereas the second translator is asked to do the other way around. They are required to record the time they spend with both methods. Then we ask 3 translators to evaluate translations based on adequacy and fluency mentioned in Section 5 and calculate average scores respectively.
promptdrivenneuralmachinetranslation/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1b535ab32e06321e7773c2ac8bedae09a828c35155816264509dc46f6999961
3
+ size 446970
promptdrivenneuralmachinetranslation/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e13d9a7e88e85013bbc9ba29772646c82cc67d32b873dbe9e1b476cdf3ef289d
3
+ size 369796
prompttuningfordiscriminativepretrainedlanguagemodels/2bb65d2d-f8fd-4016-b677-42b37efbb12e_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f22726875f9819ea330f73061ee28f68392d9bee0bd5e49627e6518e36c8d988
3
+ size 44718
prompttuningfordiscriminativepretrainedlanguagemodels/2bb65d2d-f8fd-4016-b677-42b37efbb12e_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89a1b7834d3fb751747beb52d566ca79520b682f0c6cd6f0de2e859fad862c3b
3
+ size 54287
prompttuningfordiscriminativepretrainedlanguagemodels/2bb65d2d-f8fd-4016-b677-42b37efbb12e_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c0575d9a0f6c8c87f9feee86555bf392975b6f1cd1d298a191d36b7d9915430
3
+ size 439482
prompttuningfordiscriminativepretrainedlanguagemodels/full.md ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Prompt Tuning for Discriminative Pre-trained Language Models
2
+
3
+ Yuan Yao $^{1}$ , Bowen Dong $^{1}$ , Ao Zhang $^{2}$ , Zhengyan Zhang $^{1}$ , Ruobing Xie $^{3}$ , Zhiyuan Liu $^{1,4,5,6\dagger}$ , Leyu Lin $^{3}$ , Maosong Sun $^{1,4,5,6\dagger}$ , Jianyong Wang $^{1}$
4
+
5
+ $^{1}$ Dept. of Comp. Sci. & Tech., Institute for AI, Tsinghua University, Beijing, China
6
+
7
+ Beijing National Research Center for Information Science and Technology
8
+
9
+ $^{2}$ Department of Computer Science, National University of Singapore, Singapore
10
+
11
+ <sup>3</sup>WeChat Search Application Department, Tencent, China
12
+
13
+ $^{4}$ Institute for Artificial Intelligence, Tsinghua University, Beijing, China
14
+
15
+ $^{5}$ Institute Guo Qiang, Tsinghua University, Beijing, China
16
+
17
+ $^{6}$ International Innovation Center of Tsinghua University, Shanghai, China
18
+
19
+ yaoyuanthu@163.com dongbw18@mails.tsinghua.edu.cn
20
+
21
+ # Abstract
22
+
23
+ Recent works have shown promising results of prompt tuning in stimulating pre-trained language models (PLMs) for natural language processing (NLP) tasks. However, to the best of our knowledge, existing works focus on prompt-tuning generative PLMs that are pre-trained to generate target tokens, such as BERT (Devlin et al., 2019). It is still unknown whether and how discriminative PLMs, e.g., ELECTRA (Clark et al., 2020), can be effectively prompt-tuned. In this work, we present DPT, the first prompt tuning framework for discriminative PLMs, which reformulates NLP tasks into a discriminative language modeling problem. Comprehensive experiments on text classification and question answering show that, compared with vanilla fine-tuning, DPT achieves significantly higher performance, and also prevents the unstable problem in tuning large PLMs in both full-set and low-resource settings. The source code and experiment details of this paper can be obtained from https://github.com/thunlp/DPT.
24
+
25
+ # 1 Introduction
26
+
27
+ Recent years have witnessed the great success of the pre-training-then-fine-tuning paradigm in natural language processing (NLP) (Devlin et al., 2019; Yang et al., 2019; Clark et al., 2020; Lan et al., 2020; Raffel et al., 2020). Typically, language models are first pre-trained on large-scale corpora via self-supervised generative or discriminative tasks to learn universal text representations, and then fine-tuned to adapt to downstream tasks (Qiu et al., 2020; Xu et al., 2021). However, the significant gap
28
+
29
+ between the objective forms of model pre-training and fine-tuning hinders taking full advantage of PLMs in downstream tasks (Liu et al., 2021).
30
+
31
+ Prompt tuning has recently shown its effectiveness in stimulating the capability of PLMs by transforming downstream tasks into the same form as pre-training (Petroni et al., 2019; Brown et al., 2020; Schick and Schütze, 2021; Gao et al., 2021; Liu et al., 2021). However, to the best of our knowledge, existing works focus on prompt-tuning generative PLMs (i.e., PLMs pre-trained by generating target textual tokens from the context, such as BERT (Devlin et al., 2019) and GPT (Brown et al., 2020)). It is still unknown whether and how discriminative PLMs can be effectively prompt-tuned (i.e., PLMs pre-trained by discriminating replaced tokens, such as ELECTRA (Clark et al., 2020) and WKLM (Xiong et al., 2020)). Since discriminative PLMs typically enjoy competitive performance and superior computational efficiency compared with their generative counterparts (Clark et al., 2020), it can be especially appealing to prompt-tuning discriminative PLMs.
32
+
33
+ In this work, we present DPT, the first prompt tuning framework for discriminative PLMs. DPT reformulates downstream tasks into a discriminative language modeling problem, maximally mitigating the gap between model pre-training and tuning. Specifically, as shown in Figure 1, models are asked to discriminate correct answer tokens (e.g., correct labels for text classification, or answer spans for question answering) from the input tokens based on the reused discriminative language modeling head, where the objective form is identical to pre-training.
34
+
35
+ To evaluate DPT, we conduct comprehensive experiments on text classification and question an-
36
+
37
+ ![](images/6640fae730e8a2f39dab65332431185f0cf2b3db2905ec53793672a8f4e68666.jpg)
38
+ Figure 1: Illustration of (a) discriminative language modeling (DLM) based pre-training with the DLM head, (b) vanilla fine-tuning with a new classification (CLS) head, and (c) our DPT prompt tuning approach that reformulates NLP tasks into a discriminative language modeling problem. DPT fills the input text into the template containing answer candidates, and discriminates whether each answer candidate is correct (i.e., original), or incorrect (i.e., replaced) based on the reused DLM head.
39
+
40
+ swering in both full-set and low-resource settings. Experimental results show that despite its simplicity, DPT significantly outperforms vanilla fin-tuning (e.g., $4.1\%$ accuracy improvement in the low-resource SST-5 evaluation). Moreover, previous works have shown that fine-tuning large PLMs can be highly unstable and even produce divergent results (Devlin et al., 2019; Dodge et al., 2020), which undermines the practicality of large PLMs. We show that DPT also addresses the unstable problem in tuning large discriminative PLMs.
41
+
42
+ The contributions of our work are summarized as follows: (1) We present the first prompt tuning framework for discriminative PLMs. (2) Comprehensive experimental results on text classification and question answering demonstrate the effectiveness of the proposed prompt tuning framework.
43
+
44
+ # 2 Preliminary
45
+
46
+ In this work, without loss of generality, we take ELECTRA (Clark et al., 2020) as a representative example of discriminative PLMs, while applying DPT to other discriminative PLMs is also applicable. Here we introduce the main procedure of pre-training and fine-tuning, and we refer readers to the paper (Clark et al., 2020) for more details.
47
+
48
+ Pre-training. During pre-training, a generator first corrupts the text via token replacement. Then the discriminator is asked to detect the replaced tokens, by classifying each token into binary categories, i.e., {original, replaced}, as shown in Figure 1. Finally, the generator is discarded and the discriminator is fine-tuned on downstream tasks.
49
+
50
+ Vanilla Fine-tuning. (1) During fine-tuning, to perform text classification, a new classification
51
+
52
+ head is typically introduced to classify the hidden representation of the [CLS] token in the last layer (Clark et al., 2020). (2) For general multi-span question answering, the answer could be multiple spans from the input text (Dasigi et al., 2019; Dua et al., 2019). State-of-the-art fine-tuning approaches formulate the task as a sequence-labeling problem, and classify each input token into binary labels based on a new classification head, indicating whether the token belongs to the answer or not (Segal et al., 2020; Ye et al., 2020).
53
+
54
+ Note that the classification head typically introduces new parameters, and learning the parameters from scratch usually requires a large amount of labeled data. Moreover, previous works have shown that fine-tuning large PLMs can be highly unstable, and even produce divergent results (Devlin et al., 2019; Dodge et al., 2020). As a result, multiple fine-tuning trials are usually needed to find a good random seed that leads to a stably fine-tuned PLM, which undermines the practicality of large PLMs.
55
+
56
+ # 3 Methodology
57
+
58
+ In this section, we introduce the framework of DPT for prompt-tuning discriminative PLMs. We first introduce DPT using text classification as the running example, and then illustrate its application in question answering.
59
+
60
+ DLM-based Reformulation. DPT reformulates NLP tasks into a discriminative language modeling problem, maximally mitigating the gap between pre-training and tuning. Specifically, as shown in Figure 1(c), for a text classification task with class set $\mathcal{C} = \{c_1, c_2, \dots, c_n\}$ , DPT defines a template that contains all answer candidates $\mathcal{T}(\cdot; \mathcal{C})$ . Given
61
+
62
+ an input text $x$ (e.g., "A graceful movie"). DPT fills the input text into the template as follows:
63
+
64
+ $$
65
+ \mathcal {T} (x; \mathcal {C}) = [ \mathrm {C L S} ] x \text {C l a s s :} c _ {1}, c _ {2}, \dots , c _ {n}. [ \mathrm {S E P} ] \tag {1}
66
+ $$
67
+
68
+ Intuitively, $\mathcal{T}(x;\mathcal{C})$ can be understood as creating a virtual context that assumes all candidate classes are correct for the input text $x$ . It is then straightforward for discriminative PLMs to decide whether each class candidate token is proper in the context, by classifying the tokens into original (i.e., correct), or replaced (i.e., incorrect) based on the reused DLM head. In our experiments, we find that the order of classes in template has minimal influence on the performance, and a random order can produce good prompt-tuning results.
69
+
70
+ DPT Training. After template filling, $\mathcal{T}(x;\mathcal{C})$ is fed into PLMs to obtain the hidden representations $\{\mathbf{h}_{[\mathrm{CLS}]},\mathbf{h}_1,\mathbf{h}_2,\dots ,\mathbf{h}_m,\mathbf{h}_{[\mathrm{SEP}]}\}$ . PLMs are then prompted to discriminate whether each class is correct. Specifically, we compute the score of class $c_{i}$ based on the representation of the corresponding token $t_i$ as:
71
+
72
+ $$
73
+ s \left(c _ {i}\right) = 1 - \sigma \left(\mathbf {h} _ {\mathrm {D L M}} ^ {\top} \mathbf {h} _ {t _ {i}}\right), \tag {2}
74
+ $$
75
+
76
+ where $\mathbf{h}_{\mathrm{DLM}}$ is the reused DLM head, and $\sigma(\cdot)$ is the sigmoid activation. Note that in Equation 2, the computation of class scores is different from the vanilla fine-tuning approaches which encourage large inner products between the correct answer and classification head (Devlin et al., 2019; Clark et al., 2020). The rationale is that during pre-training, discriminative PLMs are typically required to produce large inner products for the replaced tokens (i.e., incorrect ones), and small inner products for the original tokens (i.e., correct ones) (Clark et al., 2020), and therefore Equation 2 better fits the semantics in pre-training. In our experiments, we find this simple operation can lead to significantly better results in prompt-tuning discriminative PLMs. After obtaining the class score, the model is optimized as:
77
+
78
+ $$
79
+ \mathcal {L} = \sum_ {i} \left[ - y _ {i} \log s \left(c _ {i}\right) - \left(1 - y _ {i}\right) \log \left(1 - s \left(c _ {i}\right)\right) \right], \tag {3}
80
+ $$
81
+
82
+ where $y_{i}\in \{0,1\}$ indicates the ground-truth label. Since DPT tunes PLMs by reusing the pretrained DLM head in the same objective form as pre-training, compared with vanilla fine-tuning, we
83
+
84
+ expect DPT will lead to more sample efficient and stable tuning results.
85
+
86
+ DPT for Question Answering. Besides text classification, DPT can also be applied for the question answering task. Given a question and a paragraph, directly concatenating them without additional templates can already create a good prompting context. Then similar to text classification, we ask PLMs to discriminate whether each token in the paragraph is part of the answer (i.e., original), or not (i.e., replaced) based on the reused DLM head. During inference, we threshold the token scores to obtain multiple answer spans.
87
+
88
+ # 4 Experiments
89
+
90
+ In this section, we empirically evaluate DPT on the task of text classification and question answering.
91
+
92
+ Datasets. We evaluate DPT on four widely used text classification datasets, including SST-2, SST-5, TREC and AGNews. For question answering, we adopt the challenging QUOREF dataset, where for each question, there may exist multiple answer spans in the paragraph. We refer readers to Section B for more dataset details.
93
+
94
+ Evaluation Protocols. We evaluate the models under two settings, including (1) full-set setting, where the full training data is available, and (2) low-resource setting, where only $10\%$ of the full training data for each dataset is available. We report the accuracy for text classification, and exact match (EM) and F1 score for question answering. To account for the unstable problem of baseline models, we report the average results from 3 best random seeds among 10 trials.
95
+
96
+ Baselines. We compare DPT with several strong baseline models, including vanilla fine-tuning of ELECTRA (Clark et al., 2020), BERT (Devlin et al., 2019) and RoBERTa (Liu et al., 2019). The fine-tuning of ELECTRA adopts the identical discriminative PLM to our model, and serves as the most direct baseline for comparison.
97
+
98
+ Main Results. We report the main results in Table 1 and Table 2, from which we observe that: (1) DPT significantly improves the performance of discriminative PLMs. The improvements are consistent across different tasks and datasets, as well as base and large models. (2) Previous works show that despite the significant improvements in low-resource setting, template-based prompt tuning typically can only approach fine-tuning performance in full-set
99
+
100
+ <table><tr><td rowspan="2" colspan="2">PLM</td><td rowspan="2">Tuning Approach</td><td colspan="4">Full-set Setting</td><td colspan="4">Low-resource Setting</td></tr><tr><td>SST-2</td><td>SST-5</td><td>TREC</td><td>AGNews</td><td>SST-2</td><td>SST-5</td><td>TREC</td><td>AGNews</td></tr><tr><td rowspan="5">Base</td><td>BERT</td><td>FT</td><td>91.32</td><td>53.41</td><td>95.93</td><td>93.68</td><td>86.91</td><td>42.46</td><td>86.73</td><td>90.23</td></tr><tr><td>RoBERTa</td><td>FT</td><td>94.69</td><td>56.09</td><td>95.27</td><td>93.92</td><td>91.23</td><td>50.41</td><td>91.07</td><td>90.25</td></tr><tr><td>ELECTRA</td><td>FT</td><td>94.38</td><td>56.60</td><td>94.87</td><td>93.70</td><td>91.68</td><td>49.40</td><td>88.40</td><td>89.17</td></tr><tr><td rowspan="2">ELECTRA</td><td>DPT (Ours)</td><td>95.26</td><td>58.34</td><td>96.27</td><td>94.22</td><td>93.83</td><td>53.48</td><td>93.93</td><td>90.60</td></tr><tr><td>Δ</td><td>+0.88</td><td>+1.74</td><td>+1.40</td><td>+0.52</td><td>+2.15</td><td>+4.08</td><td>+5.53</td><td>+1.43</td></tr><tr><td rowspan="5">Large</td><td>BERT</td><td>FT</td><td>93.32</td><td>54.10</td><td>96.73</td><td>94.89</td><td>90.77</td><td>50.89</td><td>94.73</td><td>92.93</td></tr><tr><td>RoBERTa</td><td>FT</td><td>95.46</td><td>56.80</td><td>96.80</td><td>95.26</td><td>94.27</td><td>51.41</td><td>95.20</td><td>93.41</td></tr><tr><td>ELECTRA</td><td>FT</td><td>95.72</td><td>58.27</td><td>97.13</td><td>94.80</td><td>93.74</td><td>53.65</td><td>94.00</td><td>92.33</td></tr><tr><td rowspan="2">ELECTRA</td><td>DPT (Ours)</td><td>96.58</td><td>60.69</td><td>98.07</td><td>95.38</td><td>96.09</td><td>57.00</td><td>95.67</td><td>93.58</td></tr><tr><td>Δ</td><td>+0.86</td><td>+2.42</td><td>+0.94</td><td>+0.58</td><td>+2.35</td><td>+3.35</td><td>+1.67</td><td>+1.25</td></tr></table>
101
+
102
+ Table 1: Experimental results on text classification. Full-set setting: $100\%$ data, Low-resource setting: $10\%$ data. FT: fine-tuning, DPT: discriminative prompt tuning. $\Delta$ : Improvements of DPT over fine-tuning ELECTRA.
103
+
104
+ <table><tr><td rowspan="2">PLM</td><td rowspan="2">Tuning Approach</td><td colspan="2">Full Set</td><td colspan="2">Low Resource</td></tr><tr><td>EM</td><td>F1</td><td>EM</td><td>F1</td></tr><tr><td>BERT</td><td>FT</td><td>75.67</td><td>79.99</td><td>53.02</td><td>61.36</td></tr><tr><td>RoBERTa</td><td>FT</td><td>78.29</td><td>84.56</td><td>59.31</td><td>67.56</td></tr><tr><td>ELECTRA</td><td>FT</td><td>77.79</td><td>83.72</td><td>54.29</td><td>63.71</td></tr><tr><td>ELECTRA</td><td>DPT (Ours)</td><td>79.66</td><td>86.03</td><td>63.65</td><td>73.09</td></tr><tr><td></td><td>Δ</td><td>+1.87</td><td>+2.31</td><td>+9.36</td><td>+9.38</td></tr></table>
105
+
106
+ Table 2: Experimental results of ELECTRAlarge on QUOREF multi-span question answering dataset.
107
+
108
+ <table><tr><td>Tuning Approach</td><td>SST-2</td><td>SST-5</td><td>TREC</td><td>AGNews</td></tr><tr><td>Fine-tuning</td><td>91.68</td><td>49.40</td><td>88.40</td><td>89.17</td></tr><tr><td>DPT (σ)</td><td>92.16</td><td>50.96</td><td>88.00</td><td>90.29</td></tr><tr><td>DPT (1 - σ)</td><td>93.83</td><td>53.48</td><td>93.93</td><td>90.60</td></tr></table>
109
+
110
+ Table 3: Ablation on reuse forms of DLM head based on ELECTRA<sub>base</sub> in low-resource setting.
111
+
112
+ setting (Gao et al., 2021). In comparison, we note that DPT can improve the performance in both low-resource and full-set settings. The reason is that DPT enables PLMs to jointly model the input text and class candidates for better text understanding. In summary, DPT is effective in improving the performance of discriminative PLM tuning.
113
+
114
+ Tuning Stability. Previous works have commonly observed the instability of fine-tuning large generative PLMs (Devlin et al., 2019; Dodge et al., 2020). Some works attempt to alleviate the problem by careful initialization and optimization (Zhang et al., 2021), or intermediate fine-tuning on other largescale datasets (Phang et al., 2018). To investigate the tuning stability of discriminative PLMs, we tune $\mathrm{ELECTRA}_{\mathrm{large}}$ using fine-tuning and DPT from 10 random seeds. From the results in Figure 2, we observe that: (1) Similar to generative PLMs, fine-tuning large discriminative PLMs is
115
+
116
+ ![](images/4dfb02495ea2b88f7adade4bc270cf51b809dbfb5c1f36db26fc228cb1b864e0.jpg)
117
+ (a) Full-set Setting (100% data)
118
+
119
+ ![](images/219827dd42ef127432f6440ee1e30b42e2b74e93532ed9546a6d311ad95dd8c9.jpg)
120
+
121
+ ![](images/ff2ea77d4e0efe24152163f0822069fc5bba7c17017c5dbedded24cfca18e731.jpg)
122
+
123
+ ![](images/30fe237932cfd3d4a22a9b139515033281d60259b54c25f6c9ca1bdc88d77900.jpg)
124
+ (b) Low-resource Setting (10% data)
125
+
126
+ ![](images/27af9d09ddf11a155faae155c797324cb4b6e149e7276b024109eb851a8aa0cc.jpg)
127
+ Figure 2: Performance distribution of ELECTRAlarge using fine-tuning and DPT from 10 seeds.
128
+
129
+ ![](images/2a2c77d7c9c4922b3b103b05a11e25ca43ed4691fc6405be5096a31d17b1dead.jpg)
130
+
131
+ also highly unstable, and can even frequently produce divergent results (e.g., nearly $20\%$ accuracy for 5-way classification in SST-5 in low-resource setting). The problem is exacerbated by sparse data in low-resource setting, but remains even in full-set setting. (2) DPT achieves significantly more stable tuning results in both full-set and low-resource settings, where all tuning trials converged and closely approach the best performance. This is due to the reuse of DLM head parameters and identical objective forms to pre-training.
132
+
133
+ Ablation Study. In DPT, different from conventional fine-tuning approaches, correct labels are encouraged to have small inner products with classifiers (as indicated by the $1 - \sigma$ in Equation 2). We evaluate DPT using conventional score computation (i.e., $\sigma$ ), and report the results in Table 3. The significant drop in performance shows that a proper form of reusing DLM head is crucial to the
134
+
135
+ results of prompt-tuning discriminative PLMs.
136
+
137
+ # 5 Conclusion and Future Work
138
+
139
+ In this work, we present a simple and effective prompt tuning approach for discriminative PLMs. We note directly performing large-scale classification (e.g., for hundreds of classes) with DPT may be computationally inefficient. In future, we plan to address the problem by classifying text following class hierarchies, where each hierarchical layer typically consists of a moderate number of classes.
140
+
141
+ # 6 Acknowledgement
142
+
143
+ This work is suooprted by the Natural Science Foundation of China (NSFC) and the German Research Foundation (DFG) in Project Crossmodal Learning, NSFC 61621136008 / DFC TRR-169, Institute Guo Qiang at Tsinghua University, and International Innovation Center of Tsinghua University, Shanghai, China.
144
+
145
+ # References
146
+
147
+ Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020. Language models are few-shot learners. arXiv preprint arXiv:2005.14165.
148
+ Kevin Clark, Minh-Thang Luong, Quoc V. Le, and Christopher D. Manning. 2020. ELECTRA: pretraining text encoders as discriminators rather than generators. In Proceedings of ICLR.
149
+ Pradeep Dasigi, Nelson F. Liu, Ana Marasovic, Noah A. Smith, and Matt Gardner. 2019. QUOREF: A reading comprehension dataset with questions requiring coreferential reasoning. In Proceedings of EMNLP-IJCNLP, pages 5924-5931.
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 NAACL-HLT, pages 4171-4186.
151
+ Jesse Dodge, Gabriel Ilharco, Roy Schwartz, Ali Farhadi, Hannaneh Hajishirzi, and Noah Smith. 2020. Fine-tuning pretrained language models: Weight initializations, data orders, and early stopping. arXiv preprint arXiv:2002.06305.
152
+ Dheeru Dua, Yizhong Wang, Pradeep Dasigi, Gabriel Stanovsky, Sameer Singh, and Matt Gardner. 2019. DROP: A reading comprehension benchmark requiring discrete reasoning over paragraphs. In Proceedings of NAACL-HLT, pages 2368-2378.
153
+
154
+ Tianyu Gao, Adam Fisch, and Danqi Chen. 2021. Making pre-trained language models better few-shot learners. In Proceedings of ACL-IJCNLP, pages 3816-3830.
155
+ Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2020. ALBERT: A lite BERT for self-supervised learning of language representations. In Proceedings of ICLR.
156
+ Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. 2021. Pretrain, prompt, and predict: A systematic survey of prompting methods in natural language processing. arXiv preprint arXiv:2107.13586.
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
+ Fabio Petroni, Tim Rocttäschel, Sebastian Riedel, Patrick S. H. Lewis, Anton Bakhtin, Yuxiang Wu, and Alexander H. Miller. 2019. Language models as knowledge bases? In Proceedings of EMNLP-IJCNLP, pages 2463-2473.
159
+ Jason Phang, Thibault Févry, and Samuel R Bowman. 2018. Sentence encoders on STILTS: Supplementary training on intermediate labeled-data tasks. arXiv preprint arXiv:1811.01088.
160
+ Xipeng Qiu, Tianxiang Sun, Yige Xu, Yunfan Shao, Ning Dai, and Xuanjing Huang. 2020. Pre-trained models for natural language processing: A survey. SCTS, pages 1-26.
161
+ 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. JMLR, 21:140:1-140:67.
162
+ Timo Schick and Hinrich Schütze. 2021. It's not just size that matters: Small language models are also few-shot learners. In Proceedings of NAACL-HLT, pages 2339-2352.
163
+ Elad Segal, Avia Efrat, Mor Shoham, Amir Globerson, and Jonathan Berant. 2020. A simple and effective model for answering multi-span questions. In Proceedings of EMNLP, pages 3074-3080.
164
+ 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 EMNLP, page 1631-1642.
165
+ Ellen M. Voorhees and Dawn M. Tice. 2000. Building a question answering test collection. In Proceedings of SIGIR, pages 200-207.
166
+
167
+ Wenhan Xiong, Jingfei Du, William Yang Wang, and Veselin Stoyanov. 2020. Pretrained encyclopedia: Weakly supervised knowledge-pretrained language model. In Proceedings of ICLR.
168
+ Han Xu, Zhang Zhengyan, et al. 2021. Pre-trained models: Past, present and future. arXiv preprint arXiv:2106.07139.
169
+ Zhilin Yang, Zihang Dai, Yiming Yang, Jaime G. Carbonell, Ruslan Salakhutdinov, and Quoc V. Le. 2019. XLNet: Generalized autoregressive pretraining for language understanding. In Proceedings of NeurIPS, pages 5754-5764.
170
+ Deming Ye, Yankai Lin, Jiaju Du, Zhenghao Liu, Peng Li, Maosong Sun, and Zhiyuan Liu. 2020. Coreferential reasoning learning for language representation. In Proceedings of EMNLP, pages 7170-7186.
171
+ Tianyi Zhang, Felix Wu, Arzoo Katiyar, Kilian Q. Weinberger, and Yoav Artzi. 2021. Revisiting few-sample BERT fine-tuning. In Proceedings of ICLR.
172
+ Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In Proceedings of NIPS, pages 649-657.
173
+
174
+ # A Implementation Details
175
+
176
+ In this work, we take ELECTRA (Clark et al., 2020) as an representative example of discriminative PLMs, including (1) $\mathrm{ELECTRA}_{\mathrm{base}}$ with 768 dimensional hidden representations, 12 encoding layers and 110M parameters, and (2) $\mathrm{ELECTRA}_{\mathrm{large}}$ with 1, 024 dimensional hidden representations, 24 encoding layers and 340M parameters.
177
+
178
+ For text classification tasks, we follow the hyperparameters in Clark et al. (2020), and train the base models for 10 epochs with learning rate 2e-5 and batchsize 32 on 2 GeForce RTX 2080 Ti GPUs. And we train the large models for 10 epochs with learning rate 2e-5 and batchsize 8 on 2 GeForce RTX 2080 Ti GPUs. For question answering, we follow the hyperparameters in Segal et al. (2020), and train the large models for 20 epochs with learning rate 5e-6 and batchsize 2 on 6 GeForce RTX 2080 Ti GPUs. During inference, a token is considered as part of the answer if its score is lower than 0.6.
179
+
180
+ # B Dataset Details
181
+
182
+ We evaluate DPT on four popular text classification datasets, including SST-2 (Socher et al., 2013), SST-5 (Socher et al., 2013), TREC (Voorhees and Tice, 2000) and AGNews (Zhang et al., 2015). For question answering task, we adopt the challenging QUOREF dataset (Dasigi et al., 2019), where there may exist multiple answers in the paragraph for
183
+
184
+ ![](images/a7eb02c09b08aa63a1954852156709d18c27c5a2a893145a3d54ebb5020f439b.jpg)
185
+ (a) Full Set.
186
+
187
+ ![](images/09a3c3ee00241ab14197c28d98308fb0f6697151a69aea537d6d2d7c01da5a3d.jpg)
188
+ (b) Low Resource.
189
+ Figure 3: Performance distribution of ELECTRAlarge using fine-tuning and DPT from 10 seeds.
190
+
191
+ each question. Specifically, QUOREF contains 21,817 questions and 4,225 paragraphs, where each question has 1.15 answers on average. The average length for the questions and paragraphs are 15.49 and 325.68 respectively. We report the results on the validation set for QUOREF, since its test set is not publicly available, and report the results on the test set for the other datasets.
192
+
193
+ # C Further Results of Tuning Stability
194
+
195
+ We report the performance distribution of AGNews in Figure 3. We observe that the unstable problem of fine-tuning large discriminative PLMs remains even for the large-scale AGNews dataset with 120K training samples. The results show the advantage of DPT in stably tuning discriminative PLMs.
prompttuningfordiscriminativepretrainedlanguagemodels/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17d9529309c44fc6bafdc7de4390e994008cda8397ccd1585c59d897c2932561
3
+ size 247025
prompttuningfordiscriminativepretrainedlanguagemodels/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63d11e14c6175aabce6c6384f9e0a578c53e97ce7762fe46c82c07448165ed19
3
+ size 210836
queryandextractrefiningeventextractionastypeorientedbinarydecoding/c5dc43d9-fb58-40e8-a821-2d94f1cba382_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f6baf47073cd973751e847c0c0cc6937159ce5f4bf045315a072a5ddd8247a0
3
+ size 98130
queryandextractrefiningeventextractionastypeorientedbinarydecoding/c5dc43d9-fb58-40e8-a821-2d94f1cba382_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3bf1204be53d4d6d4d56f8d217764133f90d0d796c904b15024806776da6b01b
3
+ size 114816
queryandextractrefiningeventextractionastypeorientedbinarydecoding/c5dc43d9-fb58-40e8-a821-2d94f1cba382_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8e1c9ab3b3b702d77cb692b831c670dfe1af8e7d576345ba9df7583308ee301
3
+ size 828572
queryandextractrefiningeventextractionastypeorientedbinarydecoding/full.md ADDED
@@ -0,0 +1,394 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Query and Extract: Refining Event Extraction as Type-oriented Binary Decoding
2
+
3
+ Sijia Wang $^{1}$ , Mo Yu $^{2}$ , Shiyu Chang $^{3}$ , Lichao Sun $^{4}$ , Lifu Huang $^{1}$
4
+
5
+ $^{1}$ Virginia Tech $^{2}$ WeChat AI $^{3}$ University of California Santa Barbara $^{4}$ Lehigh University
6
+
7
+ $^{1}$ sijiawang, lifuh}@vt.edu, $^{2}$ moyumyu@tencent.com
8
+
9
+ 3chang87@ucsb.edu,4lis221@lehigh.edu
10
+
11
+ # Abstract
12
+
13
+ Event extraction is typically modeled as a multi-class classification problem where event types and argument roles are treated as atomic symbols. These approaches are usually limited to a set of pre-defined types. We propose a novel event extraction framework that uses event types and argument roles as natural language queries to extract candidate triggers and arguments from the input text. With the rich semantics in the queries, our framework benefits from the attention mechanisms to better capture the semantic correlation between the event types or argument roles and the input text. Furthermore, the query-and-extract formulation allows our approach to leverage all available event annotations from various ontologies as a unified model. Experiments on ACE and ERE demonstrate that our approach achieves state-of-the-art performance on each dataset and significantly outperforms existing methods on zero-shot event extraction.<sup>1</sup>
14
+
15
+ # 1 Introduction
16
+
17
+ Event extraction (Grishman, 1997; Chinchor and Marsh, 1998; Ahn, 2006) is a task to identify and type event triggers and participants from natural language text. As shown in Figure 1, married and left are triggers of two event mentions of the Marry and Transport event types respectively. Two arguments are involved in the left event mention: she is an Artifact, and Irap is the Destination.
18
+
19
+ Traditional studies usually model event extraction as a multi-class classification problem (McClosky et al., 2011; Li et al., 2013; Chen et al., 2015; Yang and Mitchell, 2016; Nguyen et al., 2016; Lin et al., 2020), where a set of event types are first defined, and then supervised machine learning approaches will detect and classify each candidate event mention or argument into one of the
20
+
21
+ ![](images/a99b85bb3540c8e2c48ea3cf4424772719e34c0390dbc2a2f8982578800a7828.jpg)
22
+ Figure 1: An example of event annotation.
23
+
24
+ target types. However, each event type or argument role is treated as an atomic symbol, ignoring their rich semantics in these approaches. Several studies explore the semantics of event types by leveraging the event type structures (Huang et al., 2018), seed event mentions (Bronstein et al., 2015; Lai and Nguyen, 2019), or question answering (QA) (Du and Cardie, 2020; Liu et al., 2020). However, these approaches are still designed for and thus limited to a single target event ontology $^{2}$ , such as ACE (Consortium, 2005) or ERE (Song et al., 2015).
25
+
26
+ With the existence of multiple ontologies and the challenge of handling new emerging event types, it is necessary to study event extraction approaches that are generalizable and can use all available training data from distinct event ontologies.
27
+
28
+ To this end, we propose a new event extraction framework following a query-and-extract paradigm. Our framework represents event types and argument roles as natural language queries with rich semantics. The queries are then used to extract the corresponding event triggers and arguments by leveraging our proposed attention mechanism to capture their interactions with input texts. Specifically, (1) for trigger detection, we formulate each event type as a query based on its type name and a short list of prototype triggers, and make binary decoding of each token based on its query-aware
29
+
30
+ ![](images/a44586108bdeb644de1f190f20a8d584aa602003599bf652ff38f242bf26178f.jpg)
31
+ Figure 2: Architecture overview. Each cell in Argument Role Score Matrix indicates the probabilities of an entity being labeled with an argument role. The arrows in Multiway Attention module show four attention mechanisms: (a) entity to argument roles, (b) argument role to entities, (c) entity to entities, (d) argument role to argument roles.
32
+
33
+ embedding; (2) for argument extraction, we put together all argument roles defined under each event type as a query, followed by a multiway attention mechanism to extract all arguments of each event mention with one-time encoding, with each argument predicted as binary decoding.
34
+
35
+ Our approach can naturally handle various ontologies as a unified model - compared to previous studies (Nguyen and Grishman, 2016; Wadden et al., 2019; Lin et al., 2020), our binary decoding mechanism directly works with any event type or argument role represented as natural language queries, thus effectively leveraging cross-ontology event annotations and making zero-shot predictions. Moreover, compared with the QA-based methods (Du and Cardie, 2020; Liu et al., 2020; Li et al., 2020a) that can also conduct zero-shot argument extraction, our approach does not require creating high-quality questions for argument roles or multi-time encoding for different argument roles separately, thus being more accurate and efficient.
36
+
37
+ We evaluate our approach on two public benchmark datasets, ACE and ERE, and demonstrate state-of-the-art performance in the standard supervised event extraction and the challenging transfer learning settings that generalize to new event types and ontologies. Notably, on zero-shot transfer to new event types, our approach outperforms a strong baseline by $16\%$ on trigger detection and $26\%$ on
38
+
39
+ argument detection. The overall contributions of our work are:
40
+
41
+ - We refine event extraction as a query-and-extract paradigm, which is more generalizable and efficient than previous top-down classification or QA-based approaches.
42
+ - We design a new event extraction model that leverages rich semantics of event types and argument roles, improving accuracy and generalizability.
43
+ - We establish new state-of-the-art performance on ACE and ERE in supervised and zero-shot event extraction and demonstrate our framework as an effective unified model for cross ontology transfer.
44
+
45
+ # 2 Our Approach
46
+
47
+ As Figure 2 shows, given an input sentence, we first identify the candidate triggers for each event type by taking it as a query to the sentence. Each event type, such as Attack, is represented with a natural language text, including its type name and a shortlist of prototype triggers, such as invaded and airstrikes, which are selected from the training examples. Then, we concatenate the input sentence with the event type query, encode them with a pre-trained BERT encoder (Devlin et al., 2019),
48
+
49
+ compute the attention distribution over the sequential representation of the event type query for each input token, and finally classify each token into a binary label, indicating it as a trigger candidate of the specific event type or not.
50
+
51
+ To extract the arguments for each candidate trigger, we follow a similar strategy and take the set of pre-defined argument roles for its corresponding event type as a query to the input sentence. We use another BERT encoder to learn the contextual representations for the input sentence and the query of the argument roles. Then, we take each entity of the input sentence as a candidate argument and compute the semantic correlation between entities and argument roles with multiway attention, and finally classify each entity into a binary label in terms of each argument role.
52
+
53
+ # 2.1 Trigger Detection
54
+
55
+ Event Type Representation A simple and intuitive way of representing an event type is to use the type name. However, the type name itself cannot accurately represent the semantics of the event type due to the ambiguity of the type name and the variety of the event mentions of each type. For example, Meet can refer to an organized event or an action of getting together or matching. Inspired by previous studies (Bronstein et al., 2015; Lai and Nguyen, 2019), we use a short list of prototype triggers to enrich the semantics of each event type.
56
+
57
+ Specifically, for each event type $t$ , we collect a set of annotated triggers from the training examples. For each unique trigger word, we compute its frequency from the whole training dataset as $f_{o}$ and its frequency of being tagged as an event trigger of type $t$ as $f_{t}$ , and then obtain a probability $f_{t} / f_{o}$ which will be used to sort all the annotated triggers for event type $t$ . We select the top- $K^4$ ranked words as prototype triggers $\{\tau_1, \tau_2, \dots, \tau_K\}$ .
58
+
59
+ Finally, each event type will be represented with a natural language sequence of words, consisting of its type name and the list of prototype triggers $T = \{t, \tau_1^t, \tau_2^t, \dots, \tau_K^t\}$ . Taking the event type Attack as an example, we finally represent it as Attack invaded airstrikes overthrew ambushed.
60
+
61
+ Context Encoding Given an input sentence $W = \{w_{1},w_{2},\ldots ,w_{N}\}$ , we take each event type $T = \{t,\tau_1^t,\tau_2^t,\dots ,\tau_K^t\}$ as a query to extract the corresponding event triggers. Specifically, we first
62
+
63
+ concatenate them into a sequence as follows:
64
+
65
+ $$
66
+ [ \mathrm {C L S} ] [ \mathrm {E V E N T} ] [ \mathrm {S E P} ] w _ {1} \dots w _ {N} [ \mathrm {S E P} ]
67
+ $$
68
+
69
+ $$
70
+ t \tau_ {1} ^ {t} \dots \tau_ {K} ^ {t} [ \mathrm {S E P} ]
71
+ $$
72
+
73
+ where [SEP] is a separator from the BERT encoder (Devlin et al., 2019). Following (Liu et al., 2020), we use a special symbol [EVENT] to emphasis the trigger detection task.
74
+
75
+ Then we use a pre-trained BERT encoder to encode the whole sequence and get contextual representations for the input sentence $\mathbf{W} = \{\pmb{w}_0, \pmb{w}_2, \dots, \pmb{w}_N\}$ as well as the event type $T = \{t, \tau_0^t, \tau_1^t, \dots, \tau_K^t\}$ .
76
+
77
+ Enriched Contextual Representation Given a query of each event type, we aim to automatically extract corresponding event triggers from the input sentence. To achieve this goal, we need to capture the semantic correlation of each input token to the event type. Thus we apply attention mechanism to learn a weight distribution over the sequence of contextual representations of the event type query and get an event type aware contextual representation for each token:
78
+
79
+ $$
80
+ \boldsymbol {A} _ {i} ^ {T} = \frac {1}{T} \sum_ {j = 1} ^ {| T |} \alpha_ {i j} \cdot \boldsymbol {T} _ {j},
81
+ $$
82
+
83
+ $$
84
+ \alpha_ {i j} = \cos (\boldsymbol {w} _ {i}, \boldsymbol {T} _ {j}),
85
+ $$
86
+
87
+ where $T_{j}$ is the contextual representation of the $j$ -th token in the sequence $T = \{t, \tau_{1}^{t}, \tau_{2}^{t}, \dots, \tau_{K}^{t}\}$ . $\cos(\cdot)$ is the cosine similarity function between two vectors. $A_{i}^{T}$ denotes the event type $t$ aware contextual representation of token $w_{i}$ .
88
+
89
+ In addition, the prediction of event triggers also depends on the occurrence of a particular context. For example, according to ACE event annotation guidelines (Consortium, 2005), to qualify as a Meet event, the meeting must be known to be "face-to-face and physically located somewhere". To capture such context information, we further apply in-context attention to capture the meaningful contextual words for each input token:
90
+
91
+ $$
92
+ \boldsymbol {A} _ {i} ^ {W} = \frac {1}{N} \sum_ {j = 1} ^ {N} \tilde {\alpha} _ {i j} \cdot \boldsymbol {w} _ {j},
93
+ $$
94
+
95
+ $$
96
+ \tilde {\alpha} _ {i j} = \rho (\boldsymbol {w} _ {i}, \boldsymbol {w} _ {j}),
97
+ $$
98
+
99
+ where $\rho (.)$ is the attention function and is computed as the average of the self-attention weights from the last $m$ layers of BERT.6
100
+
101
+ Event Trigger Detection With the event type oriented attention and in-context attention mechanisms, each token $w_{i}$ from the input sentence will obtain two enriched contextual representations $A_{i}^{W}$ and $A_{i}^{T}$ . We concatenate them with the original contextual representation $w_{i}$ from the BERT encoder, and classify it into a binary label, indicating it as a candidate trigger of event type $t$ or not:
102
+
103
+ $$
104
+ \tilde {\pmb {y}} _ {i} ^ {t} = \pmb {U} _ {o} \cdot ([ \pmb {w} _ {i}; \pmb {A} _ {i} ^ {W}; \pmb {A} _ {i} ^ {T}; \pmb {P} _ {i} ]),
105
+ $$
106
+
107
+ where $[\cdot ]$ denotes concatenation operation, $U_{o}$ is a learnable parameter matrix for event trigger detection, and $P_{i}$ is the one-hot part-of-speech (POS) encoding of word $w_{i}$ . We optimize the following objective for event trigger detection
108
+
109
+ $$
110
+ \mathcal {L} _ {1} = - \frac {1}{| \mathcal {T} | | \mathcal {N} |} \sum_ {t \in \mathcal {T}} \sum_ {i = 1} ^ {| \mathcal {N} |} \boldsymbol {y} _ {i} ^ {t} \cdot \log \tilde {\boldsymbol {y}} _ {i} ^ {t},
111
+ $$
112
+
113
+ where $\mathcal{T}$ is the set of target event types and $\mathcal{N}$ is the set of tokens from the training dataset. $\pmb{y}_i^t$ denotes the groundtruth label vector.
114
+
115
+ # 2.2 Event Argument Extraction
116
+
117
+ After detecting event triggers for each event type, we further extract their arguments based on the pre-defined argument roles of each event type.
118
+
119
+ Context Encoding Given a candidate trigger $r$ from the sentence $W = \{w_{1}, w_{2}, \ldots, w_{N}\}$ and its event type $t$ , we first obtain the set of predefined argument roles for event type $t$ as $G^{t} = \{g_{1}^{t}, g_{2}^{t}, \ldots, g_{D}^{t}\}$ . To extract the corresponding arguments for $r$ , similar as event trigger detection, we take all argument roles $G^{t}$ as a query and concatenate them with the original input sentence
120
+
121
+ $$
122
+ [ \mathrm {C L S} ] w _ {1} w _ {2} \dots w _ {N} [ \mathrm {S E P} ] g _ {1} ^ {t} g _ {2} ^ {t} \dots g _ {D} ^ {t} [ \mathrm {S E P} ]
123
+ $$
124
+
125
+ where we use the last [SEP] separator to denote Other category, indicating the entity is not an argument. Then, we encode the whole sequence with another pre-trained BERT encoder (Devlin et al., 2019) to get the contextual representations of the sentence $\tilde{\boldsymbol{W}} = \{\tilde{\boldsymbol{w}}_0,\tilde{\boldsymbol{w}}_2,\dots,\tilde{\boldsymbol{w}}_N\}$ , and the argument roles $\boldsymbol{G}^{t} = \{\boldsymbol{g}_{0}^{t},\boldsymbol{g}_{1}^{t},\dots,\boldsymbol{g}_{D}^{t},\boldsymbol{g}_{[\mathrm{Other}]}^{t}\}$ .
126
+
127
+ As the candidate trigger $r$ may span multiple tokens within the sentence, we obtain its contextual representation $r$ as the average of the contextual representations of all tokens within $r$ . In addition, as the arguments are usually detected
128
+
129
+ from the entities of sentence $W$ , we apply a BERT-CRF model, which is optimized on the same training set as event extraction to identify the entities $E = \{e_1, e_2, \dots, e_M\}$ . As each entity may also span multiple tokens, following the same strategy, we average the contextual representations of all tokens within each entity and obtain the entity contextual representations as $E = \{e_1, e_2, \dots, e_M\}$ .
130
+
131
+ Multiway Attention Given a candidate trigger $r$ of type $t$ and an entity $e_i$ , for each argument role $g_j^t$ , we need to determine whether the underlying relation between $r$ and $e_i$ corresponds to $g_j^t$ or not, namely, whether $e_i$ plays the argument role of $g_j^t$ in event mention $r$ . To do this, for each $e_i$ , we first obtain a trigger-aware entity representation as
132
+
133
+ $$
134
+ \pmb {h} _ {i} = \pmb {U} _ {h} \cdot ([ \pmb {e} _ {i}; \pmb {r}; \pmb {e} _ {i} \circ \pmb {r} ]),
135
+ $$
136
+
137
+ where $\circ$ denotes element-wise multiplication operation. $U_{h}$ is a learnable parameter matrix.
138
+
139
+ In order to determine the semantic correlation between each argument role and each entity, we first compute a similarity matrix $S$ between the trigger-aware entity representations $\{h_1, h_2, \dots, h_M\}$ and the argument role representations $\{g_0^t, g_1^t, \dots, g_D^t\}$ .
140
+
141
+ $$
142
+ S _ {i j} = \frac {1}{\sqrt {d}} \sigma (\boldsymbol {h} _ {i}, \boldsymbol {g} _ {j} ^ {t}) ,
143
+ $$
144
+
145
+ where $\sigma$ denotes dot product operator, $d$ denotes embedding dimension of $\pmb{g}^t$ , and $S_{ij}$ indicates the semantic correlation of entity $e_i$ to a particular argument role $g_j^t$ given the candidate trigger $r$ .
146
+
147
+ Based on the correlation matrix $S$ , we further apply a bidirectional attention mechanism to get an argument role aware contextual representation for each entity and an entity-aware contextual representation for each argument role as follows:
148
+
149
+ $$
150
+ \boldsymbol {A} _ {i} ^ {e 2 g} = \sum_ {j = 1} ^ {D} \boldsymbol {S} _ {i j} \cdot \boldsymbol {g} _ {j} ^ {t},
151
+ $$
152
+
153
+ $$
154
+ \boldsymbol {A} _ {j} ^ {g 2 e} = \sum_ {i = 1} ^ {M} \boldsymbol {S} _ {i j} \cdot \boldsymbol {h} _ {i}.
155
+ $$
156
+
157
+ In addition, previous studies (Hong et al., 2011; Li et al., 2013; Lin et al., 2020) have revealed that the underlying relations among entities or argument roles are also important to extract the arguments. For example, if entity $e_1$ is predicted as Attacker of an Attack event and $e_1$ is located in another entity $e_2$ , it's very likely that $e_2$ plays an argument role of Place for the Attack event. To capture the
158
+
159
+ underlying relations among the entities, we further compute the self-attention among them
160
+
161
+ $$
162
+ \begin{array}{l} \mu_ {i j} = \frac {1}{\sqrt {d}} \sigma (\boldsymbol {h} _ {i}, \boldsymbol {h} _ {j}), \quad \tilde {\boldsymbol {\mu}} _ {i} = \operatorname {S o f t m a x} (\boldsymbol {\mu} _ {i}), \\ \boldsymbol {A} _ {i} ^ {e 2 e} = \sum_ {j = 1} ^ {M} \tilde {\mu} _ {i j} \cdot \boldsymbol {h} _ {j}. \\ \end{array}
163
+ $$
164
+
165
+ Similarly, to capture the underlying relations among argument roles, we also compute the self-attention among them
166
+
167
+ $$
168
+ \begin{array}{l} v _ {j k} = \frac {1}{\sqrt {d}} \sigma (\boldsymbol {g} _ {j} ^ {t}, \boldsymbol {g} _ {k} ^ {t}), \quad \tilde {\boldsymbol {v}} _ {j} = \operatorname {S o f t m a x} (\boldsymbol {v} _ {j}), \\ \boldsymbol {A} _ {j} ^ {g 2 g} = \sum_ {k = 1} ^ {D} \tilde {\boldsymbol {v}} _ {j k} \cdot \boldsymbol {g} _ {k} ^ {t}. \\ \end{array}
169
+ $$
170
+
171
+ Event Argument Predication Finally, for each candidate event trigger $r$ , we determine whether an entity $e_i$ plays an argument role of $g_j^t$ in the event mention by classifying it into a binary class:
172
+
173
+ $$
174
+ \tilde {\pmb {z}} _ {i j} ^ {t} = \pmb {U} _ {a} \cdot ([ \pmb {h} _ {i}; \pmb {g} _ {j} ^ {t}; \pmb {A} _ {i} ^ {e 2 g}; \pmb {A} _ {j} ^ {g 2 e}; \pmb {A} _ {i} ^ {e 2 e}; \pmb {A} _ {j} ^ {g 2 g} ]),
175
+ $$
176
+
177
+ where $\mathbf{U}_a$ is a learnable parameter matrix for argument extraction. And $\tilde{z}^t$ is argument role score matrix for event type $t$ . The training objective is to minimize the following loss function:
178
+
179
+ $$
180
+ \mathcal {L} _ {2} = - \frac {1}{| \mathcal {A} | | \mathcal {E} |} \sum_ {j = 1} ^ {| \mathcal {A} |} \sum_ {i = 1} ^ {| \mathcal {E} |} z _ {i j} \log \tilde {z} _ {i j},
181
+ $$
182
+
183
+ where $\mathcal{A}$ denotes the collection of possible argument roles, and $\mathcal{E}$ is the set of entities we need to consider for argument extraction. $z_{ij}$ denotes the ground truth label vector. During test, an entity will be labeled as a non-argument if the prediction for Other category is 1. Otherwise, it can be labeled with multiple argument roles.
184
+
185
+ # 3 Experiments
186
+
187
+ # 3.1 Experimental Setup
188
+
189
+ We perform experiments on two public benchmarks, ACE05- $\mathrm{E}^{+7}$ and ERE-EN (Song et al., 2015) $^8$ . ACE defines 33 event types while ERE includes 38 types, among which there are 31 overlapped event types. We use the same data split of
190
+
191
+ ACE and ERE as (Wadden et al., 2019; Lin et al., 2020; Du and Cardie, 2020) for supervised event extraction. For zero-shot event extraction, we use the top-10 most popular event types in ACE as seen types for training and treat the remaining 23 event types as unseen for testing, following Huang et al. (2018). In our experiments, we use random seeds and report averaged scores of each setting. More details regarding the data statistics and evaluation are shown in Appendix A.
192
+
193
+ We further design two more challenging and practical settings to evaluate how well the approach could leverage resources from different ontologies: (1) cross-ontology direct transfer, where we only use the annotations from ACE or ERE for training and directly test the model on another event ontology. This corresponds to the domain adaptation setting in transfer learning literature; (2) joint-ontology enhancement, where we take the annotations from both ACE and ERE as the training set and test the approaches on ACE or ERE ontology separately. This corresponds to the multi-domain learning setting in transfer learning literature. Intuitively, an approach with good transferability should benefit more from the enhanced training data from other ontologies. We follow the same train/dev/test splits of ACE and ERE as supervised event extraction.
194
+
195
+ # 3.2 Supervised Event Extraction
196
+
197
+ Table 1 shows the supervised event extraction results of various approaches on ACE and ERE datasets. Though studies (Yang and Mitchell, 2016; Liu et al., 2020, 2018; Sha et al., 2018; Lai et al., 2020; Veyseh et al., 2020) have been conducted on the ACE dataset, they follow different settings<sup>9</sup>, especially regarding whether the Time and Value arguments are considered and whether all Time-related argument roles are viewed as a single role. Following several recent state-of-the-art studies (Wadden et al., 2019; Lin et al., 2020; Du and Cardie, 2020), we do not consider Time and Value arguments. Our approach significantly outperforms most of the previous comparable baseline methods, especially on the ERE dataset<sup>10</sup>. Next, we take BERT_QA(Arg, a QA_based method, as the main baseline as it shares similar ideas to our approach to compare their performance.
198
+
199
+ <table><tr><td rowspan="2">Model</td><td colspan="2">ACE05-E+</td><td colspan="2">ERE-EN</td></tr><tr><td>Trigger Ext.</td><td>Argument Ext.</td><td>Trigger Ext.</td><td>Argument Ext.</td></tr><tr><td>DYGIE++ (Wadden et al., 2019)</td><td>67.3*</td><td>42.7*</td><td>-</td><td>-</td></tr><tr><td>BERT_QA(Arg (Du and Cardie, 2020)</td><td>70.6*</td><td>48.3*</td><td>57.0</td><td>39.2</td></tr><tr><td>OneIE (Lin et al., 2020)</td><td>72.8</td><td>54.8</td><td>57.0</td><td>46.5</td></tr><tr><td>Text2Event (Lu et al., 2021)</td><td>71.8</td><td>54.4</td><td>59.4</td><td>48.3</td></tr><tr><td>FourIE (Nguyen et al., 2021)</td><td>73.3</td><td>57.5</td><td>57.9</td><td>48.6</td></tr><tr><td>Our Approach</td><td>73.6 (0.2)</td><td>55.1 (0.5)</td><td>60.4 (0.3)</td><td>50.4 (0.3)</td></tr></table>
200
+
201
+ Specifically, for trigger detection, all the baseline methods treat the event types as symbols and classify each input token into one of the target types or Other. So they heavily rely on human annotations and do not perform well when the annotations are not enough. For example, there are only 31 annotated event mentions for End_Org in the ACE05 training dataset, so BERT_QA(Arg only achieves $35.3\%$ F-score. In comparison, our approach leverages the semantic interaction between the input tokens and the event types. Therefore it still performs well when the annotations are limited, e.g., it achieves $66.7\%$ F-score for End_Org. In addition, by leveraging the rich semantics of event types, our approach also successfully detects event triggers that are rarely seen in the training dataset, e.g., ousting and purge of End-Position, while BERT_QA(Arg misses all these triggers. A more detailed discussion about the impact of seed triggers is in Appendix B.
202
+
203
+ For argument extraction, our approach shows more consistent results than baseline methods. For example, in the sentence "Shalom was to fly on to London for talks with British Prime Minister Tony Blair and Foreign Secretary Jack Straw", the BERT_QA(Arg method correctly predicts Tony Blair and Jack Straw as Entity arguments of the Meet event triggered by talks, but misses Shalom. However, by employing multiway attention, especially the self-attention among all the entities, our approach can capture their underlying semantic relations, e.g., Shalom and Tony Blair are two persons to talk, so that it successfully predicts all the three Entity arguments for the Meet event.
204
+
205
+ # 3.3 Zero-Shot Event Extraction
206
+
207
+ As there are no fully comparable baseline methods for zero-shot event extraction, we adapt one of the most recent states of the arts, BERT_QA(Arg (Du
208
+
209
+ Table 1: Event extraction results on ACE05-E $^{+}$ and ERE-EN datasets (F-score, %). * indicates scores obtained from their released codes. The performance of BERT_QA(Arg is lower than that reported in (Du and Cardie, 2020) as they only consider single-token event triggers. Each score of our approach is the mean of three runs and the variance is shown in parenthesis.
210
+
211
+ <table><tr><td>Model</td><td>Trigger Ext.</td><td>Arg Ext. (GT)</td></tr><tr><td>BERT_QA_Arg†</td><td>31.6</td><td>17.0</td></tr><tr><td>Our Approach</td><td>47.8</td><td>43.0</td></tr></table>
212
+
213
+ Table 2: Zero-shot F-scores on 23 unseen event types. †: adapted implementation from (Du and Cardie, 2020). GT indicates using gold-standard triggers as input.
214
+
215
+ and Cardie, 2020), which is expected to have specific transferability due to its QA formulation. However, the original BERT_QA(Arg) utilizes a generic query, e.g., "trigger" or "verb", to classify each input token into one of the target event types or Other, thus is not capable of detecting event mentions for any new event types during the test. We adapt the BERT_QA(Arg) framework by taking each event type instead of the generic words as a query for event detection. Note that our approach utilizes the event types as queries without prototype triggers for zero-shot event extraction.
216
+
217
+ As Table 2 shows, our approach significantly outperforms BERT_QA(Arg under zero-shot event extraction, with over $16\%$ F-score gain on trigger detection and $26\%$ F-score gain on argument extraction. Comparing with BERT_QA(Arg, which only relies on the self-attention from the BERT encoder to learn the correlation between the input tokens and the event types or argument roles, our approach further applies multiple carefully designed attention mechanisms over BERT contextual representations to better capture the semantic interaction between event types or argument roles and input tokens, yielding much better accuracy and generalizability.
218
+
219
+ We further pick 13 unseen event types and analyze our approach's zero-shot event extraction performance on each of them. As shown in Figure 3, our approach performs exceptionally well on
220
+
221
+ <table><tr><td rowspan="2">Source</td><td rowspan="2">Target</td><td colspan="2">BERT_QA_Argmulti</td><td colspan="2">BERT_QA_Argbinary†</td><td colspan="2">Our Approach</td></tr><tr><td>Trigger Ext.</td><td>Argument Ext.</td><td>Trigger Ext.</td><td>Argument Ext.</td><td>Trigger Ext.</td><td>Argument Ext.</td></tr><tr><td>ERE</td><td>ACE</td><td>48.9 (48.9)</td><td>18.5 (18.5)</td><td>50.8 (50.8)</td><td>20.9 (20.9)</td><td>53.9 (52.6)</td><td>30.2 (29.6)</td></tr><tr><td>ACE</td><td>ACE</td><td>70.6</td><td>48.3</td><td>72.2</td><td>50.4</td><td>73.6</td><td>55.1</td></tr><tr><td>ACE+ERE</td><td>ACE</td><td>70.1</td><td>47.0</td><td>71.3</td><td>49.8</td><td>74.4</td><td>56.2</td></tr><tr><td>ACE</td><td>ERE</td><td>47.2 (47.2)</td><td>18.0 (18.0)</td><td>47.2 (45.0)</td><td>17.9 (17.1)</td><td>55.9 (46.3)</td><td>31.9 (26.0)</td></tr><tr><td>ERE</td><td>ERE</td><td>57.0</td><td>39.2</td><td>56.7</td><td>42.9</td><td>60.4</td><td>50.4</td></tr><tr><td>ACE+ERE</td><td>ERE</td><td>57.0</td><td>38.6</td><td>54.6</td><td>37.1</td><td>63.0</td><td>52.3</td></tr></table>
222
+
223
+ Table 3: Cross ontology transfer between ACE and ERE datasets (F-score %). The scores in parenthesis indicate the performance on the ACE and ERE shared event types.
224
+
225
+ ![](images/e4c229affe16c39ce9a8c56088a4ea62d87296e3186b5dd9d551292c0e459629.jpg)
226
+ Figure 3: Zero-shot event extraction on each unseen event type. The number in parenthesis indicates # gold event mentions of each unseen type in the test set.
227
+
228
+ Marry, Divorce, Trial-Hearing, and Fine, but worse on Sue, Release-Parole, Charge-Indict, Demonstrate, and Declare-Bankruptcy, with two possible reasons: first, the semantics of event types, such as Marry, Divorce, is more straightforward and explicit than other types, such as Charge-Indict, Declare-Bankruptcy. Thus our approach can better interpret these types. Second, the diversity of the event triggers for some types, e.g., Divorce, is much lower than other types, e.g., Demonstrate. For example, among the 9 Divorce event triggers, there are only 2 unique strings, i.e., divorce and breakdowns, while there are 6 unique strings among the 7 event mentions of Demonstrate.
229
+
230
+ # 3.4 Cross Ontology Transfer
231
+
232
+ For cross-ontology transfer, we develop two variations of BERT_QA(Arg as baseline methods: (1) BERT_QA(Argmulti, which is the same as the original implementation and use multi-classification to detect event triggers. (2) BERT_QA(Argbinary, for which we apply the same query adaptation as Section 3.3 and use multiple binary-classification for event detection. For joint-ontology enhancement, we combine the training datasets of ACE and ERE
233
+
234
+ and optimize the models from scratch.[11]
235
+
236
+ Table 3 shows the cross-ontology transfer results in both direct transfer and enhancement settings. Our approach significantly outperforms the baseline methods under all the settings. Notably, for direct transfer, e.g., from ERE to ACE, by comparing the F-scores on the whole test set with the performance on the ACE and ERE shared event types (F-scores shown in parenthesis), our approach not only achieves better performance on the shared event types but also extracts event triggers and arguments for the new event types in ACE. In contrast, the baseline methods hardly extract any events or arguments for the new event types. Moreover, by combining the training datasets of ACE and ERE for joint-ontology enhancement, our approach's performance can be further boosted compared with using the annotations of the target event ontology only, demonstrating the superior transfer capability across different ontologies. For example, ACE includes a Transport event type while ERE defines two more fine-grained types Transport-Person and Transport-Artifact. By adding the annotations of Transport-Person and Transport-Artifact from ERE into ACE, our approach can capture the underlying semantic interaction between Transport-related event type queries and the corresponding input tokens and thus yield $1.5\%$ F-score gain on the Transport event type of ACE test set. In contrast, both baseline methods fail to be enhanced with additional annotations from a slightly different event ontology without explicitly capturing semantic interaction between event types and input tokens. Appendix C provides a more in-depth comparison between our approach and the baseline approaches.
237
+
238
+ # 3.5 Ablation Study
239
+
240
+ We further evaluate the impact of each attention mechanism on event trigger detection and argument extraction. As Table 4 shows, all the attention mechanisms show significant benefit to trigger or argument extraction, especially on the ERE dataset. The Event Type Attention and Multiway Attention show the most effects to trigger and argument extraction, which is understandable as they are designed to capture the correlation between the input texts and the event type or argument role-based queries. We also notice that, without taking entities detected by the BERT-CRF name tagging model as input, but instead considering all the tokens as candidate arguments<sup>12</sup>, our approach still shows competitive performance for argument extraction compared with the strong baselines. More ablation studies are discussed in Appendix D.
241
+
242
+ <table><tr><td></td><td>Model</td><td>ACE</td><td>ERE</td></tr><tr><td rowspan="4">Trigger</td><td>Our Approach</td><td>73.6</td><td>60.4</td></tr><tr><td>w/o Seed Trigger</td><td>72.2</td><td>58.2</td></tr><tr><td>w/o In-Context Attention</td><td>72.3</td><td>57.9</td></tr><tr><td>w/o Event Type Attention</td><td>71.1</td><td>56.9</td></tr><tr><td rowspan="5">Arg.</td><td>Our Approach</td><td>55.1</td><td>50.4</td></tr><tr><td>w/o Entity Detection</td><td>53.0</td><td>47.6</td></tr><tr><td>w/o Multiway Attention</td><td>53.4</td><td>42.8</td></tr><tr><td>w/o Entity Self-attention</td><td>53.7</td><td>48.3</td></tr><tr><td>w/o Arg Role Self-attention</td><td>54.1</td><td>47.7</td></tr></table>
243
+
244
+ Table 4: Results of various ablation studies. Each score is the average of three runs for each experiment.
245
+
246
+ # 3.6 Pros and Cons of Type-oriented Decoding
247
+
248
+ The advantages of our type-oriented binary decoding include: (1) it allows the model to better leverage the semantics of event types which have been proved effective for both supervised and zero-shot event extraction; (2) it allows the approach to leverage all available event annotations from distinct ontologies, which is demonstrated in zero-shot event extraction and cross-ontology transfer; (3) in practice, new event types and annotations could emerge incessantly, and it is not possible to always train a model for all the event types. Our approach has the potential to be continuously updated and extract events for any desired event types.
249
+
250
+ We also admit that binary decoding usually increases the computation cost. We design two strategies to mitigate this issue: (1) More than $69\%$ of
251
+
252
+ the sentences in the training dataset do not contain any event triggers, so we randomly sample $20\%$ of them for training. (2) Our one-time argument encoding and decoding strategies extract all arguments of each event trigger at once. It is more efficient than the previous QA-based approaches, which only extract arguments for one argument role at once. With these strategies, for trigger detection, our approach takes $80\%$ more time for training and $19\%$ less for inference compared with BERT_QA_Arg which relies on multiclass classification, while for argument extraction, our approach takes $36\%$ less time for training and inference than BERT_QA_Arg. Even on a more fine-grained event ontology MAVEN (Wang et al., 2020), which consists of 168 event types, for trigger extraction, our approach roughly takes $20\%$ more time for training and twice the time for inference compared with BERT_QA_Arg, with slightly better performance than the state of the art (Wang et al., 2021) $^{13}$ .
253
+
254
+ # 4 Related Work
255
+
256
+ Traditional event extraction studies (McClosky et al., 2011; Li et al., 2013; Chen et al., 2015; Cao et al., 2015; Feng et al., 2016; Yang and Mitchell, 2016; Nguyen et al., 2016; Zhang et al., 2017; Wadden et al., 2019; Lin et al., 2020; Wang et al., 2021) usually detect event triggers and arguments with multi-class classifiers. Unlike all these methods that treat event types and argument roles as symbols, our approach considers them queries with rich semantics and leverages the semantic interaction between input tokens and each event type or argument role.
257
+
258
+ Several studies have explored the semantics of event types based on seed event triggers (Bronstein et al., 2015; Lai and Nguyen, 2019; Zhang et al., 2021), event type structures (Huang et al., 2016, 2018), definitions (Chen et al., 2019) and latent representations (Huang and Ji, 2020). However, they can hardly be generalized to argument extraction. Question answering based event extraction (Du and Cardie, 2020; Liu et al., 2020; Li et al., 2020a; Lyu et al., 2021) can take advantage of the semantics of event types and the large-scale question answering datasets. Compared with these methods, there are three different vital designs, making our approach perform and be generalized better than these
259
+
260
+ QA-based approaches: (1) our approach directly takes event types and argument roles as queries. In contrast, previous QA-based approaches rely on templates or generative modules to create natural language questions. However, it is difficult to find the optimal format of questions for each event type, and many studies (Du and Cardie, 2020; Li et al., 2020b) have shown that MRC or QA models are sensitive to the subtle change of the questions. (2) QA-based approaches can only detect arguments for one argument role at once, while our approach extracts all arguments of an event trigger with one-time encoding and decoding, which is more efficient and leverages the implicit relations among the candidate arguments or argument roles. (3) QA-based approaches rely on span prediction to extract arguments without requiring entity extraction, which could result in more entity boundary errors. Thus we choose to pre-train a name tagging model and use binary decoding over system detected entities. Moreover, it is pretty challenging to fully adapt the event extraction task to the span-based Question Answering. The main reason is that each sentence may contain multiple triggers for a particular event type. Even if we can formalize a question, e.g., "what is the trigger for Attack?" it is difficult for the model to return all the spans of event triggers correctly.
261
+
262
+ # 5 Conclusion and Future Work
263
+
264
+ We refine event extraction with a query-and-extract paradigm and design a new framework that leverages rich semantics of event types and argument roles and captures their interactions with input texts using attention mechanisms to extract event triggers and arguments. Experimental results demonstrate that our approach achieves state-of-the-art performance on supervised event extraction and shows prominent accuracy and generalizability to new event types and across ontologies. In the future, we will explore better representations of event types and argument roles and combine them prompt tuning approach further to improve the accuracy and generalizability of event extraction.
265
+
266
+ # Acknowledgements
267
+
268
+ We thank the anonymous reviewers and area chair for their valuable time and constructive comments, and the helpful discussions with Zhiyang Xu and Minqian Liu. We also thank the support from the Amazon Research Awards.
269
+
270
+ # References
271
+
272
+ David Ahn. 2006. The stages of event extraction. In Proceedings of the Workshop on Annotating and Reasoning about Time and Events, pages 1-8.
273
+ Ofer Bronstein, Ido Dagan, Qi Li, Heng Ji, and Anette Frank. 2015. Seed-based event trigger labeling: How far can event descriptions get us? In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pages 372-376.
274
+ Susan Brown, Claire Bonial, Leo Obrst, and Martha Palmer. 2017. The rich event ontology. In Proceedings of the Events and Stories in the News Workshop, pages 87-97, Vancouver, Canada. Association for Computational Linguistics.
275
+ Kai Cao, Xiang Li, Miao Fan, and Ralph Grishman. 2015. Improving event detection with active learning. In Proceedings of the International Conference on Recent Advances in Natural Language Processing, pages 72-77, Hissar, Bulgaria. INCOMA Ltd. Shoumen, BULGARIA.
276
+ Yubo Chen, Liheng Xu, Kang Liu, Daojian Zeng, and Jun Zhao. 2015. Event extraction via dynamic multipooling convolutional neural networks. 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), pages 167-176.
277
+ Yunmo Chen, Tongfei Chen, Seth Ebner, Aaron Steven White, and Benjamin Van Durme. 2019. Reading the manual: Event extraction as definition comprehension. arXiv preprint arXiv:1912.01586.
278
+ Nancy Chinchor and Elaine Marsh. 1998. Muc-7 information extraction task definition. In Proceeding of the seventh message understanding conference (MUC-7), Appendices, pages 359-367.
279
+ (LDC) Linguistic Data Consortium. 2005. English annotation guidelines for events. https://www.ldc.upenn.edu/sites/www.ldc.upenn.edu/files/english-events-guidelines-v5.4.3.pdf.
280
+ 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.
281
+ Xinya Du and Claire Cardie. 2020. Event extraction by answering (almost) natural questions. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP),
282
+
283
+ pages 671-683, Online. Association for Computational Linguistics.
284
+ Xiaocheng Feng, Lifu Huang, Duyu Tang, Heng Ji, Bing Qin, and Ting Liu. 2016. A language-independent neural network for event detection. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 66-71, Berlin, Germany. Association for Computational Linguistics.
285
+ Ralph Grishman. 1997. Information extraction: Techniques and challenges. In International summer school on information extraction, pages 10-27. Springer.
286
+ Yu Hong, Jianfeng Zhang, Bin Ma, Jianmin Yao, Guodong Zhou, and Qiaoming Zhu. 2011. Using cross-entity inference to improve event extraction. In Proceedings of the 49th annual meeting of the association for computational linguistics: human language technologies, pages 1127-1136.
287
+ Lifu Huang, Taylor Cassidy, Xiaocheng Feng, Heng Ji, Clare Voss, Jiawei Han, and Avirup Sil. 2016. Liberal event extraction and event schema induction. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 258-268.
288
+ Lifu Huang and Heng Ji. 2020. Semi-supervised new event type induction and event detection. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 718-724.
289
+ Lifu Huang, Heng Ji, Kyunghyun Cho, Ido Dagan, Sebastian Riedel, and Clare Voss. 2018. Zero-shot transfer learning for event extraction. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2160-2170, Melbourne, Australia. Association for Computational Linguistics.
290
+ John Lafferty, Andrew McCallum, and Fernando CN Pereira. 2001. Conditional random fields: Probabilistic models for segmenting and labeling sequence data.
291
+ Viet Dac Lai and Thien Huu Nguyen. 2019. Extending event detection to new types with learning from keywords. arXiv preprint arXiv:1910.11368.
292
+ Viet Dac Lai, Tuan Ngo Nguyen, and Thien Huu Nguyen. 2020. Event detection: Gate diversity and syntactic importance scores for graph convolution neural networks. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 5405-5411, Online. Association for Computational Linguistics.
293
+ Fayuan Li, Weihua Peng, Yuguang Chen, Quan Wang, Lu Pan, Yajuan Lyu, and Yong Zhu. 2020a. Event extraction as multi-turn question answering. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 829-838, Online. Association for Computational Linguistics.
294
+
295
+ Qi Li, Heng Ji, and Liang Huang. 2013. Joint event extraction via structured prediction with global features. In Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 73-82, Sofia, Bulgaria. Association for Computational Linguistics.
296
+ Xiaoya Li, Jingrong Feng, Yuxian Meng, Qinghong Han, Fei Wu, and Jiwei Li. 2020b. A unified MRC framework for named entity recognition. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5849-5859, Online. Association for Computational Linguistics.
297
+ Ying Lin, Heng Ji, Fei Huang, and Lingfei Wu. 2020. A joint neural model for information extraction with global features. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7999-8009, Online. Association for Computational Linguistics.
298
+ Jian Liu, Yubo Chen, Kang Liu, Wei Bi, and Xiaojiang Liu. 2020. Event extraction as machine reading comprehension. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1641-1651, Online. Association for Computational Linguistics.
299
+ Xiao Liu, Zhunchen Luo, and Heyan Huang. 2018. Jointly multiple events extraction via attention-based graph information aggregation. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1247-1256, Brussels, Belgium. Association for Computational Linguistics.
300
+ Yaojie Lu, Hongyu Lin, Jin Xu, Xianpei Han, Jialong Tang, Annan Li, Le Sun, Meng Liao, and Shaoyi Chen. 2021. Text2Event: Controllable sequence-to-structure generation for end-to-end event extraction. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 2795-2806, Online. Association for Computational Linguistics.
301
+ Qing Lyu, Hongming Zhang, Elior Sulem, and Dan Roth. 2021. Zero-shot Event Extraction via Transfer Learning: Challenges and Insights. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pages 322-332, Online. Association for Computational Linguistics.
302
+ David McClosky, Mihai Surdeanu, and Christopher D Manning. 2011. Event extraction as dependency parsing. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 1626-1635.
303
+ Minh Van Nguyen, Viet Dac Lai, and Thien Huu Nguyen. 2021. Cross-task instance representation
304
+
305
+ interactions and label dependencies for joint information extraction with graph convolutional networks.
306
+
307
+ Thien Huu Nguyen, Kyunghyun Cho, and Ralph Grishman. 2016. Joint event extraction via recurrent neural networks. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 300-309, San Diego, California. Association for Computational Linguistics.
308
+
309
+ Thien Huu Nguyen and Ralph Grishman. 2016. Modeling skip-grams for event detection with convolutional neural networks. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 886–891, Austin, Texas. Association for Computational Linguistics.
310
+
311
+ Alexandre Passos, Vineet Kumar, and Andrew McCallum. 2014. Lexicon infused phrase embeddings for named entity resolution. In Proceedings of the Eighteenth Conference on Computational Natural Language Learning, pages 78-86, Ann Arbor, Michigan. Association for Computational Linguistics.
312
+
313
+ Lei Sha, Feng Qian, Baobao Chang, and Zhifang Sui. 2018. Jointly extracting event triggers and arguments by dependency-bridge rnns and tensor-based argument interaction. In AAAI.
314
+
315
+ Zhiyi Song, Ann Bies, Stephanie Strassel, Tom Riese, Justin Mott, Joe Ellis, Jonathan Wright, Seth Kulick, Neville Ryant, and Xiaoyi Ma. 2015. From light to rich ere: annotation of entities, relations, and events. In Proceedings of the 3rd Workshop on EVENTS: Definition, Detection, Coreference, and Representation, pages 89-98.
316
+
317
+ Amir Pouran Ben Veyseh, Tuan Ngo Nguyen, and Thien Huu Nguyen. 2020. Graph transformer networks with syntactic and semantic structures for event argument extraction. CoRR, abs/2010.13391.
318
+
319
+ David Wadden, Ulme Wennberg, Yi Luan, and Hannaneh Hajishirzi. 2019. Entity, relation, and event extraction with contextualized span representations. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 5784-5789, Hong Kong, China. Association for Computational Linguistics.
320
+
321
+ Xiaozhi Wang, Ziqi Wang, Xu Han, Wangyi Jiang, Rong Han, Zhiyuan Liu, Juanzi Li, Peng Li, Yankai Lin, and Jie Zhou. 2020. MIVEN: A massive general domain event detection dataset. In Proceedings of EMNLP 2020.
322
+
323
+ Ziqi Wang, Xiaozhi Wang, Xu Han, Yankai Lin, Lei Hou, Zhiyuan Liu, Peng Li, Juanzi Li, and Jie Zhou. 2021. CLEVE: Contrastive Pre-training for Event Extraction. In Proceedings of ACL-IJCNLP, pages
324
+
325
+ 6283-6297, Online. Association for Computational Linguistics.
326
+
327
+ Bishan Yang and Tom M. Mitchell. 2016. Joint extraction of events and entities within a document context. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 289-299, San Diego, California. Association for Computational Linguistics.
328
+
329
+ Hongming Zhang, Haoyu Wang, and Dan Roth. 2021. Zero-shot Label-aware Event Trigger and Argument Classification. In *Findings of the Association for Computational Linguistics: ACL-IJCNLP* 2021, pages 1331-1340, Online. Association for Computational Linguistics.
330
+
331
+ Tongtao Zhang, Spencer Whitehead, Hanwang Zhang, Hongzhi Li, Joseph Ellis, Lifu Huang, Wei Liu, Heng Ji, and Shih-Fu Chang. 2017. Improving event extraction via multimodal integration. In Proceedings of the 25th ACM international conference on Multimedia, pages 270-278.
332
+
333
+ # A Data Statistics and Implementation Details
334
+
335
+ Table 5 shows the detailed data statistics of the training, development and test sets of the ACE05-E+ and ERE datasets. The statistics for the ERE dataset is slightly different from previous work (Lin et al., 2020; Lu et al., 2021) as we consider the event triggers that are annotated with multiple types as different instances while the previous studies just keep one annotated type for each trigger span. For example, in the ERE-EN dataset, a token "succeeded" in the sentence "Chun ruled until 1988, when he was succeeded by Roh Tae - woo, his partner in the 1979 coup." triggers a End-Position event of Chun and a Start-Position of Roh. Previous classification based approaches did not predict multiple types for each candidate trigger.
336
+
337
+ <table><tr><td>Dataset</td><td>Split</td><td># Events</td><td># Arguments</td></tr><tr><td rowspan="3">ACE05-E+</td><td>Train</td><td>4419</td><td>6605</td></tr><tr><td>Dev</td><td>468</td><td>757</td></tr><tr><td>Test</td><td>424</td><td>689</td></tr><tr><td rowspan="3">ERE-EN</td><td>Train</td><td>7394</td><td>11576</td></tr><tr><td>Dev</td><td>632</td><td>979</td></tr><tr><td>Test</td><td>669</td><td>1078</td></tr></table>
338
+
339
+ Table 5: Data statistics for ACE2005 and ERE datasets.
340
+
341
+ Zero-Shot Event Extraction To evaluate the transfer capability of our approach, we use the top-10 most popular event types in ACE05 as seen types for training and treat the remaining 23 event
342
+
343
+ types as unseen for testing, following Huang et al. (2018). The top-10 training event types include Attack, Transport, Die, Meet, Sentence, Arrest-Jail, Transfer-Money, Elect, Transfer-Ownership, End-Position. We use the same data split as supervised event extraction but only keep the event annotations of the 10 seen types for training and development sets and sample 150 sentences with 120 annotated event mentions for the 23 unseen types from the test set for evaluation.
344
+
345
+ Implementation For fair comparison with previous baseline approaches, we use the same pretrained bert-large-uncased model for finetuning and optimize our model with BertAdam. We optimize the parameters with grid search: training epoch 10, learning rate $\in$ [3e-6, 1e-4], training batch size $\in$ {8, 12, 16, 24, 32}, dropout rate $\in$ {0.4, 0.5, 0.6}. Our experiments run on one Quadro RTX 8000. For trigger detection, the average runtime is 3.0 hours. For argument detection, the average runtime is 1.3 hours. We use Spacy to generate POS tags.
346
+
347
+ Evaluation Criteria For evaluation of supervised event extraction, we use the same criteria as (Li et al., 2013; Chen et al., 2015; Nguyen et al., 2016; Lin et al., 2020) as follows:
348
+
349
+ - Trigger: A trigger mention is correct if its span and event type matches a reference trigger. Each candidate may act as triggers for multiple event occurrences.
350
+ - Argument: An argument prediction is correct only if the event trigger is correctly detected. Meanwhile, its span and argument role need to match a reference argument. An argument candidate can be involved in multiple events as different roles. Furthermore, within a single event extent, an argument candidate may play multiple roles.
351
+
352
+ # B Impact of Seed Triggers
353
+
354
+ To investigate the impact of seed triggers on event trigger extraction, we take the supervised event extraction ACE dataset as a case study, where we divide the triggers in the evaluation dataset into two groups: overlapped triggers with the seeds or non-overlapped ones with the seeds. Then, we compare the performance of our approach with and without using seed triggers as part of the event type
355
+
356
+ representations. As Table 6 shows, by incorporating the seed triggers as part of the event type representations, our approach achieves better performance on both overlapped and non-overlapped triggers, demonstrating the benefit of seed triggers on representing event types. As the total number of overlapped triggers (34) is much lower than that of non-overlapped triggers (390), we view the impact of seed triggers on overlapped and non-overlapped triggers as comparable. On the other hand, by comparing our approach without using seed triggers with the BERT_QA(Arg baseline, our approach also achieves much better performance which is mostly due to the attention mechanism we used which can better capture the semantic consistency between the input tokens and the event type query which just consists of the event type name.
357
+
358
+ # C In-depth Comparison for Cross Ontology Transfer
359
+
360
+ To deeply investigate the reason that our approach performs better than QA-based baselines from cross ontology transfer, we conducted ablation study by removing the seed triggers from the event type queries of our approach, as shown in Table 7. The BERT_QA(Argmulti utilizes a generic query, e.g., what's the trigger, and classify each input token into one of the target types. It's essentially a multiclass classifier but just taking a query as the prompt. The BERT_QA(Argbinary utilizes each event type as the query to extract the corresponding event mentions. Comparing the two baseline methods, BERT_QA(Argbinary works slightly better than BERT_QA(Argmulti, especially on ACE, demonstrating the benefit of type-oriented binary decoding mechanism. The only difference between BERT_QA(Argbinary and our approach without seed triggers is the learning of enriched contextual representations. The comparison of their scores demonstrates the effectiveness of the attention mechanisms designed for trigger extraction. Finally, by incorporating the seed triggers into event type representations, our approach is further improved significantly for all the settings. These in-depth comparisons demonstrate the effectiveness of both seed triggers and the attention mechanisms in our approach for transferring annotations from old types to the new types.
361
+
362
+ <table><tr><td></td><td>Overlapped Triggers</td><td>Non-overlapped Triggers</td></tr><tr><td>OneIE (Lin et al., 2020)</td><td>88.2</td><td>71.0</td></tr><tr><td>BERT_QA(Arg (Du and Cardie, 2020)</td><td>72.2</td><td>70.9</td></tr><tr><td>Our Approach w/o Seed Triggers</td><td>88.9</td><td>70.8</td></tr><tr><td>Out Approach w/ Seed Triggers</td><td>97.2</td><td>71.3</td></tr></table>
363
+
364
+ Table 6: Impact of seed triggers on supervised trigger extraction on ACE (F-score, %)
365
+
366
+ <table><tr><td rowspan="2">Source</td><td rowspan="2">Target</td><td rowspan="2">BERT_QA_Argmulti †</td><td rowspan="2">BERT_QA_Argbinary †</td><td colspan="2">Our Approach</td></tr><tr><td>w/o Seed Triggers</td><td>w/ Seed Triggers</td></tr><tr><td>ERE</td><td>ACE</td><td>48.9</td><td>50.8</td><td>53.8</td><td>53.9</td></tr><tr><td>ACE</td><td>ACE</td><td>70.6</td><td>72.2</td><td>72.2</td><td>73.6</td></tr><tr><td>ACE+ERE</td><td>ACE</td><td>70.1</td><td>71.3</td><td>72.2</td><td>74.4</td></tr><tr><td>ACE</td><td>ERE</td><td>47.2</td><td>47.2</td><td>48.7</td><td>55.9</td></tr><tr><td>ERE</td><td>ERE</td><td>57.0</td><td>56.7</td><td>58.2</td><td>60.4</td></tr><tr><td>ACE+ERE</td><td>ERE</td><td>57.0</td><td>54.6</td><td>56.2</td><td>63.0</td></tr></table>
367
+
368
+ # D More Ablation Studies of Supervised Event Extraction
369
+
370
+ The entity recognition model is based on a pretrained BERT (Devlin et al., 2019) encoder with a CRF (Lafferty et al., 2001; Passos et al., 2014) based prediction network. It's trained on the same training dataset from ACE05 before event extraction, and the predictions are taken as input to argument extraction to indicate the candidate argument spans. Table 8 shows the comparison of the entity extraction performance between our BERT-CRF approach and the baselines.
371
+
372
+ Table 7: Cross ontology transfer results for queries without seed triggers, between ACE and ERE datasets (F-score %)
373
+
374
+ <table><tr><td>Model</td><td>F1</td></tr><tr><td>OneIE</td><td>89.6</td></tr><tr><td>FourIE</td><td>91.1</td></tr><tr><td>BERT+CRF</td><td>89.3</td></tr></table>
375
+
376
+ To understand the factors that affect argument extraction and decompose the errors propagated along the learning process (from predicted triggers or predicted entities), we conduct experiments that condition on given ground truth labels for those factors. Specifically, we investigate three settings: 1) given gold entity, 2) given gold event trigger, and 3) given both gold entity and event trigger. The experimental results is shown in Table 9.
377
+
378
+ Table 8: Performance of Entity Extraction (F-score, %)
379
+
380
+ <table><tr><td>Given Information</td><td>ACE</td><td>ERE</td></tr><tr><td>None</td><td>55.1</td><td>50.2</td></tr><tr><td>GE</td><td>59.7 (+4.6)</td><td>59.5 (+9.3)</td></tr><tr><td>GT</td><td>68.7 (+13.6)</td><td>67.2 (+17.0)</td></tr><tr><td>GT &amp; GE</td><td>74.2 (+19.1)</td><td>72.2 (+22.0)</td></tr></table>
381
+
382
+ Table 9: Performance of argument extraction conditioning on various input information: gold trigger (GT), and gold entities (GE). (F-score, %)
383
+
384
+ # E Remaining Challenges for Supervised Event Extraction
385
+
386
+ We sample 200 supervised trigger detection and argument extraction errors from the ACE test dataset and identify the remaining challenges.
387
+
388
+ Lack of Background Knowledge Background knowledge, as well as human commonsense knowledge, sometimes is essential to event extraction. For example, from the sentence "since the intifada exploded in September 2000, the source said", without knowing that intifada refers to a resistance movement, our approach failed to detect it as an Attack event mention.
389
+
390
+ Pronoun Resolution Extracting arguments by resolving coreference between entities and pronouns is still challenging. For example, in the following sentence "Attempts by Laleh and Ladan to have their operation elsewhere in the world were rejected, with doctors in Germany saying one or both of them could die", without pronoun resolution, our approach mistakenly extracted one, both and them as Victims of the Die event triggered by
391
+
392
+ die, while the actual Victims are Ladan and Laleh.
393
+
394
+ Ambiguous Context The ACE annotation guidelines (Consortium, 2005) provide detailed rules and constraints for annotating events of all event types. For example, a Meet event must be specified by the context as face-to-face and physically located somewhere. Though we carefully designed several attention mechanisms, it is difficult for the machines to capture such context features accurately. For example, from the sentence "The admission came during three-day talks in Beijing which concluded Friday, the first meeting between US and North Korean officials since the nuclear crisis erupted six months ago," our approach failed to capture the context features that the talks is not an explicit face-to-face meet event, and thus mistakenly identified it as a Meet event mention.
queryandextractrefiningeventextractionastypeorientedbinarydecoding/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3b671a2d261f0213f0f2b1dfe439dd0115f8e5ab06b04b58c86a595cdfbfbca
3
+ size 463481
queryandextractrefiningeventextractionastypeorientedbinarydecoding/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed801906eca1f322571afdbb14dd059d872a29773c6e6edb1355afefc334b1bd
3
+ size 447525
questionansweringinfusedpretrainingofgeneralpurposecontextualizedrepresentations/d6fd042f-9bc1-4628-b8c3-aebdba908d6c_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58ac3bea1d9d983fd501deee6a4bb1e94e7e7f1de4af70b8ae44ffe964e7f13d
3
+ size 122320
questionansweringinfusedpretrainingofgeneralpurposecontextualizedrepresentations/d6fd042f-9bc1-4628-b8c3-aebdba908d6c_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ae951cbf59ec5f881c0c4e48b23388faab8e81536eb5dc52478d2405440dbb6
3
+ size 146405
questionansweringinfusedpretrainingofgeneralpurposecontextualizedrepresentations/d6fd042f-9bc1-4628-b8c3-aebdba908d6c_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d8b8de2dce72088ec33e96440d5c0d0f22d669e7f52f2326cfb08cd555a2532
3
+ size 488923
questionansweringinfusedpretrainingofgeneralpurposecontextualizedrepresentations/full.md ADDED
@@ -0,0 +1,441 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Question Answering Infused Pre-training of General-Purpose Contextualized Representations
2
+
3
+ Robin Jia*
4
+
5
+ University of Southern California
6
+
7
+ robinjia@usc.edu
8
+
9
+ Mike Lewis, Luke Zettlemoyer
10
+
11
+ Facebook AI Research
12
+
13
+ {mikelewis,lsz}@fb.com
14
+
15
+ # Abstract
16
+
17
+ We propose a pre-training objective based on question answering (QA) for learning general-purpose contextual representations, motivated by the intuition that the representation of a phrase in a passage should encode all questions that the phrase can answer in context. To this end, we train a bi-encoder QA model, which independently encodes passages and questions, to match the predictions of a more accurate cross-encoder model on 80 million synthesized QA pairs. By encoding QA-relevant information, the bi-encoder's token-level representations are useful for non-QA downstream tasks without extensive (or in some cases, any) fine-tuning. We show large improvements over both RoBERTa-large and previous state-of-the-art results on zero-shot and few-shot paraphrase detection on four datasets, few-shot named entity recognition on two datasets, and zero-shot sentiment analysis on three datasets.
18
+
19
+ # 1 Introduction
20
+
21
+ While masked language models build contextualized word representations, they are pre-trained with losses that minimize distance to uncontextualized word embeddings (Peters et al., 2018; Devlin et al., 2019; Liu et al., 2019). This objective yields a good initialization for downstream fine-tuning, but the pre-trained representations themselves are not optimized for being immediately useful without fine-tuning. In this paper, we introduce Question Answering Infused Pre-training (QUIP), a new pretraining loss based on question answering (QA) that depends much more directly on context. QUIP learns improved token-level representations that are useful in zero-shot and few-shot settings, where extensive fine-tuning is not possible.
22
+
23
+ Our intuition for QuIP is that the contextualized representation for a phrase in a passage should contain enough information to identify all the questions
24
+
25
+ ![](images/570595e404cbbb040756183b072a4ff805d67575be35fc78e3a7d97f15c555ac.jpg)
26
+ Figure 1: An overview of Question Answering Infused Pre-training. Our model independently creates vector representations (middle) for phrases in a passage (top) and for synthesized questions (bottom). Our objective encourages the vector for each phrase to have high similarity with the vectors for all questions it answers.
27
+
28
+ that the phrase could answer in context. For example, in Figure 1, the representation for Johannes Brahms should be similar to the representation of all questions it can answer, such as "Who wrote the violin concerto?" We anticipate that optimizing passage representations for QA should benefit many downstream tasks, as question-answer pairs have been used as broad-coverage meaning representations (He et al., 2015; Michael et al., 2018), and a wide range of NLP tasks can be cast as QA problems (Levy et al., 2017; McCann et al., 2018; Gardner et al., 2019). For instance, our learned representations should encode whether a phrase answers a question like "Why was the movie considered good?", which corresponds to identifying rationales for sentiment analysis.
29
+
30
+ We train QUIP with a bi-encoder extractive QA objective. The model independently encodes passages and questions such that the representation of
31
+
32
+ each phrase in a passage is similar to the representation of reading comprehension questions answered by that phrase. We use a question generation model to synthesize 80 million QA examples, then train the bi-encoder to match the predictions of a cross-encoder QA model, which processes the passage and question together, on these examples.
33
+
34
+ Bi-encoder QA has been used before for efficient open-domain QA via phrase retrieval (Seo et al., 2018, 2019; Lee et al., 2020, 2021), but its lower accuracy compared to cross-encoder QA has previously been viewed as a drawback. We instead view the relative weakness of bi-encoder QA as an opportunity to improve contextual representations via knowledge distillation, as self-training can be effective when the student model must solve a harder problem than the teacher (Xie et al., 2020). In particular, since the bi-encoder does not know the question when encoding the passage, it must produce a single passage representation that simultaneously encodes the answers to all possible questions. In contrast, while cross-encoder QA models are more accurate, they depend on a specific question when encoding a passage; thus, they are less suited to downstream use cases that require contextualized representations of passages in isolation.
35
+
36
+ We show that QUIP token-level representations are useful in a variety of zero-shot and few-shot learning settings, both because the representations directly encode useful contextual information, and because we can often reduce downstream tasks to QA. For few-shot paraphrase detection, QUIP with BERTScore-based features (Zhang et al., 2020) outperforms prior work by 9 F1 points across four datasets. For few-shot named entity recognition (NER), QUIP combined with an initialization scheme that uses question embeddings improves over RoBERTa-large by 14 F1 across two datasets. Finally, for zero-shot sentiment analysis, QUIP with question prompts improves over RoBERTa-large with MLM-style prompts by 5 accuracy points across three datasets, and extracts interpretable rationales as a side effect. Through ablations, we show that using real questions, a strong teacher model, and the bi-encoder architecture are all crucial to the success of QUIP. Other design decisions (e.g., question generation decoding strategies) do not qualitatively affect our main findings, pointing to the stability of the QUIP approach. $^{1}$
37
+
38
+ # 2 QA Infused Pre-training
39
+
40
+ QA Infused Pre-training (QUIP) involves pretraining contextual representations with a bi-encoder extractive QA objective. In contrast with masked language modeling, QUIP's training objective directly encourages contextual representations to encode useful semantic information, namely information about what questions can be answered by each span. In contrast with a cross-encoder QA model, QUIP's bi-encoder is trained to encode single passages rather than passage-question pairs, making it more transferable to tasks involving single passages. Moreover, QUIP learns to push each phrase's representation far away from those of questions the phrase does not answer; this ability to represent unanswerability is crucial for correctly handling some question-based prompts.
41
+
42
+ We now introduce some basic notation (§2.1), then describe the QUIP pipeline, which consists of three steps: question generation (§2.2), cross-encoder teacher re-labeling (§2.3), and bi-encoder training (§2.4).
43
+
44
+ # 2.1 Notation
45
+
46
+ All models operate on sequences of tokens $x = [x_{1},\ldots ,x_{L}]$ of length $L$ . By convention, we assume that $x_{1}$ is always the special beginning-of-sequence token. We learn an encoder $r$ that maps inputs $x$ to outputs $r(x) = [r(x)_1,\dots,r(x)_L]$ where each $r(x)_i\in \mathbb{R}^d$ for some fixed dimension $d$ . We call $r(x)_i$ the contextual representation of the $i$ -th token in $x$ .
47
+
48
+ In extractive question answering, a model is given a context passage $c$ and question $q$ , and must output a span of $c$ that answers the question. Typically, models independently predict probability distributions $p(a_{\text{start}} \mid c, q)$ and $p(a_{\text{end}} \mid c, q)$ over the answer start index $a_{\text{start}}$ and end index $a_{\text{end}}$ .
49
+
50
+ # 2.2 Question Generation
51
+
52
+ Question generation model. We train a BART-large model (Lewis et al., 2020) to generate question-answer pairs given context passages. The model receives the passage as context and must generate the answer text, then a special separator token, then the question. This approach is simpler than prior approaches that use separate models for answer and question generation (Lewis and Fan, 2019; Alberti et al., 2019; Puri et al., 2020), and works well in practice.
53
+
54
+ Training data. We train on the training data from the MRQA 2019 Shared Task (Fisch et al., 2019), which includes six datasets: HotpotQA (Yang et al., 2018), NaturalQuestions (Kwiatkowski et al., 2019), NewsQA (Trischler et al., 2017), SearchQA (Dunn et al., 2017), SQuAD (Rajpurkar et al., 2016), and TriviaQA (Joshi et al., 2017). These datasets cover many of the text sources commonly used for pre-training (Liu et al., 2019; Lewis et al., 2020), namely Wikipedia (HotpotQA, NaturalQuestions, SQuAD), News articles (NewsQA), and general web text (SearchQA, TriviaQA).
55
+
56
+ Generating questions. We run our question generation model over a large set of passages to generate a large dataset of question-answer pairs. We decode using nucleus sampling (Holtzman et al., 2020) with $p = 0.6$ , which was chosen by manual inspection to balance diversity with quality of generated questions. We do not filter questions in any way. While we observed some flaws related to question quality (questions were not always well-formed) and diversity (for some passages, the same or very similar questions were asked multiple times), this approach nonetheless yielded good downstream results. Attempts to mitigate these issues, such as using a two-stage beam search to ensure that questions for the same passage have different answers, did not noticeably change our downstream results (see §4.8). We obtain passages from the same training corpus as RoBERTa (Liu et al., 2019), which uses four sub-domains: BOOK-CORPUS plus Wikipedia, CC-NEWS, OPENWEB-TEXT, and STORIES. For each domain, we sample 2 million passages and generate 10 questions per passage, for a total of 80 million questions. $^2$
57
+
58
+ # 2.3 Teacher Re-labeling
59
+
60
+ The answers generated by our BART model are not always accurate, nor are they always spans in the context passage. To improve the training signal, we re-label examples with a teacher model, as is common in knowledge distillation (Hinton et al., 2015). We use a standard cross-encoder RoBERTa-large model trained on the MRQA training data as our teacher. The model takes in the concatenation of the context passage $c$ and question $q$ and predicts $a_{\mathrm{start}}$ and $a_{\mathrm{end}}$ with two independent 2-layer
61
+
62
+ multi-layer perceptron (MLP) heads. We denote the teacher's predicted probability distribution over $a_{\mathrm{start}}$ and $a_{\mathrm{end}}$ as $T_{\mathrm{start}}(c, q)$ and $T_{\mathrm{end}}(c, q)$ , respectively.
63
+
64
+ # 2.4 Bi-encoder Training
65
+
66
+ Finally, we train a bi-encoder model to match the cross-encoder predictions on the generated questions. This objective encourages the contextual representation for a token to have high similarity (in inner product space) with the representation of every question that is answered by that token.
67
+
68
+ Model. The bi-encoder model with parameters $\theta$ consists of three components: an encoder $r$ and two question embedding heads $h_{\mathrm{start}}$ and $h_\mathrm{end}$ that map $\mathbb{R}^d\to \mathbb{R}^d$ . These heads will only be applied to beginning-of-sequence (i.e., CLS) representations; as shorthand, define $f_{\mathrm{start}}(x) = h_{\mathrm{start}}(r(x)_1)$ and likewise for $f_{\mathrm{end}}$ . Given a context passage $c$ and question $q$ , the model predicts
69
+
70
+ $$
71
+ p _ {\theta} \left(a _ {\text {s t a r t}} = i \mid c, q\right) \propto e ^ {r (c) _ {i} ^ {\top} f _ {\text {s t a r t}} (q)} \tag {1}
72
+ $$
73
+
74
+ $$
75
+ p _ {\theta} \left(a _ {\text {e n d}} = i \mid c, q\right) \propto e ^ {r (c) _ {i} ^ {\top} f _ {\text {e n d}} (q)} \tag {2}
76
+ $$
77
+
78
+ In other words, the model independently encodes the passage and question with $r$ , applies the start and end heads to the CLS token embedding for $q$ , then predicts the answer start (end) index with a softmax over the dot product between the passage representation at that index and the output of the start (end) head. We initialize $r$ to be the pretrained RoBERTa-large model (Liu et al., 2019), which uses $d = 1024$ . $h_{\mathrm{start}}$ and $h_{\mathrm{end}}$ are randomly initialized 2-layer MLPs with hidden dimension 1024, matching the default initialization of classification heads in RoBERTa.
79
+
80
+ Training. For an input consisting of context $c$ of length $L$ and question $q$ , we train $\theta$ to minimize the KL-divergence between the student and teacher predictions, which is equivalent to the objective
81
+
82
+ $$
83
+ \begin{array}{l} - \sum_ {i = 1} ^ {L} T _ {\text {s t a r t}} (c, q) _ {i} \log p _ {\theta} \left(a _ {\text {s t a r t}} = i \mid c, q\right) \\ + T _ {\mathrm {e n d}} (c, q) _ {i} \log p _ {\theta} \left(a _ {\mathrm {e n d}} = i \mid c, q\right) \tag {3} \\ \end{array}
84
+ $$
85
+
86
+ up to constants that do not depend on $\theta$ . We train for two epochs on the 80 million generated questions, which takes roughly 56 hours on 8 V100
87
+
88
+ GPUs, or roughly 19 GPU-days. $^4$ For efficiency, we process all questions for the same passage in the same batch, as encoding passages dominates runtime. For further details, see Appendix A.1.
89
+
90
+ # 3 Downstream Tasks
91
+
92
+ We evaluate QUIP on zero-shot paraphrase ranking, few-shot paraphrase classification, few-shot NER, and zero-shot sentiment analysis. Different tasks showcase different advantages of QUIP. For paraphrase detection and NER, QUIP succeeds by learning meaningful token-level contextualized representations for single passages, whereas MLM representations are trained to reconstruct uncontextualized word embeddings, and the cross-encoder QA model is trained to represent passage-question pairs. For NER and sentiment analysis, we prompt QUIP with questions, leveraging its question-answering abilities. Compared with a cross-encoder, QUIP's bi-encoder architecture enables a more efficient way to use question prompts in NER, and yields more reliable scores when questions are unanswerable in sentiment analysis. We focus on zero-shot and few-shot settings, as these require pre-trained models that are useful without fine-tuning on a large task-specific training dataset. QUIP addresses this need by anticipating what information might be useful for downstream tasks—namely, information found in question-answer pairs.
93
+
94
+ # 3.1 Paraphrase Ranking
95
+
96
+ We first evaluate QUIP token-level representations by measuring their usefulness for zero-shot paraphrase ranking. In this task, systems must rank sentence pairs that are paraphrases above pairs that are non-paraphrases, without any task-specific training data. We compute similarity scores using the $F_{\mathrm{BERT}}$ variant of BERTScore (Zhang et al., 2020), which measures cosine similarities between the representation of each token in one sentence and its most similar token in the other sentence. Given sentences $x_{1}$ and $x_{2}$ of lengths $L_{1}$ and $L_{2}$ , define
97
+
98
+ $$
99
+ B (x _ {1}, x _ {2}) = \frac {1}{L _ {1}} \sum_ {i = 1} ^ {L _ {1}} \max _ {1 \leq j \leq L _ {2}} \frac {r (x _ {1}) _ {i} ^ {\top} r (x _ {2}) _ {j}}{\| r (x _ {1}) _ {i} \| \| r (x _ {2}) _ {j} \|}.
100
+ $$
101
+
102
+ The $F_{\mathrm{BERT}}$ BERTScore is defined as the harmonic mean of $B(x_{1},x_{2})$ and $B(x_{2},x_{1})$ . Zhang et al. (2020) showed that BERTScore with RoBERTa is
103
+
104
+ useful for both natural language generation evaluation and paraphrase ranking. Since BERTScore uses token-level representations, we hypothesize that it should pair well with QUIP. As in Zhang et al. (2020), we use representations from the layer of the network that maximizes Pearson correlation between BERTScore and human judgments on the WMT16 metrics shared task (Bojar et al., 2016).
105
+
106
+ # 3.2 Paraphrase Classification
107
+
108
+ We use either frozen or fine-tuned QUIP representations for few-shot paraphrase classification, rather than ranking. Through these experiments, we can compare QUIP with existing work on few-shot paraphrase classification.
109
+
110
+ Frozen model. We train a logistic regression model that uses BERTScore with frozen representations as features. For a given pair of sentences, we extract eight features, corresponding to BERTScore computed with the final eight layers (i.e., layers 17-24) of the network. These layers encompass the optimal layers for both RoBERTa-large and QUIP (see §4.4). Freezing the encoder is often useful in practice, particularly for large models, as the same model can be reused for many tasks (Brown et al., 2020; Du et al., 2020).
111
+
112
+ Fine-tuning. For fine-tuning, we use the same computation graph and logistic loss function, but now backpropagate through the parameters of our encoder. For details, see Appendix A.2.
113
+
114
+ # 3.3 Named Entity Recognition
115
+
116
+ We also use QUIP for few-shot $^{5}$ named entity recognition, which we frame as a BIO tagging task. Since questions in QA often ask for entities of a specific type, we expect QUIP representations to contain rich entity type information. We add a linear layer that takes in token-level representations and predicts the tag for each token, and backpropagate log loss through the entire network. By default, the output layer is initialized randomly.
117
+
118
+ As a refinement, we propose using question prompts to initialize this model. The output layer is parameterized by a $T \times d$ matrix $M$ , where $T$ is the number of distinct BIO tags. The log-probability of predicting the $j$ -th tag for token $i$ is proportional to the dot product between the representation for token $i$ and the $j$ -th row of $M$ ; this resembles how
119
+
120
+ the bi-encoder predicts answers. Thus, we initialize each row of $M$ with the start head embedding of a question related to that row's corresponding entity tag. For instance, we initialize the parameters for the B-location and I-location tags with the embedding for "What is a location?" We normalize the question embeddings to have unit L2 norm. This style of initialization is uniquely enabled by our bi-encoder QA model, as it builds a single passage representation that can simultaneously answer questions corresponding to all entity types. It would be unclear how to use a language model or a cross-encoder QA model similarly, as it must perform a separate forward pass for each question (i.e., each entity type in this setting).
121
+
122
+ # 3.4 Zero-shot Sentiment Analysis
123
+
124
+ Finally, we use QUIP for zero-shot binary sentiment analysis. We reduce sentiment analysis to QA by writing a pair of questions that ask for a reason why an item is good or bad (e.g., "Why is this movie [good/bad]?"). We predict the label whose corresponding question has higher similarity with the QUIP representation of some token in the input. This prompting strategy has the additional benefit of extracting rationales, namely the span that the QUIP model predicts as the answer to the question. While we focus on sentiment analysis, extractive rationales have been used for a wide range of NLP tasks (DeYoung et al., 2020), suggesting that this method could be applied more broadly.
125
+
126
+ More formally, let $x$ be an input sentence and $(q_0, q_1)$ be a pair of questions (i.e., a prompt). For label $y \in \{0, 1\}$ , we compute a score for $y$ as
127
+
128
+ $$
129
+ \begin{array}{l} S (x, y) = \max _ {i} r (x) _ {i} ^ {\top} f _ {\text {s t a r t}} (q _ {y}) + \\ \max _ {i} r (x) _ {i} ^ {\top} f _ {\text {e n d}} \left(q _ {y}\right). \tag {4} \\ \end{array}
130
+ $$
131
+
132
+ This formula is a straightforward way to measure the extent to which some span in $x$ looks like the answer to the question $q_{y}$ , based on the model's pre-trained ability to perform QA. We predict whichever $y$ has the higher value of $S(x, y) - C_{y}$ , where $C_{y}$ is a calibration constant that offsets the model's bias towards answering $q_{0}$ or $q_{1}$ . Our inclusion of $C_{y}$ is inspired by Zhao et al. (2021), who recommend calibrating zero-shot and few-shot models with a baseline derived from content-free inputs to account for biases towards a particular label. To choose $C_{y}$ , we obtain a list $W$ of the ten most frequent English words, all of which convey no sentiment, and define $C_{y}$ as the mean over
133
+
134
+ $w \in W$ of $S(w, y)$ , i.e., the score when using $w$ as the input sentence (see Appendix A.4).
135
+
136
+ This method can succeed only if the model produces a lower score for unanswerable questions than answerable ones. For example, if the input passage is positive, the model must produce a lower score for "Why is it bad?", which not answerable (as the question contains a presupposition failure), than "Why is it good?", which presumably can be answered from the passage. We hypothesize that QUIP will indeed recognize that unanswerable questions should receive lower scores, as it is trained to make each span's representation far away from those of questions it does not answer. In contrast, the cross-encoder objective does not teach the model how to handle unanswerable questions.
137
+
138
+ # 4 Experiments
139
+
140
+ # 4.1 Experimental details
141
+
142
+ Datasets. For paraphrasing, we use four datasets: QQP (Iyer et al., 2017), MRPC (Dolan and Brockett, 2005), PAWS-Wiki, and PAWS-QQP (Zhang et al., 2019). The PAWS datasets were designed to be challenging for bag-of-words models, and thus test whether our representations are truly contextual or mostly lexical. For QQP and MRPC, we use the few-shot splits from Gao et al. (2021) that include 16 examples per class; for the PAWS datasets, we create new few-shot splits in the same manner. We report results on the development sets of QQP and MRPC (as test labels were not available), the test set of PAWS-Wiki, and the "dev-and-test" set of PAWS-QQP. For NER, we use two datasets: CoNLL 2003 (Tjong Kim Sang and De Meulder, 2003) and WNUT-17 (Derczynski et al., 2017). We use the few-shot splits from Huang et al. (2020) that include 5 examples per entity type. All few-shot experiments report an average over five random splits and seeds, following both Gao et al. (2021) and Huang et al. (2020). For sentiment analysis, we use two movie review datasets, SST-2 (Socher et al., 2013) and Movie Reviews (MR; Pang and Lee, 2005), as well as the Customer Reviews (CR) dataset (Hu and Liu, 2004). We evaluate on the SST-2 development set and the MR and CR test sets made by Gao et al. (2021).
143
+
144
+ Hyperparameter and prompt selection. Due to the nature of zero-shot and few-shot experiments, we minimize the extent to which we tune hyperparameters, relying on existing defaults and pre
145
+
146
+ viously published hyperparameters. For few-shot paraphrase classification, NER, and sentiment analysis, we developed our final method only using QQP, CoNLL, and SST-2, respectively, and directly applied it to the other datasets with no further tuning. We did measure zero-shot paraphrase ranking accuracy on all datasets during development of QUIP. For more details, see Appendix A.3.
147
+
148
+ For NER, we used the first question prompts we wrote for both CoNLL and WNUT, which all follow the same format, "Who/What is a/an [entity type]?" (see Appendix A.7 for all prompts). For sentiment analysis, we wrote six prompts (shown in Appendix A.9) and report mean accuracy over these prompts, to avoid pitfalls associated with prompt tuning (Perez et al., 2021). We use the same prompts for SST-2 and MR; for CR, the only change we make is replacing occurrences of the word "movie" with "product" to reflect the change in domain between these datasets.
149
+
150
+ # 4.2 Baselines and Ablations
151
+
152
+ To confirm the importance of all three stages of our pre-training pipeline, we compare with a number of baselines and ablations.
153
+
154
+ No question generation. We train the bi-encoder model directly on the MRQA training data ("Bi-encoder + MRQA"). We also include the cross-encoder teacher model trained on MRQA as a baseline ("Cross-encoder + MRQA"). These settings mirror standard intermediate task training (Phang et al., 2018; Pruksachatkun et al., 2020).
155
+
156
+ No teacher. We train the bi-encoder using the answer generated by the question generation model ("QUIP, no teacher"). If the generated answer is not a span in the passage, we consider the question unanswerable and treat the span containing the CLS token as the answer, as in Devlin et al. (2019).
157
+
158
+ Cross-encoder self-training. To test whether the bottleneck imposed by the bi-encoder architecture is crucial for QUIP, we also train a cross-encoder model on our generated data ("QUIP, cross-encoder student"). Since this student model has the same architecture as the teacher model, we train it to match the teacher's argmax predictions, a standard self-training objective (Lee, 2013; Kumar et al., 2020). Training is much less efficient for the cross-encoder than the bi-encoder, since batching questions about the same passage together does
159
+
160
+ <table><tr><td>Model</td><td>EM</td><td>F1</td></tr><tr><td>Lee et al. (2021)</td><td>78.3</td><td>86.3</td></tr><tr><td>Bi-encoder + UnsupervisedQA</td><td>17.4</td><td>24.9</td></tr><tr><td>Bi-encoder + MRQA</td><td>70.7</td><td>79.4</td></tr><tr><td>QuIP, no teacher</td><td>75.3</td><td>84.7</td></tr><tr><td>QuIP</td><td>85.2</td><td>91.7</td></tr><tr><td>BERT-large cross-encoder</td><td>84.2</td><td>91.1</td></tr><tr><td>Cross-encoder + MRQA</td><td>88.8</td><td>94.7</td></tr><tr><td>QuIP, cross-encoder student</td><td>89.5</td><td>94.8</td></tr></table>
161
+
162
+ Table 1: EM and F1 scores on the SQuAD development set for bi-encoder (top) and cross-encoder (bottom) models. QUIP outperforms the other bi-encoder model baselines, and even a cross-encoder BERT-large model. The RoBERTa cross-encoder models are better at QA, but will underperform QUIP on non-QA tasks.
163
+
164
+ not speed up training, so we train for a comparable number of GPU-hours (60 hours on 8 V100 GPUs).
165
+
166
+ Unsupervised QA. We test whether QUIP requires real QA data, or if a rough approximation suffices. We thus train a bi-encoder on 80 million pseudo-questions generated by applying noise to sentences ("Bi-encoder + UnsupervisedQA"), as in Lewis et al. (2019).
167
+
168
+ # 4.3 Bi-encoder Question Answering
169
+
170
+ While not our main focus, we first check that QUIP improves bi-encoder QA accuracy, as shown in Table 1. QUIP improves over Lee et al. (2021) by 5.4 F1 on the SQuAD development set. It also surpasses the reported human accuracy of 91.2 F1 on the SQuAD test set, as well as the best cross-encoder BERT-large single model from Devlin et al. (2019). QUIP greatly improves over baselines that directly train on MRQA data or do not use the teacher model. The cross-encoder models are more accurate at QA, but as we will show, this does not imply that cross-encoder QA is a better pretraining objective for downstream non-QA tasks. Appendix A.5 shows results on all MRQA development datasets.
171
+
172
+ # 4.4 Zero-shot Paraphrase Ranking
173
+
174
+ We validate our approach and study the effects of various ablations on zero-shot paraphrase ranking. The first half of Table 2 shows WMT development set Pearson correlations averaged across six to-English datasets, as in Zhang et al. (2020), along with the best layer for each model. QUIP reaches its optimal score at a later layer (20) than RoBERTa-large (17), which may suggest that the
175
+
176
+ <table><tr><td>Model</td><td>WMT r</td><td>WMT Best Layer</td><td>QQP</td><td>MRPC</td><td>PAWS-Wiki</td><td>PAWS-QQP</td></tr><tr><td>RoBERTa-large</td><td>.739</td><td>17</td><td>.763</td><td>.831</td><td>.698</td><td>.690</td></tr><tr><td>Cross-encoder + MRQA</td><td>.744</td><td>16</td><td>.767</td><td>.840</td><td>.742</td><td>.731</td></tr><tr><td>QUIP, cross-encoder student</td><td>.753</td><td>16</td><td>.769</td><td>.847</td><td>.751</td><td>.706</td></tr><tr><td>Bi-encoder + UnsupervisedQA</td><td>.654</td><td>11</td><td>.747</td><td>.801</td><td>.649</td><td>.580</td></tr><tr><td>Bi-encoder + MRQA</td><td>.749</td><td>15</td><td>.771</td><td>.807</td><td>.747</td><td>.725</td></tr><tr><td>QUIP, no teacher</td><td>.726</td><td>19</td><td>.767</td><td>.831</td><td>.780</td><td>.709</td></tr><tr><td>QUIP</td><td>.764</td><td>20</td><td>.809</td><td>.849</td><td>.830</td><td>.796</td></tr></table>
177
+
178
+ Table 2: Pearson correlation on WMT development data, best layer chosen based on WMT results, and AUROC on zero-shot paraphrase ranking using BERTScore. QUIP outperforms all baselines on all datasets.
179
+
180
+ QUIP training objective is more closely aligned with learning better representations than MLM.
181
+
182
+ The rest of Table 2 shows zero-shot paraphrase ranking results using BERTScore. QUIP improves substantially over RoBERTa on all four datasets, with an average improvement of .076 AUROC. The improvement is greatest on the PAWS datasets; since these datasets cannot be solved by lexical features alone, QUIP representations must be much more contextualized than RoBERTa representations. Training on Unsupervised QA data degrades performance compared to RoBERTa, showing that QUIP does not merely make word representations encode local context in a simple way. Training the bi-encoder directly on the MRQA dataset or without the teacher improves on average over RoBERTa, but QUIP greatly outperforms both baselines. The cross-encoder models also lag behind QUIP at paraphrase ranking, despite their higher QA accuracy; since the cross-encoders are trained to take passage-question pairs as inputs, their representations of single sentences are not as useful. Thus, we conclude that having real questions, accurate answer supervision, and a bi-encoder student model are all crucial to the success of QUIP.
183
+
184
+ # 4.5 Paraphrase Classification
185
+
186
+ Table 3 shows few-shot paraphrase classification results. As we studied QUIP-related ablations in the previous section, we focus on the comparison between QUIP and baselines based on MLM. First, we use RoBERTa-large embeddings in place of QUIP in our method. Second, we compare with LM-BFF (Gao et al., 2021), which pairs RoBERTa-large with MLM-style prompts. We use LM-BFF with manually written prompts and demonstrations, which was their best method on QQP by 2.1 F1 and was 0.3 F1 worse than their best method on MRPC. QUIP used as a frozen encoder is competitive with LM-BFF on QQP and outperforms it by 6.1 F1 on MRPC, 11.2 F1 on PAWS-Wiki, and 12.1 F1 on
187
+
188
+ PAWS-QQP. Fine-tuning QUIP gives additional improvements on three of the four datasets, and outperforms fine-tuning RoBERTa by an average of 6.9 F1.
189
+
190
+ # 4.6 Named Entity Recognition
191
+
192
+ Table 4 shows few-shot NER results on the CoNLL and WNUT datasets. QUIP improves over RoBERTa-large by 11 F1 on CoNLL and 2.9 F1 on WNUT when used with a randomly initialized output layer. We see a further improvement of 4 F1 on CoNLL and 7.4 F1 on WNUT when using question embeddings to initialize the output layer. Using the cross-encoder trained directly on QA data is roughly as good as QUIP when using randomly initialized output layers, but it is incompatible with question embedding initialization.
193
+
194
+ # 4.7 Sentiment Analysis
195
+
196
+ Table 5 shows zero-shot accuracy on our three sentiment analysis datasets. We compare with zero-shot results for LM-BFF (Gao et al., 2021) $^6$ and reported zero-shot results from Zhao et al. (2021) using GPT-3 with Contextual Calibration (CC) on SST-2. QUIP using an average prompt outperforms zero-shot LM-BFF by 5.4 points, averaged across the three datasets. Choosing the best prompt on SST-2 and using that for all datasets improves results not only on SST-2 but also MR, and maintains average accuracy on CR. Using the cross-encoder student QA model with the same prompts leads to worse performance: we hypothesize that the bi-encoder succeeds due to its better handling of unanswerable questions. Overall, these results show that question answering can provide a viable interface for building models that perform non-QA tasks.
197
+
198
+ Table 6 shows rationales extracted from random SST-2 examples for which QUIP was correct with the best prompt for SST-2 ("What is the reason
199
+
200
+ <table><tr><td>Model</td><td>Fine-tuned?</td><td>QQP</td><td>MRPC</td><td>PAWS-Wiki</td><td>PAWS-QQP</td></tr><tr><td>LM-BFF (reported)</td><td>Fine-tuned</td><td>69.80.8</td><td>77.80.9</td><td>-</td><td>-</td></tr><tr><td>LM-BFF (rerun)</td><td>Fine-tuned</td><td>67.10.9</td><td>76.51.5</td><td>60.70.7</td><td>50.12.8</td></tr><tr><td>RoBERTa-large</td><td>Frozen</td><td>64.40.4</td><td>80.60.7</td><td>62.30.9</td><td>50.60.4</td></tr><tr><td>QUIP</td><td>Frozen</td><td>68.90.2</td><td>82.60.4</td><td>71.90.5</td><td>63.01.2</td></tr><tr><td>RoBERTa-large</td><td>Fine-tuned</td><td>64.90.7</td><td>84.40.3</td><td>65.70.3</td><td>50.90.8</td></tr><tr><td>QUIP</td><td>Fine-tuned</td><td>71.00.3</td><td>86.60.4</td><td>75.10.2</td><td>60.91.0</td></tr></table>
201
+
202
+ Table 3: F1 scores on few-shot paraphrase classification, averaged across five training splits (standard errors in subscripts). QUIP outperforms prior work (LM-BFF; Gao et al., 2021) as well as our own RoBERTa baselines.
203
+
204
+ <table><tr><td>Model</td><td>CoNLL</td><td>WNUT</td></tr><tr><td>Huang et al. (2020)</td><td>65.4</td><td>37.6</td></tr><tr><td>Standard init.</td><td></td><td></td></tr><tr><td>RoBERTa-large</td><td>59.02.4</td><td>39.30.6</td></tr><tr><td>Cross-encoder + MRQA</td><td>68.93.3</td><td>43.00.9</td></tr><tr><td>QUIP, cross-encoder student</td><td>63.43.3</td><td>39.41.7</td></tr><tr><td>Bi-encoder + UnsupervisedQA</td><td>58.22.6</td><td>26.01.0</td></tr><tr><td>Bi-encoder + MRQA</td><td>66.43.3</td><td>42.20.4</td></tr><tr><td>QUIP, no teacher</td><td>67.71.9</td><td>40.71.4</td></tr><tr><td>QUIP</td><td>70.02.4</td><td>42.20.5</td></tr><tr><td>Question prompt init.</td><td></td><td></td></tr><tr><td>Bi-encoder + UnsupervisedQA</td><td>62.73.3</td><td>30.40.8</td></tr><tr><td>Bi-encoder + MRQA</td><td>72.02.8</td><td>44.01.3</td></tr><tr><td>QUIP, no teacher</td><td>71.43.0</td><td>47.81.1</td></tr><tr><td>QUIP</td><td>74.02.4</td><td>49.60.5</td></tr></table>
205
+
206
+ this movie is [good/bad]?"). To prefer shorter rationales, we extract the highest-scoring span of five BPE tokens or less. The model often identifies phrases that convey clear sentiment. Appendix A.10 shows full examples and rationales.
207
+
208
+ # 4.8 Stability Analysis
209
+
210
+ We experimented with some design decisions that did not materially affect our results. Appendix A.6 shows results for three such choices: including in-batch negative passages (Lee et al., 2021), using the argmax prediction of the teacher rather than soft labels, and using beam search to generate a diverse set of answers followed by one high-likelihood question per answer. We take these findings as evidence that our basic recipe is stable to many small changes. For question generation, we hypothesize that the objective of matching the cross-encoder teacher model encourages the bi-encoder to learn important features identified by the cross-encoder, even on questions that are not entirely well-formed.
211
+
212
+ Table 4: F1 scores on few-shot NER, averaged over five training splits (standard errors in subscripts). QUIP with question prompts performs best on both datasets.
213
+
214
+ <table><tr><td>Model</td><td>SST-2</td><td>MR</td><td>CR</td></tr><tr><td>CC + GPT-3</td><td>71.6</td><td>-</td><td>-</td></tr><tr><td>LM-BFF</td><td>83.6</td><td>80.8</td><td>79.5</td></tr><tr><td>QuIP (average)</td><td>87.90.6</td><td>81.90.4</td><td>90.30.2</td></tr><tr><td>w/ cross-enc. student</td><td>83.30.4</td><td>78.50.4</td><td>88.90.3</td></tr><tr><td>QuIP (tune on SST-2)</td><td>89.6</td><td>83.1</td><td>90.4</td></tr></table>
215
+
216
+ Table 5: Zero-shot accuracy on sentiment analysis. Third and fourth rows show mean accuracy across six prompts (standard error in subscripts). QUIP with an average prompt outperforms prior work; using the best prompt on SST-2 helps on all datasets.
217
+
218
+ <table><tr><td>Label</td><td>Rationale</td></tr><tr><td>-</td><td>“too slim”, “stale”, “every idea”, “wore out its welcome”, “unpleasant viewing experience”, “lifeless”, “plot”, “amateurishly assembled”, “10 times their natural size”, “wrong turn”</td></tr><tr><td>+</td><td>“packed with information and impressions”, “slash-and-hack”, “tightly organized efficiency”, “passion and talent”, “best films”, “surprises”, “great summer fun”, “play equally well”, “convi-tions”, “wickedly subversive bent”</td></tr></table>
219
+
220
+ Table 6: Rationales extracted by QUIP on ten random examples for each label from SST-2.
221
+
222
+ # 5 Discussion and Related Work
223
+
224
+ We build on work in question generation and answering, pre-training, and few-shot learning.
225
+
226
+ # 5.1 Question Generation
227
+
228
+ Neural question generation has been well-studied for different purposes (Du et al., 2017; Du and Cardie, 2018; Zhao et al., 2018; Lewis and Fan, 2019; Alberti et al., 2019; Puri et al., 2020; Lewis et al., 2021; Bartolo et al., 2021). We use generated questions to learn general-purpose representations. We also show that a relatively simple strategy of generating the answer and question together with a single model can be effective; most prior work uses separate answer selection and question generation models.
229
+
230
+ Phrase-indexed Question Answering Phrase-indexed question answering is a paradigm for open-
231
+
232
+ domain QA that retrieves answers by embedding questions and candidate answers in a shared embedding space (Seo et al., 2018, 2019; Lee et al., 2020). It requires using a bi-encoder architecture for efficient phrase retrieval. Especially related is Lee et al. (2021), which also uses question generation and a cross-encoder teacher model to improve phrase-indexed QA, though they focus on improving QA accuracy rather than transfer to other tasks. Our results reinforce prior observations that bi-encoder models are usually less accurate at QA than cross-encoders (see Table 1). However, the bi-encoder model transfers better to settings that require a contextualized representation of a single passage; the cross-encoder instead optimizes for producing representations of passage-question pairs.
233
+
234
+ # 5.2 Improving question answering
235
+
236
+ While we use QA to aid pre-training, related work aims to improve accuracy on QA. Ram et al. (2021) propose a span extraction pre-training objective that enables few-shot QA. Khashabi et al. (2020) run multi-task training on many QA datasets, both extractive and non-extractive, to improve QA accuracy.
237
+
238
+ # 5.3 Learning contextual representations
239
+
240
+ Pre-training on unlabeled data has yields useful contextual representations (Peters et al., 2018; Devlin et al., 2019), but further improvements are possible using labeled data. Intermediate task training (Phang et al., 2018) improves representations by training directly on large labeled datasets. Muppet (Aghajanyan et al., 2021) improves models by multi-task pre-finetuning on many labeled datasets.
241
+
242
+ Most similar to our work, QuASE (He et al., 2020) uses extractive QA to pre-train a BERT paragraph encoder. Our work improves upon QuASE in multiple ways. First, we use question generation and knowledge distillation to greatly improve over directly training on labeled data, the approach used by QuASE. Second, we propose multiple ways of leveraging question-based task descriptions to improve accuracy in zero-shot and few-shot settings, thus showing how the QA format can be used as a model-building interface for non-QA tasks; QuASE only uses their model as a feature extractor. Moreover, since the architecture of QuASE involves a more complex interaction layer than our bi-encoder, it would not be possible to use question prompts to initialize final-layer parameters, as we do for NER.
243
+
244
+ Other work has used methods similar to ours to learn vector representations of full sentences. Reimers and Gurevych (2019) train sentence embeddings for sentence similarity tasks using natural language inference data. Thakur et al. (2021) train a sentence embedding bi-encoder to mimic the predictions of a cross-encoder model. We learn token-level representations, rather than a single vector for a sentence, and thus use token-level supervision from extractive QA.
245
+
246
+ # 5.4 Few-shot learning
247
+
248
+ We study few-shot learning without access to unlabeled data, following most recent work (Brown et al., 2020; Gao et al., 2021; Zhao et al., 2021). Schick and Schütze (2021) notably propose a semi-supervised approach that uses unlabeled data for knowledge distillation; this process does not improve accuracy, but mainly improves efficiency. Moreover, large-scale unlabeled data may not be easily obtainable for all tasks, and utilizing such data increase computation time in the fine-tuning stage, so we focus on the setting without unlabeled data. The aforementioned work uses language models for few-shot learning by converting tasks to language modeling problems; we develop alternative methods for few-shot learning that use token-level representations and question-based prompts.
249
+
250
+ # 6 Conclusion
251
+
252
+ In this work, we pre-trained token-level contextual representations that are useful for downstream few-shot learning. Our key idea was to use question-answer pairs to define what information should be encoded in passage representations. We showed that these representations are useful for a variety of standard NLP tasks in zero- and few-shot settings, including paraphrase detection, named entity recognition, and sentiment analysis, across nine total datasets. Looking forward, we hope to see more work on designing pre-training objectives that align with downstream needs for few-shot learning.
253
+
254
+ # Acknowledgements
255
+
256
+ We thank Terra Blevins for investigating applications to word sense disambiguation, Jiaxin Huang for providing the few-shot NER splits used in their paper, and Douwe Kiela, Max Bartolo, Sebastian Riedel, Sewon Min, Patrick Lewis, Scott Yih, and our anonymous reviewers for their feedback.
257
+
258
+ # References
259
+
260
+ Armen Aghajanyan, Anchit Gupta, Akshit Shrivastava, Xilun Chen, Luke Zettlemoyer, and Sonal Gupta. 2021. Muppet: Massive multi-task representations with pre-finetuning. arXiv preprint arXiv:2101.11038.
261
+ Chris Alberti, Daniel Andor, Emily Pitler, Jacob Devlin, and Michael Collins. 2019. Synthetic QA corpora generation with roundtrip consistency. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 6168-6173, Florence, Italy. Association for Computational Linguistics.
262
+ Max Bartolo, Tristan Thrush, Robin Jia, Sebastian Riedel, Pontus Stenetorp, and Douwe Kiela. 2021. Improving question answering model robustness with synthetic adversarial data generation. arXiv preprint arXiv:2104.08678.
263
+ Ondrej Bojar, Yvette Graham, Amir Kamran, and Miloš Stanojevic. 2016. Results of the WMT16 metrics shared task. In Proceedings of the First Conference on Machine Translation: Volume 2, Shared Task Papers, pages 199-231, Berlin, Germany. Association for Computational Linguistics.
264
+ Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877-1901. Curran Associates, Inc.
265
+ Leon Derczynski, Eric Nichols, Marieke van Erp, and Nut Limsopatham. 2017. Results of the WNUT2017 shared task on novel and emerging entity recognition. In Proceedings of the 3rd Workshop on Noisy User-generated Text, pages 140-147, Copenhagen, Denmark. Association for Computational Linguistics.
266
+ 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.
267
+ Jay DeYoung, Sarthak Jain, Nazneen Fatema Rajani, Eric Lehman, Caiming Xiong, Richard Socher, and Byron C. Wallace. 2020. ERASER: A benchmark to
268
+
269
+ evaluate rationalized NLP models. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4443-4458, Online. Association for Computational Linguistics.
270
+ William B. Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005).
271
+ Jingfei Du, Myle Ott, Haoran Li, Xing Zhou, and Veselin Stoyanov. 2020. General purpose text embeddings from pre-trained language models for scalable inference. In *Findings of the Association for Computational Linguistics: EMNLP* 2020, pages 3018-3030, Online. Association for Computational Linguistics.
272
+ Xinya Du and Claire Cardie. 2018. Harvesting paragraph-level question-answer pairs from Wikipedia. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1907-1917, Melbourne, Australia. Association for Computational Linguistics.
273
+ Xinya Du, Junru Shao, and Claire Cardie. 2017. Learning to ask: Neural question generation for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1342-1352, Vancouver, Canada. Association for Computational Linguistics.
274
+ Dheeru Dua, Yizhong Wang, Pradeep Dasigi, Gabriel Stanovsky, Sameer Singh, and Matt Gardner. 2019. DROP: A reading comprehension benchmark requiring discrete reasoning over paragraphs. 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 2368-2378, Minneapolis, Minnesota. Association for Computational Linguistics.
275
+ Matthew Dunn, Levent Sagun, Mike Higgins, V. Ugur Guney, Volkan Cirik, and Kyunghyun Cho. 2017. SearchQA: A new Q&A dataset augmented with context from a search engine. arXiv preprint arXiv:1704.05179.
276
+ Adam Fisch, Alon Talmor, Robin Jia, Minjoon Seo, Eunsol Choi, and Danqi Chen. 2019. MRQA 2019 shared task: Evaluating generalization in reading comprehension. In Proceedings of the 2nd Workshop on Machine Reading for Question Answering, pages 1-13, Hong Kong, China. Association for Computational Linguistics.
277
+ Tianyu Gao, Adam Fisch, and Danqi Chen. 2021. Making pre-trained language models better few-shot learners. In Association for Computational Linguistics (ACL).
278
+
279
+ Matt Gardner, Jonathan Berant, Hannaneh Hajishirzi, Alon Talmor, and Sewon Min. 2019. Question answering is a format; when is it useful? arXiv preprint arXiv:1909.11291.
280
+ Hangfeng He, Qiang Ning, and Dan Roth. 2020. QuASE: Question-answer driven sentence encoding. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8743-8758, Online. Association for Computational Linguistics.
281
+ Luheng He, Mike Lewis, and Luke Zettlemoyer. 2015. Question-answer driven semantic role labeling: Using natural language to annotate natural language. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 643-653, Lisbon, Portugal. Association for Computational Linguistics.
282
+ Geoffrey Hinton, Oriol Vinyals, and Jeffrey Dean. 2015. Distilling the knowledge in a neural network. In NeurIPS Deep Learning and Representation Learning Workshop.
283
+ Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. 2020. The curious case of neural text degeneration. In International Conference on Learning Representations.
284
+ Minqing Hu and Bing Liu. 2004. Mining and summarizing customer reviews. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pages 168-177.
285
+ Jiaxin Huang, Chunyuan Li, Krishan Subudhi, Damien Jose, Shobana Balakrishnan, Weizhu Chen, Baolin Peng, Jianfeng Gao, and Jiawei Han. 2020. Few-shot named entity recognition: A comprehensive study. arXiv preprint arXiv:2012.14978.
286
+ Shankar Iyer, Nikhil Dandekar, and Kornél Csernai. 2017. First quora dataset release: Question pairs. https://www.quora.com/q/quoradata/First-Quora-Dataset-Release-Questic
287
+ Mandar Joshi, Eunsol Choi, Daniel Weld, and Luke Zettlemoyer. 2017. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1601-1611, Vancouver, Canada. Association for Computational Linguistics.
288
+ Aniruddha Kembhavi, Minjoon Seo, Dustin Schwenk, Jonghyun Choi, Ali Farhadi, and Hannaneh Hajishirzi. 2017. Are you smarter than a sixth grader? textbook question answering for multimodal machine comprehension. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5376-5384.
289
+ Daniel Khashabi, Sewon Min, Tushar Khot, Ashish Sabharwal, Oyvind Tafjord, Peter Clark, and Hannaneh Hajishirzi. 2020. UNIFIEDQA: Crossing format boundaries with a single QA system. In Findings of the Association for Computational Linguistics:
290
+
291
+ EMNLP 2020, pages 1896-1907, Online. Association for Computational Linguistics.
292
+ Ananya Kumar, Tengyu Ma, and Percy Liang. 2020. Understanding self-training for gradual domain adaptation. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 5468-5479. PMLR.
293
+ 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.
294
+ Guokun Lai, Qizhe Xie, Hanxiao Liu, Yiming Yang, and Eduard Hovy. 2017. RACE: Large-scale ReAding comprehension dataset from examinations. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 785-794, Copenhagen, Denmark. Association for Computational Linguistics.
295
+ Dong-Hyun Lee. 2013. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In ICML 2013 Workshop on Challenges in Representation Learning (WREPL).
296
+ Jinhyuk Lee, Minjoon Seo, Hannaneh Hajishirzi, and Jaewoo Kang. 2020. Contextualized sparse representations for real-time open-domain question answering. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 912-919, Online. Association for Computational Linguistics.
297
+ Jinhyuk Lee, Mujeen Sung, Jaewoo Kang, and Danqi Chen. 2021. Learning dense representations of phrases at scale. In Association for Computational Linguistics (ACL).
298
+ Omer Levy, Minjoon Seo, Eunsol Choi, and Luke Zettlemoyer. 2017. Zero-shot relation extraction via reading comprehension. In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), pages 333-342, Vancouver, Canada. Association for Computational Linguistics.
299
+ Mike Lewis and Angela Fan. 2019. Generative question answering: Learning to answer the whole question. In International Conference on Learning Representations.
300
+ Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020. BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics,
301
+
302
+ pages 7871-7880, Online. Association for Computational Linguistics.
303
+ Patrick Lewis, Ludovic Denoyer, and Sebastian Riedel. 2019. Unsupervised question answering by cloze translation. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4896-4910, Florence, Italy. Association for Computational Linguistics.
304
+ Patrick Lewis, Yuxiang Wu, Linqing Liu, Pasquale Minervini, Heinrich Kuttler, Aleksandra Piktus, Pontus Stenetorp, and Sebastian Riedel. 2021. Paq: 65 million probably-asked questions and what you can do with them. arXiv preprint arXiv:2102.07033.
305
+ 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.
306
+ Bryan McCann, Nitish Shirish Keskar, Caiming Xiong, and Richard Socher. 2018. The natural language decathlon: Multitask learning as question answering. arXiv preprint arXiv:1806.08730.
307
+ Julian Michael, Gabriel Stanovsky, Luheng He, Ido Dagan, and Luke Zettlemoyer. 2018. Crowdsourcing question-answer meaning representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 560-568, New Orleans, Louisiana. Association for Computational Linguistics.
308
+ Stephen Mussmann, Robin Jia, and Percy Liang. 2020. On the Importance of Adaptive Data Collection for Extremely Imbalanced Pairwise Tasks. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 3400-3413, Online. Association for Computational Linguistics.
309
+ 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.
310
+ F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. 2011. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825-2830.
311
+ Ethan Perez, Douwe Kiela, and Kyunghyun Cho. 2021. True few-shot learning with language models. arXiv preprint arXiv:2105.11447.
312
+
313
+ 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.
314
+ Jason Phang, Thibault Févry, and Samuel R Bowman. 2018. Sentence encoders on stilts: Supplementary training on intermediate labeled-data tasks. arXiv preprint arXiv:1811.01088.
315
+ Yada Pruksachatkun, Jason Phang, Haokun Liu, Phu Mon Htut, Xiaoyi Zhang, Richard Yuanzhe Pang, Clara Vania, Katharina Kann, and Samuel R. Bowman. 2020. Intermediate-task transfer learning with pretrained language models: When and why does it work? In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5231-5247, Online. Association for Computational Linguistics.
316
+ Raul Puri, Ryan Spring, Mohammad Shoeybi, Mostofa Patwary, and Bryan Catanzaro. 2020. Training question answering models from synthetic data. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 5811-5826, Online. Association for Computational Linguistics.
317
+ 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.
318
+ Ori Ram, Yuval Kirstain, Jonathan Berant, Amir Globerson, and Omer Levy. 2021. Few-shot question answering by pretraining span selection. In Association for Computational Linguistics (ACL).
319
+ Nils Reimers and Iryna Gurevych. 2019. SentenceBERT: Sentence embeddings using Siamese BERTnetworks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3982-3992, Hong Kong, China. Association for Computational Linguistics.
320
+ Amrita Saha, Rahul Aralikatte, Mitesh M. Khapra, and Karthik Sankaranarayanan. 2018. DuoRC: Towards complex language understanding with paraphrased reading comprehension. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1683-1693, Melbourne, Australia. Association for Computational Linguistics.
321
+ Timo Schick and Hinrich Schütze. 2021. It's not just size that matters: Small language models are also few-shot learners. In Proceedings of the 2021 Conference
322
+
323
+ of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2339-2352, Online. Association for Computational Linguistics.
324
+ Minjoon Seo, Tom Kwiatkowski, Ankur Parikh, Ali Farhadi, and Hannaneh Hajishirzi. 2018. Phrase-indexed question answering: A new challenge for scalable document comprehension. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 559-564, Brussels, Belgium. Association for Computational Linguistics.
325
+ Minjoon Seo, Jinhyuk Lee, Tom Kwiatkowski, Ankur Parikh, Ali Farhadi, and Hannaneh Hajishirzi. 2019. Real-time open-domain question answering with dense-sparse phrase index. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4430-4441, Florence, Italy. Association for Computational Linguistics.
326
+ 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.
327
+ Nandan Thakur, Nils Reimers, Johannes Daxenberger, and Iryna Gurevych. 2021. Augmented SBERT: Data augmentation method for improving bi-encoders for pairwise sentence scoring tasks. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 296–310, Online. Association for Computational Linguistics.
328
+ Erik F. Tjong Kim Sang and Fien De Meulder. 2003. Introduction to the CoNLL-2003 shared task: Language-independent named entity recognition. In Proceedings of the Seventh Conference on Natural Language Learning at HLT-NAACL 2003, pages 142-147.
329
+ Adam Trischler, Tong Wang, Xingdi Yuan, Justin Harris, Alessandro Sordoni, Philip Bachman, and Kaheer Suleman. 2017. NewsQA: A machine comprehension dataset. In Proceedings of the 2nd Workshop on Representation Learning for NLP, pages 191-200, Vancouver, Canada. Association for Computational Linguistics.
330
+ George Tsatsaronis, Georgios Balikas, Prodromos Malakasiotis, Ioannis Partalas, Matthias Zschunke, Michael R Alvers, Dirk Weissenborn, Anastasia Krithara, Sergios Petridis, Dimitris Polychronopoulos, Yannis Almirantis, John Pavlopoulos, Nicolas Baskiotis, Patrick Gallinari, Thierry Artieres, Axel Ngonga, Norman Heino, Eric Gaussier, Liliana Barrio-Alvers, Michael Schroeder, Ion Androutsopoulos, and Georgios Paliouras. 2015. An overview of the bioasq large-scale biomedical semantic indexing and question answering competition. BMC Bioinformatics, 16:138.
331
+
332
+ Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumont, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander Rush. 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, Online. Association for Computational Linguistics.
333
+ Qizhe Xie, Minh-Thang Luong, Eduard Hovy, and Quoc V. Le. 2020. Self-training with noisy student improves imagenet classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).
334
+ Yi Yang and Arzoo Katiyar. 2020. Simple and effective few-shot named entity recognition with structured nearest neighbor learning. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 6365-6375, Online. Association for Computational Linguistics.
335
+ Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. 2018. HotpotQA: A dataset for diverse, explainable multi-hop question answering. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2369-2380, Brussels, Belgium. Association for Computational Linguistics.
336
+ Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger, and Yoav Artzi. 2020. BERTScore: Evaluating text generation with bert. In International Conference on Learning Representations.
337
+ Yuan Zhang, Jason Baldridge, and Luheng He. 2019. PAWS: Paraphrase adversaries from word scrambling. 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 1298-1308, Minneapolis, Minnesota. Association for Computational Linguistics.
338
+ Tony Z. Zhao, Eric Wallace, Shi Feng, Dan Klein, and Sameer Singh. 2021. Calibrate before use: Improving few-shot performance of language models. arXiv preprint arXiv:2102.09690.
339
+ Yao Zhao, Xiaochuan Ni, Yuanyuan Ding, and Qifa Ke. 2018. Paragraph-level neural question generation with maxout pointer and gated self-attention networks. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3901–3910, Brussels, Belgium. Association for Computational Linguistics.
340
+
341
+ # A Appendix
342
+
343
+ # A.1 QuIP Details
344
+
345
+ We limit passages to 456 byte-pair encoding (BPE) tokens and questions to 50 so that the concatenation can fit comfortably within the 512 token context usable by the cross-encoder teacher. We create passages from our unlabeled text corpus by greedily selecting maximal chunks of contiguous sentences that fit within the BPE token limit. We pre-compute the teacher predictions $T_{\mathrm{start}}$ and $T_{\mathrm{end}}$ before bi-encoder training. To save space, we sparsify these vectors by only storing the eight largest predicted probabilities, treating all others as 0.
346
+
347
+ We conducted minimal hyperparameter tuning for QUIP. We used a learning rate of $1 \cdot 10^{-5}$ (default for most RoBERTa fine-tuning experiments<sup>7</sup>) and no gradient accumulation, which we found led to faster training.
348
+
349
+ # A.2 Paraphrase Fine-tuning Details
350
+
351
+ To fine-tune our model for paraphrase classification, we use two practices recommended by Mussmann et al. (2020), who also train a binary classification model that uses cosine similarity-based features derived from fine-tuned BERT embeddings. First, we disable dropout during training, as dropout artificially lowers all cosine similarities. Second, we use a larger learning rate on the final output layer than the Transformer parameters, by a factor of $10^{3}$ .
352
+
353
+ # A.3 Downstream Task Hyperparameter Details
354
+
355
+ For few-shot paraphrase detection with the frozen model, we use Scikit-learn's logistic regression implementation with default settings (Pedregosa et al., 2011). For fine-tuned paraphrase detection, we again use a learning rate of $1 \cdot 10^{-5}$ and train for 20 epochs, which we found to usually be sufficient for convergence on the training data. For NER, we use the default hyperparameters from the Huggingface transformers repository (Wolf et al., 2020), with the exception of decreasing the learning rate from $5 \cdot 10^{-5}$ to $2 \cdot 10^{-5}$ , which we found improved the RoBERTa baseline on CoNLL.
356
+
357
+ # A.4 Sentiment Analysis Calibration
358
+
359
+ To calibrate the zero-shot sentiment analysis model, we use ten content-free inputs: "the",
360
+
361
+ "be", "to", "of", "and", "a", "in", "that", "have", and "I". These were the top ten words listed on https://en.wikipedia.org/wiki/ Most_common_words_in_English. We only applied calibration for the main QUIP model, as we did not find calibration to improve results for either LM-BFF or the cross-encoder QA student model.
362
+
363
+ # A.5 Full QA results
364
+
365
+ Table 7 shows EM and F1 scores on the 12 development sets from the MRQA 2019 Shared Task (Fisch et al., 2019). These are divided into 6 in-domain datasets—HotpotQA (Yang et al., 2018), NaturalQuestions (Kwiatkowski et al., 2019), NewsQA (Trischler et al., 2017), SearchQA (Dunn et al., 2017), SQuAD (Rajpurkar et al., 2016), and TriviaQA (Joshi et al., 2017)—for which corresponding training data was used to train the question generation model and teacher, and 6 out-of-domain datasets—BioASQ (Tsatsaronis et al., 2015), DROP (Dua et al., 2019), DuoRC (Saha et al., 2018), RACE (Lai et al., 2017), RelationExtraction (Levy et al., 2017), and TextbookQA (Kembhavi et al., 2017)—for which no training data was used in the QUIP pipeline. QUIP improves over training the bi-encoder directly on the MRQA data by an average of $4.4\mathrm{~F}1$ on the in-domain datasets and $12.7\mathrm{~F}1$ on the out-of-domain datasets. It underperforms the cross-encoder teacher by about $5\mathrm{~F}1$ on both the in-domain and out-of-domain datasets on average.
366
+
367
+ # A.6 Stability Analysis
368
+
369
+ We experimented with some design decisions that did not materially affect our results. Here, we report these findings as evidence that our basic recipe is stable to many small changes. First, we concatenated the representations of all passages in the same batch and on the same GPU together (9 passages on average), and trained the model to extract answers from this larger pseudo-document; this effectively adds in-batch negative passages, as in Lee et al. (2021). Second, we trained the model to match the argmax prediction of the teacher, rather than its soft distribution over start and end indices. Finally, we used a two-stage beam search to generate questions. For a given passage, we generated 20 possible answers via beam search, chose 10 of these to maximize answer diversity, then generated one question for each answer with another beam search. Our goal was to ensure diversity by forcing
370
+
371
+ <table><tr><td>In-domain</td><td>HotpotQA</td><td>NaturalQ</td><td>NewsQA</td><td>SQuAD</td><td>SearchQA</td><td>TriviaQA</td><td>Average</td></tr><tr><td>Bi-encoder + UnsupervisedQA</td><td>9.5 / 16.6</td><td>8.0 / 15.5</td><td>7.6 / 14.4</td><td>17.5 / 25.0</td><td>15.4 / 21.1</td><td>17.6 / 23.3</td><td>12.6 / 19.3</td></tr><tr><td>Bi-encoder + MRQA</td><td>61.0 / 77.5</td><td>64.1 / 76.4</td><td>46.1 / 61.5</td><td>70.9 / 79.6</td><td>73.8 / 79.8</td><td>63.1 / 69.0</td><td>63.2 / 74.0</td></tr><tr><td>QUIP, no teacher</td><td>52.9 / 68.7</td><td>57.8 / 70.8</td><td>41.8 / 58.7</td><td>75.4 / 84.8</td><td>64.5 / 71.7</td><td>71.1 / 76.1</td><td>60.6 / 71.8</td></tr><tr><td>QUIP</td><td>61.3 / 77.9</td><td>63.7 / 77.2</td><td>52.4 / 68.7</td><td>85.3 / 91.8</td><td>68.7 / 76.8</td><td>72.0 / 78.1</td><td>67.2 / 78.4</td></tr><tr><td>Cross-encoder + MRQA</td><td>66.8 / 83.0</td><td>70.5 / 82.0</td><td>58.8 / 72.9</td><td>89.1 / 94.8</td><td>78.3 / 84.6</td><td>73.4 / 79.6</td><td>72.8 / 82.8</td></tr><tr><td>QUIP, cross-encoder student</td><td>66.3 / 82.3</td><td>66.5 / 79.4</td><td>54.4 / 70.5</td><td>89.6 / 94.9</td><td>72.1 / 80.1</td><td>73.4 / 79.8</td><td>70.4 / 81.2</td></tr><tr><td>Out-of-domain</td><td>BioASQ</td><td>DROP</td><td>DuoRC</td><td>RACE</td><td>RelationExt</td><td>TextbookQA</td><td>Average</td></tr><tr><td>Bi-encoder + UnsupervisedQA</td><td>15.3 / 19.2</td><td>5.9 / 9.5</td><td>14.1 / 17.4</td><td>6.5 / 11.4</td><td>12.7 / 22.1</td><td>8.9 / 13.3</td><td>10.6 / 15.5</td></tr><tr><td>Bi-encoder + MRQA</td><td>42.2 / 57.2</td><td>29.9 / 38.3</td><td>38.6 / 48.6</td><td>29.1 / 39.8</td><td>71.3 / 83.5</td><td>34.7 / 43.6</td><td>41.0 / 51.8</td></tr><tr><td>QUIP, no teacher</td><td>40.9 / 54.9</td><td>33.5 / 43.0</td><td>44.1 / 53.2</td><td>31.8 / 44.4</td><td>70.8 / 82.1</td><td>37.3 / 46.2</td><td>43.0 / 54.0</td></tr><tr><td>QUIP</td><td>51.3 / 67.5</td><td>46.2 / 57.1</td><td>53.0 / 63.2</td><td>39.6 / 53.4</td><td>75.5 / 86.0</td><td>50.2 / 60.0</td><td>52.6 / 64.5</td></tr><tr><td>Cross-encoder + MRQA</td><td>58.0 / 72.9</td><td>55.4 / 65.3</td><td>55.0 / 66.8</td><td>44.2 / 57.7</td><td>78.5 / 88.8</td><td>58.5 / 67.4</td><td>58.2 / 69.8</td></tr><tr><td>QUIP, cross-encoder student</td><td>57.3 / 72.6</td><td>57.5 / 68.3</td><td>56.2 / 67.5</td><td>44.8 / 58.6</td><td>79.5 / 89.1</td><td>58.4 / 67.3</td><td>59.0 / 70.6</td></tr></table>
372
+
373
+ Table 7: Exact match/F1 scores on the twelve development datasets from the MRQA 2019 shared task. The six in-domain datasets are on top; the six out-of-domain datasets are on bottom.
374
+
375
+ <table><tr><td>Model</td><td>SQuAD F1</td><td>Paraphrase AUROC</td><td>NER F1</td></tr><tr><td>QUIP</td><td>91.7</td><td>.821</td><td>61.8</td></tr><tr><td>+ concat. passages</td><td>91.7</td><td>.818</td><td>62.7</td></tr><tr><td>w/ hard labels</td><td>91.5</td><td>.814</td><td>62.5</td></tr><tr><td>w/ 2-stage beam search</td><td>91.7</td><td>.821</td><td>62.8</td></tr></table>
376
+
377
+ questions to be about different answers, while also maintaining high question quality. As shown in Table 8, these choices have a relatively minor impact on the results (within .007 AUROC and 1 F1 on NER).
378
+
379
+ # A.7 QA Prompts for NER
380
+
381
+ Table 9 shows the question prompts we use to initialize the NER model for CoNLL and WNUT. For entity types that occur in both datasets, and for the $\bigcirc$ tag, we always use the same question. We used the English description of the entity type provided by the dataset.
382
+
383
+ # A.8 Full training set NER
384
+
385
+ Table 10 shows NER results when training on the full training dataset. QUIP gives a 0.6 F1 improvement on WNUT, but has effectively the same accuracy on CoNLL.
386
+
387
+ # A.9 Sentiment Analysis QA Prompts
388
+
389
+ Table 11 shows the six prompts we use for sentiment analysis for the movie review datasets (SST-2 and MR). Each prompt consists of one question
390
+
391
+ Table 8: SQuAD development set F1, average zero-shot paraphrase ranking AUROC across all datasets, and average few-shot NER F1 using question prompts across both datasets for QUIP variants. Models shown here are all similarly effective.
392
+
393
+ <table><tr><td>Entity type</td><td>Question</td></tr><tr><td>Both datasets</td><td></td></tr><tr><td>O</td><td>“What is a generic object?”</td></tr><tr><td>Person</td><td>“Who is a person?”</td></tr><tr><td>Location</td><td>“What is a location?”</td></tr><tr><td>CoNLL</td><td></td></tr><tr><td>Organization</td><td>“What is an organization?”</td></tr><tr><td>Miscellaneous</td><td>“What is a miscellaneous entity?”</td></tr><tr><td>WNUT</td><td></td></tr><tr><td>Corporation</td><td>“What is a corporation?”</td></tr><tr><td>Product</td><td>“What is a product?”</td></tr><tr><td>Creative work</td><td>“What is a creative work?”</td></tr><tr><td>Group</td><td>“What is a group?”</td></tr></table>
394
+
395
+ Table 9: Question prompts used for the CoNLL and WNUT NER datasets.
396
+
397
+ <table><tr><td>Model</td><td>CoNLL</td><td>WNUT</td></tr><tr><td>RoBERTa-large</td><td>92.7</td><td>57.9</td></tr><tr><td>QuIP, standard</td><td>92.7</td><td>58.1</td></tr><tr><td>QuIP, QA prompts</td><td>92.8</td><td>58.8</td></tr></table>
398
+
399
+ Table 10: F1 scores on NER, using the entire training dataset.
400
+
401
+ for the positive label and one for the negative label. For CR, we use the same prompts except that we replace all instances of the word "movie" with "product".
402
+
403
+ # A.10 Sentiment Analysis Rationales
404
+
405
+ Tables 12, 13, and 14 show full examples and rationales extracted by our zero-shot sentiment analysis method for SST-2, MR, and CR, respectively. In all cases, we use the prompt that led to the highest accuracy on SST-2. For each dataset, we randomly sample ten examples of each label for which the model predicted the correct answer. We highlight in bold the span of $\leq 5$ BPE tokens that the model
406
+
407
+ <table><tr><td>#</td><td>Label</td><td>Question</td></tr><tr><td rowspan="2">1</td><td>+</td><td>&quot;Why is it good?&quot;</td></tr><tr><td>-</td><td>&quot;Why is it bad?&quot;</td></tr><tr><td rowspan="2">2</td><td>+</td><td>&quot;Why is this movie good?&quot;</td></tr><tr><td>-</td><td>&quot;Why is this movie bad?&quot;</td></tr><tr><td rowspan="2">3</td><td>+</td><td>&quot;Why is it great?&quot;</td></tr><tr><td>-</td><td>&quot;Why is it terrible?&quot;</td></tr><tr><td rowspan="2">4</td><td>+</td><td>&quot;What makes this movie good?&quot;</td></tr><tr><td>-</td><td>&quot;What makes this movie bad?&quot;</td></tr><tr><td rowspan="2">5</td><td>+</td><td>&quot;What is the reason this movie is good?&quot;</td></tr><tr><td>-</td><td>&quot;What is the reason this movie is bad?&quot;</td></tr><tr><td rowspan="2">6</td><td>+</td><td>&quot;What is the reason this movie is great?&quot;</td></tr><tr><td>-</td><td>&quot;What is the reason this movie is terrible?&quot;</td></tr></table>
408
+
409
+ Table 11: Question prompts used for sentiment analysis on movie review datasets (SST-2 and MR). Prompts used for CR are identical except for replacing "movie" with "product".
410
+
411
+ predicts best answers the question associated with the correct label. In some cases, the rationales correspond to clear sentiment markers. In other cases, they highlight an aspect of a movie or product that is criticized or praised in the review; these could be considered reasonable answers to a question like "Why is this movie bad?" even if the sentiment associated with them is unclear without the surrounding context. In future work, it would be interesting to find better ways to align the task of extractive QA and with the goal of producing rationales that are human-interpretable in isolation.
412
+
413
+ <table><tr><td>Label</td><td>SST-2 Example (rationale in bold)</td></tr><tr><td>-</td><td>“for starters, the story is just too slim.”
414
+ “paid in full is so stale, in fact, that its most vibrant scene is one that uses clips from brian de palma’s scarface.”
415
+ “(e) ventuallly, every idea in this film is flushed down the latrine of heroism.”
416
+ “corpus collosum – while undeniably interesting – wore out its welcome well before the end credits rolled about 45 minutes in.”
417
+ “makes for a pretty unpleasant viewing experience.”
418
+ “while (hill) has learned new tricks, the tricks alone are not enough to salvage this lifeless boxing film.”
419
+ “It’s hampered by a lifetime-channel kind of plot and a lead actress who is out of her depth.”
420
+ “dull, lifeless, and amateurishly assembled.”
421
+ “The movie is what happens when you blow up small potatoes to 10 times their natural size, and it ain’t pretty.”
422
+ “every time you look, sweet home alabama is taking anotherbummer of a wrong turn.”</td></tr><tr><td>+</td><td>“though only 60 minutes long, the film is packed with information and impressions.”
423
+ “good old-fashioned slash-and-hack is back!”
424
+ “with tightly organized efficiency, numerous flashbacks and a constant edge of tension, miller’s film is one of 2002’s involvingly adult surprises.”
425
+ “displaying about equal amounts of naivete, passion and talent, beneath clouds establishes sen as a filmmaker of considerable potential.”
426
+ “‘easily my choice for one of the year’s best films.’”
427
+ “‘a delectable and intriguing thriller filled with surprises, read my lips is an original.’”
428
+ “it is great summer fun to watch arnold and his buddy gerald bounce off a quirky cast of characters.”
429
+ “The film will play equally well on both the standard and giant screens.”
430
+ “for this reason and this reason only – the power of its own steadfast, hoity-toity convictions – chelsea walls deserves a medal.”
431
+ “There’s a wickedly subversive bent to the best parts of birthday girl.”</td></tr></table>
432
+
433
+ Table 12: Rationales (in bold) extracted by the zero-shot QuIP sentiment analysis model for SST-2. We show ten random examples for each label on which the model made the correct prediction.
434
+
435
+ <table><tr><td>Label</td><td>MR Example (rationale in bold)</td></tr><tr><td>-</td><td>“strangely comes off as a kingdom more mild than wild.”“feels like the work of someone who may indeed have finally aged past his prime . . . and , perhaps more than he realizes , just wants to be liked by the people who can still give him work.”“watching the powerpuff girls movie , my mind kept returning to one anecdote for comparison : the cartoon in japan that gave people seizures.”“this is a movie so insecure about its capacity to excite that it churns up not one but two flagrantly fake thunderstorms to underscore the action.”“witless , pointless , tasteless and idiotic.”“the next big thing&#x27;s not-so-big ( and not-so-hot ) directorial debut.”“unfortunately , it&#x27;s also not very good . especially compared with the television series that inspired the movie.”“irwin and his director never come up with an adequate reason why we should pay money for what we can get on television for free.”“with this new rollerball , sense and sensibility have been overrun by what can only be characterized as robotic sentiment.”“the video work is so grainy and rough , so dependent on being ‘naturalistic’ rather than carefully lit and set up , that it&#x27;s exhausting to watch.”</td></tr><tr><td>+</td><td>“the appearance of treebeard and gollum&#x27;s expanded role will either have you loving what you&#x27;re seeing , or rolling your eyes . i loved it ! gollum&#x27;s ‘performance’ is incredible !”“droll caper-comedy remake of &quot; big deal on madonna street &quot; that&#x27;s a sly , amusing , laugh-filled little gem in which the ultimate &quot; bellini &quot; begins to look like a &quot; real kaputschnik . ””“katz uses archival footage , horrified documents of lynchings , still photographs and charming old reel-to-reel recordings of meeropol entertaining his children to create his song history , but most powerful of all is the song itself”“a thunderous ride at first , quiet cadences of pure finesse are few and far between ; their shortage dilutes the potency of otherwise respectable action . still , this flick is fun , and host to some truly excellent sequences.”“compellingly watchable .”“an unbelievably fun film just a leading man away from perfection .”“andersson creates a world that&#x27;s at once surreal and disturbingly familiar ; absurd , yet tremendously sad .”“the invincible werner herzog is alive and well and living in la”“you can feel the heat that ignites this gripping tale , and the humor and humanity that root it in feeling .”“this is a terrific character study , a probe into the life of a complex man .”</td></tr></table>
436
+
437
+ Table 13: Rationales (in bold) extracted by the zero-shot QUIP sentiment analysis model for the Movie Reviews (MR) dataset. We show ten random examples for each label on which the model made the correct prediction.
438
+
439
+ <table><tr><td>Label</td><td>CR Example (rationale in bold)</td></tr><tr><td>-</td><td>“i’ve tried the belkin fm transmitter unit with it &amp; it worked well when i set it on top of a portable radio, but was awful trying to use in the car which is somewhat of a disappointment.”“but the major problem i had was with the software.”“after a week i tried to load some more songs and delete a few but the auto load didn’t do anything but turn on my player.”“2 . the scroll button is n ‘t the best , as it sometimes can be hard to select.”“iriver has a better fm receiver built in , but the drawback to iriver products is they are flimsy and poorly constructed.”“i would imagine this is a problem with any camera of a compact nature.”“the pictures are a little dark sometimes.”“the depth adjustment was sloppy.”“the instructions that come with it do n ‘t explain how to make things simple.”“my “fast forward ” button works , but it takes a little extra pressure on it to make it go.”</td></tr><tr><td>+</td><td>“i did not conduct a rigorous test , but just took some identical shots in identical lighting with both cameras , and the canon won hands down.”“as a whole , the dvd player has a sleek design and works fine.”“i , as many others , have waited for many years for the convergence of price , features , size and ease of use to hit that happy center point.”“+ i had no problem using musicmatch software already on my computer to load songs and albums onto this unit”“apex is the best cheap quality brand for dvd players.”“i chose this one because from what i read , it was the best deal for the money.”“the two-times optical zoom operates smoothly and quietly , and lo and behold , a two-piece shutter-like cap automatically slides closed over the lens when you turn the camera off.”“this camera is perfect for the person who wants a compact camera that produces excellent photos in just about any situation.”“it was easy enough to remove the front plate , and there was only one way the battery could be inserted.”“i have been very impressed with my purchase of the sd500 i bought it at the beginning of the month as the ultimate pocket camera and have shot 300 images so far with it.”</td></tr></table>
440
+
441
+ Table 14: Rationales (in bold) extracted by the zero-shot QUIP sentiment analysis model for the Customer Reviews (CR) dataset. We show ten random examples for each label on which the model made the correct prediction.
questionansweringinfusedpretrainingofgeneralpurposecontextualizedrepresentations/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85d30f42dfd905c3806f27a0092d214a9c8b3034e9ffc0d4eee57eafa154d05c
3
+ size 1117071
questionansweringinfusedpretrainingofgeneralpurposecontextualizedrepresentations/layout.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8650a0f475c94a5e431675d5d403d9dff5bb582441ed65c7fb32e1a6f35267f0
3
+ size 511860
questiongenerationforreadingcomprehensionassessmentbymodelinghowandwhattoask/3c9d33d5-9ea8-4716-a998-899cd4c4c14c_content_list.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0edbf50b7e6f17503a571f38f4c340e3a335a7667fae6d2c8716bcf0a14fa61a
3
+ size 105415
questiongenerationforreadingcomprehensionassessmentbymodelinghowandwhattoask/3c9d33d5-9ea8-4716-a998-899cd4c4c14c_model.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e3d2ef4157e6145b55800f54d4b247715505dd218abf1a024b5fc12187f0d6b0
3
+ size 134183